Skip to content
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

Addon to fill in untranslated strings in a file #5692

Closed
nijel opened this issue Mar 18, 2021 · 7 comments
Closed

Addon to fill in untranslated strings in a file #5692

nijel opened this issue Mar 18, 2021 · 7 comments
Assignees
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature.
Milestone

Comments

@nijel
Copy link
Member

nijel commented Mar 18, 2021

By default, all strings in a new translation created by Weblate are empty. The application for which I run a localization site expects untranslated string to be copies of the original English source strings. Is there a way of configuring Weblate to change how it creates new translations?

I also now have a number of translations that contain these empty strings. Can I somehow batch edit those to copy the English source strings for cases in which the translated string is empty?

Originally posted by @sr258 in #5599

@nijel nijel added backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature. labels Mar 18, 2021
@github-actions
Copy link

This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented. In case you need this feature soon, please consider helping or push it by funding the development.

@sr258
Copy link

sr258 commented Dec 28, 2021

I've looked into the source code to modify the "Remove blank strings" addon for this purpose. As the addon still relies on a specific method in the core, it looks like this feature requires changes in the core. As I'm new to Weblate and also Python, I can't contribute this feature myself.

How much would you ask for developing this addon, @nijel ? You can reach me at serettig@posteo.de

@nijel
Copy link
Member Author

nijel commented Dec 31, 2021

I think the better approach would be to start from Pseudolocale generation add-on. I've sent you followup to e-mail.

@nijel
Copy link
Member Author

nijel commented Jan 3, 2022

Summary provided by @sr258:

  • Overall aim: Instead of having empty strings in the files that are pushed to the actual source code repo, the translation files should contain the source strings if there is no translation.
  • If the source string is empty (this happens), the translation should also be empty, of course.
  • I don't mind if the translations in Weblate appear empty or with a copy of the English source strings. Either is fine.
  • Changes in the source string don't need to be propagated to the translations that are created by the addon.
  • If possible existing empty translations in components are also filled in when the addon is activated first. There are some partial translations at the moment that have some strings translated and other that aren't. If this is not possible within the timeframe you mention, it is also fine if only new translation files are filled with the empty English strings when they are created.

@nijel nijel self-assigned this Jan 3, 2022
@nijel nijel added this to the 4.11 milestone Jan 3, 2022
@KadAnna
Copy link

KadAnna commented Jan 5, 2022

Would it be possible for the point "Changes in the source string don't need to be propagated to the translations that are created by the addon." Instead I suggest that it does this:

  • If source strings changes, I want the change to also be propagated in the translations that are created by the add-on or alternatively,
  • When source string chages, then the translation created by the add-on would be marked as "needs editing"

@nijel
Copy link
Member Author

nijel commented Jan 5, 2022

When source string chages, then the translation created by the add-on would be marked as "needs editing"

This is already the case for all source string edits.

nijel added a commit that referenced this issue Jan 19, 2022
This will allow to reuse this for prefill add-on later.

Issue #5692
@nijel nijel closed this as completed in 1651fe3 Jan 19, 2022
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants