Move strings to i18n for logging & php

pull/111/head
MattIPv4 5 years ago
parent c331e2c79a
commit a90ecf416a

@ -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 };

@ -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',
};

@ -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',
};

@ -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 };

@ -18,7 +18,7 @@ limitations under the License.
<div>
<div class="field is-horizontal">
<div class="field-label">
<label class="label">access_log by domain</label>
<label class="label">access_log {{ i18n.templates.domainSections.logging.byDomain }}</label>
</div>
<div class="field-body">
<div class="field">
@ -26,7 +26,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="accessLog" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
enable for this domain
{{ i18n.templates.domainSections.logging.enableForThisDomain }}
</PrettyCheck>
</div>
</div>
@ -36,7 +36,7 @@ limitations under the License.
<div class="field is-horizontal">
<div class="field-label">
<label class="label">error_log by domain</label>
<label class="label">error_log {{ i18n.templates.domainSections.logging.byDomain }}</label>
</div>
<div class="field-body">
<div class="field">
@ -44,7 +44,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="errorLog" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
enable for this domain
{{ i18n.templates.domainSections.logging.enableForThisDomain }}
</PrettyCheck>
</div>
</div>
@ -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: {

@ -18,18 +18,18 @@ limitations under the License.
<div>
<div v-if="!phpEnabled" class="field is-horizontal is-aligned-top">
<div class="field-label">
<label class="label">PHP</label>
<label class="label">{{ i18n.templates.domainSections.php.php }}</label>
</div>
<div class="field-body">
<div class="field">
<div class="control is-changed">
<label class="text">
PHP is disabled.
{{ i18n.templates.domainSections.php.phpIsDisabled }}
<template v-if="$parent.$props.data.reverseProxy.reverseProxy.computed">
<br />PHP cannot be enabled whilst the reverse proxy is enabled.
<br />{{ i18n.templates.domainSections.php.phpCannotBeEnabledWithReverseProxy }}
</template>
<template v-if="$parent.$props.data.python.python.computed">
<br />PHP cannot be enabled whilst Python is enabled.
<br />{{ i18n.templates.domainSections.php.phpCannotBeEnabledWithPython }}
</template>
</label>
</div>
@ -47,7 +47,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="php" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
enable PHP
{{ i18n.templates.domainSections.php.enablePhp }}
</PrettyCheck>
</div>
</div>
@ -57,7 +57,7 @@ limitations under the License.
<div v-if="wordPressRulesEnabled" class="field is-horizontal">
<div class="field-label">
<label class="label">WordPress rules</label>
<label class="label">{{ i18n.templates.domainSections.php.wordPressRules }}</label>
</div>
<div class="field-body">
<div class="field">
@ -65,7 +65,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="wordPressRules" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
enable WordPress-specific rules
{{ i18n.templates.domainSections.php.enableWordPressRules }}
</PrettyCheck>
</div>
</div>
@ -75,7 +75,7 @@ limitations under the License.
<div v-if="drupalRulesEnabled" class="field is-horizontal">
<div class="field-label">
<label class="label">Drupal rules</label>
<label class="label">{{ i18n.templates.domainSections.php.drupalRules }}</label>
</div>
<div class="field-body">
<div class="field">
@ -83,7 +83,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="drupalRules" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
enable Drupal-specific rules
{{ i18n.templates.domainSections.php.enableDrupalRules }}
</PrettyCheck>
</div>
</div>
@ -93,7 +93,7 @@ limitations under the License.
<div v-if="magentoRulesEnabled" class="field is-horizontal">
<div class="field-label">
<label class="label">Magento rules</label>
<label class="label">{{ i18n.templates.domainSections.php.magentoRules }}</label>
</div>
<div class="field-body">
<div class="field">
@ -101,7 +101,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="magentoRules" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
enable Magento-specific rules
{{ i18n.templates.domainSections.php.enableMagentoRules }}
</PrettyCheck>
</div>
</div>
@ -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: {

Loading…
Cancel
Save