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

duplicated languages for Brazilian Portugal #8427

Closed
2 tasks done
jzahradn opened this issue Dec 5, 2022 · 6 comments
Closed
2 tasks done

duplicated languages for Brazilian Portugal #8427

jzahradn opened this issue Dec 5, 2022 · 6 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@jzahradn
Copy link

jzahradn commented Dec 5, 2022

Describe the issue

Hi,
when a new language for Brazilian Portugese was created on Weblate on an Android component, it was created as just "Portugese" with code pt_BR (and the Gitlab file is ../values-pt-rbr/strings.xml)
We already have another Portugese language in the same component, so finally we have two languages identified as "Portugese", one with code pt and second one with code pt_BR.
In another non-Android component, the Brazil language was created correctly as "Portugese (Brazil)(pt-br)" with code pt-br. (and the gitlab file is ../translations/pt-BR.json).
So in the whole project, we have among languages:

  • Portugese with code pt
  • Portugese with code pt_BR
  • Portugese (Brazil)(pt-br) with code pt-br

Is it correct? Do you know why don't we have just one language for Portugese and one language for Brazilian Portugese? Can we use Portugese (Brazil)(pt-br) language on Android component too? A current status is a bit confusing.
Thank you
Best Regards
Jan

I already tried

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

Steps to reproduce the behavior

  1. Go to '...'
  2. Scroll down to '...'
  3. Click on '...'
  4. See error

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Git checkout

Weblate versions

Weblate: weblate-4.5
Django: 3.1.7
siphashc: 2.1
translate-toolkit: 3.3.2
lxml: 4.6.2
Pillow: 8.1.0
bleach: 3.3.0
python-dateutil: 2.8.1
social-auth-core: 4.0.3
social-auth-app-django: 4.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.0.12
setuptools: 53.0.0
jellyfish: 0.8.2
openpyxl: 3.0.6
celery: 5.0.5
kombu: 5.0.2
translation-finder: 2.9
weblate-language-data: 2021.3
html2text: 2020.1.16
pycairo: 1.20.0
pygobject: 3.38.0
diff-match-patch: 20200713
requests: 2.25.1
django-redis: 4.12.1
hiredis: 1.1.0
sentry_sdk: 0.20.3
Cython: 0.29.22
misaka: 2.1.1
GitPython: 3.1.13
borgbackup: 1.1.15
pyparsing: 2.4.7
Python: 3.6.9
Git: 2.17.1
psycopg2: 2.7.4
phply: 1.2.5
chardet: 3.0.4
ruamel.yaml: 0.16.12
tesserocr: 2.4.0
akismet: 1.0.1
boto3: 1.16.39
zeep: 3.4.0
aeidon: 1.2.1
Mercurial: 4.5.3
git-review: 1.28.0
Redis server: 4.0.9
PostgreSQL server: 9.5.13
Database backends: django.db.backends.postgresql
Cache backends: default:RedisCache, avatar:FileBasedCache
Email setup: django.core.mail.backends.smtp.EmailBackend: smtpinternal.myq.cz
OS encoding: filesystem=utf-8, default=utf-8
Celery: redis://localhost:6379, redis://localhost:6379, regular
Platform: Linux 4.15.0-191-generic (x86_64)

Weblate deploy checks

SystemCheckError: System check identified some issues:

CRITICALS:
?: (weblate.E027) The path /var/www/weblate/data/cache/fonts/14d784bc3113819c63ec09bcd1e0dcb4-le64.cache-7 is owned by a different user, check your DATA_DIR settings.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/install.html#file-permissions
?: (weblate.E027) The path /var/www/weblate/data/cache/fonts/b5e909958a2fcc4071e7f0142376ee37-le64.cache-7 is owned by a different user, check your DATA_DIR settings.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/install.html#file-permissions
?: (weblate.E027) The path /var/www/weblate/data/cache/fonts/be68cefafcae4573dbe0c72153107a55-le64.cache-7 is owned by a different user, check your DATA_DIR settings.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/install.html#file-permissions
?: (weblate.E027) The path /var/www/weblate/data/cache/fonts/d7cac2f5cee47ca036f3b6ae92bfbdcc-le64.cache-7 is owned by a different user, check your DATA_DIR settings.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/install.html#file-permissions

WARNINGS:
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
?: (weblate.W025.ini) Failure in loading handler for ini file format: Missing iniparse library.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/install.html#optional-deps
?: (weblate.W025.islu) Failure in loading handler for islu file format: Missing iniparse library.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/install.html#optional-deps
?: (weblate.W033.Subversion) Failure in loading VCS module for Subversion: git: 'svn' is not a git command. See 'git --help'.

The most similar commands are
	fsck
	mv
	show
 (1)
	HINT: https://docs.weblate.org/en/weblate-4.5/vcs.html

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
	HINT: https://docs.weblate.org/en/weblate-4.5/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.5/admin/backup.html
?: (weblate.I031) New Weblate version is available, please upgrade to 4.14.
	HINT: https://docs.weblate.org/en/weblate-4.5/admin/upgrade.html

System check identified 12 issues (2 silenced).

Additional context

No response

@jzahradn jzahradn added the question This is more a question for the support than an issue. label Dec 5, 2022
@github-actions
Copy link

github-actions bot commented Dec 5, 2022

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
Copy link
Member

nijel commented Dec 6, 2022

Built-in Weblate definitions for languages are here: https://github.com/WeblateOrg/language-data/blob/main/languages.csv#L450

As you can see, it has Portuguese (Brazil) and Portuguese. Your Weblate instance might have customized the languages' data, so it might be caused by this. Additionally, language codes can be customized per-project using https://docs.weblate.org/en/latest/admin/projects.html#language-aliases. See also https://docs.weblate.org/en/latest/admin/languages.html#language-parsing-codes and https://docs.weblate.org/en/latest/admin/languages.html#new-translations

@jzahradn
Copy link
Author

jzahradn commented Dec 8, 2022

I still don't know why language with code pt_BR was created as "Portuguese" when we already have language with code pt and name "Portuguese" and language with code pt-br and name "Portuguese (Brazil)".
I expect to have only two such languages in a project, one for Portuguese and one for Brazilian Portuguese.
You can close this case. I renamed language pt_BR from "Portuguese" to "Portuguese (Brazil)", it is not a solution I would like to have, but at least the language code corresponds the name now.

@nijel
Copy link
Member

nijel commented Dec 8, 2022

pt_BR is included with Weblate as Portuguese (Brazil), pt-br is not included with Weblate and should be automatically mapped to pt_BR. Maybe somebody has created in manually?

To merge these, you can move all content from one to other using weblate move_language pt-br pt_BR. Once that is completed, you can delete pt-br language from the user interface (the deletion is not available when there is some content).

@jzahradn
Copy link
Author

jzahradn commented Dec 8, 2022

Thank you for the explanation.

@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 Dec 19, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

2 participants