Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing translations and translation typos #1443

Merged
merged 6 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
- name: "Analyze Code"
run: ./flutterw pub global run melos analyze-check

- name: "Check translations"
run: |
cd app && ./../flutterw gen-l10n && cd ..
./scripts/check_translations.sh ./app/.untranslated-messages.txt

- name: "Run unit tests Encointer"
run: ./flutterw pub global run melos unit-test-app-exclude-encointer-node-e2e

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ app/android/fastlane/metadata/android/en-US/images/phoneScreenshots/
/source

# printscreens generated in tests
/screenshots
/screenshots

# Contains missing translations if any, otherwise it is an empty json: '{}'
app/.untranslated-messages.txt
3 changes: 2 additions & 1 deletion app/l10n.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
arb-dir: lib/l10n/arb
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
nullable-getter: false
nullable-getter: false
untranslated-messages-file: .untranslated-messages.txt
6 changes: 3 additions & 3 deletions app/lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
"placeholders": {
"errorText": {
"type": "String",
"example": "Format exaception"
"example": "Format exception"
}
}
},
Expand All @@ -291,7 +291,7 @@
"placeholders": {
"accountName": {
"type": "String",
"example": "Format exaception"
"example": "Format exception"
}
}
},
Expand All @@ -317,7 +317,7 @@
"placeholders": {
"network": {
"type": "String",
"example": "Dev-Gessel"
"example": "Dev-Gesell"
},
"community": {
"type": "String",
Expand Down
1 change: 1 addition & 0 deletions app/lib/l10n/arb/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"deleteAccount": "supprimer",
"detail": "Détail",
"detailsEnter": "Entre tes détails.",
"developer": "Mode développeur",
"done": "Finit",
"doYouAlreadyHaveAnAccount": "Tu as déjà un compte?",
"enable": "Activer",
Expand Down
1 change: 1 addition & 0 deletions app/lib/l10n/arb/app_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
"shareInvoice": "Отправить инвойс",
"shareLinkHint": "Или Вы можете поделиться ссылкой",
"showRouteMeetupLocation": "Показать маршрут",
"startGathering": "Старт собрание",
"success": "Успешно",
"switchAccount": "Сменить аккаунт",
"switchCommunity": "Сменить сообщество",
Expand Down
16 changes: 16 additions & 0 deletions scripts/check_translations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if [ $# -eq 0 ]; then
echo "Usage: $0 <filename>"
exit 1
fi

file="$1"

if grep -q '{}' "$file"; then
echo "No missing translations found."
else
echo "Found missing translations:"
cat "$file"
exit 1
fi
Loading