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

"Other" not shown for Serbian Android strings #9364

Open
2 tasks done
eighthave opened this issue Jun 7, 2023 · 5 comments · Fixed by translate/translate#5115
Open
2 tasks done

"Other" not shown for Serbian Android strings #9364

eighthave opened this issue Jun 7, 2023 · 5 comments · Fixed by translate/translate#5115
Labels
bug Something is broken.

Comments

@eighthave
Copy link
Contributor

Describe the issue

https://hosted.weblate.org/translate/f-droid/f-droid/sr/?q=button_view_all_apps_in_category&sort_by=-priority%2Cposition
shows "one", "few", and "many". But using this string in Android causes a crash because "other" is missing:

org.fdroid.fdroid.LocalizationTest > testLoadAllPlural[ci_test(AVD) - 6.0] FAILED
	java.lang.IllegalArgumentException: Bad 'null' format in sr button_view_all_apps_in_category: Plural resource ID #0x7f100000 quantity=0 item=other
	at org.fdroid.fdroid.LocalizationTest.testLoadAllPlural(LocalizationTest.java:128)

This might be related to #1550

I already tried

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

Steps to reproduce the behavior

https://hosted.weblate.org/translate/f-droid/f-droid/sr/?q=button_view_all_apps_in_category&sort_by=-priority%2Cposition&checksum=

  • "other" is not presented in the UI
  • see that the plurals in values-sr/strings.xml lack "other" entries

Expected behavior

There should be "other" strings in the Weblate UI when editing plurals in Serbian.

Screenshots


Screenshot from 2023-06-07 22-14-11

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Jun 8, 2023

It has three plurals, and it should save it as other to the file. But there seems to be issue with labelling it in the UI.

@nijel
Copy link
Member

nijel commented Jun 8, 2023

This is yet another incarnation of #7520. The problem here is that in integer scope, rules for several languages are the same (sr/bs/ru/uk), but they differ in floating-point conditions. That's why in CLDR, they are once named one/few/other and once/few/many (keeping other for the floating-point bits). As Weblate sees only integer part here, it does not differentiate these and uses the same labelling for all of them.

The translate-toolkit has a hard-coded list of plurals per language from CLDR, so loading/saving should work fine, this is just display logic in Weblate which is wrong.

This comment was marked as off-topic.

@nijel nijel reopened this Nov 13, 2023
@nijel

This comment was marked as off-topic.

This comment was marked as outdated.

@nijel nijel reopened this Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants