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

Chinese (Traditional, Hong Kong) using incorrect plural quantifier on android #7816

Closed
2 tasks done
crowleysimon opened this issue Jun 29, 2022 · 6 comments · Fixed by translate/translate#4666
Closed
2 tasks done
Assignees
Labels
bug Something is broken. translate-toolkit Issues which need to be fixed in the translate-toolkit
Milestone

Comments

@crowleysimon
Copy link

Describe the issue

I'm seeing the same issue described in 4296 but the language I am seeing the issue with is Chinese (Traditional, Hong Kong).

To recap, Weblate is aware that the language only has one plural form, but is exporting it to the incorrect quantifier on android. e.g.:

It's taking this original English string:

<plurals name="vms_num_visitors">
    <item quantity="one"><xliff:g id="qtySingular">%d</xliff:g> visitor</item>
    <item quantity="other"><xliff:g id="qtyPlural">%d</xliff:g> visitors</item>
</plurals>

and outputting:

<plurals name="vms_num_visitors">
    <item quantity="one"><xliff:g id="qtyPlural">%d</xliff:g> 訪客</item>
    <item quantity="other"/>
</plurals>

when the correct output would be:

<plurals name="vms_num_visitors">
    <item quantity="other"><xliff:g id="qtyPlural">%d</xliff:g> 訪客</item>
</plurals>

Android will only display what is in the "other" quantity.

I noticed that issue was marked fixed in 4.2.1 however I'm using 4.10.1.

I already tried

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

Steps to reproduce the behavior

No response

Expected behavior

Chinese (Traditional, Hong Kong) plurals on android are only exported as the "other" quantity. e.g.:

<plurals name="vms_num_visitors">
    <item quantity="other"><xliff:g id="qtyPlural">%d</xliff:g> 訪客</item>
</plurals>

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

PyPI module

Weblate versions

Weblate 4.10.1
Django 3.2.6
siphashc 1.3
translate-toolkit 3.5.1
lxml 4.6.3
Pillow 7.2.0
bleach 3.1.5
python-dateutil 2.8.2
social-auth-core 4.1.0
social-auth-app-django 5.0.0
django-crispy-forms 1.9.2
oauthlib 3.1.1
django-compressor 2.4.1
djangorestframework 3.11.2
django-filter 2.4.0
django-appconf 1.0.4
user-agents 2.1
filelock 3.0.12
setuptools 57.4.0
jellyfish 0.8.2
openpyxl 3.0.7
celery 5.1.2
kombu 5.1.0
translation-finder 2.7
weblate-language-data 2021.5
html2text 2020.1.16
pycairo 1.20.1
pygobject 3.40.1
diff-match-patch 20200713
requests 2.24.0
django-redis 4.12.1
hiredis 1.1.0
sentry_sdk 0.16.5
Cython 0.29.24
misaka 2.1.1
GitPython 3.1.18
borgbackup 1.1.17
pyparsing 3.0.6
pyahocorasick 1.4.2
python-redis-lock 3.6.0
Python 3.6.9
Git 2.17.1
psycopg2-binary 2.8.6
chardet 3.0.4
ruamel.yaml 0.17.10
Redis server 4.0.9
PostgreSQL server 10.21

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Jun 29, 2022

I cannot reproduce this on the current versions. Maybe it has been fixed meanwhile, or I'm doing something different. Can you share more details on the issue?

@nijel nijel added the question This is more a question for the support than an issue. label Jun 29, 2022
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

nijel added a commit to translate/translate that referenced this issue Jun 29, 2022
@crowleysimon
Copy link
Author

Thank you for the fast reply. It may have been fixed already, but I did look through the change logs for each release since 4.10.1 before creating this issue and didn't notice anything relevant.
I didn't setup or manage our weblate but I believe there's an issue with the python version preventing us from updating past 4.10.1 that is hopefully resolved soon.

I'll admit I don't know much about weblate, what other details could I provide? The translators are correctly only given one plural form to translate to:
Screen Shot 2022-06-29 at 5 26 31 pm
and when I download the strings file directly from weblate it appears in the "one" quantity with a blank "other".
Screen Shot 2022-06-29 at 5 25 22 pm

nijel added a commit to nijel/translate that referenced this issue Jun 29, 2022
This is Android way of coding complex language codes, we need to strip
this out to get actual language code.

Fixes WeblateOrg/weblate#7816
@nijel
Copy link
Member

nijel commented Jun 29, 2022

Thanks, this should fix it: translate/translate#4666

@nijel nijel added bug Something is broken. translate-toolkit Issues which need to be fixed in the translate-toolkit and removed question This is more a question for the support than an issue. labels Jun 29, 2022
@nijel nijel self-assigned this Jun 29, 2022
@nijel nijel added this to the 4.13.1 milestone Jun 29, 2022
nijel added a commit to translate/translate that referenced this issue Jun 29, 2022
This is Android way of coding complex language codes, we need to strip
this out to get actual language code.

Fixes WeblateOrg/weblate#7816
@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).

@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
bug Something is broken. translate-toolkit Issues which need to be fixed in the translate-toolkit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants