forked from openedx/openedx-app-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openedx#399 from openedx/develop
Develop to main. Release v2
- Loading branch information
Showing
479 changed files
with
17,573 additions
and
6,309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Validate English strings.xml | ||
|
||
on: | ||
pull_request: { } | ||
push: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
translation_strings: | ||
name: Validate strings.xml | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install translations requirements | ||
run: make translation_requirements | ||
|
||
- name: Validate English plurals in strings.xml | ||
run: make validate_english_plurals | ||
|
||
- name: Test extract strings | ||
run: | | ||
make extract_translations | ||
# Ensure the file is extracted | ||
test -f i18n/src/main/res/values/strings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,6 @@ local.properties | |
/.idea/ | ||
*.log | ||
/config_settings.yaml | ||
.venv/ | ||
i18n/ | ||
**/values-*/strings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
clean_translations_temp_directory: | ||
rm -rf i18n/ | ||
|
||
translation_requirements: | ||
pip3 install -r i18n_scripts/requirements.txt | ||
|
||
pull_translations: clean_translations_temp_directory | ||
atlas pull $(ATLAS_OPTIONS) translations/openedx-app-android/i18n:i18n | ||
python3 i18n_scripts/translation.py --split --replace-underscore | ||
|
||
extract_translations: clean_translations_temp_directory | ||
python3 i18n_scripts/translation.py --combine | ||
|
||
validate_english_plurals: | ||
@if git grep 'quantity' -- '**/res/values/strings.xml' | grep -E 'quantity=.(zero|two|few|many)'; then \ | ||
echo ""; \ | ||
echo ""; \ | ||
echo "Error: Found invalid plurals in the files listed above."; \ | ||
echo " Please only use 'one' and 'other' in English strings.xml files,"; \ | ||
echo " otherwise Transifex fails to parse them."; \ | ||
echo ""; \ | ||
exit 1; \ | ||
else \ | ||
echo "strings.xml files are valid."; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.