Move i18n strings to be centralised

This commit is contained in:
MattIPv4
2020-06-02 16:51:28 +01:00
parent 85910e7794
commit 707ff8238a
41 changed files with 184 additions and 167 deletions

View File

@@ -144,23 +144,23 @@ limitations under the License.
};
export default {
name: 'GlobalHTTPS', // Component name
display: i18n.templates.globalSections.https.https, // Display name for tab
key: 'https', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
name: 'GlobalHTTPS', // Component name
display: i18n.common.https, // Display name for tab
key: 'https', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
PrettyCheck,
PrettyRadio,
},
props: {
data: Object, // Data delegated back to us from parent
data: Object, // Data delegated back to us from parent
},
data () {
return {
i18n,
};
},
computed: computedFromDefaults(defaults, 'https'), // Getters & setters for the delegated data
computed: computedFromDefaults(defaults, 'https'), // Getters & setters for the delegated data
watch: {
// Check SSL profile is valid
'$props.data.sslProfile': {

View File

@@ -93,7 +93,7 @@ limitations under the License.
export default {
name: 'GlobalLogging', // Component name
display: i18n.templates.globalSections.logging.logging, // Display name for tab
display: i18n.common.logging, // Display name for tab
key: 'logging', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {

View File

@@ -144,7 +144,7 @@ limitations under the License.
export default {
name: 'GlobalNGINX', // Component name
display: i18n.templates.globalSections.nginx.nginx, // Display name for tab
display: i18n.common.nginx, // Display name for tab
key: 'nginx', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {

View File

@@ -100,15 +100,15 @@ limitations under the License.
};
export default {
name: 'GlobalPHP', // Component name
display: i18n.templates.globalSections.php.php, // Display name for tab
key: 'php', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
name: 'GlobalPHP', // Component name
display: i18n.common.php, // Display name for tab
key: 'php', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
VueSelect,
},
props: {
data: Object, // Data delegated back to us from parent
data: Object, // Data delegated back to us from parent
},
data () {
return {
@@ -116,7 +116,7 @@ limitations under the License.
};
},
computed: {
...computedFromDefaults(defaults, 'php'), // Getters & setters for the delegated data
...computedFromDefaults(defaults, 'php'), // Getters & setters for the delegated data
phpServerOptions() {
return Object.entries(this.$props.data.phpServer.options)
.map(([key, value]) => ({ label: value, value: key }));

View File

@@ -63,19 +63,19 @@ limitations under the License.
};
export default {
name: 'GlobalPython', // Component name
display: i18n.templates.globalSections.python.python, // Display name for tab
key: 'python', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
name: 'GlobalPython', // Component name
display: i18n.common.python, // Display name for tab
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: Object, // Data delegated back to us from parent
},
data () {
return {
i18n,
};
},
computed: computedFromDefaults(defaults, 'python'), // Getters & setters for the delegated data
computed: computedFromDefaults(defaults, 'python'), // Getters & setters for the delegated data
watch: {
// Enable Python server settings if any site uses Python
'$parent.$parent.$data.domains': {

View File

@@ -59,7 +59,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="serverTokens" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
{{ i18n.templates.globalSections.security.enable }}
{{ i18n.common.enable }}
</PrettyCheck>
</div>
</div>
@@ -77,7 +77,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="limitReq" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
{{ i18n.templates.globalSections.security.enable }}
{{ i18n.common.enable }}
</PrettyCheck>
</div>
</div>