Skip to content

Commit

Permalink
Merge pull request #15 from oxen-io/test-fix-rtl-locale-changes
Browse files Browse the repository at this point in the history
fix: rtl locales write to file causing issues on CI
  • Loading branch information
mpretty-cyro authored Aug 28, 2024
2 parents 48e1596 + 4c06d76 commit 0f707c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_for_crowdin_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v4
with:
path: 'scripts'
ref: 'main'
# don't provide a branch (ref) so it uses the default for that event
- name: Checkout Android
uses: actions/checkout@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion crowdin/generate_desktop_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def convert_non_translatable_strings_to_type_script(input_file, output_path, rtl
# Output the file in the desired format
Path(output_path).parent.mkdir(parents=True, exist_ok=True)

joined_rtl_locales = {", ".join(f"'{locale}'" for locale in rtl_locales)}

with open(output_path, 'w', encoding='utf-8') as file:
file.write('export enum LOCALE_DEFAULTS {\n')
for entry in entries:
Expand All @@ -127,7 +129,7 @@ def convert_non_translatable_strings_to_type_script(input_file, output_path, rtl

file.write('}\n')
file.write('\n')
file.write(f"export const rtlLocales = [{", ".join(f"'{locale}'" for locale in rtl_locales)}] as const\n")
file.write(f"export const rtlLocales = [{joined_rtl_locales}] as const;\n")
file.write('\n')

def convert_all_files(input_directory):
Expand Down

0 comments on commit 0f707c0

Please sign in to comment.