Skip to content

Weblate not outputing Android <plurals> fields properly, causing app crashes  #1550

Description

@eighthave

With Hebrew, the user interface shows One and Other as the options:

But the strings.xml then has One and Two filled out, then Many and Other blank:

<plurals name="details_last_update_weeks">
	<item quantity="one">עודכן לפני שבוע</item>
	<item quantity="two">עודכן לפני %1$d שבועות</item>
	<item quantity="many"></item>
	<item quantity="other"></item>
</plurals>

An empty Other string can cause crashes. Especially because we remove blank strings, since they cause other problems. Weblate should ensure that if any item of <plurals> has been translated, then <item quantity="other"> must be translated. Here's the Android source reference on the requirement for other:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/res/ResourcesImpl.java#268

Server configuration

https://hosted.weblate.org/translate/f-droid/f-droid

Metadata

Metadata

Assignees

Labels

Blocked by upstreamThe solution to this issue depends on a third-party project and needs to be addressed there first.bugSomething is broken.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions