modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.35k stars 527 forks source link

Crowdin integration bugs #15355

Open Ruslan-Aleev opened 3 years ago

Ruslan-Aleev commented 3 years ago

Bug report

Summary

Crowdin and MODX integration errors:

1) Unnecessary removal of translation strings if the English strings have been changed.

If the strings in English have been changed, then they replace the translation strings, even if there is a translation. For example, PR changed "Template Variables" to "TV" and now all translations will be erased, see https://github.com/modxcms/revolution/pull/15354/files

It makes sense to indicate that the lines have changed and translation strings can be updated. Otherwise, after a certain number of PRs, the translations will be completely replaced by English.

2) The translation strings were in Crowdin, but they weren't in the files.

Recently, a PR was done to add the missing lexicon refresh_media_sources, see - https://github.com/modxcms/revolution/pull/15336 But if we look at the translation history, then this line has been in Crowdin for a long time, why was it not in the files (see https://crowdin.com/translate/modx-revolution/1290/en-ru?filter=basic&value=0#q=refresh_media_sources)?

crowdin_1

3) Duplicate strings with the same key.

Again, after merging the PR (link above), 2 lines with the same key appeared in the translations (see https://crowdin.com/translate/modx-revolution/all/en-ru?filter=basic&value=0#q=refresh_system_settings).

crowdin_2

Environment

Crowdin, MODX

Ruslan-Aleev commented 3 years ago

@rthrash @opengeek This is a significant issue, especially the removal of translated strings.

opengeek commented 3 years ago

These are just how the system works. There's nothing we can do to change how CrowdIn itself handles this stuff. As for 2, the translation you referenced was added to 3.x quite a while back, so now it is there for 2.x already.

Ruslan-Aleev commented 3 years ago

As for 2, the translation you referenced was added to 3.x quite a while back, so now it is there for 2.x already.

I see.

These are just how the system works. There's nothing we can do to change how CrowdIn itself handles this stuff.

It's a pity. It's strange that Crowdin doesn't provide any other options.

Jako commented 3 years ago

The previous translations of these (and similar) strings are visible in Crowdin and are not lost. But they have to be added again manually. I don't see a better solution for this.

comradekingu commented 3 years ago

@Jako Anything that supports fuzzy strings for the given file-format sounds like a better idea. As far as Crowdin being a good idea, I don't understand why you are tying yourself to it.

Jako commented 3 years ago

@comradekingu Do you have a better solution/service?

comradekingu commented 3 years ago

Weblate, copylefted libre software, but depends on the file format if there is support. https://docs.weblate.org/en/latest/formats.html?highlight=fuzzy#supported-file-formats Transifex doesn't handle fuzzy files whatsoever.

Jako commented 3 years ago

I see the reason for your bias for Weblate. And if you could help to connect any of i.e. my open source MODX side projects with Weblate, I will give it a try.

comradekingu commented 3 years ago

I suppose some of it is gained only though having used the alternatives. Sent you an e-mail.

Jako commented 3 years ago

We can add Revolution as a new project on weblate.org and setup getting the language strings into that service. So we can test the fuzzy auto translation inside of Weblate before switching the translation to it.

opengeek commented 3 years ago

We can add Revolution as a new project on weblate.org and setup getting the language strings into that service. So we can test the fuzzy auto translation inside of Weblate before switching the translation to it.

Why don't we do that with a fork to see how it works? Does it integrate with GitHub, automatically pulling and pushing PRs?

Jako commented 3 years ago

My first interest is to see how the fuzzy translation option is working in Weblate. Weblate will get the files out of the GitHub Repository. If we don't setup any pushing PR branch, we should not get any PRs pushed into the GitHub Repo.

opengeek commented 3 years ago

I want to see the whole process work. So that's why I want to set it up on a fork.

Jako commented 3 years ago

Why not. You just need an https://hosted.weblate.org/ account and setup a new project there.

comradekingu commented 3 years ago

@opengeek I suppose https://docs.weblate.org/no/latest/admin/continuous.html?highlight=webhooks#automatically-receiving-changes-from-github answers your question part-way.

@Jako You can push to a branch that isn't in development first.

https://hosted.weblate.org/hosting/ for Hosted Weblate and https://github.com/WeblateOrg/weblate for self-hosting. There is also paid support available if I can't help :)