Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add translation .mo file

  • Hi,

    I’ve translate this plugin in french with PoEdit, but I don’t know how do I call mo file to translate.
    Someone could help me please ?

    Thanks.
    Guillaume.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Hi Guillaume – Looks like the plugin wasn’t set up quite right to allow translation. I just fixed it in version 2.5.3. Now you should be able to put your .mo file in wp-content/languages (with the proper file name – buddypress-group-email-subscription-fr_FR.mo) and translation should work.

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Oops, my mistake – I mean that it has to go in wp-content/plugins/buddypress-group-email-subscription/languages. You’ll probably have to create that directory, and make sure that you have a backup copy of the .mo file, as it might get overwritten on plugin upgrades.

    Ok, thanks, I’ll try. I’ll send you my french translation if you want.

    Perfect. It works.
    Other question : I don’t uderstand why email sent by your plugin don’t like the accent. All other email are sent without problem. Moreover, French and English are mixed in the email by your plugin.

    Where can I customize email sent by your plugin ?

    i.e. :

    Recrut Test a créé la discussion Testtttt dans le groupe efvefv:

    “ttttt”

    To view or reply to this topic, log in and go to:
    http://webcaviste.com/zado22/groupes/efvefv/forum/topic/testtttt/

    Note: You won’t receive replies to this topic. To get them, click the link above then click the ‘Follow this topic’ button


    Pour désactiver ces alertes, veuillez vous connecter et vous rendre sur: http://webcaviste.com/zado22/groupes/efvefv/notifications/
    Your email setting for this group is: New Topics

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Ha, there must be untranslated strings. I’l fix it one of these days.

    As for the accents – I’m not sure. I’ll have to do some testing. Can you send me your .po and .mo? I think you have my email address.

    Ok. Let me know when you’ll fix this.
    If you don’t have time to do that, maybe I could with instructions ?
    I’ll send you po and mo file.
    Guillaume.

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    i’ll make sure those strings are caught.

    boone, isn’t there a better way to include translations – because they will be erased on each update. Should they not live outside of the plugin directory? I guess once they are settled, you can send them to us and we can include them in future versions.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    Hi @boonebgorges @dwenaus
    I am doing a german translation, but ALOT is not translatable yet (or did I miss something?) I am posting the stuff, that is not translated:

    Backend-Admin:
    - Group Email Subscription Settings
    -The server timezone is UTC (UTC); the current server time is 2:50pm (14:50); and the day is Thursday.
    -Allow group admins and mods to change members’ email subscription settings: yes no
    -Allow group admins to override subscription settings and send an email to everyone in their group: yes no

    Frontend:
    -Your email status is Daily Digest (change) –>wherever it occurs, and the pop-up as well!!!
    - Email Options (wherever – as a Menu-Tab)
    -Email Subject:
    -Email Content:
    -Email this notice to everyone in the group (BUTTON)
    -Site Admin Only: update email subscription settings for ALL members to the default: Daily Digest. Warning: this is not reversible so use with caution. Make it
    so!
    -Weekly | Daily | New Topics (underneath the members)

    EMAIL:
    -pretty much everything…

    Hmmmmm – strange! Did I do something wrong? In Po-Edit there are 44 translatable “chains”… There is no pot-file, right?

    I really would love to use this plugin now. Could you fix this and/or help me?

    Avatar of techguy
    techguy
    Participant

    @crashutah

    I needed this same function since I needed to change all the references to group in the plugin. It’s my first time creating a po and mo for a plugin. I actually got 90 strings that needed to be changed when I did it. I used this page to walk me through creating it: http://codex.wordpress.org/User:Skippy/Creating_POT_Files

    My problem is that a number of the translations that I did in the po/mo aren’t actually appearing on the site. Some are and some aren’t. For example, when you click “Change” to change the subscription those strings aren’t changed even though they are in my pot and they’re escaped in the plugin.

    I also had to add my own code to load the language file:
    function bp_activity_subscription_locale_init () {
    $plugin_dir = basename(dirname(__FILE__));
    $locale = get_locale();
    $mofile = WP_PLUGIN_DIR . “/buddypress-group-email-subscription/languages/buddypress-group-email-subscription.mo”;

    if ( file_exists( $mofile ) )
    load_textdomain( ‘bp-ass’, $mofile );
    }
    add_action (‘init’, ‘bp_activity_subscription_locale_init’);

    Not sure why the code in bp-activity-subscription.php didn’t work for me. Probably something to do with the naming of the files and the locale stuff.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    @crashutah It seems, that you have a different problem, than I do. It is not my first translation, but I am far from being a crack :-)
    I had no problems loading the language-file – thanks to boone sdescription above. BUT it only shows me about 40 strings… that’s too bad – 90 sounds more like what it should be.
    Can someone tell me, what the problem could be?

    PS: I already translated an older version of the plugin, but all the files are overwritten and I “refreshed” the poedit file (sorry, I don’t know all the correct english terms for that stuff ;-))

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    hey, I’ll look into this and make sure all the words are translatable. I’m guessing I should include a POT file in the plugin, would that help?

    the way language files are erased during an update is very poor design. I added some code to a config file and put my language translations outside of the buddypress folder. Make sure to keep backups!

    Avatar of techguy
    techguy
    Participant

    @crashutah

    I think including a POT file would be helpful. I’m not sure if that’s standard, but I’d think it should be.

    You might also take a look at the javascript stuff (ie. changing your subscription preference). I’m thinking maybe it’s not pulling the translated items. Maybe an issue with the way the javascript is loaded vs. the translations?

    Avatar of techguy
    techguy
    Participant

    @crashutah

    Ok, I looked into this some more.

    The localization function just needs to be lowered in the bp-activity-subscription.php file for it to load. I’m not sure why it’s not loading where it is now, but when I moved it down to the last item in the file it loaded with no problems.

    Also, it is missing the localization for the javascript drop down menu. I was confused since it uses the same terms twice and so I found essentially the same phrase in the .po file and couldn’t figure out why it wasn’t applying the translation.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    A POT file would be great. Somehow it doesn’t cach all the phrases that need to be translated and/or the translations don’t show up (some). POT would be great! :-)

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    there is a POT now, and please email me any translations so I can include it in the next update :) my email is deryk@bluemandala.com

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

You must be logged in to reply to this topic.