How to fix translation errors

(Konstantinos Karasardelis) #1

Hi there,
I’m trying to install discourse and use it in my native language (Greek) but there are errors in the translation file which i would like to fix. The worst errors that i can’t find a way to fix are variable names (like the one used in the welcome message) which were translated to my language and now the welcome message (and not only) arrives broken.


How do i fix translation errors in general?

(Konstantinos Karasardelis) #2

If i try to replace any variable with it’s original name in English, i get the following error message:

(Jeff Atwood) #3

That is because the keys have to be in English (the values in {}).

Good catch on adding this validation @tgxworld!

(Konstantinos Karasardelis) #4

Thanks for stepping in… yes i know that, but i can’t fix it. Can you help?

(Jeff Atwood) #5

Sure @tgxworld can help.

(Konstantinos Karasardelis) #6

OK i’ll wait for @tgxworld to step in and help…

(Alan Tan) #7

What are the keys that you’re having trouble translating?

(Jeff Atwood) #8

It is in the screenshot in the first post. Those substitution words should not be translated.

(Alan Tan) #9

I was requesting for the translation keys for the translation not the interpolation keys. Anyway I think I’ll just write a script to find all the broken translations.

(Alan Tan) #10

Ok I’ve added a test to check for translated interpolation keys in our translation files whenever we pull down new translations

All the broken translations have been fixed on Transifex as well.

(Konstantinos Karasardelis) #11

This is good news @tgxworld Thanks!!! What should we do to fix our discourse installations now?

(Alan Tan) #12

Upgrade to the lastest version :slight_smile:

(Konstantinos Karasardelis) #13

I would also like to actively join the Greek translation team on Transifex… i already joined the team but at the moment i can only submit translated keys for review. Thanks.

(Arpit Jalan) #14

I just promoted you to Reviewer for Greek (Greece) team. Thanks for keeping Greek translations up-to-date. :heart:

(Konstantinos Karasardelis) #15

I did the upgrade and although some keys seem to be fixed, “invite_forum_mailer.text_body_template” still have translated variables. Can you check that please?

(Alan Tan) #16

Which branch of DIscourse are you on?

(Konstantinos Karasardelis) #17

I don’t know… how do i check that?

My version is v1.9.0.beta2 +86

(Konstantinos Karasardelis) #18

version: tests-passed

(Alan Tan) #19

Hmm I’m pretty sure the interpolation keys have been corrected. Maybe try rebuilding again?

(Konstantinos Karasardelis) #20

I rebuilded again but this template still has a problem…