Skip to content

Dedupe translations #24488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
silverwind opened this issue May 2, 2023 · 4 comments
Open

Dedupe translations #24488

silverwind opened this issue May 2, 2023 · 4 comments
Labels
modifies/translation proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Comments

@silverwind
Copy link
Member

silverwind commented May 2, 2023

We have many duplicate translations, for example:

$ rg '= Repository$' options/locale/locale_en-US.ini
51:repository = Repository
1883:settings.options = Repository
2075:settings.event_repository = Repository
2753:packages.repository = Repository
3117:notices.type_1 = Repository
3254:conan.details.repository = Repository
3407:runners.task_list.repository = Repository

We should deduplicate them, ideally without invalidating existing translation, if such a thing is possible. I do understand that some translations mean different things in different contexts, but I estimate 90% can be deduplicated safely.

@silverwind silverwind added type/proposal The new feature has not been accepted yet but needs to be discussed first. type/feature Completely new functionality. Can only be merged if feature freeze is not active. modifies/translation type/refactoring Existing code has been cleaned up. There should be no new functionality. and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels May 2, 2023
@yardenshoham yardenshoham added the proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. label May 2, 2023
@silverwind
Copy link
Member Author

Excerpt from #24492:

Other locales on main branch should not be updated manually as they will be overwritten with each sync

I imagine if we really want to start this deduping effort, it would be be nice to be able to just "move" a existing translation in all locales to a new key without invalidating on Crowdin.

@yardenshoham
Copy link
Member

Want me to add a check to make sure these files (other than English) are unchanged in a PR?

@silverwind
Copy link
Member Author

Ideally we should have a way to modify other translations from this repo, e.g. making it a kind of two-way sync.

I currently don't understand enough of this sync process to further comment, but to cleanly solve this issue, we definitely need the ability to move around other language translations, and have those movements be accepted by Crowdin.

@silverwind
Copy link
Member Author

silverwind commented Jul 6, 2023

The plan ahead should be to:

  • Remove all ini sections
  • Merge all now-duplicate value strings from english translation
  • Replicate the changes into other languages
  • Force an approval of all translations from the ini on Crowdin

Is the last step possible? If not, we may never be able to clean this up properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modifies/translation proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants