• Resolved erenor

    (@erenor)


    Hello,

    I was about to translate some strings from your plugin, using WPML, when I found an issue with a particular line of code. Within file /wp-content/plugins/gamipress/includes/filters.php, at line 501, there’s the following line:

    $steps_heading = sprintf( __( '%1$d Required %2$s', 'gamipress' ), $count, _n( 'Step', 'Steps', $count, 'gamipress' ) );

    The problem, here, is that you separate the two strings, using the plural syntax only for the second. This is ok in English, because you say “1 required step” or “2 required steps”. But in other languages both terms should change (and also be inverted), so it would be better to have a single sentence, using plural syntax. Something like

    $steps_heading = sprintf( _n( '%1$d Required Step', '%1$d Required Steps', $count, 'gamipress' ) );

    Thank you,
    Erenor.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @erenor

    Thank you so much for your suggestion

    We placed the translations in this way because for “Points Awards”, “Points Deducts”, “Steps” and “Requirements” we used the same way to translate this part and for points awards and deducts, the points word can change based on the points type name

    Anyway, we will take in count your consideration and we will look the best way to add those translations to allow the maximum flexibility

    Best regards

    Thread Starter erenor

    (@erenor)

    Hello @rubengc

    Thank you for the prompt and kind answer.

    For now, I managed to change the first translated string to Richiesto/i %1$d %2$s, so that it is a correct italian sentence (the same would be used in french and other languages). Anyway, having a single string would allow us to avoid the “implicit plural” (the “o/i” part), so I’ll look forward to whatever you come up with ??

    Have a nice day,
    Erenor.

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