• Resolved raspbianfrance

    (@raspbianfrance)


    Hello, i’m using your plugin to translate my theme and it’s mainly working, but i encounter an issue when the text i want to translate contain an escaped quote. Then, the text is just not translated.

    For exemple, my theme contain this line :
    <?php _e('Tous nos tutoriels autour de la Raspberry Pi, de Raspbian et bien d\'autres !', 'lightheme'); ?>

    As you can see the string contain an escaped quote, and so it is not translated even after i added a translation… Also, the translation appear with the backslash char, you can find a screen here.

    Do you have any idea or suggestion about this one ?

    Thanks for your work and your time ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    Hi,
    Thanks for your issue.
    You have right but you can fix it:

    <?php _e("Tous nos tutoriels autour de la Raspberry Pi, de Raspbian et bien d'autres !", 'lightheme'); ?>

    if you can change quotes form ‘ to ” ??
    but if you can’t do it I will think about fix ??
    let me know

    Thread Starter raspbianfrance

    (@raspbianfrance)

    Hi,
    actually i’ve kind of avoid the problem by using ' instead of ‘.

    Though i think it’s still a problem that deserve be fixed if you have an idea of how to do that :). Especially since using double quote will just transfer the problem to \” instead of \’, even if this is quite a less common issue.

    I don’t now how traditional tools like gettext handle this case but they seems to handle it. Maybe that in the function file_scanner() you should remove the backslash from the harvested strings, just a idea, i didn’t test it myself.

    Anyway, thanks for the work and the nice plugin ??

    Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    Thank you for the suggestion.
    In my free time I will try to fix it ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘String does not translate when containing quotes.’ is closed to new replies.