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

Plurals not working in 4.14.1 for i18next JSON v3 #8136

Closed
2 tasks done
tibormarchynzoom opened this issue Sep 20, 2022 · 2 comments
Closed
2 tasks done

Plurals not working in 4.14.1 for i18next JSON v3 #8136

tibormarchynzoom opened this issue Sep 20, 2022 · 2 comments
Labels
wontfix Nobody will work on this.

Comments

@tibormarchynzoom
Copy link

Describe the issue

If we have JSON file looks like this and using i18next JSON v3

{
  "messages": {
    "SAVED_FILTERS_plural": "Uložené filtry ({{count}})",
    "SAVED_FILTERS": "Uložený filtr",
    "SAVED_FILTERS_0": "Žádné uložené filtry"
  }
}

Weblate is showing us alert saying

"The component contains several duplicated translation strings. Please fix this by removing duplicated strings with same identifier from the translation files."

for all languages. Also when we want to translate plurals, there is not visible field for it in UI for other languages than English US. Also there is no field for "zero (_0)" form even in English US.

I already tried

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

Steps to reproduce the behavior

See description

Expected behavior

No response

Screenshots

cs_cz_plurals
en_us_plurals
weblate_duplicate_found
git_en_us

Exception traceback

No response

How do you run Weblate?

PyPI module

Weblate versions

  • Weblate: 4.14.1
  • Django: 3.2.6
  • siphashc: 2.1
  • translate-toolkit: 3.7.3
  • lxml: 4.9.1
  • Pillow: 9.2.0
  • bleach: 3.3.0
  • python-dateutil: 2.8.1
  • social-auth-core: 4.3.0
  • social-auth-app-django: 5.0.0
  • django-crispy-forms: 1.11.1
  • oauthlib: 3.1.0
  • django-compressor: 2.4
  • djangorestframework: 3.12.2
  • django-filter: 2.4.0
  • django-appconf: 1.0.4
  • user-agents: 2.2.0
  • filelock: 3.8.0
  • rapidfuzz: 2.6.1
  • openpyxl: 3.0.7
  • celery: 5.2.7
  • kombu: 5.2.4
  • translation-finder: 2.14
  • weblate-language-data: 2022.7
  • html2text: 2020.1.16
  • pycairo: 1.20.0
  • pygobject: 3.38.0
  • diff-match-patch: 20200713
  • requests: 2.27.1
  • django-redis: 4.12.1
  • hiredis: 1.1.0
  • sentry_sdk: 1.9.8
  • Cython: 0.29.22
  • misaka: 2.1.1
  • GitPython: 3.1.14
  • borgbackup: 1.1.15
  • pyparsing: 3.0.9
  • pyahocorasick: 1.4.1
  • python-redis-lock: 3.7.0
  • charset-normalizer: 2.0.12
  • Python: 3.8.13
  • Git: 2.31.1
  • psycopg2-binary: 2.8.6
  • phply: 1.2.5
  • ruamel.yaml: 0.16.13
  • tesserocr: 2.5.2
  • boto3: 1.24.76
  • zeep: 4.1.0
  • aeidon: 1.9
  • iniparse: 0.5
  • Mercurial: 6.2.2
  • git-svn: 2.31.1
  • git-review: 2.3.1
  • Redis server: 5.0.3
  • PostgreSQL server: 10.19
  • Database backends: django.db.backends.postgresql
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: mail.office.zoomint.com
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://localhost:6379, redis://localhost:6379, regular
  • Platform: Linux 4.18.0-408.el8.x86_64 (x86_64)

Weblate deploy checks

System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/weblate-4.14.1/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/weblate-4.14.1/admin/backup.html

System check identified 3 issues (1 silenced).

Additional context

No response

@nijel
Copy link
Member

nijel commented Sep 22, 2022

The current implementation matches v3 documentation that you either use muptiple (_<digit> suffix) or simple (_plural suffix) plural, not both of them. See https://www.i18next.com/misc/json-format#i18next-json-v3

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

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 Oct 3, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

2 participants