Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madis0/weblate-memory-to-translations
Convert Weblate translation memory to translations
https://github.com/madis0/weblate-memory-to-translations
Last synced: 23 days ago
JSON representation
Convert Weblate translation memory to translations
- Host: GitHub
- URL: https://github.com/madis0/weblate-memory-to-translations
- Owner: Madis0
- License: mit
- Created: 2023-07-29T04:48:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-29T05:10:57.000Z (over 1 year ago)
- Last Synced: 2023-07-29T05:27:15.147Z (over 1 year ago)
- Language: Python
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Weblate memory to translations
Convert Weblate translation memory to translations## How to use
1. Log in to any instance of Weblate
2. Click on your profile -> Translation memory
3. Download the file you need as JSON
4. Go to the project itself
5. Open the original localization file (e.g. English)
6. Files -> Download translation
7. Download the script
8. Place the script and the two files in the same folder
9. Adjust the filenames at the end of the script, make sure to match the output locale code you need
10. Run the script
11. Go back to the project
12. Open the target localization file (your language)
13. Files -> Upload translation
14. Select the output file and options you prefer
15. Upload!## Why
For some reason, a Weblate project I translated suddenly lost my translations for one file. After a short panic, I found out that my profile has automatically stored the translation memory based on my previous work.
Tried downloading and uploading it directly, both JSON and TMX formats failed to upload. Then I downloaded the JSON file, compared the structure to the original localization file and wrote a script to automatically generate translations from it.
## Notes
- Translation memory doesn't seem to contain plurals, these you'll have to redo manually
- Strings that are identical on original and target language will not be included