Translations frequently broken

(Eric Vantillard) #9

In the present case the problem is that the keys in question are not present in transifex.

(Eric Vantillard) #10

Can we poll on META on the users using the translated versions versus users using it in EN ?

Maybe we are legions :smile: ?

(Rafael Pereira) #11

I believe the problem here is not having a fallback. I don’t think the translation team will ever be able to be in pair with the coding team and it’s pretty much expected. But to not have a fallback for the keys in, at least, English, make the website unusable.

For the user, a button changing from “Reply” to something bizarre like “pt_BR.Some_Button” will make the user never click on that or even know what that does. Having a fallback to English would be a good change since it’s something the other systems already have and don’t let users hanging for so long. Since it’s in Discourse goal to be the next gen forum system, I believe this should be taken more serious. I’m willing to help.

(Gerhard Schlager) #12

@techAPJ Would it be possible to change your workflow of updating the translations a little bit?

It looks like you’re currently always uploading the English translation files to Transifex before you download all other languages. This leads to untranslated strings for all those languages when something got updated in the English translation.

If you could download the translations before uploading the current English translation this could be avoided. IMHO it’s better to have some translated strings that are not up-to-date than have untranslated ones.

(Jeff Atwood) #13

Good idea! The downside is that people wouldn’t necessarily know the translations were not up to date, would they? Or does Transifex appropriately flag those as changed?

(Gerhard Schlager) #14

They appear as untranslated in Transifex. That’s why they always get removed in the current workflow of updating the translations.

(Kane York) #15

I think they would get flagged as changed after the push - which is after the current ones have been pulled. So the translations would lag one version behind.

(Gerhard Schlager) #16

It’s better to lag behind than to have untranslated strings until the next pull.

(Benjol) #17

The problem I’m seeing is that the key [fr.topic.create] is showing in the UI, but it’s not even there to be able to translate in Transifex. What could this be a symptom of?

(Régis Hanol) #18

Transifex UI isn’t the best, but here’s how to find that key :wink:

NOTE: there are 2 results, because the other key is “topic.create_long”.

(Benjol) #19

But that’s [js.topic.create], is that the same thing? And the last translation was done two months ago anyway.

Something I’m not understanding here :frowning:

(Kane York) #20

The translations that are given to the client are prefixed with js., so yes, it is the same thing. The prefix is removed on the client.

(Benjol) #21

Any idea why the translation isn’t ‘getting through’?

(Régis Hanol) #22

What do you mean by getting through? We usually retrieve the translations from transifex every week or so.

(Benjol) #23

Well, I don’t know the exact history of that particular tag, but last week when I created my Discourse instance (with DiscourseHosting), the create topic button had a translated text, but at some point over the last few days, it went back to [fr.topic.create].

One thought was “Oh, it’s a new key”, but that can’t be true, because it says that the translation comes from two months ago.

I guess, maybe, just maybe it was translated but not reviewed and then the key was swapped into the New Topic button instead of something else: I haven’t worked out where to see the history of reviewing in Transifex.

BTW: I just did a major push to translate/review all remaining strings in FR…

(Arpit Jalan) #24

Okay, I just updated the translations and pushed the new source files to Transifex after downloading translations. So I hope translations doesn’t break this time. :pray:

(Benjol) #25

@techAPJ, Is there any chance you could look into this for me in more detail?

It seems to me that [topic.create] can’t be a NEW key, and according to the history on Transifex, it’s been translated for at least a year now.

Also, see this topic:

This leads me to wonder whether it isn’t the translation which is broken, but something in the i18n code in Discourse which is choking. (The other notable broken key is [composer.create_topic])

(etewiah) #26

I had problems with translations not appearing correctly as well and it turned out that I had to update some of the plugins I was using ( and had written myself ).

In a few places I had overwritten existing templates which referred to the translations so:

{{ i18n admin_title }}

It seems now i18n references in templates have to be quoted so it now works after I changed the above to

{{ i18n 'admin_title' }}

I’m not sure exactly which update introduced that change.

(Régis Hanol) #27

That’s an Ember update that introduced this change.

(Benjol) #28

OK, I managed to track down which version of Discourse I’m on, and cross-referencing with Github, apparently [topic.create] effectively didn’t exist in French in V1.1.3.

But that still leaves me wondering how come it had a translation as far back as a year ago (per Transifex)… and when the next stable releases is going to come out!