1.6 KiB
1.6 KiB
Misskey's Translation - English version
How to add a new language?
Copy a language file to /locales
and rename it after the language you wish to add.
If you find an untranslated part on Misskey:
-
Look for untranslated parts in the miskey's source code.
- For instance, if you find an untranslated part in:
src/client/app/mobile/views/pages/home.vue
.
- For instance, if you find an untranslated part in:
-
Replace the untranslated portion with a character string of the form
%i18n:@foo%
.- In fact,
foo
should be a word that is appropriate for the situation and is easy to understand in English. - For example, if the untranslated portion is the following "タイムライン" you must write:
%i18n:@timeline%
.
- In fact,
-
Open each language file in /locales, check whether the file name (path) found in step 1 exists, if not, create it.
- You shouldn't touch any of the files in
src/client/app/
. - For example, in this case we want to modify untranslated parts of
src/client/app/mobile/views/pages/home.vue
, so you should only modify the followingmobile/views/pages/home.vue
.
- You shouldn't touch any of the files in
-
Add the translated text property using the
foo
keyword below the path that you found or created in step 2. Make sure to type your text in quotation marks. Text should always be inside of quotes.- For example, in this case we add timeline:
timeline: "Timeline"
tolocales/en.yml
, andtimeline: "タイムライン"
tolocales/ja.yml
.
- For example, in this case we add timeline:
-
And done!
For more details, please refer to this commit.