From a90ecf416a6b8ba772d04d45b533ed2770a894e3 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Fri, 29 May 2020 15:55:18 +0100 Subject: [PATCH] Move strings to i18n for logging & php --- .../en/templates/domain_sections/index.js | 4 ++- .../en/templates/domain_sections/logging.js | 21 ++++++++++++++ .../i18n/en/templates/domain_sections/php.js | 29 +++++++++++++++++++ src/nginxconfig/i18n/index.js | 2 +- .../templates/domain_sections/logging.vue | 10 +++---- .../templates/domain_sections/php.vue | 24 +++++++-------- 6 files changed, 71 insertions(+), 19 deletions(-) create mode 100644 src/nginxconfig/i18n/en/templates/domain_sections/logging.js create mode 100644 src/nginxconfig/i18n/en/templates/domain_sections/php.js diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/index.js b/src/nginxconfig/i18n/en/templates/domain_sections/index.js index fc55d8d..57551d1 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/index.js @@ -15,5 +15,7 @@ limitations under the License. */ import https from './https'; +import logging from './logging'; +import php from './php'; -export default { https }; +export default { https, logging, php }; diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/logging.js b/src/nginxconfig/i18n/en/templates/domain_sections/logging.js new file mode 100644 index 0000000..86355a2 --- /dev/null +++ b/src/nginxconfig/i18n/en/templates/domain_sections/logging.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 { + byDomain: 'by domain', + enableForThisDomain: 'enable for this domain', + logging: 'Logging', +}; diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/php.js b/src/nginxconfig/i18n/en/templates/domain_sections/php.js new file mode 100644 index 0000000..5554444 --- /dev/null +++ b/src/nginxconfig/i18n/en/templates/domain_sections/php.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 { + php: 'PHP', + phpIsDisabled: 'PHP is disabled.', + phpCannotBeEnabledWithReverseProxy: 'PHP cannot be enabled whilst the reverse proxy is enabled.', + phpCannotBeEnabledWithPython: 'PHP cannot be enabled whilst Python is enabled.', + enablePhp: 'enable PHP', + wordPressRules: 'WordPress rules', + enableWordPressRules: 'enable WordPress-specific rules', + drupalRules: 'Drupal rules', + enableDrupalRules: ' enable Drupal-specific rules', + magentoRules: 'Magento rules', + enableMagentoRules: ' enable Magento-specific rules', +}; diff --git a/src/nginxconfig/i18n/index.js b/src/nginxconfig/i18n/index.js index ab0d9af..3654fc7 100644 --- a/src/nginxconfig/i18n/index.js +++ b/src/nginxconfig/i18n/index.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as en from './en'; +import en from './en'; const lang = 'en'; const packs = { en }; diff --git a/src/nginxconfig/templates/domain_sections/logging.vue b/src/nginxconfig/templates/domain_sections/logging.vue index 54d656d..5726319 100644 --- a/src/nginxconfig/templates/domain_sections/logging.vue +++ b/src/nginxconfig/templates/domain_sections/logging.vue @@ -18,7 +18,7 @@ limitations under the License.
- +
@@ -26,7 +26,7 @@ limitations under the License.
- enable for this domain + {{ i18n.templates.domainSections.logging.enableForThisDomain }}
@@ -36,7 +36,7 @@ limitations under the License.
- +
@@ -44,7 +44,7 @@ limitations under the License.
- enable for this domain + {{ i18n.templates.domainSections.logging.enableForThisDomain }}
@@ -73,7 +73,7 @@ limitations under the License. export default { name: 'DomainLogging', // Component name - display: 'Logging', // Display name for tab + display: i18n.templates.domainSections.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/domain_sections/php.vue b/src/nginxconfig/templates/domain_sections/php.vue index ca34692..6322e29 100644 --- a/src/nginxconfig/templates/domain_sections/php.vue +++ b/src/nginxconfig/templates/domain_sections/php.vue @@ -18,18 +18,18 @@ limitations under the License.
- +
@@ -47,7 +47,7 @@ limitations under the License.
- enable PHP + {{ i18n.templates.domainSections.php.enablePhp }}
@@ -57,7 +57,7 @@ limitations under the License.
- +
@@ -65,7 +65,7 @@ limitations under the License.
- enable WordPress-specific rules + {{ i18n.templates.domainSections.php.enableWordPressRules }}
@@ -75,7 +75,7 @@ limitations under the License.
- +
@@ -83,7 +83,7 @@ limitations under the License.
- enable Drupal-specific rules + {{ i18n.templates.domainSections.php.enableDrupalRules }}
@@ -93,7 +93,7 @@ limitations under the License.
- +
@@ -101,7 +101,7 @@ limitations under the License.
- enable Magento-specific rules + {{ i18n.templates.domainSections.php.enableMagentoRules }}
@@ -138,7 +138,7 @@ limitations under the License. export default { name: 'DomainPHP', // Component name - display: 'PHP', // Display name for tab + display: i18n.templates.domainSections.php.php, // Display name for tab key: 'php', // Key for data in parent delegated: delegatedFromDefaults(defaults), // Data the parent will present here components: {