Skip to content

Commit 687bfa4

Browse files
committed
Merge remote-tracking branch 'origin/main' into merge-a-bit-shared-logic
2 parents b504b02 + 385bfb6 commit 687bfa4

File tree

6 files changed

+30
-4
lines changed

6 files changed

+30
-4
lines changed

.github/workflows/check_for_crowdin_updates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Setup Python
3737
uses: actions/setup-python@v5
3838
with:
39-
python-version: 3.8
39+
python-version: 3.12
4040
cache: 'pip' # caching pip dependencies
4141
- name: Install Dependencies
4242
shell: bash

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.yml
2+

actions/checkout_desktop/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
with:
99
repository: 'session-foundation/session-desktop'
1010
path: 'desktop'
11-
ref: 'unstable'
11+
ref: 'dev'
1212
- name: Remove existing strings
1313
shell: bash
1414
run: |

actions/setup_shared/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
- name: Setup Python
77
uses: actions/setup-python@v5
88
with:
9-
python-version: 3.8
9+
python-version: 3.12
1010
cache: 'pip' # caching pip dependencies
1111
- name: Install Dependencies
1212
shell: bash

crowdin/generate_desktop_strings.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def convert_non_translatable_strings_to_type_script(input_file, output_path, exp
117117
# Output the file in the desired format
118118
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
119119

120-
joined_exported_locales = ", ".join(f"\n '{locale}'" for locale in exported_locales)
120+
joined_exported_locales = ",".join(f"\n '{locale}'" for locale in exported_locales)
121121
joined_rtl_locales = ", ".join(f"'{locale}'" for locale in rtl_locales)
122122

123123
with open(output_path, 'w', encoding='utf-8') as file:
@@ -134,6 +134,10 @@ def convert_non_translatable_strings_to_type_script(input_file, output_path, exp
134134
file.write('\n')
135135
file.write("export type CrowdinLocale = (typeof crowdinLocales)[number];\n")
136136
file.write('\n')
137+
file.write('export function isCrowdinLocale(locale: string): locale is CrowdinLocale {\n')
138+
file.write(' return crowdinLocales.includes(locale as CrowdinLocale);\n')
139+
file.write('}\n')
140+
file.write('\n')
137141

138142

139143
def convert_all_files(input_directory):

do_not_commit.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
. venv/bin/activate
2+
3+
rm -rf /tmp/strings_download_directory /tmp/strings_output_directory
4+
python crowdin/download_translations_from_crowdin.py db687d6437eb61196bdb5cf18d6b2a9c6f8bea968f2da097b9c3044198377e26ed930c4f4b31184d 618696 --glossary_id 407522 --concept_id 36 /tmp/strings_download_directory --skip-untranslated-strings
5+
6+
python "crowdin/generate_desktop_strings.py" "/tmp/strings_download_directory" "/tmp/strings_output_directory/_locales" "/tmp/strings_output_directory/desktop/ts/localization/constants.ts" && nautilus /tmp/strings_output_directory/_locales /tmp/strings_output_directory/desktop/ts/localization/
7+
8+
9+
python "crowdin/generate_android_strings.py" "/tmp/strings_download_directory" "/tmp/strings_output_directory/android/plop" "/tmp/strings_output_directory/android/plop.kt"
10+
11+
gh workflow run check_for_crowdin_updates.yml
12+
13+
14+
https://crowdin.com/editor/session-crossplatform-strings/all?view=multilingual&languages=he,ha,hi,hu,id,ja,it,kn,km,ko,ku,kmr,lo,lt,lv,lg,mk,ms,mn,no,nenp,nb,nnno,ps,fa,pl,pt,ptbr,pain,ro&filter=basic&value=39
15+
16+
https://crowdin.com/editor/session-crossplatform-strings/all?view=multilingual&languages=ro,ru,sr,srcs,sh,silk,sk,sl,es,sw,es419,sv,tl,ta,te,th,uk,tr,urin,uz,vi,cy,xh&filter=basic&value=39
17+
18+
https://crowdin.com/editor/session-crossplatform-strings/all?view=multilingual&languages=fr,af,ar,be,bg,ca,cs,da,de,el,eu,fi,hy,ka,nl,sq,zhcn,zhtw,gl,bn,hr,et,az,my,eo,fil,lg,ha,bal,ny&filter=basic&value=39
19+
20+

0 commit comments

Comments
 (0)