Skip to:
Content
Pages
Categories
Search
Top
Bottom

BBpress 2.6.1 translations issue

  • @maksanse

    Participant

    Hello !
    I updated bbpress to version 2.6.1 and noticed that several words were not translated anymore (I own a french website), especially in freshness :

    freshness-translation-issues

    I used to edit those translation with a plugin called “Loco Translate”.
    So I went and checked if those words (ago, months, months, day, days, etc.) were still correctly translated in french version, and they are.

    So, is there an issue with translation since 2.6.x release with the freshness labels ?
    Can you help ?

    Best regards

Viewing 17 replies - 1 through 17 (of 17 total)
  • @robin-w

    Moderator

    this is because 2.6 has changed some wording and context, and the new translations have not been made yet

    to fix the above either use this

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    add_filter(  'ngettext',  'rew_bbpress_translate' , 20 , 3 );
    
    function rew_bbpress_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            '%s day' => '%s jour',
    						'%s days' => '%s jours',
    						'Last Post' => 'Dernier message',
                 );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
         return $translated;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    or use the translations tab in my style pack plugin

    bbp style pack

    @maksanse

    Participant

    Thank you Robin !
    I saw your translation tab today and was thinking to giving it a try (thank you for the plugin by the way 👍).

    Edit : I tried it like this, but it doesn’t solve the issue :
    translation try

    Is there anything else to do than translating it here and saving that settings ?

    @robin-w

    Moderator

    it needs to be

    %s day and %s jour

    etc.

    The % is then replaced in live

    @maksanse

    Participant

    Ok.
    I couldn’t make it work with dates… Anyway, translation should arrive soon, right ?

    @robin-w

    Moderator

    I’ve looked further at the code, and yes my translation won’t work for time.

    I am just a bbpress user who helps out on this forum, so I cannot say when the devs will complete the translations.

    @maksanse

    Participant

    Ok, thank you for your help 👍

    @robin-w

    Moderator

    ok, in 4.3.6 freshness tab, I have added translations

    @maksanse

    Participant

    Yeah ! It works 👍
    Thank you ! You rock !

    @robin-w

    Moderator

    great – glad you are fixed

    @casiepa

    Moderator

    @maksanse
    Translation of bbPress 2.6.x is being updated. Hopefully by next weekend all is done.

    @maksanse

    Participant

    Great ! Thank you for the information

    @alysko

    Participant

    I note that problem too. Thanks for the information.

    @casiepa
    , is your bbp Toolkit still useful?

    @casiepa

    Moderator

    @maksansem @BenM :
    Success: Language pack for fr_FR generated for version 2.6.2.

    For bbPress Toolkit, well more stuff is now inside 2.6 so I would need to check what is still really needed.

    @ico33

    Participant

    After last main update I still have problems with translations: some words in italian, and some words in english.

    How can I solve the issue? Or do I have just to wait for an update again?

    @matthias70

    Participant

    Same problem here. I have the right translation in my .mo-files, but still the english translation is shown in the freshness part for year, month, day, hour…
    Any suggestions?


    @robin-w
    I can translate it with your style plugin, but it is way to big to install for just translating these few words…

    Thanks
    Matthias

    @maudoune01

    Participant

    How can I translate the words : profil, login, register, log out, …?
    Thank you for your help.

    @robin-w

    Moderator

    Put this in your child theme’s function file – or use

    Code Snippets

    
    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    add_filter(  'ngettext',  'rew_bbpress_translate' , 20 , 3 );
    
    function rew_bbpress_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            '%s day' => '%s jour',
    						'%s days' => '%s jours',
    						'Last Post' => 'Dernier message',
                 );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
         return $translated;
    }
Viewing 17 replies - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.
Skip to toolbar