translation parameterisation (#165)

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#165
This commit is contained in:
floatingghost 2022-09-12 15:47:53 +00:00
parent 61c70545f0
commit f628483499
5 changed files with 119 additions and 30 deletions

View file

@ -41,7 +41,7 @@
"qrcode": "1", "qrcode": "1",
"ruffle-mirror": "2021.12.31", "ruffle-mirror": "2021.12.31",
"vue": "^3.2.31", "vue": "^3.2.31",
"vue-i18n": "^9.2.0-beta.39", "vue-i18n": "^9.2.2",
"vue-router": "4.0.14", "vue-router": "4.0.14",
"vue-template-compiler": "2.6.11", "vue-template-compiler": "2.6.11",
"vuex": "4.0.2" "vuex": "4.0.2"

View file

@ -60,7 +60,7 @@
v-if="status.translation" v-if="status.translation"
class="translation" class="translation"
> >
<h4>{{ $t('status.translated_from', { language: status.translation.detected_language }) }}</h4> <h4>{{ $t(`languages.translated_from.${status.translation.detected_language.toLowerCase()}`) }}</h4>
<RichContent <RichContent
:class="{ '-single-line': singleLine }" :class="{ '-single-line': singleLine }"
class="text media-body" class="text media-body"
@ -85,7 +85,7 @@
:key="language.key" :key="language.key"
:value="language.value" :value="language.value"
> >
{{ language.label }} {{ $t(`languages.${language.value.toLowerCase()}`) }}
</option> </option>
</Select> </Select>
{{ ' ' }} {{ ' ' }}

View file

@ -164,6 +164,74 @@
"load_older": "Load older interactions", "load_older": "Load older interactions",
"moves": "User migrates" "moves": "User migrates"
}, },
"languages": {
"bg": "Bulgarian",
"en": "English",
"ar": "Arabic",
"az": "Azerbaijani",
"zh": "Chinese",
"cs": "Czech",
"da": "Danish",
"nl": "Dutch",
"eo": "Esperanto",
"fi": "Finnish",
"fr": "French",
"de": "German",
"el": "Greek",
"he": "Hebrew",
"hi": "Hindi",
"hu": "Hungarian",
"id": "Indonesian",
"ga": "Irish",
"it": "Italian",
"ja": "Japanese",
"ko": "Korean",
"fa": "Persian",
"pl": "Polish",
"pt": "Portuguese",
"ru": "Russian",
"sk": "Slovak",
"es": "Spanish",
"sv": "Swedish",
"tr": "Turkish",
"uk": "Ukrainian",
"lt": "Lithuanian",
"lv": "Latvian",
"translated_from": {
"bg": "Translated from @:languages.bg",
"en": "Translated from @:languages.en",
"ar": "Translated from @:languages.ar",
"az": "Translated from @:languages.az",
"zh": "Translated from @:languages.zh",
"cs": "Translated from @:languages.cs",
"da": "Translated from @:languages.da",
"nl": "Translated from @:languages.nl",
"eo": "Translated from @:languages.eo",
"fi": "Translated from @:languages.fi",
"fr": "Translated from @:languages.fr",
"de": "Translated from @:languages.de",
"el": "Translated from @:languages.el",
"he": "Translated from @:languages.he",
"hi": "Translated from @:languages.hi",
"hu": "Translated from @:languages.hu",
"id": "Translated from @:languages.id",
"ga": "Translated from @:languages.ga",
"it": "Translated from @:languages.it",
"ja": "Translated from @:languages.ja",
"ko": "Translated from @:languages.ko",
"fa": "Translated from @:languages.fa",
"pl": "Translated from @:languages.pl",
"pt": "Translated from @:languages.pt",
"ru": "Translated from @:languages.ru",
"sk": "Translated from @:languages.sk",
"es": "Translated from @:languages.es",
"sv": "Translated from @:languages.sv",
"tr": "Translated from @:languages.tr",
"uk": "Translated from @:languages.uk",
"lt": "Translated from @:languages.lt",
"lv": "Translated from @:languages.lv"
}
},
"lists": { "lists": {
"create": "Create", "create": "Create",
"delete": "Delete list", "delete": "Delete list",

View file

@ -164,6 +164,14 @@
"load_older": "古いインタラクションを見る", "load_older": "古いインタラクションを見る",
"moves": "ユーザーの引っ越し" "moves": "ユーザーの引っ越し"
}, },
"languages": {
"en": "英語",
"ja": "日本語",
"zh": "中国語",
"translated_from": {
"en": "英語から翻訳しました"
}
},
"lists": { "lists": {
"create": "作成", "create": "作成",
"delete": "削除", "delete": "削除",

View file

@ -1156,24 +1156,32 @@
source-map "0.6.1" source-map "0.6.1"
yaml-eslint-parser "^0.3.2" yaml-eslint-parser "^0.3.2"
"@intlify/core-base@9.2.0-beta.40": "@intlify/core-base@9.2.2":
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.0-beta.40.tgz#85df2e183b2102716c5d40795848fc2359354580" resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.2.tgz#5353369b05cc9fe35cab95fe20afeb8a4481f939"
integrity sha512-vOR0lHgtJ3IkzvXLeMQeNeYreFSKG9v3SU8QOD//WKHdBy4QPISs9CZJkYzBeBVCJVZ/eM6OTSbXF8M2k53iCw== integrity sha512-JjUpQtNfn+joMbrXvpR4hTF8iJQ2sEFzzK3KIESOx+f+uwIjgw20igOyaIdhfsVVBCds8ZM64MoeNSx+PHQMkA==
dependencies: dependencies:
"@intlify/devtools-if" "9.2.0-beta.40" "@intlify/devtools-if" "9.2.2"
"@intlify/message-compiler" "9.2.0-beta.40" "@intlify/message-compiler" "9.2.2"
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/vue-devtools" "9.2.0-beta.40" "@intlify/vue-devtools" "9.2.2"
"@intlify/devtools-if@9.2.0-beta.40": "@intlify/devtools-if@9.2.2":
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.0-beta.40.tgz#bee42fefaaaa590aa5ac7fe2a98777fb84bfaf5e" resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.2.tgz#b13d9ac4b4e2fe6d2e7daa556517a8061fe8bd39"
integrity sha512-EUiuLxlgortD1dhT0btm3YYIs2vk9kMdcGXiYYbHWRTylc8Iv7Yz47y5Y+IlbZzk51h/nYvuqXE1h9diZZWAvQ== integrity sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==
dependencies: dependencies:
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/message-compiler@9.2.0-beta.40", "@intlify/message-compiler@next": "@intlify/message-compiler@9.2.2":
version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.2.tgz#e42ab6939b8ae5b3d21faf6a44045667a18bba1c"
integrity sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==
dependencies:
"@intlify/shared" "9.2.2"
source-map "0.6.1"
"@intlify/message-compiler@next":
version "9.2.0-beta.40" version "9.2.0-beta.40"
resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.40.tgz#d5d0c5652b9e74e0b4da07a2b8731e1f0e729029" resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.40.tgz#d5d0c5652b9e74e0b4da07a2b8731e1f0e729029"
integrity sha512-6QWTSYewmkew4nsRqgkwTVuGFKzxVCOK8EXsPt15N+tN1g+OYjC3PfGA2dPB6cVkNxqA9mV/hNK02uHPWU9t0A== integrity sha512-6QWTSYewmkew4nsRqgkwTVuGFKzxVCOK8EXsPt15N+tN1g+OYjC3PfGA2dPB6cVkNxqA9mV/hNK02uHPWU9t0A==
@ -1186,13 +1194,18 @@
resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.40.tgz#a850936008e6e865310b2a49136d494dd326faab" resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.40.tgz#a850936008e6e865310b2a49136d494dd326faab"
integrity sha512-xWz+SFjgt/LfaSbbHVn+V7gmvX4ZNP3cIFta790GWZ/tEgwJeC3tkV7i45iUbZ4ZimOerFgKH05b7qvJlKb6RQ== integrity sha512-xWz+SFjgt/LfaSbbHVn+V7gmvX4ZNP3cIFta790GWZ/tEgwJeC3tkV7i45iUbZ4ZimOerFgKH05b7qvJlKb6RQ==
"@intlify/vue-devtools@9.2.0-beta.40": "@intlify/shared@9.2.2":
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.0-beta.40.tgz#37457fd719b0b6afb0679c33ceb47b0ac77f457c" resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.2.tgz#5011be9ca2b4ab86f8660739286e2707f9abb4a5"
integrity sha512-3A0D/E9quf+KWonzXUDk3xNP0+d1DMdtAwyXNTjzFcQPvjugC2Xn6fmsd0kNn7nHjgpB+vwIuamGiuE+S+OULw== integrity sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==
"@intlify/vue-devtools@9.2.2":
version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.2.tgz#b95701556daf7ebb3a2d45aa3ae9e6415aed8317"
integrity sha512-+dUyqyCHWHb/UcvY1MlIpO87munedm3Gn6E9WWYdWrMuYLcoIoOEVDWSS8xSwtlPU+kA+MEQTP6Q1iI/ocusJg==
dependencies: dependencies:
"@intlify/core-base" "9.2.0-beta.40" "@intlify/core-base" "9.2.2"
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/vue-i18n-loader@^5.0.0": "@intlify/vue-i18n-loader@^5.0.0":
version "5.0.0" version "5.0.0"
@ -11415,14 +11428,14 @@ vue-eslint-parser@^5.0.0:
esquery "^1.0.1" esquery "^1.0.1"
lodash "^4.17.11" lodash "^4.17.11"
vue-i18n@^9.2.0-beta.39: vue-i18n@^9.2.2:
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0-beta.40.tgz#8088b19d619f47bf0e0f529f9bd1413460f2ff56" resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.2.tgz#aeb49d9424923c77e0d6441e3f21dafcecd0e666"
integrity sha512-UwcGsbTTaDJry6BbFFzt115EVHN/bXi07DyUIZ4zrYeGMBPp2QAptMwVaGUQid1gaMmUreAKarGIqw46oCQEvg== integrity sha512-yswpwtj89rTBhegUAv9Mu37LNznyu3NpyLQmozF3i1hYOhwpG8RjcjIFIIfnu+2MDZJGSZPXaKWvnQA71Yv9TQ==
dependencies: dependencies:
"@intlify/core-base" "9.2.0-beta.40" "@intlify/core-base" "9.2.2"
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/vue-devtools" "9.2.0-beta.40" "@intlify/vue-devtools" "9.2.2"
"@vue/devtools-api" "^6.2.1" "@vue/devtools-api" "^6.2.1"
vue-loader@^16.0.0: vue-loader@^16.0.0: