|
5 | 5 | [changelog]: https://github.com/polyipseity/obsidian-modules/blob/main/CHANGELOG.md |
6 | 6 | [community plugin]: https://obsidian.md/plugins?id=modules |
7 | 7 | [latest release]: https://github.com/polyipseity/obsidian-modules/releases/latest |
8 | | -[other things]: https://github.com/polyipseity/obsidian-monorepo |
9 | | -[plugin library]: https://github.com/polyipseity/obsidian-plugin-library |
10 | 8 | [repository]: https://github.com/polyipseity/obsidian-modules |
11 | 9 | [trailer]: https://raw.githubusercontent.com/polyipseity/obsidian-modules/main/assets/trailer.png |
| 10 | +[related]: https://github.com/polyipseity/obsidian-monorepo |
12 | 11 |
|
13 | 12 | Load JavaScript and related languages like TypeScript modules from the vault and the Internet. |
14 | 13 |
|
15 | 14 | [![Buy Me a Coffee/embed]][Buy Me a Coffee] |
16 | 15 |
|
17 | | -__[Repository] · [Changelog] · [Community plugin] · [Other things] · [Features](#features) · [Installation](#installation) · [Usage](#usage) · [Contributing](#contributing) · [Security](#security)__ |
| 16 | +__[Repository] · [Changelog] · [Community plugin] · [Related] · [Features](#features) · [Installation](#installation) · [Usage](#usage) · [Contributing](#contributing) · [Security](#security)__ |
18 | 17 |
|
19 | 18 | ![Trailer] |
20 | 19 |
|
@@ -175,47 +174,7 @@ The todos here, ordered alphabetically, are things planned for the plugin. There |
175 | 174 |
|
176 | 175 | ### Translating |
177 | 176 |
|
178 | | -Translation files are under [`assets/locales/`](assets/locales/). Each locale has its own directory named with its corresponding __[IETF language tag](https://wikipedia.org/wiki/IETF_language_tag)__. Some translation keys are missing here and instead located at [`obsidian-plugin-library`][plugin library]. |
179 | | - |
180 | | -To contribute translation for an existing locale, modify the files in the corresponding directory. |
181 | | - |
182 | | -For a new locale, create a new directory named with its language tag and copy [`assets/locales/en/translation.json`](assets/locales/en/translation.json) into it. Then, add an entry to [`assets/locales/en/language.json`](assets/locales/en/language.json) in this format: |
183 | | - |
184 | | -```JSONc |
185 | | -{ |
186 | | - // ... |
187 | | - "en": "English", |
188 | | - "(your-language-tag)": "(Native name of your language)", |
189 | | - "uwu": "Uwuish", |
190 | | - // ... |
191 | | -} |
192 | | -``` |
193 | | - |
194 | | -Sort the list of languages by the alphabetical order of their language tags. Then modify the files in the new directory. There will be errors in [`assets/locales.ts`](assets/locales.ts), which you can ignore and we will fix them for you. You are welcome to fix them yourself if you know TypeScript. |
195 | | - |
196 | | -When translating, keep in mind the following things: |
197 | | - |
198 | | -- Do not translate anything between `{{` and `}}` (`{{example}}`). They are __interpolations__ and will be replaced by localized strings at runtime. |
199 | | -- Do not translate anything between `$t(` and `)` (`$t(example)`). They refer to other localized strings. To find the localized string being referred to, follow the path of the key, which is separated by dots (`.`). For example, the key [`youtu.be./dQw4w9WgXcQ`](https://youtu.be./dQw4w9WgXcQ) refers to: |
200 | | - |
201 | | -```JSONc |
202 | | -{ |
203 | | - // ... |
204 | | - "youtu": { |
205 | | - // ... |
206 | | - "be": { |
207 | | - // ... |
208 | | - "/dQw4w9WgXcQ": "I am 'youtu.be./dQw4w9WgXcQ'!", |
209 | | - // ... |
210 | | - }, |
211 | | - // ... |
212 | | - }, |
213 | | - // ... |
214 | | -} |
215 | | -``` |
216 | | - |
217 | | -- The keys under `generic` are vocabularies. They can be referred in translation strings by `$t(generic.key)`. Refer to them as much as possible to standardize translations for vocabularies that appear in different places. |
218 | | -- It is okay to move interpolations and references to other localized strings around to make the translation natural. It is also okay to not use some references used in the original translation. However, it is NOT okay to not use all interpolations. |
| 177 | +See [`assets/locales/README.md`](assets/locales/README.md). |
219 | 178 |
|
220 | 179 | ## Security |
221 | 180 |
|
|
0 commit comments