-
-
Notifications
You must be signed in to change notification settings - Fork 951
Expand file tree
/
Copy pathcrowdin.yml
More file actions
50 lines (50 loc) · 4.26 KB
/
Copy pathcrowdin.yml
File metadata and controls
50 lines (50 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Crowdin CLI configuration for Kolibri
# See https://crowdin.github.io/crowdin-cli/configuration for more information
# See https://support.crowdin.com/developer/configuration-file/ for all available options
#
#
# Your Crowdin credentials
#
"project_id": "201933"
"base_path": "."
"base_url": "https://api.crowdin.com"
#
# Defines whether to preserve the original directory structure in the Crowdin project
#
"preserve_hierarchy": false
#
# Files configuration.
# See https://support.crowdin.com/developer/configuration-file/ for all available options
# Note that this only works because of the additional language mapping in the Crowdin project settings
# This allows us to use two-letter language codes in our locale folder names
# but override with specific locale codes in Crowdin where needed
#
files: [
# CSV translation files
{"source": "/kolibri/locale/en/LC_MESSAGES/*.csv", "first_line_contains_header": true, "scheme": "identifier,source_phrase,context,translation", "update_option": "update_as_unapproved", "translation": "/kolibri/locale/%locale_with_underscore%/LC_MESSAGES/%original_file_name%", "languages_mapping": &language_mapping {"locale_with_underscore": {
# Generated mapping from crowdin_code to Django locale code
# Generated by build_tools/i18n/generate_mapping.py
"ach": "ach_UG", "ar": "ar", "bg": "bg_BG", "bn": "bn_BD", "de": "de", "el": "el", "en": "en", "es-ES": "es_ES", "fa": "fa", "fr": "fr_FR", "fv": "ff_CM", "gu-IN": "gu_IN", "ha": "ha", "hi": "hi_IN", "ht": "ht", "id": "id", "it": "it", "ka": "ka", "km": "km", "ko": "ko", "la": "es_419", "mr": "mr", "my": "my", "ny": "ny", "pa-IN": "pa", "pt-BR": "pt_BR", "pt-mz": "pt_MZ", "sw-TZ": "sw_TZ", "te": "te", "uk": "uk", "ur-PK": "ur_PK", "vi": "vi", "yo": "yo", "zh-CN": "zh_Hans"}}},
# Frontend i18n for ALL python_packages/* plugins (issue #14970) — one entry.
# Plugin frontend CSVs are namespace-prefixed (e.g.
# kolibri_sentry_plugin-messages.csv), so their basenames are globally unique
# under preserve_hierarchy: false. The `**` in source and translation carries
# each plugin's <dist>/<module> subpath through, so downloads land back in the
# correct plugin locale/. A new frontend plugin needs NO change here. (Ignore
# node_modules so the recursive `**` can't pick up any vendored CSVs.)
{"source": "/python_packages/**/locale/en/LC_MESSAGES/*.csv", "ignore": ["/python_packages/**/node_modules/**"], "first_line_contains_header": true, "scheme": "identifier,source_phrase,context,translation", "update_option": "update_as_unapproved", "translation": "/python_packages/**/locale/%locale_with_underscore%/LC_MESSAGES/%original_file_name%", "languages_mapping": *language_mapping},
# PO translation files
{"source": "/kolibri/locale/en/LC_MESSAGES/*.po", "update_option": "update_as_unapproved", "translation": "/kolibri/locale/%locale_with_underscore%/LC_MESSAGES/%original_file_name%", "ignore": ["/kolibri/locale/en/LC_MESSAGES/*.json", "/kolibri/locale/en/LC_MESSAGES/*.mo", "/kolibri/locale/en/LC_MESSAGES/README.md"], "languages_mapping": *language_mapping},
# Plugin backend PO — one entry PER plugin, unavoidably (unlike the frontend
# CSVs above). Django makemessages always emits a file named django.po, so
# under preserve_hierarchy: false every plugin's django.po flattens to the same
# Crowdin file and collides (with each other and with kolibri's). Keeping them
# distinct needs a unique `dest` per file, which is inherently one explicit
# entry per plugin: a wildcard `dest` disambiguated by directory would require
# preserve_hierarchy: true globally, restructuring kolibri's own catalogs on
# Crowdin (out of scope). `dest` renames only in the Crowdin project; the
# `translation` template still writes downloads to the real local django.po, so
# compile / message-file steps are unaffected. A plugin gaining its first
# backend string needs a new entry mirroring this one.
{"source": "/python_packages/kolibri-oidc-client-plugin/kolibri_oidc_client_plugin/locale/en/LC_MESSAGES/django.po", "dest": "/kolibri_oidc_client_plugin.django.po", "update_option": "update_as_unapproved", "translation": "/python_packages/kolibri-oidc-client-plugin/kolibri_oidc_client_plugin/locale/%locale_with_underscore%/LC_MESSAGES/django.po", "languages_mapping": *language_mapping}]