WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Translation

[Resolved] Translation

  • Hi,

    I intend to use BP registration options, but I fail to make it speak French.
    I have created bp-registration-options-fr_FR.po and bp-registration-options-fr_FR.mo. They are in the /wp-content/plugins/bp-registration-options/languages. But still not a single French word.

    I noticed that the .pot in the /languages directory is called bpregistration_options.pot (no – after bp). Maybe there is a possible flaw here.

    Has anyone encountered and solved the problem ?

    Best regards
    Philippe

    http://wordpress.org/plugins/bp-registration-options/

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Michael Beckwith
    Participant

    @tw2113

    That very well may be a typo on my part, and I’ll look into fixing it soon. May be a few days though.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    While I can’t guarantee it, I did push out 4.1.1 that at least renamed the pot file to match the textdomain. I’m hoping that helps fix this issue of yours, but if it doesn’t let me know and I’ll dig in more extensively.

    pladame
    Member

    @pladame

    The pot file has been renamed all right. The .po and .mo files were subsequently created fine (with “CodeStyling Localization”) but still bp-registration-options stubbornly refuses to speak French 😉
    Sorry I can’t help.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    I’ll keep prodding it a bit then.

    patloq
    Member

    @patloq

    Hi, I encountered the same issue: my translation didn’t load. Then I added a line at the very end of the ‘bp-registration-options.php’ file with the following code:

    load_plugin_textdomain( 'bp-registration-options', false, 'bp-registration-options/languages' );

    Now it loads the translation, except from the email messages which don’t display my translation.

    By the way, the buttons ‘Reset Messages’ and ‘Save Options’ are not localized.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    thanks patloq, i’ll get those two spots fixed and look into getting your working fixes in.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    patloq, just checked the code and the buttons are using esc_attr_e(). I’ll run the plugin through poedit soon and make sure it looks for that as well.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    And pushed out 4.1.2. You’ll both want to update 🙂 Thanks for the feedback and helping me realize what was missing.

    patloq
    Member

    @patloq

    Michael, thank you for the update and the ongoing development of this particularly useful plugin.

    R J
    Participant

    @r-j-1

    Doesn’t work for me. I try to add russian translation …
    https://dl.dropboxusercontent.com/u/60952367/bp-registration-options-ru_RU.zip

    pladame
    Member

    @pladame

    Hi,

    (Sorry, I was away for a few days)

    4.1.2 doesn’t work for me either yet.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    grrr @ this issue.

    will investigate. Can anyone confirm that any part of the translating process is working? Or is it all failing?

    pladame
    Member

    @pladame

    All failing as far as I’m concerned.

    Plugin Author Michael Beckwith
    Participant

    @tw2113

    So. I realize now how much I still need to learn regarding localization of plugins. This article proved very handy. http://geertdedeckere.be/article/loading-wordpress-language-files-the-right-way

    I also need to thank R J for providing some translated files for me to test with. I’m admittedly limited to English, but I try to help others out the best I can with this topic.

    Before I push this out to everyone, R J or pladame, would you be kind enough to test a couple manual changes to help verify that they work for someone besides just me.

    In the bp-registration-options.php file, change the “plugins_loaded” hook, on line 17, to “init”. Then, move down to line 43 with the load_plugin_textdomain() function, and change it to:

    load_plugin_textdomain( 'bp-registration-options', false, basename( dirname( __FILE__ ) ) . '/languages/' );

    If you start seeing it translated correctly with your chosen language, then we have success, finally, and I can push up for everyone.

    R J
    Participant

    @r-j-1

    Michael Beckwith
    Yes, it works !
    You can get full russian translation here (download it again) and add to new version of plugin:
    https://dl.dropboxusercontent.com/u/60952367/bp-registration-options-ru_RU.zip

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Resolved] Translation’ is closed to new replies.