OpenTTD / eints

WebTranslator for OpenTTD and its add-ons
GNU General Public License v2.0
6 stars 10 forks source link

Eints is reverting/ignoring translations, but they still exist in the History #70

Closed absay closed 2 years ago

absay commented 2 years ago

I've noticed Eints is overwriting or, more accurately, "reverting" translations, but the updated changes are still shown in the History. This is what is happening:

  1. I change a translation of a string.
  2. Eints saves the translation correctly. When I refresh and review the strings page, everything looks in order.
  3. However, at some point, when I download the latest build and open the game, I discover many of the changes were ignored/reverted to an older translation.
  4. Then, I go back to the strings page and it now shows these "reversions", as if I had done nothing.
  5. However, if I click on a string I suspect Eints reverted, and try to see the history, it shows the saved change, though the current translated string is still the older version.
  6. If I change the string again, the next build of the game apparently registers the updates alright.

Here's an image that explains it better: image

As you can see, the changes were successfully saved 2 weeks ago, but the current translated string is showing the previous, wrong version. Whenever I change any translation, I make sure I get the blue message telling me the string was successfully changed, so I don't know what's happening or if this occurs to other translators.

Is there a way to prevent this behavior, or better yet, to recover all those updates as the new translations, since they are apparently correctly stored somewhere, in order to avoid going over each string again?

edit:

Something really funky is happening here. If I fix any translation, the History now says the "older" version is the one made 2 weeks ago...

image

This is quickly becoming a mess lol. 😵

glx22 commented 2 years ago

Due to an unnoticed disabling of the eints-to-git workflow (the one pushing translations updates once a day), there was no update of translation in game between Apr 23, 2022 and May 1, 2022, but all the changes made during this period should have been applied on May 1, 2022.

And I can see in most current version (May 9, 2022 20h50 UTC+2) this line has not been changed for 10 months https://github.com/OpenTTD/OpenTTD/blame/master/src/lang/spanish_MX.txt#L4314

absay commented 2 years ago

Yes, the changes are not making it to the commits on the OpenTTD master, that's part of the issue, this is why the builds come out without these updates, and the wrong strings still appear in the game.

And I was suspecting the git workflpw outage could have been implicated. But it apparently is not it since: 1) there are a lot of unapplied changes still, despite the reactivation of the git workflow, and 2) the same issue continues to happen with recent changes I've made, "recent" as in a couple of days ago.

I don't have an screenshot to show, but if you see this commit, I was mostly changing vehículo de carretera to autotransporte (and its plural form). The intention was an entire replacement of that word. Again, I made REALLY sure I didn't miss any string. The strings page showed nothing when Ctrl+F "vehículo de carretera". But then, the build was released the next day, I downloaded it, played the game and found missing updated strings again (in the Finance window), so I had to go back to the strings page, and when I Ctrl+F "vehiculo de carretera" once more, I got results! So, I had to amend them, changes that can be seen in the commit of the next day. Only then the updates stuck.

How come I make changes, I get the blue notification, I check that the changes are correct in the list of strings, I trust everything goes OK, even the history saves such changes (made 2 weeks ago, not 10 months ago), but in the next build many changes are reverted? There's something definitely happening here, and I apologize if I sound repetitive, but it's frustrating to have hours of work lost to an unknown bug (or an action on my part? But what?), and the idea of going over those changes again 😅.

frosch123 commented 2 years ago

Do you have another example? If/when you have another example, please do not fix it.

I can only check what is going on, as long as the text is still wrong. After you fixed it, I have no idea what could have been wrong.

Also, not everyone may know this: The text shown in the screenshot as "es_ES" is indeed the current es_ES translation, not the es_MX translation. Eints shows translations from similar languages for guidance.

absay commented 2 years ago

Thanks for the help frosch! Here are more examples that remain unfixed:

Also, not everyone may know this: The text shown in the screenshot as "es_ES" is indeed the current es_ES translation, not the es_MX translation. Eints shows translations from similar languages for guidance.

Not sure about that... it apparently is the other way around. Every single "es_ES" translation that shows up in that particular part of the page is actually es_MX, not es_ES.

For example:

I can recognize that all those es_ES translations that are show for guidance are my translations for es_MX, so I guess that's a new issue here? Eints it's not grabbing the text from the appropriate similar language, at least not across Spanish lang files.

Thanks again for the patience. Hopefully this help you guys see what could be happening.

frosch123 commented 2 years ago

Ok, the "similar languages" thingie is obviously broken :) I found the issue, and will fix that.

About the lost translations: There is some weirdness on the staging version as well. Apparently all translations changed "2 months ago", which correlates with the last dependency update. I am testing some things there.

frosch123 commented 2 years ago

@absay I'll restore the correct translations via script. You do not have to do anything. But I may only get to it tomorrow evening.

absay commented 2 years ago

Thanks a lot for the work. I see you even added timestamps to the history in Eints. 😄

frosch123 commented 2 years ago

Restored the translations: https://github.com/OpenTTD/OpenTTD/commit/1eed52f294879313142b392771560cdbdd37a0fd

Have fun translating, and please report bugs again :)