Turkish Translation needs some love

I’m reaching out on behalf of someone else who doesn’t have access to Meta anymore. I don’t recall the username, but on Sitepoint he goes by @ogsocials (his username on Meta was @o.g).

In short, he is having issues with the Turkish translation and customizing site text. After digging into it tonight, the issue is quite clear, the Turkish Translations needs some love and other languages may be in the same situation.

First let’s look at the request I received:
“The reply button is in english and I’d like to customize it to Turkish”

Seems simple enough, Customize Site Text should be sufficient, right? Well, not so fast.

It ends up the Turkish translation does not have the appropriate keys for the Reply button.
https://github.com/discourse/discourse/blob/master/config/locales/client.tr_TR.yml#L1352-L1354

As you can see, it has reply with sub-keys title and help.

The English version is very different:
https://github.com/discourse/discourse/blob/master/config/locales/client.en.yml#L1562-L1568

There is another layer of keys that does not exist in the Turkish language and as such, and I’ve confirmed on my sandbox, when in Turkish, you cannot customize these keys. They show up in a search, but the customization does not take. I imagine this is because the Turkish file itself does not have the appropriate structure so it continues to fallback to English, but I’m guessing here (as I’m not 100% well versed in translations).

All I can say is I did the following to verify it is impossible to translate the post or topic reply buttons.

  1. Set your default locale to Turkish
  2. Go to Customize > Site Text
  3. Search for ‘Reply’
  4. Click on js.topic.reply.post.title
  5. Customize the Text and Save it
  6. Navigate to topic, refresh the page, text has not updated

I have a feeling that Transfix needs to be updated first for this issue to resolve itself and permit users in the Turkish language to customize their site text, but again, I could be wrong here. Can anyone a bit more versed in Translations give this a quick lookover and verify what I’ve uncovered?

Looks like all languages in the format xx_XX are missing this keys, let me take a look.

4 Likes

Wait, no, this was the erroneous community PR that got checked in, the bad translation that decided “hey we need to distinguish between reply-to-the-topic and reply-to-the-post”. Which was… :poop:

Reply should NOT be broken into these two fields.

So the English translation file is the one that is wrong, probably an artifact of that disastrous PR.

I have this PR that fixes this for locales with territory code:

https://github.com/discourse/discourse/pull/4695

Now English and most languages are right, rolling this back would be more work.

1 Like

I am sorry but your PR is incorrect. WE DO NOT WANT to distinguish this text.

I will commit the code personally if I have to.

English MUST be fixed. The other languages ARE correct. This is all fallout from that hideous community PR.

Other languages have this atrocity too
https://github.com/discourse/discourse/blob/master/config/locales/client.es.yml#L1405-L1410

Based on this commit, it seems the broken out version was intended…
https://github.com/discourse/discourse/commit/a553fecb51150a127f7eee4ee1a3cf734f471157

The breakage is here:

https://github.com/discourse/discourse/pull/4600/files

If that is what @zogstrip pulled forward, it was done incorrectly. I’ll do it myself if I have to.

Such a dumb, dumb change in that PR – completely pointless and breaks every translation for a key button.

1 Like

Ah, yeah, that is definitely related to the problem.

Every part of that PR fills me with rage. Plus all the disastrous fallout to date.

All right @cpradio can you check my work?

https://github.com/discourse/discourse/commit/7c9f8cb2458e15844383ee8436f5fefc52a3db14

:angel: YAML

reply:
  title: 'Reply'
  help: 'begin composing a reply to this topic'

:angel: i18n string keys

topic.reply.title
topic.reply.help

:japanese_ogre: YAML

post:
  title: 'Svar'
topic:
  title: 'Svar'
  help: 'begynd at skrive et svar til dette emne'

:japanese_ogre: i18n string keys

topic.reply.post.title
topic.reply.topic.title
4 Likes

It looks legit. From what I can tell it seems to remove it entirely from all places. :thumbsup:

1 Like

Just ran it on my sandbox, the test works now. Customizable in Turkish and all! Thanks!

4 Likes

Me right now :unamused:

3 Likes

It was a weird PR, I only blame you a little tiny bit.

2 Likes