Move i18n strings to be centralised

pull/111/head
MattIPv4 2020-06-02 16:51:28 +01:00
parent 85910e7794
commit 707ff8238a
41 changed files with 184 additions and 167 deletions

View File

@ -17,4 +17,17 @@ limitations under the License.
export default { export default {
back: 'Back', back: 'Back',
next: 'Next', 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. limitations under the License.
*/ */
import common from './common';
import templates from './templates'; import templates from './templates';
// TODO: centralised shared strings export default { common, templates };
export default { templates };

View File

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

View File

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

View File

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

View File

@ -18,11 +18,6 @@ export default {
presets: 'Presets', 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.', 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', frontend: 'Frontend',
php: 'PHP',
django: 'Django',
nodeJs: 'Node.js', nodeJs: 'Node.js',
singlePageApplication: 'Single-page application', 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. limitations under the License.
*/ */
import common from '../../common';
export default { export default {
python: 'Python', pythonIsDisabled: `${common.python} is disabled.`,
pythonIsDisabled: 'Python is disabled.', pythonCannotBeEnabledWithReverseProxy: `${common.python} cannot be enabled whilst the reverse proxy is enabled.`,
pythonCannotBeEnabledWithReverseProxy: 'Python cannot be enabled whilst the reverse proxy is enabled.', pythonCannotBeEnabledWithPhp: `${common.python} cannot be enabled whilst ${common.php} is enabled.`,
pythonCannotBeEnabledWithPhp: 'Python cannot be enabled whilst PHP is enabled.', enablePython: `${common.enable} ${common.python}`,
enablePython: 'enable Python', djangoRules: `${common.django} rules`,
djangoRules: 'Django rules', enableDjangoRules: `${common.enable} ${common.django}-specific rules`,
enableDjangoRules: 'enable Django-specific rules',
}; };

View File

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

View File

@ -14,12 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import common from '../../common';
export default { export default {
enable: 'enable',
fallbackRouting: 'Fallback routing', fallbackRouting: 'Fallback routing',
fallbackRoutingPhpPath: 'Fallback routing PHP path', fallbackRoutingPhpPath: `Fallback routing ${common.php} path`,
legacyPhpRouting: 'Legacy PHP routing', legacyPhpRouting: `Legacy ${common.php} routing`,
enableLegacyRouting: 'enable legacy routing', enableLegacyRouting: `${common.enable} legacy routing`,
path: 'Path', path: 'Path',
routing: 'Routing', 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. limitations under the License.
*/ */
import common from '../../common';
const mozilla = 'Mozilla';
export default { export default {
sslProfile: 'SSL Profile', sslProfile: `${common.ssl} Profile`,
httpsMustBeEnabledOnOneSite: 'HTTPS must be enabled on at least one site to configure global HTTPS settings.', httpsMustBeEnabledOnOneSite: `${common.https} must be enabled on at least one site to configure global ${common.https} settings.`,
ocspDnsResolvers: 'OCSP DNS Resolvers', ocspDnsResolvers: 'OCSP DNS Resolvers',
cloudflareResolver: 'Cloudflare Resolver', cloudflareResolver: 'Cloudflare Resolver',
googlePublicDns: 'Google Public DNS', googlePublicDns: 'Google Public DNS',
openDns: 'OpenDNS', openDns: 'OpenDNS',
letsEncryptWebroot: 'Let\'s Encrypt webroot', letsEncryptWebroot: `${common.letsEncrypt} webroot`,
mozillaModern: 'Mozilla Modern', mozillaModern: `${mozilla} Modern`,
mozillaIntermediate: 'Mozilla Intermediate', mozillaIntermediate: `${mozilla} Intermediate`,
mozillaOld: 'Mozilla Old', mozillaOld: `${mozilla} Old`,
https: 'HTTPS',
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,11 +15,9 @@ limitations under the License.
*/ */
import app from './app'; import app from './app';
import domain from './domain';
import global from './global';
import setup from './setup'; import setup from './setup';
import domainSections from './domain_sections'; import domainSections from './domain_sections';
import globalSections from './global_sections'; import globalSections from './global_sections';
import setupSections from './setup_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 { export default {
back: 'Back',
next: 'Next',
downloadConfig: 'Download Config', downloadConfig: 'Download Config',
copyBase64: 'Copy Base64', copyBase64: 'Copy Base64',
}; };

View File

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

View File

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

View File

@ -14,8 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import common from '../../common';
export default { export default {
letsGoLive: 'Let\'s go live!', 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!', goLive: 'Go live!',
}; };

View File

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

View File

@ -39,10 +39,10 @@ limitations under the License.
<div class="navigation-buttons"> <div class="navigation-buttons">
<a v-if="previousTab !== false" class="button is-mini" @click="active = previousTab"> <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>
<a v-if="nextTab !== false" class="button is-primary is-mini" @click="active = nextTab"> <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> </a>
</div> </div>
</div> </div>
@ -50,6 +50,7 @@ limitations under the License.
</template> </template>
<script> <script>
import i18n from '../i18n';
import isChanged from '../util/is_changed'; import isChanged from '../util/is_changed';
import Presets from './domain_sections/presets'; import Presets from './domain_sections/presets';
import * as Sections from './domain_sections'; import * as Sections from './domain_sections';
@ -75,6 +76,7 @@ limitations under the License.
}, },
data() { data() {
return { return {
i18n,
active: tabs[0].key, active: tabs[0].key,
tabs, tabs,
}; };

View File

@ -18,7 +18,7 @@ limitations under the License.
<div> <div>
<div class="field is-horizontal"> <div class="field is-horizontal">
<div class="field-label"> <div class="field-label">
<label class="label">{{ i18n.templates.domainSections.https.https }}</label> <label class="label">{{ i18n.common.https }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -216,7 +216,7 @@ limitations under the License.
certType: { certType: {
default: 'letsEncrypt', default: 'letsEncrypt',
options: { options: {
letsEncrypt: i18n.templates.domainSections.https.letsEncrypt, letsEncrypt: i18n.common.letsEncrypt,
custom: i18n.templates.domainSections.https.customCertificate, custom: i18n.templates.domainSections.https.customCertificate,
}, },
enabled: true, enabled: true,
@ -237,7 +237,7 @@ limitations under the License.
export default { export default {
name: 'DomainHTTPS', // Component name name: 'DomainHTTPS', // Component name
display: i18n.templates.domainSections.https.https, // Display name for tab display: i18n.common.https, // Display name for tab
key: 'https', // Key for data in parent key: 'https', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

@ -73,7 +73,7 @@ limitations under the License.
export default { export default {
name: 'DomainLogging', // Component name name: 'DomainLogging', // Component name
display: i18n.templates.domainSections.logging.logging, // Display name for tab display: i18n.common.logging, // Display name for tab
key: 'logging', // Key for data in parent key: 'logging', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

@ -18,7 +18,7 @@ limitations under the License.
<div> <div>
<div v-if="!phpEnabled" class="field is-horizontal is-aligned-top"> <div v-if="!phpEnabled" class="field is-horizontal is-aligned-top">
<div class="field-label"> <div class="field-label">
<label class="label">{{ i18n.templates.domainSections.php.php }}</label> <label class="label">{{ i18n.common.php }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -39,7 +39,7 @@ limitations under the License.
<div v-else class="field is-horizontal"> <div v-else class="field is-horizontal">
<div class="field-label"> <div class="field-label">
<label class="label">PHP</label> <label class="label">{{ i18n.common.php }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -138,7 +138,7 @@ limitations under the License.
export default { export default {
name: 'DomainPHP', // Component name 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 key: 'php', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

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

View File

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

View File

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

View File

@ -34,16 +34,17 @@ limitations under the License.
<div class="navigation-buttons"> <div class="navigation-buttons">
<a v-if="previousTab !== false" class="button is-mini" @click="active = previousTab"> <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>
<a v-if="nextTab !== false" class="button is-primary is-mini" @click="active = nextTab"> <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> </a>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import i18n from '../i18n';
import isChanged from '../util/is_changed'; import isChanged from '../util/is_changed';
import * as Sections from './global_sections'; import * as Sections from './global_sections';
@ -61,6 +62,7 @@ limitations under the License.
}, },
data() { data() {
return { return {
i18n,
active: tabs[0].key, active: tabs[0].key,
tabs, tabs,
}; };

View File

@ -145,7 +145,7 @@ limitations under the License.
export default { export default {
name: 'GlobalHTTPS', // Component name name: 'GlobalHTTPS', // Component name
display: i18n.templates.globalSections.https.https, // Display name for tab display: i18n.common.https, // Display name for tab
key: 'https', // Key for data in parent key: 'https', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

@ -93,7 +93,7 @@ limitations under the License.
export default { export default {
name: 'GlobalLogging', // Component name 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 key: 'logging', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

@ -144,7 +144,7 @@ limitations under the License.
export default { export default {
name: 'GlobalNGINX', // Component name 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 key: 'nginx', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

@ -101,7 +101,7 @@ limitations under the License.
export default { export default {
name: 'GlobalPHP', // Component name name: 'GlobalPHP', // Component name
display: i18n.templates.globalSections.php.php, // Display name for tab display: i18n.common.php, // Display name for tab
key: 'php', // Key for data in parent key: 'php', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
components: { components: {

View File

@ -64,7 +64,7 @@ limitations under the License.
export default { export default {
name: 'GlobalPython', // Component name name: 'GlobalPython', // Component name
display: i18n.templates.globalSections.python.python, // Display name for tab display: i18n.common.python, // Display name for tab
key: 'python', // Key for data in parent key: 'python', // Key for data in parent
delegated: delegatedFromDefaults(defaults), // Data the parent will present here delegated: delegatedFromDefaults(defaults), // Data the parent will present here
props: { props: {

View File

@ -59,7 +59,7 @@ limitations under the License.
<div class="checkbox"> <div class="checkbox">
<PrettyCheck v-model="serverTokens" class="p-default p-curve p-fill p-icon"> <PrettyCheck v-model="serverTokens" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i> <i slot="extra" class="icon fas fa-check"></i>
{{ i18n.templates.globalSections.security.enable }} {{ i18n.common.enable }}
</PrettyCheck> </PrettyCheck>
</div> </div>
</div> </div>
@ -77,7 +77,7 @@ limitations under the License.
<div class="checkbox"> <div class="checkbox">
<PrettyCheck v-model="limitReq" class="p-default p-curve p-fill p-icon"> <PrettyCheck v-model="limitReq" class="p-default p-curve p-fill p-icon">
<i slot="extra" class="icon fas fa-check"></i> <i slot="extra" class="icon fas fa-check"></i>
{{ i18n.templates.globalSections.security.enable }} {{ i18n.common.enable }}
</PrettyCheck> </PrettyCheck>
</div> </div>
</div> </div>

View File

@ -35,10 +35,10 @@ limitations under the License.
<div class="navigation-buttons"> <div class="navigation-buttons">
<a v-if="previousTab !== false" class="button is-mini" @click="active = previousTab"> <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>
<a v-if="nextTab !== false" class="button is-primary is-mini" @click="active = nextTab"> <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> </a>
</div> </div>
</div> </div>
@ -55,6 +55,7 @@ limitations under the License.
import getStream from 'get-stream'; import getStream from 'get-stream';
import { gzip } from 'node-gzip'; import { gzip } from 'node-gzip';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import i18n from '../i18n';
import * as Sections from './setup_sections'; import * as Sections from './setup_sections';
const tabs = Object.values(Sections); const tabs = Object.values(Sections);
@ -66,6 +67,7 @@ limitations under the License.
}, },
data() { data() {
return { return {
i18n,
active: tabs[0].key, active: tabs[0].key,
tabs, tabs,
}; };

View File

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