From c90ad419e839467deb4b8b20fde153f01b65c782 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Tue, 19 Mar 2024 21:05:09 -0700 Subject: [PATCH 1/6] Add: i18n workflow check --- .github/workflows/i18n-check.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/i18n-check.yml diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml new file mode 100644 index 00000000..97373dde --- /dev/null +++ b/.github/workflows/i18n-check.yml @@ -0,0 +1,28 @@ +name: Verify all i18n files are alphabetized + +on: + push: + pull_request: + paths: + - strings/** # Should only check if any strings changed + +jobs: + update_translations: + runs-on: ubuntu-latest + steps: + # Check out the repository + - name: Checkout repository + uses: actions/checkout@v4 + + # Set up node to run the javascript + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: '20' + + # The only argument is the `directory`, which is where the i18n files are + # stored. + - name: Run Update JSON Files action + uses: audiobookshelf/audiobookshelf-i18n-updater@v1.1.0 + with: + directory: 'strings/' # Adjust the directory path as needed \ No newline at end of file From f27048618de2459090877b24c1055fee395e31b5 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Tue, 19 Mar 2024 21:05:53 -0700 Subject: [PATCH 2/6] Add: newline to end of file --- .github/workflows/i18n-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index 97373dde..c0917408 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -25,4 +25,4 @@ jobs: - name: Run Update JSON Files action uses: audiobookshelf/audiobookshelf-i18n-updater@v1.1.0 with: - directory: 'strings/' # Adjust the directory path as needed \ No newline at end of file + directory: 'strings/' # Adjust the directory path as needed From 95f47793d28f5bbff6c651f4789e9750434ecccf Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Tue, 19 Mar 2024 21:08:43 -0700 Subject: [PATCH 3/6] Example: German strings out of order --- strings/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/de.json b/strings/de.json index 2e5d5cd3..6341e7bc 100644 --- a/strings/de.json +++ b/strings/de.json @@ -3,8 +3,8 @@ "ButtonAddNewServer": "Neuen Server hinzufügen", "ButtonAuthors": "Autoren", "ButtonBack": "Zurück", - "ButtonCancel": "Abbrechen", "ButtonCancelTimer": "Timer abbrechen", + "ButtonCancel": "Abbrechen", "ButtonClearFilter": "Filter löschen", "ButtonCloseFeed": "Feed schließen", "ButtonCollections": "Sammlungen", From 4a32de482b02cf41913923efaf44e8eea11a5745 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Tue, 19 Mar 2024 21:09:49 -0700 Subject: [PATCH 4/6] Example: German keys alphabetized --- strings/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/de.json b/strings/de.json index 6341e7bc..2e5d5cd3 100644 --- a/strings/de.json +++ b/strings/de.json @@ -3,8 +3,8 @@ "ButtonAddNewServer": "Neuen Server hinzufügen", "ButtonAuthors": "Autoren", "ButtonBack": "Zurück", - "ButtonCancelTimer": "Timer abbrechen", "ButtonCancel": "Abbrechen", + "ButtonCancelTimer": "Timer abbrechen", "ButtonClearFilter": "Filter löschen", "ButtonCloseFeed": "Feed schließen", "ButtonCollections": "Sammlungen", From 8994cb3a6e3b897b9047db159fbb42b55a02aafb Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Tue, 19 Mar 2024 21:12:52 -0700 Subject: [PATCH 5/6] Added newline to force check --- strings/da.json | 2 +- strings/de.json | 2 +- strings/en-us.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/strings/da.json b/strings/da.json index 285d9298..497ea7bd 100644 --- a/strings/da.json +++ b/strings/da.json @@ -291,4 +291,4 @@ "ToastPodcastCreateSuccess": "Podcast oprettet med succes", "ToastRSSFeedCloseFailed": "Mislykkedes lukning af RSS-feed", "ToastRSSFeedCloseSuccess": "RSS-feed lukket" -} \ No newline at end of file +} diff --git a/strings/de.json b/strings/de.json index 2e5d5cd3..2ea2ea5f 100644 --- a/strings/de.json +++ b/strings/de.json @@ -291,4 +291,4 @@ "ToastPodcastCreateSuccess": "Podcast erstellt", "ToastRSSFeedCloseFailed": "RSS-Feed konnte nicht geschlossen werden", "ToastRSSFeedCloseSuccess": "RSS-Feed geschlossen" -} \ No newline at end of file +} diff --git a/strings/en-us.json b/strings/en-us.json index c48c5907..733656c3 100644 --- a/strings/en-us.json +++ b/strings/en-us.json @@ -291,4 +291,4 @@ "ToastPodcastCreateSuccess": "Podcast created successfully", "ToastRSSFeedCloseFailed": "Failed to close RSS feed", "ToastRSSFeedCloseSuccess": "RSS feed closed" -} \ No newline at end of file +} From 934d9b1df456b3c128c341d7c39e65e7be52abf4 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Tue, 19 Mar 2024 21:19:38 -0700 Subject: [PATCH 6/6] Fixed release number of action --- .github/workflows/i18n-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index c0917408..9e9415f6 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -23,6 +23,6 @@ jobs: # The only argument is the `directory`, which is where the i18n files are # stored. - name: Run Update JSON Files action - uses: audiobookshelf/audiobookshelf-i18n-updater@v1.1.0 + uses: audiobookshelf/audiobookshelf-i18n-updater@v1.1.1 with: directory: 'strings/' # Adjust the directory path as needed