Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#5925 closed defect (bug) (fixed)

buddypress.pot issue

Reported by: danbp's profile danbp Owned by:
Milestone: 2.3 Priority: high
Severity: major Version: 2.1
Component: I18N Keywords: reporter-feedback 2nd-opinion
Cc:

Description

several issues remains with the 2.1 pot file.

  • some strings are untranslated despite the translation exist (from a previous version for example)
  • when you create a new pot file from scratch with poEdit, using all possible keywords, you get an incredible number of new strings concerning bbpress.

This sounds like the whole plugin is reintroduced to BP.

  • if you download

zip from the wp repo, buddypress.pot is at the root of BP and if you read the header, you see

# Copyright (C) 2014 The BuddyPress Community
# This file is distributed under the GPLv2 or later (license.txt).
msgid ""
msgstr ""
"Project-Id-Version: BuddyPress 2.1\n"
"Report-Msgid-Bugs-To: https://buddypress.trac.wordpress.org\n"
"POT-Creation-Date: 2014-09-18 18:01:13+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: JOHN JAMES JACOBY <jjj@buddypress.org>\n"
"Language-Team: ENGLISH <jjj@buddypress.org>\n"
"X-Generator: grunt-wp-i18n 0.4.5\n"

Maybe correct, but unusual. Particulary if you compare this file with the pot file actually in the tagged version (r9015), the header contains

# Copyright (C) 2014 BuddyPress
# This file is distributed under the same license as the BuddyPress package.
msgid ""
msgstr ""
"Project-Id-Version: BuddyPress \n"
"Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
"POT-Creation-Date: 2014-09-14 11:30:39+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

This header is also correct, and in the form used with previous versions.

The tip to get a translation to work was to merge the previous version with the new one.

This means to take the po from 2.02 and to update it from the new pot coming with 2.1

Doing this generates untranslated strings. For example, the SWA page title or the buddybar View menu or the swa default filter - everything -, yet these are old !

If you update from source (a la poEdit) this pot file (coming with BP), you receive 1144 new strings !

And now, if you update the 2.02 po file with this pot file you get 1327 new strings and 135 obsolete. By details you have a 2.1 transaltion achieved to 50%, with 705 untranslated strings and 625 marked as fuzzy, for a total string number of 2668 !

As reminder, the 2.0.2 version translated to 100% contains only 1476 strings.

If this can help, here the header informations i use for the fr_FR translation.

msgid ""
msgstr ""
"Project-Id-Version: BuddyPress 2.0.2\n"
"POT-Creation-Date: 2014-10-03 13:57+0100\n"
"PO-Revision-Date: 2014-10-03 14:13+0100\n"
"Last-Translator: dan <danco38@gmail.com>\n"
"Language-Team: danbp\n"
"Language: fr\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: Poedit 1.5.7\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
"_n_noop: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-SearchPath-0: ..\n"

The most important information is the keyword list:

"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
"_n_noop: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"

Aside these issues, another problem for custom translation is the glotpress po file.
When you upload the po file, you get a header without any information. But a po file without a keywords list used by the software is a little more tendencious.

To resume the situation for 2.1, we have a wrong pot file shipped with BP and a uncomplete translation on glotpress who can't fit with 2.1... where 2.1 is not avaible in the project !

Change History (9)

#1 @boonebgorges
10 years ago

  • Keywords reporter-feedback added

This header is also correct, and in the form used with previous versions.

The .pot in the zip file at https://wordpress.org/plugins/buddypress/ (the "distribution" version) is generated as part of our Grunt-based build process. The .pot file in the tagged version (the "buddypress.svn" version) is created by the wordpress.org potbot. That's why the headers don't match. The versions that are in buddypress.svn will be removed at a future date. See #5920, #5621.

From my understanding, the different header format should not make a difference to how you translate the file. If I'm wrong about that, and the change in header format causes a problem for sites, please provide some additional details for testing.

Doing this generates untranslated strings. For example, the SWA page title or the buddybar View menu or the swa default filter - everything -, yet these are old !

A number of strings have changed in small ways in BP 2.1. See eg [8662] and [8705]. A reminder that moving from __() to _x() will produce a new entry in the .pot file.

If you update from source (a la poEdit) this pot file (coming with BP), you receive 1144 new strings !

If you are updating from source, you are probably including bp-forums/bbpress/. Either remove it before generating the .pot, or configure Poedit to ignore this directory (I'm not sure the latter is possible, but I assume it is).

When you upload the po file, you get a header without any information. But a po file without a keywords list used by the software is a little more tendencious.

Can you provide more information about this? I'm not sure I understand the problem.

a uncomplete translation on glotpress who can't fit with 2.1... where 2.1 is not avaible in the project !

There were some problems around the time that 2.1 was released regarding translate.wordpress.org synchronization. So we (mainly me and nacin) decided to feed the 2.1 language packs from the Development branch on GlotPress for now. We will create a 2.1.x branch soon. More background: https://irclogs.wordpress.org/chanlog.php?channel=buddypress-dev&day=2014-09-24&sort=asc#m241993 Sorry for not being clearer about this with translators - it has been a bit confusing on our end too.

==

Leaving this ticket open for feedback on the following:

  • whether the different header formats cause technical problems
  • clarification on the "you get a header without any information" problem

#2 @danbp
10 years ago

Thanks Boone,
i'm already aware of all you say, as i follow i18n issues and opened the ticket because @djpaul asked me to do so.

  • clarification on the "you get a header without any information" problem

When you export the glotpress po file, the header looks like this

# Translation of Development in French (France)
# This file is distributed under the same license as the Development package.
msgid ""
msgstr ""
"PO-Revision-Date: 2014-08-11 17:22:22+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"

With such a header you can't update the file locally from source because of the missing keywords.

  • whether the different header formats cause technical problems

Not sure it causes effect, i want only to show the existing difference in an apparently same process, despite the bot difference.

Now the really weird thing: bbpress.

Of course i haven't translated the new strings in the 2.1 fr_FR version, and almost anything goes well for now.
Of course i can ignore the folder, but this is not an answer, eighther a workaround. Why is bbpres suddenly, and so heavily, back ?

The stupid thing, at my level first, is that this version, like the previous since BP is on glotpress, is made by me and transfered to glotpress by xavier from the french WP Translate staff. So untill 2.1, buddypress fr_FR was always avaible as 100% translated a few hours after an upgrade.

If i leave the bbp part untranslated, people find a 50% completed translation.
If i remove this part from the file, people wil get missing strings.

I haven't found yet what exactly is malfunctionning, but i guess they are some strings belonging to BP and bbp who don't use the exact same disambiguation or so...

#3 @r-a-y
10 years ago

The most important information is the keyword list [in PoEdit - "X-Poedit-KeywordsList"]

When I was doing some testing with PoEdit based on the comments on the forums, I also found this to be the case.

Unfortunately, the grunt-wp-i18n script and the one powered by GlotPress does not add specific PoEdit headers into the translation file.


And now, if you update the 2.02 po file with this pot file you get 1327 new strings and 135 obsolete.

I'll try and do some further testing with taking a completed 2.0.2 translation file and merging it with the 2.1 pot file and see if I can duplicate some of your issues.


Now the really weird thing: bbpress.

Why is bbpres suddenly, and so heavily, back ?

If you used PoEdit on the release version directory of BuddyPress, it probably included the /bp-forums/bbpress/ folder.

I just checked the .pot file for v2.1 on the wp.org repo:
https://plugins.trac.wordpress.org/export/1001387/buddypress/tags/2.1/buddypress.pot

And it doesn't include the older legacy forum strings. Nor does the one from translate.wordpress.org.


danbp - From your description, it looks like you are using an older version of PoEdit. This might not make a difference, but can you try upgrading as there might have been some bugs related to the older version?

#4 @danbp
10 years ago

Good advice @r-a-y ! Wanted to update poEdit since a while.

i updated poEdit to 1.6.9 and got a message telling i was using an unusual plural form for french language????????

So i changed

"Plural-Forms: nplurals=2; plural=n != 1;\n"

to

"Plural-Forms: nplurals=2; plural=(n > 1);\n"

Don't know why i had this error in my file. I have always used the right plural form in my previous translation. Mystery, mystery.... mist.

Once the error was removed, i tried a new upgrade with the latest pot and my previous 2.03 translation. 4 new strings of 1529 and 99% translated. Wow !

Added the mo to my site, and bam, again untranslated strings.

WTF ? oh yes, my mo is in wp-content/languages/plugins/buddypress-fr_FR.mo
GlotPress bot was here ! .... and updated the file faster as me !

Added my mo to wp-content/languages/buddypress-fr_FR.mo... and voilà: got it to work !

Guess i have to find now the best option to preserve my custom translation, untouched by bot or upgrade in any case.

The most easiest solution would be:
if you want the automated translation, wait for next update.
If you not want the automated translation, use your custom file from within this folder. Untouched by bot, update and upgrade. Bullet proven your copy only and for as long you use a mo from this place.

  • want also to mention that they are two URL in the pot for respectively plugin url and author url who don't need to be translated.
  • po on glotpress doesn't contain keywords, but is also missing plural form information (even if this is more language dependant) This can probably stay outside of gettext scope, so we gain 1% on translated strings to access definetly 100% ! :D

#5 @danbp
10 years ago

FYI: fr_FR po/mo is correctly translated to 100% on glotpress (merci to Xavier Borderie)
https://translate.wordpress.org/projects/buddypress/dev

#6 @slaFFik
10 years ago

Seems the same situation with the Russian language (which is 100% translated on GlotPress, no PoEdit used).
Just as a reference, here is a thread on Russuan support forum regarding this issue. In short - strings are untranslated on a site though they are in po/mo, examples: Activity, Profile, Notifications, Friends etc.

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

#7 @johnjamesjacoby
10 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to 2.3

#8 @DJPaul
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#9 @DJPaul
8 years ago

  • Component changed from Locale - i18n to I18N
Note: See TracTickets for help on using tickets.