Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#2555 closed enhancement (fixed)

Texts are not (properly) translated (bp-core-templatetags.php)

Reported by: helpy Owned by: sorich87
Priority: normal Milestone: 1.5
Component: Core Version:
Severity: Keywords: needs-patch
Cc: gigalinux@…, Bountin

Description

Hello,

Have a look at the lines 926 and 928 in bp-core-templatetags.php:

The german translation depending on the loaded page is:

+ “Members Verzeichnis” … instead of: “Mitgliederverzeichnis” (engl.: “Members Directory”)
+ “Groups Verzeichnis” … instead of: “Gruppenverzeichnis” (engl.: “Groups Directory”)

For a proper translation, you should think about changing the source code! In german language “Mitgliderverzeichnis” (Members Directory) is ONE word! Therefore with the present code line …

$title = sprintf( __( ‘%s Directory’, ‘buddypress’ ), ucwords( BP_MEMBERS_SLUG ) );

Besides the that the words "groups, members, ..." will not be translated, it ist not possible to translate it properly! It is the same with other directory pages!

cu, guido

Attachments (3)

2555.patch (1.3 KB) - added by sorich87 3 years ago.
2555.diff (1.5 KB) - added by sorich87 2 years ago.
Removes "Directory"
patch_bp_gettext.txt (1.1 KB) - added by Bountin 2 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 follow-up: ↓ 2   helpy3 years ago

  • Milestone changed from 1.2.6 to 1.2.5

comment:2 in reply to: ↑ 1   helpy3 years ago

Sorry! I thought that "milestone" is the version where I found this issue.

@developers ... please change it to whatever fits your plans!

  • Milestone changed from 1.2.5 to 1.2.6
  • Keywords has-patch added; I18N, L10N, Internationalization, localization removed
  • Owner set to sorich87
  • Status changed from new to accepted
  • Milestone changed from 1.2.6 to 1.3

This works for core components, but not for external root components like Events, etc...

Bumping to 1.3 because this function needs a sweep anyhow.

  • Summary changed from Texts are not (properly) translated (bp-core-templatetags.php) to [patch] Texts are not (properly) translated (bp-core-templatetags.php)

I already had reported that bug and provided a patch that worked with plugins, too, but was marked as invalid :/ see #1364

  • Cc gigalinux@… added
  • Keywords needs-patch added; has-patch removed
  • Summary changed from [patch] Texts are not (properly) translated (bp-core-templatetags.php) to Texts are not (properly) translated (bp-core-templatetags.php)

We need to think about this again for BP 1.3. The components now exists as a Page in the posts table. We need to be pulling in those pages' name from the database to accomodate users who want to rename the pages via the wp-admin. This will unfortunately lead back to the two-word translation problem that this ticket and #1364 has highlighted.

Using "groups directory" as an example, as that phrase only appears on the page template itself and in the page title, what about just using "groups" in the title, i.e. dropping "... directory"? That'd take care of both issues.

+1 on removing the word 'Directory' altogether.

Removes "Directory"

  • Cc Bountin added

Some lines above there is a similar problem because $bp->current_component isn't gettext'd (see patch suggestion)

Last edited 2 years ago by Bountin (previous) (diff)

Bountin2 years ago

  • Resolution set to duplicate
  • Status changed from accepted to closed

Closing this ticket in favour of #2595, as the two are effectively the same.

  • Resolution changed from duplicate to fixed

(In [4194]) Improve page title i18n. Fixes #2595, #2555. Props for initial patches to SergeyBiryukov? and sorich87.

Also fixes a couple of possible PHP notices.

Note: See TracTickets for help on using tickets.