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

Pull new translations and add script to map files #1309

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
724 changes: 150 additions & 574 deletions cms/locale/bg/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

625 changes: 212 additions & 413 deletions cms/locale/bs/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

414 changes: 95 additions & 319 deletions cms/locale/cs/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

557 changes: 193 additions & 364 deletions cms/locale/de/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

469 changes: 195 additions & 274 deletions cms/locale/es/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

1,021 changes: 1,021 additions & 0 deletions cms/locale/es_CL/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

302 changes: 66 additions & 236 deletions cms/locale/et/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

775 changes: 365 additions & 410 deletions cms/locale/fr/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

741 changes: 334 additions & 407 deletions cms/locale/it/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

608 changes: 214 additions & 394 deletions cms/locale/ja/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

338 changes: 112 additions & 226 deletions cms/locale/ko/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

334 changes: 110 additions & 224 deletions cms/locale/lt/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

355 changes: 101 additions & 254 deletions cms/locale/lv/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

611 changes: 211 additions & 400 deletions cms/locale/nl/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

619 changes: 140 additions & 479 deletions cms/locale/ro/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

614 changes: 204 additions & 410 deletions cms/locale/ru/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

388 changes: 170 additions & 218 deletions cms/locale/sl/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

382 changes: 78 additions & 304 deletions cms/locale/uk/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

353 changes: 107 additions & 246 deletions cms/locale/vi/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

607 changes: 155 additions & 452 deletions cms/locale/zh_CN/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

617 changes: 257 additions & 360 deletions cms/locale/zh_TW/LC_MESSAGES/cms.po

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions copy_translations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python3

import pathlib
import shutil
import sys

Check warning on line 5 in copy_translations.py

View check run for this annotation

Codecov / codecov/patch

copy_translations.py#L3-L5

Added lines #L3 - L5 were not covered by tests

if len(sys.argv) != 3:
print(f"Usage: {sys.argv[0]} <onesky-downloaded-folder> <cms-repository-root>")
sys.exit(0)

Check warning on line 9 in copy_translations.py

View check run for this annotation

Codecov / codecov/patch

copy_translations.py#L7-L9

Added lines #L7 - L9 were not covered by tests

onesky_folder = pathlib.Path(sys.argv[1])
cms_folder = pathlib.Path(sys.argv[2])

Check warning on line 12 in copy_translations.py

View check run for this annotation

Codecov / codecov/patch

copy_translations.py#L11-L12

Added lines #L11 - L12 were not covered by tests

locale_map = {

Check warning on line 14 in copy_translations.py

View check run for this annotation

Codecov / codecov/patch

copy_translations.py#L14

Added line #L14 was not covered by tests
"bg-BG": "bg",
"bs-BA": "bs",
"cs": "cs",
"de-DE": "de",
"es-CL": "es_CL",
"es-ES": "es",
"et-EE": "et",
"fr-FR": "fr",
"it-IT": "it",
"ja": "ja",
"ko": "ko",
"lt-LT": "lt",
"lv-LV": "lv",
"nl-NL": "nl",
"ro-RO": "ro",
"ru-RU": "ru",
"sl-SI": "sl",
"uk": "uk",
"vi": "vi",
"zh-CN": "zh_CN",
"zh-TW": "zh_TW",
}

for onesky_locale, cms_locale in locale_map.items():
shutil.copy(

Check warning on line 39 in copy_translations.py

View check run for this annotation

Codecov / codecov/patch

copy_translations.py#L38-L39

Added lines #L38 - L39 were not covered by tests
onesky_folder / f"{onesky_locale}.po",
cms_folder / "cms/locale" / cms_locale / "LC_MESSAGES/cms.po",
)