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

@ -15,6 +15,19 @@ limitations under the License.
*/
export default {
back: 'Back',
next: 'Next',
back: 'Back',
next: 'Next',
enable: 'enable',
php: 'PHP',
ssl: 'SSL',
nginx: 'NGINX',
http: 'HTTP',
https: 'HTTPS',
letsEncrypt: 'Let\'s Encrypt',
python: 'Python',
wordPress: 'WordPress',
drupal: 'Drupal',
magento: 'Magento',
django: 'Django',
logging: 'Logging',
};

View file

@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from './common';
import templates from './templates';
// TODO: centralised shared strings
export default { templates };
export default { common, templates };

View file

@ -14,9 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../common';
export default {
title: 'NGINXConfig',
description: 'The easiest way to configure a performant, secure, and stable NGINX server.',
title: `${common.nginx}Config`,
description: `The easiest way to configure a performant, secure, and stable ${common.nginx} server.`,
singleColumnMode: 'Single column mode',
splitColumnMode: 'Split column mode',
perWebsiteConfig: 'Per-website config',

View file

@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
https: 'HTTPS',
enableEncryptedSslConnection: 'enable encrypted SSL connections',
http2: 'HTTP/2',
enableHttp2Connections: 'enable HTTP/2 connections',
forceHttps: 'Force HTTPS',
enableEncryptedSslConnection: `${common.enable} encrypted ${common.ssl} connections`,
http2: `${common.http}/2`,
enableHttp2Connections: `${common.enable} ${common.http}/2 connections`,
forceHttps: `Force ${common.https}`,
hsts: 'HSTS',
enableStrictTransportSecurity: 'enable Strict Transport Security',
enableStrictTransportSecurity: `${common.enable} Strict Transport Security`,
certificationType: 'Certification type',
letsEncrypt: 'Let\'s Encrypt',
customCertificate: 'Custom certificate',
letsEncryptEmail: 'Let\'s Encrypt email',
letsEncryptEmail: `${common.letsEncrypt} email`,
};

View file

@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
byDomain: 'by domain',
enableForThisDomain: 'enable for this domain',
logging: 'Logging',
enableForThisDomain: `${common.enable} for this domain`,
};

View file

@ -14,16 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
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',
phpIsDisabled: `${common.php} is disabled.`,
phpCannotBeEnabledWithReverseProxy: `${common.php} cannot be enabled whilst the reverse proxy is enabled.`,
phpCannotBeEnabledWithPython: `${common.php} cannot be enabled whilst ${common.python} is enabled.`,
enablePhp: `${common.enable} ${common.php}`,
wordPressRules: `${common.wordPress} rules`,
enableWordPressRules: `${common.enable} ${common.wordPress}-specific rules`,
drupalRules: `${common.drupal} rules`,
enableDrupalRules: `${common.enable} ${common.drupal}-specific rules`,
magentoRules: `${common.magento} rules`,
enableMagentoRules: `${common.enable} ${common.magento}-specific rules`,
};

View file

@ -18,11 +18,6 @@ export default {
presets: 'Presets',
itLooksLikeYouCustomisedTheConfig: 'It looks like you\'ve customised the configuration for this domain. Choosing a new preset may reset or change some of the settings that you\'ve customised.',
frontend: 'Frontend',
php: 'PHP',
django: 'Django',
nodeJs: 'Node.js',
singlePageApplication: 'Single-page application',
wordPress: 'WordPress',
drupal: 'Drupal',
magento: 'Magento',
};

View file

@ -14,12 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
python: 'Python',
pythonIsDisabled: 'Python is disabled.',
pythonCannotBeEnabledWithReverseProxy: 'Python cannot be enabled whilst the reverse proxy is enabled.',
pythonCannotBeEnabledWithPhp: 'Python cannot be enabled whilst PHP is enabled.',
enablePython: 'enable Python',
djangoRules: 'Django rules',
enableDjangoRules: 'enable Django-specific rules',
pythonIsDisabled: `${common.python} is disabled.`,
pythonCannotBeEnabledWithReverseProxy: `${common.python} cannot be enabled whilst the reverse proxy is enabled.`,
pythonCannotBeEnabledWithPhp: `${common.python} cannot be enabled whilst ${common.php} is enabled.`,
enablePython: `${common.enable} ${common.python}`,
djangoRules: `${common.django} rules`,
enableDjangoRules: `${common.enable} ${common.django}-specific rules`,
};

View file

@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
reverseProxy: 'Reverse proxy',
reverseProxyIsDisabled: 'Reverse proxy is disabled.',
reverseProxyCannotBeEnabledWithPhp: 'Reverse proxy cannot be enabled whilst PHP is enabled.',
reverseProxyCannotBeEnabledWithPython: 'Reverse proxy cannot be enabled whilst Python is enabled.',
enableReverseProxy: 'enable reverse proxy',
reverseProxyCannotBeEnabledWithPhp: `Reverse proxy cannot be enabled whilst ${common.php} is enabled.`,
reverseProxyCannotBeEnabledWithPython: `Reverse proxy cannot be enabled whilst ${common.python} is enabled.`,
enableReverseProxy: `${common.enable} reverse proxy`,
path: 'Path',
};

View file

@ -14,12 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
enable: 'enable',
fallbackRouting: 'Fallback routing',
fallbackRoutingPhpPath: 'Fallback routing PHP path',
legacyPhpRouting: 'Legacy PHP routing',
enableLegacyRouting: 'enable legacy routing',
fallbackRoutingPhpPath: `Fallback routing ${common.php} path`,
legacyPhpRouting: `Legacy ${common.php} routing`,
enableLegacyRouting: `${common.enable} legacy routing`,
path: 'Path',
routing: 'Routing',
};

View file

@ -1,20 +0,0 @@
/*
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 {
back: 'Back',
next: 'Next',
};

View file

@ -14,16 +14,19 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
const mozilla = 'Mozilla';
export default {
sslProfile: 'SSL Profile',
httpsMustBeEnabledOnOneSite: 'HTTPS must be enabled on at least one site to configure global HTTPS settings.',
sslProfile: `${common.ssl} Profile`,
httpsMustBeEnabledOnOneSite: `${common.https} must be enabled on at least one site to configure global ${common.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',
letsEncryptWebroot: `${common.letsEncrypt} webroot`,
mozillaModern: `${mozilla} Modern`,
mozillaIntermediate: `${mozilla} Intermediate`,
mozillaOld: `${mozilla} Old`,
};

View file

@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
enableFileNotFoundErrorLogging: 'enable file not found error logging in',
logging: 'Logging',
enableFileNotFoundErrorLogging: `${common.enable} file not found error logging in`,
};

View file

@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
nginxConfigDirectory: 'NGINX config directory',
nginxConfigDirectory: `${common.nginx} config directory`,
mb: 'MB',
nginx: 'NGINX',
};

View file

@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
gzipCompression: 'Gzip compression',
enableGzipCompression: 'enable gzip compression',
enableGzipCompression: `${common.enable} gzip compression`,
brotliCompression: 'Brotli compression',
enableBrotliCompression: 'enable brotli compression',
enableBrotliCompression: `${common.enable} brotli compression`,
expirationForAssets: 'Expiration for assets',
expirationForMedia: 'Expiration for media',
expirationForSvgs: 'Expiration for SVGs',

View file

@ -14,10 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
phpServer: 'PHP server',
phpMustBeEnabledOnOneSite: 'PHP must be enabled on at least one site to configure global PHP settings.',
phpBackupServer: 'PHP backup server',
phpServer: `${common.php} server`,
phpMustBeEnabledOnOneSite: `${common.php} must be enabled on at least one site to configure global ${common.php} settings.`,
phpBackupServer: `${common.php} backup server`,
tcp: 'TCP',
hhvmSocket: 'HHVM socket',
php5Socket: '5.x socket',
@ -26,5 +28,4 @@ export default {
php72Socket: '7.2 socket',
php73Socket: '7.3 socket',
disabled: 'Disabled',
php: 'PHP',
};

View file

@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
pythonServer: 'Python server',
pythonMustBeEnabledOnOneSite: 'Python must be enabled on at least one site to configure global Python settings.',
python: 'Python',
pythonServer: `${common.python} server`,
pythonMustBeEnabledOnOneSite: `${common.python} must be enabled on at least one site to configure global ${common.python} settings.`,
};

View file

@ -15,6 +15,5 @@ limitations under the License.
*/
export default {
enable: 'enable',
security: 'Security',
};

View file

@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
modularizedStructure: 'Modularized structure',
enableModularizedConfigFiles: 'enable modularized config files',
enableModularizedConfigFiles: `${common.enable} modularized config files`,
symlinkVhost: 'Symlink vhost',
enableSymLinksFrom: 'enable symlinks from',
enableSymLinksFrom: `${common.enable} symlinks from`,
to: 'to',
shareConfiguration: 'Share configuration',
resetConfiguration: 'Reset configuration',

View file

@ -15,11 +15,9 @@ limitations under the License.
*/
import app from './app';
import domain from './domain';
import global from './global';
import setup from './setup';
import domainSections from './domain_sections';
import globalSections from './global_sections';
import setupSections from './setup_sections';
export default { app, domain, global, setup, domainSections, globalSections, setupSections };
export default { app, setup, domainSections, globalSections, setupSections };

View file

@ -15,8 +15,6 @@ limitations under the License.
*/
export default {
back: 'Back',
next: 'Next',
downloadConfig: 'Download Config',
copyBase64: 'Copy Base64',
};

View file

@ -14,12 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
const certbot = 'Certbot';
export default {
commentOutSslDirectivesInConfiguration: 'Comment out SSL related directives in the configuration:',
reloadYourNginxServer: 'Reload your NGINX server:',
obtainSslCertificatesFromLetsEncrypt: 'Obtain SSL certificates from Let\'s Encrypt using Certbot:',
uncommentSslDirectivesInConfiguration: 'Uncomment SSL related directives in the configuration:',
configureCertbotToReloadNginxOnCertificateRenewal: 'Configure Certbot to reload NGINX when it successfully renews certificates:',
certbotDoesNotNeedToBeSetupForYourConfiguration: 'Certbot does not need to be set up for your NGINX configuration.',
certbot: 'Certbot',
commentOutSslDirectivesInConfiguration: `Comment out ${common.ssl} related directives in the configuration:`,
reloadYourNginxServer: `Reload your ${common.nginx} server:`,
obtainSslCertificatesFromLetsEncrypt: `Obtain ${common.ssl} certificates from ${common.letsEncrypt} using ${certbot}:`,
uncommentSslDirectivesInConfiguration: `Uncomment ${common.ssl} related directives in the configuration:`,
configureCertbotToReloadNginxOnCertificateRenewal: `Configure ${certbot} to reload ${common.nginx} when it successfully renews certificates:`,
certbotDoesNotNeedToBeSetupForYourConfiguration: `${certbot} does not need to be set up for your ${common.nginx} configuration.`,
certbot,
};

View file

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
downloadTheGeneratedConfig: '<b>Download</b> the generated config:',
andUploadItToYourServers: 'and <b>upload</b> it to your server\'s',
@ -21,8 +23,8 @@ export default {
or: 'or, ',
copyBase64StringOfCompressedConfig: 'Copy a base64 string of the compressed config',
pasteItInYourServersCommandLineAndExecute: ', paste it in your server\'s command line and execute it.',
navigateToYourNginxConfigurationDirectoryOnYourServer: 'Navigate to your NGINX <b>configuration directory</b> on your server:',
createABackupOfYourCurrentNginxConfiguration: 'Create a <b>backup</b> of your current NGINX configuration:',
navigateToYourNginxConfigurationDirectoryOnYourServer: `Navigate to your ${common.nginx} <b>configuration directory</b> on your server:`,
createABackupOfYourCurrentNginxConfiguration: `Create a <b>backup</b> of your current ${common.nginx} configuration:`,
extractTheNewCompressedConfigurationArchiveUsingTar: '<b>Extract</b> the new compressed configuration archive using tar:',
download: 'Download',
};

View file

@ -14,8 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
letsGoLive: 'Let\'s go live!',
reloadNginxToLoadInYourNewConfiguration: 'Reload NGINX to load in your new configuration:',
reloadNginxToLoadInYourNewConfiguration: `Reload ${common.nginx} to load in your new configuration:`,
goLive: 'Go live!',
};

View file

@ -14,9 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import common from '../../common';
export default {
generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Generate <b>Diffie-Hellman keys</b> by running this command on your server:',
createACommonAcmeChallengeDirectoryForLetsEncrypt: 'Create a common <b>ACME-challenge</b> directory (for <b>Let\'s Encrypt</b>):',
noAdditionalStepsAreNeededToSetUpSslForNginx: 'No additional steps are needed to set up SSL for your NGINX configuration.',
sslInit: 'SSL init',
createACommonAcmeChallengeDirectoryForLetsEncrypt: `Create a common <b>ACME-challenge</b> directory (for <b>${common.letsEncrypt}</b>):`,
noAdditionalStepsAreNeededToSetUpSslForNginx: `No additional steps are needed to set up ${common.ssl} for your ${common.nginx} configuration.`,
sslInit: `${common.ssl} init`,
};

View file

@ -39,10 +39,10 @@ limitations under the License.
<div class="navigation-buttons">
<a v-if="previousTab !== false" class="button is-mini" @click="active = previousTab">
<i class="fas fa-long-arrow-alt-left"></i> <span>{{ i18n.templates.domain.back }}</span>
<i class="fas fa-long-arrow-alt-left"></i> <span>{{ i18n.common.back }}</span>
</a>
<a v-if="nextTab !== false" class="button is-primary is-mini" @click="active = nextTab">
<span>{{ i18n.templates.domain.next }}</span> <i class="fas fa-long-arrow-alt-right"></i>
<span>{{ i18n.common.next }}</span> <i class="fas fa-long-arrow-alt-right"></i>
</a>
</div>
</div>
@ -50,6 +50,7 @@ limitations under the License.
</template>
<script>
import i18n from '../i18n';
import isChanged from '../util/is_changed';
import Presets from './domain_sections/presets';
import * as Sections from './domain_sections';
@ -75,6 +76,7 @@ limitations under the License.
},
data() {
return {
i18n,
active: tabs[0].key,
tabs,
};

View file

@ -18,7 +18,7 @@ limitations under the License.
<div>
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{{ i18n.templates.domainSections.https.https }}</label>
<label class="label">{{ i18n.common.https }}</label>
</div>
<div class="field-body">
<div class="field">
@ -216,7 +216,7 @@ limitations under the License.
certType: {
default: 'letsEncrypt',
options: {
letsEncrypt: i18n.templates.domainSections.https.letsEncrypt,
letsEncrypt: i18n.common.letsEncrypt,
custom: i18n.templates.domainSections.https.customCertificate,
},
enabled: true,
@ -236,16 +236,16 @@ limitations under the License.
};
export default {
name: 'DomainHTTPS', // Component name
display: i18n.templates.domainSections.https.https, // Display name for tab
key: 'https', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
name: 'DomainHTTPS', // 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 {
@ -253,7 +253,7 @@ limitations under the License.
};
},
computed: {
...computedFromDefaults(defaults, 'https'), // Getters & setters for the delegated data
...computedFromDefaults(defaults, 'https'), // Getters & setters for the delegated data
nginxDir() {
return this.$parent.$parent.$data.global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '');
},

View file

@ -72,15 +72,15 @@ limitations under the License.
};
export default {
name: 'DomainLogging', // Component name
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
name: 'DomainLogging', // Component name
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: {
PrettyCheck,
},
props: {
data: Object, // Data delegated back to us from parent
data: Object, // Data delegated back to us from parent
},
data () {
return {

View file

@ -18,7 +18,7 @@ limitations under the License.
<div>
<div v-if="!phpEnabled" class="field is-horizontal is-aligned-top">
<div class="field-label">
<label class="label">{{ i18n.templates.domainSections.php.php }}</label>
<label class="label">{{ i18n.common.php }}</label>
</div>
<div class="field-body">
<div class="field">
@ -39,7 +39,7 @@ limitations under the License.
<div v-else class="field is-horizontal">
<div class="field-label">
<label class="label">PHP</label>
<label class="label">{{ i18n.common.php }}</label>
</div>
<div class="field-body">
<div class="field">
@ -138,7 +138,7 @@ limitations under the License.
export default {
name: 'DomainPHP', // Component name
display: i18n.templates.domainSections.php.php, // Display name for tab
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: {
@ -152,7 +152,7 @@ limitations under the License.
i18n,
};
},
computed: computedFromDefaults(defaults, 'php'), // Getters & setters for the delegated data
computed: computedFromDefaults(defaults, 'php'), // Getters & setters for the delegated data
watch: {
// If the Reverse proxy or Python is enabled, PHP will be forced off
'$parent.$props.data': {

View file

@ -67,7 +67,7 @@ limitations under the License.
},
php: {
default: true,
display: i18n.templates.domainSections.presets.php,
display: i18n.common.php,
enabled: true,
computedCheck (data) {
return data.php.php.computed
@ -81,7 +81,7 @@ limitations under the License.
},
django: {
default: false,
display: i18n.templates.domainSections.presets.django,
display: i18n.common.django,
enabled: true,
computedCheck (data) {
return data.python.python.computed
@ -110,7 +110,7 @@ limitations under the License.
},
wordPress: {
default: false,
display: i18n.templates.domainSections.presets.wordPress,
display: i18n.common.wordPress,
enabled: true,
computedCheck (data) {
return data.routing.index.computed === 'index.php'
@ -123,7 +123,7 @@ limitations under the License.
},
drupal: {
default: false,
display: i18n.templates.domainSections.presets.drupal,
display: i18n.common.drupal,
enabled: true,
computedCheck (data) {
return data.routing.index.computed === 'index.php'
@ -136,7 +136,7 @@ limitations under the License.
},
magento: {
default: false,
display: i18n.templates.domainSections.presets.magento,
display: i18n.common.magento,
enabled: true,
computedCheck (data) {
return data.routing.index.computed === 'index.php'

View file

@ -18,7 +18,7 @@ limitations under the License.
<div>
<div v-if="!pythonEnabled" class="field is-horizontal is-aligned-top">
<div class="field-label">
<label class="label">{{ i18n.templates.domainSections.python.python }}</label>
<label class="label">{{ i18n.common.python }}</label>
</div>
<div class="field-body">
<div class="field">
@ -39,7 +39,7 @@ limitations under the License.
<div v-else class="field is-horizontal">
<div class="field-label">
<label class="label">{{ i18n.templates.domainSections.python.python }}</label>
<label class="label">{{ i18n.common.python }}</label>
</div>
<div class="field-body">
<div class="field">
@ -93,15 +93,15 @@ limitations under the License.
};
export default {
name: 'DomainPython', // Component name
display: i18n.templates.domainSections.python.python, // Display name for tab
key: 'python', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here
name: 'DomainPython', // 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
components: {
PrettyCheck,
},
props: {
data: Object, // Data delegated back to us from parent
data: Object, // Data delegated back to us from parent
},
data () {
return {

View file

@ -26,7 +26,7 @@ limitations under the License.
<div class="checkbox">
<PrettyCheck v-model="root" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i>
{{ i18n.templates.domainSections.routing.enable }}
{{ i18n.common.enable }}
</PrettyCheck>
</div>
</div>

View file

@ -34,16 +34,17 @@ limitations under the License.
<div class="navigation-buttons">
<a v-if="previousTab !== false" class="button is-mini" @click="active = previousTab">
<i class="fas fa-long-arrow-alt-left"></i> <span>{{ i18n.templates.global.back }}</span>
<i class="fas fa-long-arrow-alt-left"></i> <span>{{ i18n.common.back }}</span>
</a>
<a v-if="nextTab !== false" class="button is-primary is-mini" @click="active = nextTab">
<span>{{ i18n.templates.global.next }}</span> <i class="fas fa-long-arrow-alt-right"></i>
<span>{{ i18n.common.next }}</span> <i class="fas fa-long-arrow-alt-right"></i>
</a>
</div>
</div>
</template>
<script>
import i18n from '../i18n';
import isChanged from '../util/is_changed';
import * as Sections from './global_sections';
@ -61,6 +62,7 @@ limitations under the License.
},
data() {
return {
i18n,
active: tabs[0].key,
tabs,
};

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>

View file

@ -35,10 +35,10 @@ limitations under the License.
<div class="navigation-buttons">
<a v-if="previousTab !== false" class="button is-mini" @click="active = previousTab">
<i class="fas fa-long-arrow-alt-left"></i> <span>{{ i18n.templates.setup.back }}</span>
<i class="fas fa-long-arrow-alt-left"></i> <span>{{ i18n.common.back }}</span>
</a>
<a v-if="nextTab !== false" class="button is-primary is-mini" @click="active = nextTab">
<span>{{ i18n.templates.setup.next }}</span> <i class="fas fa-long-arrow-alt-right"></i>
<span>{{ i18n.common.next }}</span> <i class="fas fa-long-arrow-alt-right"></i>
</a>
</div>
</div>
@ -55,6 +55,7 @@ limitations under the License.
import getStream from 'get-stream';
import { gzip } from 'node-gzip';
import copy from 'copy-to-clipboard';
import i18n from '../i18n';
import * as Sections from './setup_sections';
const tabs = Object.values(Sections);
@ -66,6 +67,7 @@ limitations under the License.
},
data() {
return {
i18n,
active: tabs[0].key,
tabs,
};

View file

@ -22,7 +22,7 @@ module.exports = {
publicPath: './',
outputDir: 'dist',
filenameHashing: false,
productionSourceMap: false,
//productionSourceMap: false,
configureWebpack: {
plugins: [
process.argv.includes('--analyze') && new BundleAnalyzerPlugin(),