#4631 closed defect (bug) (fixed)
Translation string "%s Directory" isn't good
Reported by: | DanielJuhl | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | 1.6.1 |
Component: | I18N | Keywords: | has-patch 2nd-opinion |
Cc: |
Description
http://buddypress.trac.wordpress.org/browser/trunk/bp-core/bp-core-filters.php#L386
http://buddypress.trac.wordpress.org/browser/trunk/bp-core/bp-core-filters.php#L388
"%s Directory" is used to make page titles like "Activity Directory", "Groups Directory" and "Members Directory" etc.,
The issue is that in danish "User Groups" would be "Brugergrupper" and "Members" would be "Medlemmer", but "User Groups Directory" would be "Brugergruppeoversigt" (or maybe just "Gruppeoversigt") and "Members Directory" would be "Medlemsoversigt".
It would be better to use the same strings/translations for the page title as the headline eg. "Groups Directory" and "Members Directory".
Attachments (2)
Change History (14)
#3
@
12 years ago
- Milestone changed from 1.8 to 1.9
I think the solution is each component with a directory title should be registering a 'directory_title' string in BP_Component::setup_globals()
(we would generate one automatically as we currently do for components that don't do so), and then we'd use that directory_title
string wherever we need to have a title for the component directory. Let's do this for 1.9.
#4
follow-up:
↓ 5
@
11 years ago
- Keywords has-patch added
- Milestone changed from 1.9 to 2.0
4631.patch is an example of what I mean (for the activity component).
I'm moving this out of the milestone because there are some further odd problems with the page title filter. From what I can see, it's not actually working - it's getting cancelled out by some other filter on wp_page_title, so that eg the Members directory title is actually 'Members' rather than 'Members Directory'. We'll have to debug this before the current issue can be resolved.
#5
in reply to:
↑ 4
@
11 years ago
- Keywords has-patch removed
The page title filter is getting re-set by the calls to bp_theme_compat_reset_post()
for each template, e.g. https://buddypress.trac.wordpress.org/browser/trunk/bp-activity/bp-activity-screens.php#L434
And it is indeed different from the title element in the HTML that the web browser tab picks up.
#6
@
11 years ago
- Keywords has-patch 2nd-opinion added
4631.02.patch is an updated patch that implements for Members, Activity, and Groups. It does change the current behavior by forcing the <title> element and the page title header element to be the same string. But to my mind, this is semantically correct anyway. And it's definitely a big translation improvement.
See also #4726
#7
@
11 years ago
Approach seems decent. My only comment is I'd suggest using _x
and providing context for this string __( 'Directory', 'buddypress' );
.
#8
@
11 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 8090:
#10
@
10 years ago
mineo - Your Poedit screenshot makes it look like your translation is out of date. It's possible that your language's translation is not fully up to date; check out https://translate.wordpress.org/projects/buddypress to learn more (and contribute missing translations).
#11
@
10 years ago
Ok, thank you. Issue is resolved. Maybe it help all newbies like me:
Do not copy old tranlated .po file, when is update of theme or plugin!!'''
When are new strings in new .po file, we need to merge old and new .po file.
This is the right way :)
Here is tutorial:
http://www.marketpressthemes.com/blog/how-to-merge-two-po-files-using-poedit/
Punting to 1.8. We've gone back and forth about these in almost every release.