[PR #2302] [CLOSED] Preparing for GitLocalize to manage translations #3694

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

📋 Pull Request Information

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

Base: masterHead: master


📝 Commits (9)

  • d72665a Removed duplicate strings and added English fallback
  • b2bf301 Fixed special characters breaking comparison
  • 2fea8a6 Updated readme for server translation
  • 4bda632 Initial string syncer
  • 2a834d1 Added pretty printing
  • 0da5f49 Cleaned up functions
  • 4b55137 Stats not correctly counting multiple files
  • 86175ce Updated to use helper functions
  • e583f63 Handle new language key collisions

📊 Changes

22 files changed (+430 additions, -1657 deletions)

View changed files

📝 client/plugins/i18n.js (+3 -3)
📝 client/plugins/utils.js (+2 -2)
client/strings/.gitignore (+1 -0)
📝 client/strings/cs/strings.json (+1 -8)
📝 client/strings/da/strings.json (+0 -49)
📝 client/strings/de/strings.json (+0 -44)
📝 client/strings/en-us/strings.json (+0 -0)
📝 client/strings/es/strings.json (+0 -39)
📝 client/strings/fr/strings.json (+0 -52)
client/strings/hi.json (+0 -729)
client/strings/hi/strings.json (+90 -0)
📝 client/strings/hr/strings.json (+0 -284)
📝 client/strings/it/strings.json (+1 -58)
📝 client/strings/lt/strings.json (+0 -33)
📝 client/strings/nl/strings.json (+0 -70)
📝 client/strings/no/strings.json (+0 -41)
📝 client/strings/pl/strings.json (+0 -186)
📝 client/strings/ru/strings.json (+0 -27)
client/strings/string_syncer.py (+328 -0)
📝 client/strings/sv/strings.json (+0 -14)

...and 2 more files

📄 Description

In order to prepare for using GitLocalize for managing server translations, the following steps need to take place:

  • Rename the strings from %lang%.json to %lang%/strings.json because GitLocalize does not like a flat file structure (without adding the entire repository
  • Delete strings which have not been translated yet (matches English version)
  • Change supplant to fallback to English if the translation does not exist and use the new naming scheme
  • Write script to copy translations between repositories
  • Set up GitLocalize

If GitLocalize is decided on, the following steps should be taken:

  • Link repository to GitLocalize
  • BEFORE adding languages, set the project path in the Settings (it's a pain to get GitLocalize to scan the repository properly if you add languages before fixing the path)
    image
  • Add languages (Overview tab)
  • Add "Translation FAQ" to the website and "How to Contribute" on this GH readme. Maybe make an announcement on Discord too. I was thinking of making a thread for people to coordinate since there will probably be multiple people who want to work on per language

Once users who want to help link their GH account to GitLocalize, they should be added as a Moderator (https://docs.gitlocalize.com/understanding_roles.html) so they can open PRs to GH. If a user does not want to use GitLocalize, they can still open PRs like normal, but they will not be able to just look at the %lang%/strings.json file to find English lines because they will not exist until they have been translated (since some languages will use the same words as English)

Once this first pass of updating the missing translations for the server is finished, the translations will be copied to the app repository using the included script to help keep the two repositories in sync. will diverge since there is not a lot of overlap beyond the basic book, podcast, and ABS strings, and the UI is updated separately.


🔄 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/2302 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 11/11/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (9) - [`d72665a`](https://github.com/advplyr/audiobookshelf/commit/d72665a64805ad4049de9e0e430ee1f319646608) Removed duplicate strings and added English fallback - [`b2bf301`](https://github.com/advplyr/audiobookshelf/commit/b2bf3016350de476daad690e5199daa1b75959ae) Fixed special characters breaking comparison - [`2fea8a6`](https://github.com/advplyr/audiobookshelf/commit/2fea8a658fc89b235f02942f4582cab555ef6629) Updated readme for server translation - [`4bda632`](https://github.com/advplyr/audiobookshelf/commit/4bda632984e8908592e945dda51ecfd9f0c48b6c) Initial string syncer - [`2a834d1`](https://github.com/advplyr/audiobookshelf/commit/2a834d137efbd573771422de71621c10908dd74a) Added pretty printing - [`0da5f49`](https://github.com/advplyr/audiobookshelf/commit/0da5f49b5a856036ea02c8d261194402c78daba0) Cleaned up functions - [`4b55137`](https://github.com/advplyr/audiobookshelf/commit/4b5513798316c8d65074f84a9b9f0bf4aa3e300e) Stats not correctly counting multiple files - [`86175ce`](https://github.com/advplyr/audiobookshelf/commit/86175ce1b5ca5c7986a4282f037c1301637628df) Updated to use helper functions - [`e583f63`](https://github.com/advplyr/audiobookshelf/commit/e583f63b6b59e0499924850081f9930e081c2310) Handle new language key collisions ### 📊 Changes **22 files changed** (+430 additions, -1657 deletions) <details> <summary>View changed files</summary> 📝 `client/plugins/i18n.js` (+3 -3) 📝 `client/plugins/utils.js` (+2 -2) ➕ `client/strings/.gitignore` (+1 -0) 📝 `client/strings/cs/strings.json` (+1 -8) 📝 `client/strings/da/strings.json` (+0 -49) 📝 `client/strings/de/strings.json` (+0 -44) 📝 `client/strings/en-us/strings.json` (+0 -0) 📝 `client/strings/es/strings.json` (+0 -39) 📝 `client/strings/fr/strings.json` (+0 -52) ➖ `client/strings/hi.json` (+0 -729) ➕ `client/strings/hi/strings.json` (+90 -0) 📝 `client/strings/hr/strings.json` (+0 -284) 📝 `client/strings/it/strings.json` (+1 -58) 📝 `client/strings/lt/strings.json` (+0 -33) 📝 `client/strings/nl/strings.json` (+0 -70) 📝 `client/strings/no/strings.json` (+0 -41) 📝 `client/strings/pl/strings.json` (+0 -186) 📝 `client/strings/ru/strings.json` (+0 -27) ➕ `client/strings/string_syncer.py` (+328 -0) 📝 `client/strings/sv/strings.json` (+0 -14) _...and 2 more files_ </details> ### 📄 Description In order to prepare for using GitLocalize for managing server translations, the following steps need to take place: - [x] Rename the strings from `%lang%.json` to `%lang%/strings.json` because GitLocalize does not like a flat file structure (without adding the entire repository - [x] Delete strings which have not been translated yet (matches English version) - [x] Change `supplant` to fallback to English if the translation does not exist and use the new naming scheme - [x] Write script to copy translations between repositories - [ ] Set up GitLocalize If GitLocalize is decided on, the following steps should be taken: - Link repository to GitLocalize - BEFORE adding languages, set the project path in the Settings (it's a pain to get GitLocalize to scan the repository properly if you add languages before fixing the path) ![image](https://github.com/advplyr/audiobookshelf/assets/5686638/a401f1c5-d8aa-4652-954b-9e545d128230) - Add languages (`Overview` tab) - ~~Add "Translation FAQ" to the website and "How to Contribute" on this GH readme.~~ Maybe make an announcement on Discord too. I was thinking of making a thread for people to coordinate since there will probably be multiple people who want to work on per language Once users who want to help link their GH account to GitLocalize, they should be added as a Moderator (https://docs.gitlocalize.com/understanding_roles.html) so they can open PRs to GH. If a user does not want to use GitLocalize, they can still open PRs like normal, but they will not be able to just look at the `%lang%/strings.json` file to find English lines because they will not exist until they have been translated (since some languages will use the same words as English) Once this first pass of updating the missing translations for the server is finished, the translations will be copied to the app repository using the included script to help keep the two repositories in sync. ~~will diverge since there is not a lot of overlap beyond the basic book, podcast, and ABS strings, and the UI is updated separately.~~ --- <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:41 +02:00
adam closed this issue 2026-04-25 00:16:41 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3694