Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress Translation – Missing Wordings & Future Updates

  • Avatar of Cartographer
    Cartographer
    Participant

    @cartographer

    Hi community,

    I have a couple of questions on buddypress translation.

    1) I notice that there are some words that are missing from the .po file and so I can’t translate them. Do you know if the pot file includes all the wordings?

    2) I translated buddypress but I have some worries about the future bbpress updates. So if there will be a new update, including some new features, how we will be able to translate the new words? What about the all ready uploaded .po and .mo files?

    Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of danbpfr
    danbpfr
    Participant

    @chouf1

    @cartographer,

    each BP version provide a pot file who contain ALL wording.
    each bbPress version provide that too.

    You have to check your BP/bbP translation after each update and eventually update the existing po file with the new version .pot file. Save the .po file to generate the compiled .mo file and upload it to the appropriate folder:

    wp-content/languages/buddypress-xx_XX.mo
    wp-content/languages/bbpress/bbpress-xx_XX.mo

    (xx-XX is your language prefix)

    If some BP or bbP wordings are missing, it’s generally due to a third party theme. In that case, you have to add them yourself to the theme po file or ask the author, or wait for a theme update.

    Avatar of Cartographer
    Cartographer
    Participant

    @cartographer

    @chouf1

    Hi and thank you for your answer!

    So how can I update the existing pot file (the one including the all ready translations) with the new version’s pot file? I mean, is there any way to merge those two files?

    If there is a way to merge the two files I will keep both the translated wordings and the new ones (if there wiil be), right?

    Thank you again!

    Avatar of danbpfr
    danbpfr
    Participant

    @chouf1

    @cartographer, i guess you got a PBCK. ;-)

    If there is a way to merge the two files I will keep both the translated wordings and the new ones (if there wiil be), right?

    False ! ;-) Let me explain.

    Each new BP version is shipped with a pot file in his language directory. This file is normally up to date for that current version. The BP language directory is a placeholder for user guidance who contain only the pot file. This folder is updated like any other BP folder when you upgrade.

    A pot file does nothing by itself. It only contain ALL wording. The elder and (enventually) the new one. And there is nothing to update or to merge for you.

    BP (and WP or bbP or plugins or themes) use php gettext function to translate strings/words. And gettext use only a compiled file with a .mo extension.

    When you make a translation, you can use a sofware like poEdit who helps you to translate those strings. To do that, you create a new projekt based on a import of the pot file. Once finished, you save the work which gives a .po file and poEdit will generate automatically the corresponding .mo file.

    The pot file contains only the strings in the original language provided by the author.
    The po file contains the original strings AND there translations.
    Both file can be viewed/read in a text editor like notepad++ for example. These files are only “working files”.

    But to get the translation on your site, you must use a .mo file. This file is compiled by poEdit and cannot be read by humans. But gettext can, and that’s why this file must be on your server.

    http://codex.buddypress.org/user/translations/

    Avatar of Cartographer
    Cartographer
    Participant

    @cartographer

    Hi @chouf1

    First of all, thank you for taking time to response.

    I think I understand the difference between the .mo and the .pot file.

    What I still don’t get is which will be my moves after an update so to keep the all ready translated wordings and the new ones (if there will be new ones).

    So, if you could try to write this procedure by steps, I would be grateful and I promise that I will avoid a new PBCK :)

    Avatar of danbpfr
    danbpfr
    Participant

    @chouf1

    @cartographer,

    simply keep a copy of each translation file on your computer !

    buddypress 1.6/bp-languages/
    - buddypress.pot
    - buddypress-xx_XX.po
    - buddypress-xx_XX.mo

    buddypress 1.7.1/bp-languages/
    - buddypress.pot
    - buddypress-xx_XX.po (which is first a copy of the previous 1.6 version and who becames the new version after you made your translations)
    - buddypress-xx_XX.mo

    etc…

    Additionnally, and depending of your poEdit commands, the unused/obsolete strings are commented and stays in the po file.

    For example the string “Hey dude” is used in bp x.x pot version.
    You make your translation of “hey dude” for that x.x version.

    2 mounth later, a new version comes up with “Hey you!”.
    You make a copy of the previous .po file, than you import the new pot file with poEdit.
    After the import, poEdit says 1 new string, 1 obsolete.
    The new string is “Hey you!”
    The obsolete string is “Hey dude”.

    You translate the new string, and poEdit silently comment the obsolete string and keep it in the new po file you just update, AS LONG AS YOU DON’T tell it to delete unused strings.

    But you have probably to read also some poEdit documentation and tutorials to find out how it works.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.