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

Weblate outputs empty Android string entities #7248

Closed
2 tasks done
arkon opened this issue Feb 13, 2022 · 9 comments
Closed
2 tasks done

Weblate outputs empty Android string entities #7248

arkon opened this issue Feb 13, 2022 · 9 comments
Assignees
Labels
enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit
Milestone

Comments

@arkon
Copy link

arkon commented Feb 13, 2022

Describe the issue

We were notified in https://github.com/tachiyomiorg/tachiyomi/pull/6607 (c.f. the PR diff) that the strings sometimes contain invalid empty string entities, e.g.,

<string name="foo" />

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

Unsure, seems to be the existing Weblate behavior

Expected behavior

  • Entities are not included in the XML file if there's not translations.
  • Weblate enforces all plurals items if needed

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

The related project: https://hosted.weblate.org/projects/tachiyomi/strings/

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Feb 24, 2022
@arkon
Copy link
Author

arkon commented Feb 24, 2022

This still needs to be triaged.

@nijel nijel added enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit and removed wontfix Nobody will work on this. labels Feb 24, 2022
@github-actions
Copy link

The issue you've reported needs to be addressed in the translate-toolkit. Please file the issue there, and include links to any relevant specifications about the formats (if applicable).

@nijel
Copy link
Member

nijel commented Feb 24, 2022

This happens in case the string translation is being removed in Weblate. In case you don't want such entries to be present, you can use Remove blank strings add-on. If this is generally desired for this file format, it should be probably addressed in the translate-toolkit.

@arkon
Copy link
Author

arkon commented Feb 24, 2022

Thanks, the add-on works.

translate/translate#3281 seems to partially address the plurals issue, but it may be possible for Weblate to enforce validation on their end to require all quantities.

@nijel
Copy link
Member

nijel commented Mar 2, 2022

Not writing some strings to the files by Weblate should be covered by #3745.

Back to the original topic - is this general with the Android strings, or is this behavior specific to your use case?

@nijel nijel self-assigned this Mar 2, 2022
@nijel nijel added this to the 4.11.1 milestone Mar 2, 2022
@nijel nijel closed this as completed in d10fd0d Mar 2, 2022
@github-actions
Copy link

github-actions bot commented Mar 2, 2022

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.

@arkon
Copy link
Author

arkon commented Mar 2, 2022

This should be the general desired behaviour, yes. Empty strings are invalid (but the system may still fall back to another locale's version), while incomplete plurals will crash apps.

@nijel
Copy link
Member

nijel commented Mar 2, 2022

Okay, I've made the add-on installed by default for the Android files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit
Projects
None yet
Development

No branches or pull requests

2 participants