From f2b6be5fa8a3d3e4cf1d9f43689aed1334879129 Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 25 Nov 2026 07:39:29 +0300 Subject: [PATCH] feat(i18n): Ukrainian The panel in Ukrainian, the language of the project's founder: a full catalog of its 2610 messages, Ukrainian in the language list, and the CI catalog check, the catalog test and CONTRIBUTING with locale/uk. Unit symbols stay Latin (GiB, MiB/s), as the panel writes them in numbers next to these texts. --- .github/workflows/test.yml | 4 +- CONTRIBUTING.md | 6 +- README.md | 2 +- appsettings/tests/test_appsettings.py | 2 +- locale/uk/LC_MESSAGES/django.mo | Bin 0 -> 348093 bytes locale/uk/LC_MESSAGES/django.po | 13450 ++++++++++++++++++++++++ webvirtcloud/settings.py | 1 + webvirtcloud/tests/test_catalogs.py | 2 +- 8 files changed, 13459 insertions(+), 8 deletions(-) create mode 100644 locale/uk/LC_MESSAGES/django.mo create mode 100644 locale/uk/LC_MESSAGES/django.po diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe8d3619..46cbf949 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -91,8 +91,8 @@ jobs: - name: Check Translation Catalogs if: matrix.python-version == '3.12' && matrix.database == 'sqlite' run: | - python manage.py makemessages -l tr -l zh --no-obsolete --ignore=staticfiles -v0 - for dir in locale/tr/LC_MESSAGES locale/zh/LC_MESSAGES; do + python manage.py makemessages -l tr -l zh -l uk --no-obsolete --ignore=staticfiles -v0 + for dir in locale/tr/LC_MESSAGES locale/zh/LC_MESSAGES locale/uk/LC_MESSAGES; do msgfmt --check -o /tmp/django.mo "$dir/django.po" missing=$(msgattrib --untranslated "$dir/django.po"; msgattrib --only-fuzzy "$dir/django.po") if [ -n "$missing" ]; then echo "$missing"; echo "::error file=$dir/django.po::untranslated or fuzzy messages"; exit 1; fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d974050e..be8b16d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,9 +61,9 @@ It lists the dead keys it leaves out: a character only a dead key types cannot b English is the source language; the panel is translated into the other languages of `LANGUAGES` in `settings.py`, each with a full catalog in `locale/`. A new or changed text needs its translation in each before CI passes (needs `gettext`): ```bash -python manage.py makemessages -l tr -l zh --no-obsolete --ignore=staticfiles --ignore=.venv -# translate the new and fuzzy entries of locale/tr/LC_MESSAGES/django.po and locale/zh/LC_MESSAGES/django.po -python manage.py compilemessages -l tr -l zh +python manage.py makemessages -l tr -l zh -l uk --no-obsolete --ignore=staticfiles --ignore=.venv +# translate the new and fuzzy entries of the django.po of locale/tr, locale/zh and locale/uk +python manage.py compilemessages -l tr -l zh -l uk ``` ## Running tests diff --git a/README.md b/README.md index 5cc03272..17076009 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ flowchart TB
  • VMs created, renamed or deleted with virsh or virt-manager are picked up on their own
  • Tags, protected VMs, search by IP or MAC address and a VM report as an Excel file
  • Alerts by e-mail or webhook, and a health check URL
  • -
  • English, Turkish and Simplified Chinese
  • +
  • English, Turkish, Simplified Chinese and Ukrainian
  • diff --git a/appsettings/tests/test_appsettings.py b/appsettings/tests/test_appsettings.py index c6474b40..39e1a4d9 100644 --- a/appsettings/tests/test_appsettings.py +++ b/appsettings/tests/test_appsettings.py @@ -31,7 +31,7 @@ class AppSettingsTestCase(TestCase): page = self.client.get(reverse("appsettings")).content.decode() choice = page[page.index('