0003: post locale selector should use the prime version of the language identifier
This commit is contained in:
parent
0fb494d351
commit
356dc5fedb
1 changed files with 21 additions and 6 deletions
|
@ -1,9 +1,22 @@
|
|||
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
|
||||
index 74663fd7..3d278d55 100644
|
||||
--- a/src/components/post_status_form/post_status_form.vue
|
||||
+++ b/src/components/post_status_form/post_status_form.vue
|
||||
@@ -204,7 +204,7 @@
|
||||
>
|
||||
<Select
|
||||
id="post-language"
|
||||
- v-model="newStatus.language"
|
||||
+ v-model="newStatus.language.split(/[-_]/)[0]"
|
||||
class="form-control"
|
||||
>
|
||||
<option
|
||||
diff --git a/src/i18n/en_3pp.json b/src/i18n/en_3pp.json
|
||||
new file mode 100644
|
||||
index 00000000..441f15fc
|
||||
index 00000000..7c4cecd1
|
||||
--- /dev/null
|
||||
+++ b/src/i18n/en_3pp.json
|
||||
@@ -0,0 +1,1223 @@
|
||||
@@ -0,0 +1,1224 @@
|
||||
+{
|
||||
+ "about": {
|
||||
+ "bubble_instances": "Local Bubble Instances",
|
||||
|
@ -212,6 +225,7 @@ index 00000000..441f15fc
|
|||
+ "de": "Translated from @:languages.de",
|
||||
+ "el": "Translated from @:languages.el",
|
||||
+ "en": "Translated from @:languages.en",
|
||||
+ "en_3pp": "Translated from @:languages.en",
|
||||
+ "eo": "Translated from @:languages.eo",
|
||||
+ "es": "Translated from @:languages.es",
|
||||
+ "fa": "Translated from @:languages.fa",
|
||||
|
@ -1228,25 +1242,26 @@ index 00000000..441f15fc
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
|
||||
index 3282fd85..8a1b80d2 100644
|
||||
index 3282fd85..6cafc1b3 100644
|
||||
--- a/src/i18n/messages.js
|
||||
+++ b/src/i18n/messages.js
|
||||
@@ -13,6 +13,7 @@ const loaders = {
|
||||
cs: () => import('./cs.json'),
|
||||
de: () => import('./de.json'),
|
||||
eo: () => import('./eo.json'),
|
||||
+ en: () => import('./en.json'),
|
||||
+ en_3pp: () => import('./en_3pp.json'),
|
||||
es: () => import('./es.json'),
|
||||
et: () => import('./et.json'),
|
||||
eu: () => import('./eu.json'),
|
||||
@@ -42,9 +43,9 @@ const loaders = {
|
||||
@@ -42,9 +43,10 @@ const loaders = {
|
||||
}
|
||||
|
||||
const messages = {
|
||||
- languages: ['en', ...Object.keys(loaders)],
|
||||
+ languages: ['en_3pp', ...Object.keys(loaders)],
|
||||
+ languages: ['en_3pp', 'en', ...Object.keys(loaders)],
|
||||
default: {
|
||||
- en: require('./en.json').default
|
||||
+ en: require('./en.json').default,
|
||||
+ en_3pp: require('./en_3pp.json').default
|
||||
},
|
||||
setLanguage: async (i18n, language) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue