-
Notifications
You must be signed in to change notification settings - Fork 289
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
🚚 Stop copying yaml content when a new language is added #5815
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Oromo) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Added translation using Weblate (Xhosa) Co-authored-by: Languages add-on <[email protected]>
Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Deleted translation using Weblate (Xhosa) Co-authored-by: boryanagoncharenko <[email protected]>
boryanagoncharenko
force-pushed
the
weblate_copy_5187
branch
from
September 27, 2024 09:52
ea739e1
to
9ebdbd2
Compare
boryanagoncharenko
force-pushed
the
weblate_copy_5187
branch
from
October 1, 2024 09:18
0685d5b
to
76bd092
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a draft PR meant to collect feedback for a solution of issue #5187.
Description of the problem
When a new language is added in Weblate, the prefill add-on copies the English content into the new language yaml files. This means that when the English content changes, we manually need make the change in all language that do not have the content translated. Instead of this, we would like to keep in the yaml files only the content that has actually been translated.
Description of the solution
When the prefill add-on is disabled, Weblate produces empty files and first, and if translations are added, only the translated key-values are present in the yaml file. The current solution adds a new folder content-translation which will contain all files synced from Weblate (which will contain partial solutions and will be 'styled' according to Weblate's preferences) and a script that generates the same files as currently exist in the content folder by merging the missing translation with the base language (which for now is always English).
This is the minimal change that could stop the language coping. However, there are a couple of things to consider:
The next step would be to find a way to keep which keys still have to be translated. I have not found a nice way to store this information in the generated yaml files along with the keys, so I was thinking to either add a separate key-value pair for untranslated values or even put that information into separate files.