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

Request: option to remove orphaned translations from yaml files during extraction #74

Open
bryghtlabs-richard opened this issue Dec 4, 2024 · 3 comments

Comments

@bryghtlabs-richard
Copy link
Contributor

bryghtlabs-richard commented Dec 4, 2024

I'd like to suggest an optional flag to lv_i18n extract that could remove orphaned phrases as part of the extraction file.

The warning is great for projects that are already translated, but after reviewing the orphaned phrases, it would be helpful to have a way to automatically remove them before sending the YML file out for translating.

@puzrin
Copy link
Collaborator

puzrin commented Dec 4, 2024

That looked a bit dangerous when doing this package. But you can invoke extract with --orphaned-fail to tests/CI. Will it help, or do you have frequent cases that require bulk deletes?

@puzrin
Copy link
Collaborator

puzrin commented Dec 4, 2024

If I remember right, there is a technical limitation—it is impossible to keep formatting and comments on a yaml override. So, all related features were skipped in favor of a read-only alternative.

@bryghtlabs-richard
Copy link
Contributor Author

or do you have frequent cases that require bulk deletes?

We had some prototype screens in our UI tool. When my UX designer updates them to a more finished look, some of the widgets go away or change. Many of the strings haven't been translated yet. It's easy enough to work through the report patching each YML file. The UX engineer isn't exporting the UI to C code, so finding out gets delayed.

Thinking about it, the case we would like to be able to remove is even more specific: it's that we want to drop orphaned translations that haven't been translated yet - these we do not care about.

I agree about the YAML parser/serializer - it's a lot more complicated to try and keep comments and formatting, which are nice too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants