[PR #2372] [CLOSED] Localization Try2 #3704

Closed
opened 2026-04-25 00:16:43 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2372
Author: @nichwall
Created: 11/30/2023
Status: Closed

Base: masterHead: gitlocalize_try2


📝 Commits (4)

  • 1a89a0d Moved string resource files using git mv to prevent merge conflicts
  • 3c29fe5 Updated i18n.json to use new resource paths
  • ecb462e Added string_syncer script
  • 701cb96 Fixed strings typo

📊 Changes

20 files changed (+331 additions, -2 deletions)

View changed files

📝 client/plugins/i18n.js (+2 -2)
client/strings/.gitignore (+1 -0)
📝 client/strings/cs/strings.json (+0 -0)
📝 client/strings/da/strings.json (+0 -0)
📝 client/strings/de/strings.json (+0 -0)
📝 client/strings/en-us/strings.json (+0 -0)
📝 client/strings/es/strings.json (+0 -0)
📝 client/strings/fr/strings.json (+0 -0)
📝 client/strings/gu/strings.json (+0 -0)
📝 client/strings/hi/strings.json (+0 -0)
📝 client/strings/hr/strings.json (+0 -0)
📝 client/strings/it/strings.json (+0 -0)
📝 client/strings/lt/strings.json (+0 -0)
📝 client/strings/nl/strings.json (+0 -0)
📝 client/strings/no/strings.json (+0 -0)
📝 client/strings/pl/strings.json (+0 -0)
📝 client/strings/ru/strings.json (+0 -0)
client/strings/string_syncer.py (+328 -0)
📝 client/strings/sv/strings.json (+0 -0)
📝 client/strings/zh-cn/strings.json (+0 -0)

📄 Description

This is a second attempt at getting ready for localization (original was #2302) In order to simplify the merge, a few different steps were taken.

The resource files were moved using git mv and were not modified beyond that. This does not remove the English duplicates like I want, but will allow for merging without breaking other PRs by having merge conflicts due to moved files.

I also updated i18n.js to use the new resource paths, but did not change the English fallback behavior.

I added the script explained in the original PR to help keep the server and app repository resource files in sync.

EDIT: removed GitLocalize instructions since it was decided against

Translation workflow

The workflow for translations is as follows for both repositories since the sync happens both ways:

  1. When adding new strings to the project, only add them to the English resource file.
  2. Run the included script to sync existing translations from the other repository (will pull from other repository if translation already exists)
  3. Commit and push both repositories as needed
  4. Untranslated/updated strings show up in GitLocalize to be translated.
  5. Translation PRs from contributors are merged as usual

The script can also be run after translation PRs are merged to ensure that both repositories get new translations of shared strings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2372 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 11/30/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `gitlocalize_try2` --- ### 📝 Commits (4) - [`1a89a0d`](https://github.com/advplyr/audiobookshelf/commit/1a89a0d485adc1922adae16777b073e76c60a1c7) Moved string resource files using git mv to prevent merge conflicts - [`3c29fe5`](https://github.com/advplyr/audiobookshelf/commit/3c29fe5656b17dea7367ef94a6f337085c91a6aa) Updated i18n.json to use new resource paths - [`ecb462e`](https://github.com/advplyr/audiobookshelf/commit/ecb462e4825ff0126367a9ccda883c98723f41ed) Added string_syncer script - [`701cb96`](https://github.com/advplyr/audiobookshelf/commit/701cb9680a7df5d5e9dd2aeb6e75a33fb1099a5e) Fixed strings typo ### 📊 Changes **20 files changed** (+331 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `client/plugins/i18n.js` (+2 -2) ➕ `client/strings/.gitignore` (+1 -0) 📝 `client/strings/cs/strings.json` (+0 -0) 📝 `client/strings/da/strings.json` (+0 -0) 📝 `client/strings/de/strings.json` (+0 -0) 📝 `client/strings/en-us/strings.json` (+0 -0) 📝 `client/strings/es/strings.json` (+0 -0) 📝 `client/strings/fr/strings.json` (+0 -0) 📝 `client/strings/gu/strings.json` (+0 -0) 📝 `client/strings/hi/strings.json` (+0 -0) 📝 `client/strings/hr/strings.json` (+0 -0) 📝 `client/strings/it/strings.json` (+0 -0) 📝 `client/strings/lt/strings.json` (+0 -0) 📝 `client/strings/nl/strings.json` (+0 -0) 📝 `client/strings/no/strings.json` (+0 -0) 📝 `client/strings/pl/strings.json` (+0 -0) 📝 `client/strings/ru/strings.json` (+0 -0) ➕ `client/strings/string_syncer.py` (+328 -0) 📝 `client/strings/sv/strings.json` (+0 -0) 📝 `client/strings/zh-cn/strings.json` (+0 -0) </details> ### 📄 Description This is a second attempt at getting ready for localization (original was #2302) In order to simplify the merge, a few different steps were taken. The resource files were moved using `git mv` and were not modified beyond that. This does not remove the English duplicates like I want, but will allow for merging without breaking other PRs by having merge conflicts due to moved files. I also updated `i18n.js` to use the new resource paths, but did not change the English fallback behavior. I added the script explained in the original PR to help keep the server and app repository resource files in sync. EDIT: removed GitLocalize instructions since it was decided against <details> <summary>Translation workflow</summary> The workflow for translations is as follows for both repositories since the sync happens both ways: 1. When adding new strings to the project, only add them to the English resource file. 2. Run the included script to sync existing translations from the other repository (will pull from other repository if translation already exists) 3. Commit and push both repositories as needed 4. Untranslated/updated strings show up in GitLocalize to be translated. 5. Translation PRs from contributors are merged as usual The script can also be run after translation PRs are merged to ensure that both repositories get new translations of shared strings. </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:43 +02:00
adam closed this issue 2026-04-25 00:16:44 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3704