Support » Plugin: bbPress - Moderation Tools » Support translations

Viewing 6 replies - 1 through 6 (of 6 total)
  • The same for me:

    How to get front-end texts translated in Finnish? moderation-tools-for-bbpress

    does not have any *.po or *.pot files.
    These should get translated:
    * approved
    * report
    * report reason + all related options

    I must directly edit report.php file in oder to ge those texts into Finnish. 🙁

    If some plugins has front end texts for ordinary participants IMO those texts should always be possinble to transalate usein *.po(t) files.

    See:

    https://bbpress.org/forums/topic/bbpress-moderation-2/

    There is plugin Code Snippets. With that plugin you can translate front end texts, for example

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    if ( $translated_text == ‘Unapprove’ ) {
    $translated_text = ‘ÄlĂ€ hyvĂ€ksy’;
    }
    if ( $translated_text == ‘Report’ ) {
    $translated_text = ‘Raportoi’;
    }
    return $translated_text;
    }
    add_filter( ‘gettext’, ‘change_translate_text’, 20 );

    Plugin Author Digital Arm

    (@digital-arm)

    This is something we want to address so you can properly translate the plugin. I can’t give an exact date when this will be ready but I will prioritise it for you.

    Translation is not possible if the code is hard coded. For example in the report.php all texts are harcoded.
    Translations needs a moderation-tools-for-bbpress.pot file for base.

    I must “translate” it by replacing strings.

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    if ( $translated_text == ‘Unapprove’ ) {
    $translated_text = ‘ÄlĂ€ hyvĂ€ksy’;
    }
    if ( $translated_text == ‘Report’ ) {
    $translated_text = ‘Raportoi’;
    }
    if ( $translated_text == ‘Report reason’ ) {
    $translated_text = ‘Raportoinnin syy’;
    }
    if ( $translated_text == ‘Spam’ ) {
    $translated_text = ‘SpĂ€mmi’;
    }
    if ( $translated_text == ‘Advertisement’ ) {
    $translated_text = ‘Mainostaminen’;
    }
    if ( $translated_text == ‘Harassment’ ) {
    $translated_text = ‘HĂ€iritseminen’;
    }
    if ( $translated_text == ‘Inappropriate content’ ) {
    $translated_text = ‘EpĂ€asiallinen sisĂ€ltö’;
    }
    return $translated_text;
    }
    add_filter( ‘gettext’, ‘change_translate_text’, 20 );

    @tapiohuuhaa – I’m sure the plugin author knows what making the plugin translatable means and how the plugin code should be modified to make translating possible.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Support translations’ is closed to new replies.