mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2024-12-12 09:04:06 +02:00
1.4 KiB
1.4 KiB
How to add translations
Getting ready
- Clone this repository recursively.
git clone --recursive https://github.com/vrtmrz/obsidian-livesync
- Make
ls-debug
folder under your vault's.obsidian
folder (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.js
to.obsidian/plugins/obsidian-livesync
folder 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 a tagged template literal using
$f
, like below.
- Logger("Could not determine passphrase to save data.json! You probably make the configuration sure again!", LOG_LEVEL_URGENT);
+ Logger($f`Could not determine passphrase to save data.json! You probably make the configuration sure again!`, 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.