From 84f3a296d893d5bde0b1da29cb2aed5b3e6986bb Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Mon, 1 Jun 2020 20:39:46 +0100 Subject: [PATCH] Move all global section strings to i18n --- src/nginxconfig/i18n/en/index.js | 2 + .../en/templates/global_sections/https.js | 29 ++++++++++++ .../en/templates/global_sections/index.js | 26 +++++++++++ .../en/templates/global_sections/logging.js | 20 ++++++++ .../en/templates/global_sections/nginx.js | 21 +++++++++ .../templates/global_sections/performance.js | 27 +++++++++++ .../i18n/en/templates/global_sections/php.js | 30 ++++++++++++ .../en/templates/global_sections/python.js | 21 +++++++++ .../en/templates/global_sections/security.js | 20 ++++++++ .../en/templates/global_sections/tools.js | 33 +++++++++++++ src/nginxconfig/i18n/en/templates/index.js | 3 +- .../templates/global_sections/https.vue | 24 +++++----- .../templates/global_sections/logging.vue | 4 +- .../templates/global_sections/nginx.vue | 6 +-- .../templates/global_sections/performance.vue | 28 +++++------ .../templates/global_sections/php.vue | 28 +++++------ .../templates/global_sections/python.vue | 18 ++++---- .../templates/global_sections/security.vue | 6 +-- .../templates/global_sections/tools.vue | 46 ++++++++++--------- 19 files changed, 313 insertions(+), 79 deletions(-) create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/https.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/index.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/logging.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/nginx.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/performance.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/php.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/python.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/security.js create mode 100644 src/nginxconfig/i18n/en/templates/global_sections/tools.js 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.
- +
@@ -34,7 +34,7 @@ limitations under the License.