Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 8 years ago

Last modified 3 years ago

#5655 closed defect (bug) (no action required)

Translation Problem

Reported by: wpleo's profile wpleo Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Cc:

Description

I got this bp-custom.php:

define( ‘BPLANG’, ‘pt-br’ );
if ( file_exists( WP_LANG_DIR . ‘/buddypress-’ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, WP_LANG_DIR . ‘/buddypress-’ . BPLANG . ‘.mo’ );
echo “FOUND IT!!”;
}

I’m pretty sure that this fil is being read and that the language file is being found because of the flag that I put: “FOUND IT!!”. In fact everything is being translated but the titles! No title got the proper translation, like:

http://astronomia.blog.br/forum-astronomia/atividades/ (Sitewide Activity)
http://astronomia.blog.br/forum-astronomia/pessoas/ (Members)
http://astronomia.blog.br/forum-astronomia/grupos/ (Groups)

Each one of these expressions is translated in the .po and .mo, acording to Loco Translate.

Already deleted the pages and re-created it but nothing.

I’m still trying, if I find a solution I’ll post it here.

Thanks for the help!

Attachments (2)

Screenshot_11.png (23.2 KB) - added by Viva-Xrizzy 10 years ago.
pt_BR_buddypress language.zip (206.3 KB) - added by danbp 10 years ago.
2 copy of pt_br po/mo from 2 diff days, with diff headers

Download all attachments as: .zip

Change History (21)

#1 in reply to: ↑ description @Viva-Xrizzy
10 years ago

  • Owner set to Viva-Xrizzy
  • Status changed from new to assigned

Replying to wpleo:

I am facing the same problem with my German Site.

Thank you in advance for looking into this.

Xrizzy

#2 @Viva-Xrizzy
10 years ago

  • Owner Viva-Xrizzy deleted

#3 follow-up: @boonebgorges
10 years ago

These page titles can be edited in Dashboard > Pages, in the same way you would edit other page titles.

Can you please give additional details about your site? Are these new sites, or upgrades from a previous version of BP?

#4 in reply to: ↑ 3 @Viva-Xrizzy
10 years ago

Replying to boonebgorges:

These page titles can be edited in Dashboard > Pages, in the same way you would edit other page titles.

Can you please give additional details about your site? Are these new sites, or upgrades from a previous version of BP?

Thank you for your assistance boonegorges :)

It is a new Site using WordPress 3.8.2 with Theme Spacious and BuddyPress 2.0.1.
The Site is in German using the Wordpress and BuddyPress Language Files.
The page title I set in Dashboard> Pages is displayed correctly when BuddyPress is NOT ACTIVATED. As soon as I activate it everything is in German except the page title. (Please see attachement Screenshot_11.png)

#5 follow-up: @boonebgorges
10 years ago

Thanks. But I am confused: what do you see when you look at Dashboard > Pages now? Do you see 'Members', or 'Mitgliedern'?

#6 in reply to: ↑ 5 @Viva-Xrizzy
10 years ago

Replying to boonebgorges:

Thanks. But I am confused: what do you see when you look at Dashboard > Pages now? Do you see 'Members', or 'Mitgliedern'?

Thanks to you for looking into this.

In Dashboard > Pages I see "Mitglieder" as it should be.

#7 @boonebgorges
10 years ago

  • Component changed from Template Pack to i18n
  • Milestone changed from BuddyPress.org to 2.0.2

Marked #5700 as a duplicate.

In that ticket, it was suggested that _x() might be the problem; when switching to using __(), the titles were translated.

This suggests to me that the problem is out-of-date language files. Can I ask someone who is experiencing this problem (Viva-Xrizzy or wp-leo) to say more about their language files (mo/po)? Are they custom built, or are you using the ones from wordpress.org? If you installed them manually, how and when did you do it? Or did these files install automatically for you? Could one of you upload your .po file so I can examine the headers?

(FWIW, when I download the pt_BR dev .mo directly from translate.wordpress.org, it was working properly.)

DJPaul or others who may understand the Glotpress workflow better - is it possible that this is being caused by the fact that we have to 2.0.x branch here? http://translate.wordpress.org/projects/buddypress/

#8 @danbp
10 years ago

here's my pt_BR po header

# Translation in Portuguese (Brazil)
msgid ""
msgstr ""
"Project-Id-Version: BuddyPress 2.0.1\n"
"Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
"POT-Creation-Date: 2014-04-15 14:30:37+00:00\n"
"PO-Revision-Date: 2014-06-09 23:18+0100\n"
"Last-Translator: dan <danco38@gmail.com>\n"
"Language-Team: Dan <danco38@gmail.com>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
"X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Generator: Poedit 1.5.7\n"
"X-Poedit-SearchPath-0: ..\n"

Surprisingly, when i opened my languages/plugins/ directory, i found 2 copies of pt_BR po/mo
This arrived also several times during my debug work.

This is the po header of the second, apparently from glotpress automate update service. Hum ?!!!

# Translation of Development in Portuguese (Brazil)
# This file is distributed under the same license as the Development package.
msgid ""
msgstr ""
"PO-Revision-Date: 2013-08-02 02:07:58+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: GlotPress/0.1\n"
"Project-Id-Version: Development\n"

In the same directory, i have also my fr_FR copy. Untouched and unique.

So i have 2 version of pt_BR and i played with them.
Apparently, the glotpress version works properly while the one i used for my test doesn't work anymore !

Last edited 10 years ago by danbp (previous) (diff)

@danbp
10 years ago

2 copy of pt_br po/mo from 2 diff days, with diff headers

#9 @danbp
10 years ago

Debug in progress...

i changed the po header from the glotpress version to mine made with poedit: BP isn't translated at all.
i used the glotpress version: BP is translated but NOT the directories titles.

i moved the poedit version outside the /languages/plugins/folder and let the glotpress version. BP is in english
Added the poedit version - 2 copies now: BP is translated !
But not the directories titles

Also tried with the poedit version in the plugins folder and the glotpress version in the languages folder (and vice versa): BP is translated but not the titles

Aside there also other strings witch are not translated.

#: bp-groups/bp-groups-template.php:932
msgid "Viewing group %1$s to %2$s (of %3$s groups)"
msgstr "Visualizando grupos %1$s até %2$s (de %3$s grupos)"

#: bp-members/bp-members-template.php:347
msgid "Viewing member %1$s to %2$s (of %3$s active members)"
msgstr "Visualizando membros %1$s até %2$s (de %3$s membros ativos)"

#: bp-core/bp-core-admin.php:385
msgid "Activity auto-refresh"
msgstr "Ativar auto-atualizar"

Last edited 10 years ago by danbp (previous) (diff)

#10 @boonebgorges
10 years ago

Thanks very much, danbp. The files you provided gave me some helpful hints.

I believe I've tracked this down to a problem in the wordpress.org translation update API. I've opened a ticket for it https://meta.trac.wordpress.org/ticket/511 and will update here as more details emerge.

#11 follow-up: @danbp
10 years ago

Thank you Boone, glad to read your ticket on meta trac and Nacin's answer to it.
And when the API is out, i hope we'll also have an easy way to activate/deactivate such silent updates without any control over a long translation work (in some case files where overwritten in the languages folder).

buddypress-pt_BR i uploaded yesterday contained 1 error(a \n) detected by poedit.

#12 @DJPaul
10 years ago

  • Milestone changed from 2.0.2 to Future Release

#13 in reply to: ↑ 11 @netweb
10 years ago

Replying to danbp:

And when the API is out, i hope we'll also have an easy way to activate/deactivate such silent updates without any control over a long translation work (in some case files where overwritten in the languages folder).

add_filter( 'auto_update_translation', '__return_false' );

In theory the above should work to disable automatic updates for translations, but, per #WP28572, this is not the case at the moment, I'd suggest also keeping an eye on that ticket.

#14 @Nettimedia
10 years ago

I have same problem here!
I cannot translate even via WPML, all words will not be translated!

#15 follow-up: @Adjunkten
10 years ago

I see the same problem with Danish translation:

'Site-wide activity' , 'Members', 'Groups' won't translate.

I have the buddypress translations plugin enabled

#16 in reply to: ↑ 15 @danbp
10 years ago

Replying to Adjunkten:

I see the same problem with Danish translation:

'Site-wide activity' , 'Members', 'Groups' won't translate.

I have the buddypress translations plugin enabled

Remove the define(WP_LANG) in wp-config.php. This is no more used by WP 4.x
More here: https://buddypress.org/support/topic/french-language-help/

#17 @Adjunkten
10 years ago

Hi Dan, thanks for helping me.

I have deleted the 'define (WP_LANG)' line in wp.config.php.
I have uploaded my language files to /languages/plugins (they were located and checked permissions are ok.

Still, the 3 above mentioned titles on default BP-pages won't translate...

#18 @DJPaul
8 years ago

  • Component changed from Locale - i18n to I18N

#19 @r-a-y
8 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from assigned to closed

The problem appears to be a configuration problem in translation programs that are not properly configured to use WordPress keywords like _x.

If you're using PoEdit, check out the following tutorial (pay close attention to the "Keywords lists, WordPress functions, whaaaaaa?" section):
http://www.cssigniter.com/ignite/wordpress-poedit-translation-secrets/

Going to mark this as invalid, but if you are still experiencing problems, feel free to continue replying.

Note: See TracTickets for help on using tickets.