From 52d640c5a7fc6085cdd1bb1a23f1b93acee184aa Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Wed, 22 Aug 2018 01:46:10 +0900 Subject: [PATCH] Fix --- docs/translate.en.md | 4 ++-- docs/translate.fr.md | 2 +- docs/translate.ja.md | 4 ++-- locales/README.md | 2 +- locales/index.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/translate.en.md b/docs/translate.en.md index 8ac65d3564..13c2b3d7f4 100644 --- a/docs/translate.en.md +++ b/docs/translate.en.md @@ -11,12 +11,12 @@ If you find an untranslated part on Misskey: - 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%`. -3. Open the `locales/ja.yml`, check whether the <strong>file name (path)</strong> found in step 1 exists, if not, create it. +3. Open the `locales/ja-JP.yml`, check whether the <strong>file name (path)</strong> found in step 1 exists, if not, create it. - Do not put the beginning of the path `src/client/app/` in the locale file. - For example, in this case we want to modify untranslated parts of `src/client/app/mobile/views/pages/home.vue`, so the key is `mobile/views/pages/home.vue`. 4. Add the 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: "タイムライン"` to `locales/ja.yml`. + - For example, in this case we add timeline: `timeline: "タイムライン"` to `locales/ja-JP.yml`. 5. And doneï¼ diff --git a/docs/translate.fr.md b/docs/translate.fr.md index 463267daa5..940055602a 100644 --- a/docs/translate.fr.md +++ b/docs/translate.fr.md @@ -16,7 +16,7 @@ Si vous trouvez un segment non-traduit sur Misskey : - Par exemple, dans ce cas de figure, nous voulons modifier le segment non-traduit de : `src/client/app/mobile/views/pages/home.vue`donc il faut juste écrire : `mobile/views/pages/home.vue` dans les fichiers linguistiques. 4. Ajoutez la propriété du texte traduit grâce à la clef `foo`, en-dessous du chemin correspondant à votre modification que vous avez trouvé ou créé dans l'étape 2. À côté, veuillez indiquer entre "guillemets" la valeur de votre traduction. - - Par exemple, dans ce cas de figure, nous ajoutons la propriété et la traduction `timeline: "Timeline"` à `locales/fr.yml`, mais aussi la propriété et la version originale `timeline: "タイムライン"` à `locales/ja.yml`. + - Par exemple, dans ce cas de figure, nous ajoutons la propriété et la traduction `timeline: "Timeline"` à `locales/fr.yml`, mais aussi la propriété et la version originale `timeline: "タイムライン"` à `locales/ja-JP.yml`. 5. Vous avez réussi à traduire une portion de misskey ï¼ diff --git a/docs/translate.ja.md b/docs/translate.ja.md index 8a2ef25005..d59dc2a4a9 100644 --- a/docs/translate.ja.md +++ b/docs/translate.ja.md @@ -11,12 +11,12 @@ Misskey内ã®æœªç¿»è¨³ç®‡æ‰€ã‚’見ã¤ã‘ãŸã‚‰ - `foo`ã¯å®Ÿéš›ã«ã¯ãã®å ´ã«é©ã—ãŸã‚ã‹ã‚Šã‚„ã™ã„(英語ã®)åå‰ã«ã—ã¦ãã ã•ã„。 - 例ãˆã°æœªç¿»è¨³ç®‡æ‰€ãŒã€Œã‚¿ã‚¤ãƒ ラインã€ã¨ã„ã†ãƒ†ã‚ストã ã£ãŸå ´åˆã€`%i18n:@timeline%`ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ -3. `locales/ja.yml`ã‚’é–‹ãã€1.ã§è¦‹ã¤ã‘ãŸ<strong>ファイルå(パス)</strong>ã®ã‚ーãŒå˜åœ¨ã™ã‚‹ã‹ç¢ºèªã—ã€ç„¡ã‘ã‚Œã°ä½œæˆã—ã¦ãã ã•ã„。 +3. `locales/ja-JP.yml`ã‚’é–‹ãã€1.ã§è¦‹ã¤ã‘ãŸ<strong>ファイルå(パス)</strong>ã®ã‚ーãŒå˜åœ¨ã™ã‚‹ã‹ç¢ºèªã—ã€ç„¡ã‘ã‚Œã°ä½œæˆã—ã¦ãã ã•ã„。 - パスã®`src/client/app/`ã¯çœç•¥ã—ã¦ãã ã•ã„。 - 例ãˆã°ã€ä»Šå›žã®ä¾‹ã§ã¯`src/client/app/mobile/views/pages/home.vue`ã®æœªç¿»è¨³ç®‡æ‰€ã‚’ä¿®æ£ã—ãŸã„ã®ã§ã€ã‚ーã¯`mobile/views/pages/home.vue`ã«ãªã‚Šã¾ã™ã€‚ 4. ãã®ã‚ーã®ç›´ä¸‹ã«2.ã§ç½®æ›ã—ãŸ`foo`ã®éƒ¨åˆ†ã‚’ã‚ーã¨ã—ã€ãƒ†ã‚ストを値ã¨ã™ã‚‹ãƒ—ãƒãƒ‘ãƒ†ã‚£ã‚’è¿½åŠ ã—ã¾ã™ã€‚ - - 例ãˆã°ã€ä»Šå›žã®ä¾‹ã§è¨€ã†ã¨`locales/ja.yml`ã«`timeline: "タイムライン"`ã‚’è¿½åŠ ã—ã¾ã™ã€‚ + - 例ãˆã°ã€ä»Šå›žã®ä¾‹ã§è¨€ã†ã¨`locales/ja-JP.yml`ã«`timeline: "タイムライン"`ã‚’è¿½åŠ ã—ã¾ã™ã€‚ 5. 完了ã§ã™ï¼ diff --git a/locales/README.md b/locales/README.md index ff663f1a20..09888299cd 100644 --- a/locales/README.md +++ b/locales/README.md @@ -1,4 +1,4 @@ -# **Please DO NOT edit these files** except `ja.yml`. +# **Please DO NOT edit these files** except `ja-JP.yml`. If you want to... * i18n ... please see [Translation guide](../docs/translate.en.md). diff --git a/locales/index.js b/locales/index.js index a17fb6c5ce..0910749bbf 100644 --- a/locales/index.js +++ b/locales/index.js @@ -8,7 +8,7 @@ const yaml = require('js-yaml'); const loadLang = lang => yaml.safeLoad( fs.readFileSync(`${__dirname}/${lang}.yml`, 'utf-8')); -const native = loadLang('ja'); +const native = loadLang('ja-JP'); const langs = { 'de': loadLang('de'), -- GitLab