mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-10-16 03:43:08 +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,13 +28,13 @@ THE SOFTWARE.
|
||||
<div>
|
||||
<div v-if="!pythonServerEnabled" class="field is-horizontal is-aligned-top">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ i18n.templates.globalSections.python.pythonServer }}</label>
|
||||
<label class="label">{{ $t('templates.globalSections.python.pythonServer') }}</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<label class="text">
|
||||
{{ i18n.templates.globalSections.python.pythonMustBeEnabledOnOneSite }}
|
||||
{{ $t('templates.globalSections.python.pythonMustBeEnabledOnOneSite') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@ THE SOFTWARE.
|
||||
|
||||
<div v-else class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ i18n.templates.globalSections.python.pythonServer }}</label>
|
||||
<label class="label">{{ $t('templates.globalSections.python.pythonServer') }}</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
@@ -61,7 +61,6 @@ THE SOFTWARE.
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '../../i18n';
|
||||
import delegatedFromDefaults from '../../util/delegated_from_defaults';
|
||||
import computedFromDefaults from '../../util/computed_from_defaults';
|
||||
|
||||
@@ -74,17 +73,12 @@ THE SOFTWARE.
|
||||
|
||||
export default {
|
||||
name: 'GlobalPython', // Component name
|
||||
display: i18n.common.python, // Display name for tab
|
||||
display: 'common.python', // Display name for tab (i18n key)
|
||||
key: 'python', // Key for data in parent
|
||||
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
|
||||
props: {
|
||||
data: Object, // Data delegated back to us from parent
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
i18n,
|
||||
};
|
||||
},
|
||||
computed: computedFromDefaults(defaults, 'python'), // Getters & setters for the delegated data
|
||||
watch: {
|
||||
// Enable Python server settings if any site uses Python
|
||||
|
Reference in New Issue
Block a user