mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-10-15 19:19:21 +08:00
Allow language selection (#191)
* Add dropdown for language * Use vue-i18n to translate strings * Tweak header styling * Add Chinese languages in * Typo * Get language from browser (#193) * adaptive system language * Modify the adaptive system language * Remove dead code * Delete lang default values * Move browser language detection to util * Remove todos * Fix global PHP dropdown Co-authored-by: 墨娘 <61287199+moniang@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7d3290d850
commit
ff88e2f322
@@ -28,7 +28,7 @@ THE SOFTWARE.
|
||||
<div>
|
||||
<div class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ i18n.common.docker }}</label>
|
||||
<label class="label">{{ $t('common.docker') }}</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
@@ -36,7 +36,7 @@ THE SOFTWARE.
|
||||
<div class="checkbox">
|
||||
<PrettyCheck v-model="dockerfile" class="p-default p-curve p-fill p-icon">
|
||||
<i slot="extra" class="icon fas fa-check"></i>
|
||||
{{ i18n.templates.globalSections.docker.dockerfile }}
|
||||
{{ $t('templates.globalSections.docker.dockerfile') }}
|
||||
</PrettyCheck>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@ THE SOFTWARE.
|
||||
</div>
|
||||
<div v-if="dockerfile" class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ i18n.common.dockerCompose }}</label>
|
||||
<label class="label">{{ $t('common.dockerCompose') }}</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
@@ -53,7 +53,7 @@ THE SOFTWARE.
|
||||
<div class="checkbox">
|
||||
<PrettyCheck v-model="dockerCompose" class="p-default p-curve p-fill p-icon">
|
||||
<i slot="extra" class="icon fas fa-check"></i>
|
||||
{{ i18n.templates.globalSections.docker.dockerCompose }}
|
||||
{{ $t('templates.globalSections.docker.dockerCompose') }}
|
||||
</PrettyCheck>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,10 +64,9 @@ THE SOFTWARE.
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '../../i18n';
|
||||
import PrettyCheck from 'pretty-checkbox-vue/check';
|
||||
import delegatedFromDefaults from '../../util/delegated_from_defaults';
|
||||
import computedFromDefaults from '../../util/computed_from_defaults';
|
||||
import PrettyCheck from 'pretty-checkbox-vue/check';
|
||||
|
||||
const defaults = {
|
||||
dockerfile: {
|
||||
@@ -82,7 +81,7 @@ THE SOFTWARE.
|
||||
|
||||
export default {
|
||||
name: 'GlobalDocker', // Component name
|
||||
display: i18n.common.docker, // Display name for tab
|
||||
display: 'common.docker', // Display name for tab (i18n key)
|
||||
key: 'docker', // Key for data in parent
|
||||
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
|
||||
components: {
|
||||
@@ -91,11 +90,6 @@ THE SOFTWARE.
|
||||
props: {
|
||||
data: Object, // Data delegated back to us from parent
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
i18n,
|
||||
};
|
||||
},
|
||||
computed: computedFromDefaults(defaults, 'docker'), // Getters & setters for the delegated data
|
||||
watch: {
|
||||
// Disable docker-compose if dockerfile is disabled
|
||||
|
Reference in New Issue
Block a user