mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-12 17:25:56 +00:00
1.3 KiB
1.3 KiB
How to add translations
Getting ready
- Clone this repository recursively.
git clone --recursive https://github.com/vrtmrz/obsidian-livesync
- Make
ls-debugfolder under your vault's.obsidianfolder (as like.../dev/.obsidian/ls-debug).
Add translations for already defined terms
- Install dependencies, and build the plug-in as dev. build.
cd obsidian-livesync
npm i -D
npm run buildDev
- Copy the
main.jsto.obsidian/plugins/obsidian-livesyncfolder of your vault, and run Obsidian-Self-hosted LiveSync. - You will get the
missing-translation-yyyy-mm-dd.jsonl, please fill in new translations. - Build the plug-in again, and confirm that displayed things were expected.
- Merge them into
rosetta.ts, and make the PR tohttps://github.com/vrtmrz/livesync-commonlib.
Make messages to be translated
- Find the message that you want to be translated.
- Change the literal to use
$tf, like below.
- Logger("Could not determine passphrase to save data.json! You probably make the configuration sure again!", LOG_LEVEL_URGENT);
+ Logger($tf('someKeyForPassphraseError'), LOG_LEVEL_URGENT);
- Make the PR to
https://github.com/vrtmrz/obsidian-livesync. - Follow the steps of "Add translations for already defined terms" to add the translations.