From 0998546ed27883497e4ce3d6af8c7bf03804d0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20K=C3=B6nig?= <33655937+jkoenig134@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:44:22 +0100 Subject: [PATCH] Clean translations (#404) * chore: run translations cleaner * chore: add melos utilities to clean translations * ci: check translations --- .github/workflows/test.yml | 1 + apps/enmeshed/lib/l10n/app_de.arb | 1 - apps/enmeshed/lib/l10n/app_en.arb | 1 - melos.yaml | 8 ++++++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58e67e5ee..efcc35eff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: - run: melos bootstrap - run: melos analyze - run: melos format + - run: melos check_translations test: runs-on: ubuntu-latest diff --git a/apps/enmeshed/lib/l10n/app_de.arb b/apps/enmeshed/lib/l10n/app_de.arb index 6f9adade4..615df4076 100644 --- a/apps/enmeshed/lib/l10n/app_de.arb +++ b/apps/enmeshed/lib/l10n/app_de.arb @@ -138,7 +138,6 @@ "drawer_hints_firstSteps": "Erste Schritte", "profiles_copyAddressToClipboardLabel": "Die Profil-Adresse in die Zwischenablage kopieren.", "profiles_copiedAddressToClipboard": "Die Profil-Adresse wurde in die Zwischenablage kopiert.", - "profiles_settings_title": "Einstellungen", "profiles_settings_subtitle": "Verwalten Sie hier Ihre verbundenen Geräte und Profileinstellungen oder sichern Sie Ihre Daten.", "profiles_settings_editProfile": "Profil bearbeiten", "profiles_settings_deleteProfile": "Profil löschen", diff --git a/apps/enmeshed/lib/l10n/app_en.arb b/apps/enmeshed/lib/l10n/app_en.arb index 0075a3228..a274ed2e5 100644 --- a/apps/enmeshed/lib/l10n/app_en.arb +++ b/apps/enmeshed/lib/l10n/app_en.arb @@ -138,7 +138,6 @@ "drawer_hints_firstSteps": "First steps", "profiles_copyAddressToClipboardLabel": "Copy your profile-address to the clipboard.", "profiles_copiedAddressToClipboard": "The profile-address has been copied to the clipboard.", - "profiles_settings_title": "Settings", "profiles_settings_subtitle": "Manage your connected devices and profile settings or back up your data here.", "profiles_settings_editProfile": "Edit profile", "profiles_settings_deleteProfile": "Delete profile", diff --git a/melos.yaml b/melos.yaml index 9d8f2e1a3..dfcce7e80 100644 --- a/melos.yaml +++ b/melos.yaml @@ -27,3 +27,11 @@ scripts: outdated: run: melos exec -c 1 --no-flutter -- "dart pub outdated" && melos exec -c 1 --flutter -- "flutter pub outdated" description: Run `dart pub outdated` in all packages + + check_translations: + run: melos exec --dir-exists=lib/l10n --flutter -- "dart run translations_cleaner list-unused-terms --abort-on-unused" + description: Check translations in all packages + + clean_translations: + run: melos exec --dir-exists=lib/l10n --flutter -- "dart run translations_cleaner clean-translations && npx prettier -w lib/l10n/*.arb --parser json" + description: Check translations in all packages