mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-30 03:32:43 +00:00
Update for Crowdin Integration
- Rename extracted template file to `sunshine.po` - Add `crowdin.yml` - Remove `--init` and `--update` from `localize.yml` - Crowdin will initialize new languages and update existing ones
This commit is contained in:
parent
84584c950b
commit
a014391ae7
2
.github/workflows/localize.yml
vendored
2
.github/workflows/localize.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
- name: Update Strings
|
||||
run: |
|
||||
python ./scripts/_locale.py --extract --init --update
|
||||
python ./scripts/_locale.py --extract
|
||||
|
||||
- name: GitHub Commit & Push # push changes back into nightly
|
||||
uses: actions-js/push@v1.2
|
||||
|
17
crowdin.yml
Normal file
17
crowdin.yml
Normal file
@ -0,0 +1,17 @@
|
||||
"base_path": "."
|
||||
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
|
||||
"preserve_hierarchy": false # flatten tree on crowdin
|
||||
|
||||
"files" : [
|
||||
{
|
||||
"source" : "/locale/*.po",
|
||||
"translation" : "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
|
||||
"languages_mapping": {
|
||||
"two_letters_code": {
|
||||
# map non-two letter codes here, left side is crowdin designation, right side is babel designation
|
||||
"en-GB": "en_GB",
|
||||
"en-US": "en_US"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
@ -38,7 +38,7 @@ def x_extract():
|
||||
commands = [
|
||||
'xgettext',
|
||||
f'--default-domain={project_name.lower()}',
|
||||
f'--output={os.path.join(locale_dir, project_name.lower() + ".pot")}',
|
||||
f'--output={os.path.join(locale_dir, project_name.lower() + ".po")}',
|
||||
'--language=C++',
|
||||
'--boost',
|
||||
'--from-code=utf-8',
|
||||
|
Loading…
x
Reference in New Issue
Block a user