Move strings to i18n for python & reverse proxy domain sections
This commit is contained in:
parent
242ff5b80e
commit
49406bfd46
|
@ -18,5 +18,7 @@ import https from './https';
|
||||||
import logging from './logging';
|
import logging from './logging';
|
||||||
import php from './php';
|
import php from './php';
|
||||||
import presets from './presets';
|
import presets from './presets';
|
||||||
|
import python from './python';
|
||||||
|
import reverseProxy from './reverse_proxy';
|
||||||
|
|
||||||
export default { https, logging, php, presets };
|
export default { https, logging, php, presets, python, reverseProxy };
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 DigitalOcean
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
python: 'Python',
|
||||||
|
pythonIsDisabled: 'Python is disabled.',
|
||||||
|
pythonCannotBeEnabledWithReverseProxy: 'Python cannot be enabled whilst the reverse proxy is enabled.',
|
||||||
|
pythonCannotBeEnabledWithPhp: 'Python cannot be enabled whilst PHP is enabled.',
|
||||||
|
enablePython: 'enable Python',
|
||||||
|
djangoRules: 'Django rules',
|
||||||
|
enableDjangoRules: 'enable Django-specific rules',
|
||||||
|
};
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 DigitalOcean
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
reverseProxy: 'Reverse proxy',
|
||||||
|
reverseProxyIsDisabled: 'Reverse proxy is disabled.',
|
||||||
|
reverseProxyCannotBeEnabledWithPhp: 'Reverse proxy cannot be enabled whilst PHP is enabled.',
|
||||||
|
reverseProxyCannotBeEnabledWithPython: 'Reverse proxy cannot be enabled whilst Python is enabled.',
|
||||||
|
enableReverseProxy: 'enable reverse proxy',
|
||||||
|
path: 'Path',
|
||||||
|
};
|
|
@ -100,7 +100,7 @@ limitations under the License.
|
||||||
},
|
},
|
||||||
singlePageApplication: {
|
singlePageApplication: {
|
||||||
default: false,
|
default: false,
|
||||||
display: i18n.templates.domainSections.presets.singePageApplication,
|
display: i18n.templates.domainSections.presets.singlePageApplication,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.php.php.computed
|
return data.php.php.computed
|
||||||
|
|
|
@ -18,18 +18,18 @@ limitations under the License.
|
||||||
<div>
|
<div>
|
||||||
<div v-if="!pythonEnabled" class="field is-horizontal is-aligned-top">
|
<div v-if="!pythonEnabled" class="field is-horizontal is-aligned-top">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">Python</label>
|
<label class="label">{{ i18n.templates.domainSections.python.python }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<label class="text">
|
<label class="text">
|
||||||
Python is disabled.
|
{{ i18n.templates.domainSections.python.pythonIsDisabled }}
|
||||||
<template v-if="$parent.$props.data.reverseProxy.reverseProxy.computed">
|
<template v-if="$parent.$props.data.reverseProxy.reverseProxy.computed">
|
||||||
<br />Python cannot be enabled whilst the reverse proxy is enabled.
|
<br />{{ i18n.templates.domainSections.python.pythonCannotBeEnabledWithReverseProxy }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="$parent.$props.data.php.php.computed">
|
<template v-if="$parent.$props.data.php.php.computed">
|
||||||
<br />Python cannot be enabled whilst PHP is enabled.
|
<br />{{ i18n.templates.domainSections.python.pythonCannotBeEnabledWithPhp }}
|
||||||
</template>
|
</template>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +39,7 @@ limitations under the License.
|
||||||
|
|
||||||
<div v-else class="field is-horizontal">
|
<div v-else class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">Python</label>
|
<label class="label">{{ i18n.templates.domainSections.python.python }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
@ -47,7 +47,7 @@ limitations under the License.
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="python" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="python" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
enable Python
|
{{ i18n.templates.domainSections.python.enablePython }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,7 +57,7 @@ limitations under the License.
|
||||||
|
|
||||||
<div v-if="djangoRulesEnabled" class="field is-horizontal">
|
<div v-if="djangoRulesEnabled" class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">Django rules</label>
|
<label class="label">{{ i18n.templates.domainSections.python.djangoRules }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
@ -65,7 +65,7 @@ limitations under the License.
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="djangoRules" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="djangoRules" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
enable Django-specific rules
|
{{ i18n.templates.domainSections.python.enableDjangoRules }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,7 +94,7 @@ limitations under the License.
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DomainPython', // Component name
|
name: 'DomainPython', // Component name
|
||||||
display: 'Python', // Display name for tab
|
display: i18n.templates.domainSections.python.python, // Display name for tab
|
||||||
key: 'python', // Key for data in parent
|
key: 'python', // Key for data in parent
|
||||||
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
|
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -18,18 +18,18 @@ limitations under the License.
|
||||||
<div>
|
<div>
|
||||||
<div v-if="!reverseProxyEnabled" class="field is-horizontal is-aligned-top">
|
<div v-if="!reverseProxyEnabled" class="field is-horizontal is-aligned-top">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">Reverse proxy</label>
|
<label class="label">{{ i18n.templates.domainSections.reverseProxy.reverseProxy }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<label class="text">
|
<label class="text">
|
||||||
Reverse proxy is disabled.
|
{{ i18n.templates.domainSections.reverseProxy.reverseProxyIsDisabled }}
|
||||||
<template v-if="$parent.$props.data.php.php.computed">
|
<template v-if="$parent.$props.data.php.php.computed">
|
||||||
<br />Reverse proxy cannot be enabled whilst PHP is enabled.
|
<br />{{ i18n.templates.domainSections.reverseProxy.reverseProxyCannotBeEnabledWithPhp }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="$parent.$props.data.python.python.computed">
|
<template v-if="$parent.$props.data.python.python.computed">
|
||||||
<br />Reverse proxy cannot be enabled whilst Python is enabled.
|
<br />{{ i18n.templates.domainSections.reverseProxy.reverseProxyCannotBeEnabledWithPython }}
|
||||||
</template>
|
</template>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +39,7 @@ limitations under the License.
|
||||||
|
|
||||||
<div v-else class="field is-horizontal">
|
<div v-else class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">Reverse proxy</label>
|
<label class="label">{{ i18n.templates.domainSections.reverseProxy.reverseProxy }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div :class="`field${reverseProxyChanged ? ' is-changed' : ''}`">
|
<div :class="`field${reverseProxyChanged ? ' is-changed' : ''}`">
|
||||||
|
@ -47,7 +47,7 @@ limitations under the License.
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="reverseProxy" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="reverseProxy" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
enable reverse proxy
|
{{ i18n.templates.domainSections.reverseProxy.enableReverseProxy }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,7 +57,7 @@ limitations under the License.
|
||||||
|
|
||||||
<div v-if="pathEnabled" class="field is-horizontal">
|
<div v-if="pathEnabled" class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">Path</label>
|
<label class="label">{{ i18n.templates.domainSections.reverseProxy.path }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div :class="`field${pathChanged ? ' is-changed' : ''}`">
|
<div :class="`field${pathChanged ? ' is-changed' : ''}`">
|
||||||
|
@ -114,7 +114,7 @@ limitations under the License.
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DomainReverseProxy', // Component name
|
name: 'DomainReverseProxy', // Component name
|
||||||
display: 'Reverse proxy', // Display name for tab
|
display: i18n.templates.domainSections.reverseProxy.reverseProxy, // Display name for tab
|
||||||
key: 'reverseProxy', // Key for data in parent
|
key: 'reverseProxy', // Key for data in parent
|
||||||
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
|
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue