diff --git a/src/nginxconfig/i18n/en/index.js b/src/nginxconfig/i18n/en/index.js
index 8d260b9..0e9cbe0 100644
--- a/src/nginxconfig/i18n/en/index.js
+++ b/src/nginxconfig/i18n/en/index.js
@@ -16,4 +16,6 @@ limitations under the License.
import templates from './templates';
+// TODO: centralised shared strings
+
export default { templates };
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/https.js b/src/nginxconfig/i18n/en/templates/global_sections/https.js
new file mode 100644
index 0000000..8b9181c
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/https.js
@@ -0,0 +1,29 @@
+/*
+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 {
+ sslProfile: 'SSL Profile',
+ httpsMustBeEnabledOnOneSite: 'HTTPS must be enabled on at least one site to configure global HTTPS settings.',
+ ocspDnsResolvers: 'OCSP DNS Resolvers',
+ cloudflareResolver: 'Cloudflare Resolver',
+ googlePublicDns: 'Google Public DNS',
+ openDns: 'OpenDNS',
+ letsEncryptWebroot: 'Let\'s Encrypt webroot',
+ mozillaModern: 'Mozilla Modern',
+ mozillaIntermediate: 'Mozilla Intermediate',
+ mozillaOld: 'Mozilla Old',
+ https: 'HTTPS',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/index.js b/src/nginxconfig/i18n/en/templates/global_sections/index.js
new file mode 100644
index 0000000..4230e8c
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/index.js
@@ -0,0 +1,26 @@
+/*
+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.
+*/
+
+import https from './https';
+import logging from './logging';
+import nginx from './nginx';
+import performance from './performance';
+import php from './php';
+import python from './python';
+import security from './security';
+import tools from './tools';
+
+export default { https, logging, nginx, performance, php, python, security, tools };
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/logging.js b/src/nginxconfig/i18n/en/templates/global_sections/logging.js
new file mode 100644
index 0000000..e3ddd52
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/logging.js
@@ -0,0 +1,20 @@
+/*
+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 {
+ enableFileNotFoundErrorLogging: 'enable file not found error logging in',
+ logging: 'Logging',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/nginx.js b/src/nginxconfig/i18n/en/templates/global_sections/nginx.js
new file mode 100644
index 0000000..07b4ea5
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/nginx.js
@@ -0,0 +1,21 @@
+/*
+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 {
+ nginxConfigDirectory: 'NGINX config directory',
+ mb: 'MB',
+ nginx: 'NGINX',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/performance.js b/src/nginxconfig/i18n/en/templates/global_sections/performance.js
new file mode 100644
index 0000000..51e875c
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/performance.js
@@ -0,0 +1,27 @@
+/*
+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 {
+ gzipCompression: 'Gzip compression',
+ enableGzipCompression: 'enable gzip compression',
+ brotliCompression: 'Brotli compression',
+ enableBrotliCompression: 'enable brotli compression',
+ expirationForAssets: 'Expiration for assets',
+ expirationForMedia: 'Expiration for media',
+ expirationForSvgs: 'Expiration for SVGs',
+ expirationForFonts: 'Expiration for fonts',
+ performance: 'Performance',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/php.js b/src/nginxconfig/i18n/en/templates/global_sections/php.js
new file mode 100644
index 0000000..ba7a5b3
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/php.js
@@ -0,0 +1,30 @@
+/*
+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 {
+ phpServer: 'PHP server',
+ phpMustBeEnabledOnOneSite: 'PHP must be enabled on at least one site to configure global PHP settings.',
+ phpBackupServer: 'PHP backup server',
+ tcp: 'TCP',
+ hhvmSocket: 'HHVM socket',
+ php5Socket: '5.x socket',
+ php70Socket: '7.0 socket',
+ php71Socket: '7.1 socket',
+ php72Socket: '7.2 socket',
+ php73Socket: '7.3 socket',
+ disabled: 'Disabled',
+ php: 'PHP',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/python.js b/src/nginxconfig/i18n/en/templates/global_sections/python.js
new file mode 100644
index 0000000..5b33d15
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/python.js
@@ -0,0 +1,21 @@
+/*
+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 {
+ pythonServer: 'Python server',
+ pythonMustBeEnabledOnOneSite: 'Python must be enabled on at least one site to configure global Python settings.',
+ python: 'Python',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/security.js b/src/nginxconfig/i18n/en/templates/global_sections/security.js
new file mode 100644
index 0000000..1ab8091
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/security.js
@@ -0,0 +1,20 @@
+/*
+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 {
+ enable: 'Python server',
+ security: 'Security',
+};
diff --git a/src/nginxconfig/i18n/en/templates/global_sections/tools.js b/src/nginxconfig/i18n/en/templates/global_sections/tools.js
new file mode 100644
index 0000000..ed7327e
--- /dev/null
+++ b/src/nginxconfig/i18n/en/templates/global_sections/tools.js
@@ -0,0 +1,33 @@
+/*
+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 {
+ modularizedStructure: 'Modularized structure',
+ enableModularizedConfigFiles: 'enable modularized config files',
+ symlinkVhost: 'Symlink vhost',
+ enableSymLinksFrom: 'enable symlinks from',
+ to: 'to',
+ shareConfiguration: 'Share configuration',
+ resetConfiguration: 'Reset configuration',
+ resetGlobalConfig: 'Reset global config',
+ resetAllDomains: 'Reset all domains',
+ removeAllDomains: 'Remove all domains',
+ resetDomainConfig: 'Reset domain config',
+ removeDomain: 'Remove domain',
+ yesImSure: 'Yes, I\'m sure',
+ noCancel: 'No, cancel',
+ tools: 'Tools',
+};
diff --git a/src/nginxconfig/i18n/en/templates/index.js b/src/nginxconfig/i18n/en/templates/index.js
index 120315b..3b8ce2d 100644
--- a/src/nginxconfig/i18n/en/templates/index.js
+++ b/src/nginxconfig/i18n/en/templates/index.js
@@ -16,5 +16,6 @@ limitations under the License.
import app from './app';
import domainSections from './domain_sections';
+import globalSections from './global_sections';
-export default { app, domainSections };
+export default { app, domainSections, globalSections };
diff --git a/src/nginxconfig/templates/global_sections/https.vue b/src/nginxconfig/templates/global_sections/https.vue
index 4ebe895..3bb5855 100644
--- a/src/nginxconfig/templates/global_sections/https.vue
+++ b/src/nginxconfig/templates/global_sections/https.vue
@@ -18,13 +18,13 @@ limitations under the License.
@@ -119,9 +119,9 @@ limitations under the License.
sslProfile: {
default: 'intermediate',
options: {
- modern: 'Mozilla Modern',
- intermediate: 'Mozilla Intermediate',
- old: 'Mozilla Old',
+ modern: i18n.templates.globalSections.https.mozillaModern,
+ intermediate: i18n.templates.globalSections.https.mozillaIntermediate,
+ old: i18n.templates.globalSections.https.mozillaOld,
},
enabled: true,
},
@@ -145,7 +145,7 @@ limitations under the License.
export default {
name: 'GlobalHTTPS', // Component name
- display: 'HTTPS', // Display name for tab
+ 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
components: {
diff --git a/src/nginxconfig/templates/global_sections/logging.vue b/src/nginxconfig/templates/global_sections/logging.vue
index 03c2b77..05110ef 100644
--- a/src/nginxconfig/templates/global_sections/logging.vue
+++ b/src/nginxconfig/templates/global_sections/logging.vue
@@ -60,7 +60,7 @@ limitations under the License.
- enable file not found error logging in error_log
+ {{ i18n.templates.globalSections.logging.enableFileNotFoundErrorLogging }} error_log
@@ -93,7 +93,7 @@ limitations under the License.
export default {
name: 'GlobalLogging', // Component name
- display: 'Logging', // Display name for tab
+ display: i18n.templates.globalSections.logging.logging, // Display name for tab
key: 'logging', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
diff --git a/src/nginxconfig/templates/global_sections/nginx.vue b/src/nginxconfig/templates/global_sections/nginx.vue
index 9adb7bf..7b4478d 100644
--- a/src/nginxconfig/templates/global_sections/nginx.vue
+++ b/src/nginxconfig/templates/global_sections/nginx.vue
@@ -18,7 +18,7 @@ limitations under the License.
-
+
@@ -100,7 +100,7 @@ limitations under the License.
@@ -144,7 +144,7 @@ limitations under the License.
export default {
name: 'GlobalNGINX', // Component name
- display: 'NGINX', // Display name for tab
+ display: i18n.templates.globalSections.nginx.nginx, // Display name for tab
key: 'nginx', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
diff --git a/src/nginxconfig/templates/global_sections/performance.vue b/src/nginxconfig/templates/global_sections/performance.vue
index bbb69ad..2ff6b1f 100644
--- a/src/nginxconfig/templates/global_sections/performance.vue
+++ b/src/nginxconfig/templates/global_sections/performance.vue
@@ -18,7 +18,7 @@ limitations under the License.
@@ -105,7 +105,7 @@ limitations under the License.
-
+
@@ -156,21 +156,21 @@ limitations under the License.
};
export default {
- name: 'GlobalPerformance', // Component name
- display: 'Performance', // Display name for tab
- key: 'performance', // Key for data in parent
- delegated: delegatedFromDefaults(defaults), // Data the parent will present here
+ name: 'GlobalPerformance', // Component name
+ display: i18n.templates.globalSections.performance.performance, // Display name for tab
+ key: 'performance', // Key for data in parent
+ delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
PrettyCheck,
},
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, 'performance'), // Getters & setters for the delegated data
+ computed: computedFromDefaults(defaults, 'performance'), // Getters & setters for the delegated data
};
diff --git a/src/nginxconfig/templates/global_sections/php.vue b/src/nginxconfig/templates/global_sections/php.vue
index ef1d7f0..daa003d 100644
--- a/src/nginxconfig/templates/global_sections/php.vue
+++ b/src/nginxconfig/templates/global_sections/php.vue
@@ -18,13 +18,13 @@ limitations under the License.
-
+
@@ -34,7 +34,7 @@ limitations under the License.
-
+
@@ -51,7 +51,7 @@ limitations under the License.
-
+
@@ -76,14 +76,14 @@ limitations under the License.
import computedFromDefaults from '../../util/computed_from_defaults';
const serverOptions = {
- '127.0.0.1:9000': 'TCP: 127.0.0.1:9000',
- '/var/run/hhvm/sock': 'HHVM socket: /var/run/hhvm/sock',
- '/var/run/hhvm/hhvm.sock': 'HHVM socket: /var/run/hhvm/hhvm.sock',
- '/var/run/php5-fpm.sock': '5.x socket: /var/run/php5-fpm.sock',
- '/var/run/php/php7.0-fpm.sock': '7.0 socket: /var/run/php/php7.0-fpm.sock',
- '/var/run/php/php7.1-fpm.sock': '7.1 socket: /var/run/php/php7.1-fpm.sock',
- '/var/run/php/php7.2-fpm.sock': '7.2 socket: /var/run/php/php7.2-fpm.sock',
- '/var/run/php/php7.3-fpm.sock': '7.3 socket: /var/run/php/php7.3-fpm.sock',
+ '127.0.0.1:9000': `${i18n.templates.globalSections.php.tcp}: 127.0.0.1:9000`,
+ '/var/run/hhvm/sock': `${i18n.templates.globalSections.php.hhvmSocket}: /var/run/hhvm/sock`,
+ '/var/run/hhvm/hhvm.sock': `${i18n.templates.globalSections.php.hhvmSocket}: /var/run/hhvm/hhvm.sock`,
+ '/var/run/php5-fpm.sock': `${i18n.templates.globalSections.php.php5Socket}: /var/run/php5-fpm.sock`,
+ '/var/run/php/php7.1-fpm.sock': `${i18n.templates.globalSections.php.php71Socket}: /var/run/php/php7.1-fpm.sock`,
+ '/var/run/php/php7.2-fpm.sock': `${i18n.templates.globalSections.php.php72Socket}: /var/run/php/php7.2-fpm.sock`,
+ '/var/run/php/php7.0-fpm.sock': `${i18n.templates.globalSections.php.php70Socket}: /var/run/php/php7.0-fpm.sock`,
+ '/var/run/php/php7.3-fpm.sock': `${i18n.templates.globalSections.php.php73Socket}: /var/run/php/php7.3-fpm.sock`,
};
const defaults = {
@@ -94,14 +94,14 @@ limitations under the License.
},
phpBackupServer: {
default: '',
- options: { '': 'Disabled', ...serverOptions },
+ options: { '': i18n.templates.globalSections.php.disabled, ...serverOptions },
enabled: true,
},
};
export default {
name: 'GlobalPHP', // Component name
- display: 'PHP', // Display name for tab
+ 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
components: {
diff --git a/src/nginxconfig/templates/global_sections/python.vue b/src/nginxconfig/templates/global_sections/python.vue
index 20abd57..8070d1e 100644
--- a/src/nginxconfig/templates/global_sections/python.vue
+++ b/src/nginxconfig/templates/global_sections/python.vue
@@ -18,13 +18,13 @@ limitations under the License.
-
+
@@ -33,7 +33,7 @@ limitations under the License.
-
+
@@ -63,19 +63,19 @@ limitations under the License.
};
export default {
- name: 'GlobalPython', // Component name
- display: '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.templates.globalSections.python.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': {
diff --git a/src/nginxconfig/templates/global_sections/security.vue b/src/nginxconfig/templates/global_sections/security.vue
index ce1c772..56a95a1 100644
--- a/src/nginxconfig/templates/global_sections/security.vue
+++ b/src/nginxconfig/templates/global_sections/security.vue
@@ -59,7 +59,7 @@ limitations under the License.
@@ -125,7 +125,7 @@ limitations under the License.
export default {
name: 'GlobalSecurity', // Component name
- display: 'Security', // Display name for tab
+ display: i18n.templates.globalSections.security.security, // Display name for tab
key: 'security', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
diff --git a/src/nginxconfig/templates/global_sections/tools.vue b/src/nginxconfig/templates/global_sections/tools.vue
index ec74e67..f03862b 100644
--- a/src/nginxconfig/templates/global_sections/tools.vue
+++ b/src/nginxconfig/templates/global_sections/tools.vue
@@ -18,7 +18,7 @@ limitations under the License.
@@ -150,28 +155,27 @@ limitations under the License.
};
export default {
- name: 'GlobalTools', // Component name
- display: 'Tools', // Display name for tab
- key: 'tools', // Key for data in parent
- delegated: delegatedFromDefaults(defaults), // Data the parent will present here
+ name: 'GlobalTools', // Component name
+ display: i18n.templates.globalSections.tools.tools, // Display name for tab
+ key: 'tools', // Key for data in parent
+ delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: {
PrettyCheck,
Modal,
},
props: {
- data: Object, // Data delegated back to us from parent
+ data: Object, // Data delegated back to us from parent
},
data() {
return {
i18n,
confirmTitle: '',
confirmBody: '',
- confirmAction: () => {
- },
+ confirmAction: () => {},
};
},
computed: {
- ...computedFromDefaults(defaults, 'tools'), // Getters & setters for the delegated data
+ ...computedFromDefaults(defaults, 'tools'), // Getters & setters for the delegated data
hasDomain() {
return this.$parent.$parent.activeDomains.length > 0;
},