Move domain https section strings to i18n

pull/111/head
MattIPv4 2020-05-28 17:16:20 +01:00
parent 19cac71df0
commit c331e2c79a
5 changed files with 63 additions and 14 deletions

View File

@ -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 {
https: 'HTTPS',
enableEncryptedSslConnection: 'enable encrypted SSL connections',
http2: 'HTTP/2',
enableHttp2Connections: 'enable HTTP/2 connections',
forceHttps: 'Force HTTPS',
hsts: 'HSTS',
enableStrictTransportSecurity: 'enable Strict Transport Security',
certificationType: 'Certification type',
letsEncrypt: 'Let\'s Encrypt',
customCertificate: 'Custom certificate',
letsEncryptEmail: 'Let\'s Encrypt email',
};

View File

@ -0,0 +1,19 @@
/*
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';
export default { https };

View File

@ -15,5 +15,6 @@ limitations under the License.
*/ */
import app from './app'; import app from './app';
import domainSections from './domain_sections';
export default { app }; export default { app, domainSections };

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import en from './en'; import * as en from './en';
const lang = 'en'; const lang = 'en';
const packs = { en }; const packs = { en };

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">HTTPS</label> <label class="label">{{ i18n.templates.domainSections.https.https }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -26,7 +26,7 @@ limitations under the License.
<div class="checkbox"> <div class="checkbox">
<PrettyCheck v-model="https" class="p-default p-curve p-fill p-icon"> <PrettyCheck v-model="https" 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>
enable encrypted SSL connections {{ i18n.templates.domainSections.https.enableEncryptedSslConnection }}
</PrettyCheck> </PrettyCheck>
</div> </div>
</div> </div>
@ -36,7 +36,7 @@ limitations under the License.
<div v-if="http2Enabled" class="field is-horizontal"> <div v-if="http2Enabled" class="field is-horizontal">
<div class="field-label"> <div class="field-label">
<label class="label">HTTP/2</label> <label class="label">{{ i18n.templates.domainSections.https.http2 }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -44,7 +44,7 @@ limitations under the License.
<div class="checkbox"> <div class="checkbox">
<PrettyCheck v-model="http2" class="p-default p-curve p-fill p-icon"> <PrettyCheck v-model="http2" 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>
enable HTTP/2 connections {{ i18n.templates.domainSections.https.enableHttp2Connections }}
</PrettyCheck> </PrettyCheck>
</div> </div>
</div> </div>
@ -54,7 +54,7 @@ limitations under the License.
<div v-if="forceHttpsEnabled" class="field is-horizontal"> <div v-if="forceHttpsEnabled" class="field is-horizontal">
<div class="field-label"> <div class="field-label">
<label class="label">Force HTTPS</label> <label class="label">{{ i18n.templates.domainSections.https.forceHttps }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -74,7 +74,7 @@ limitations under the License.
<div v-if="hstsEnabled" class="field is-horizontal is-aligned-top"> <div v-if="hstsEnabled" class="field is-horizontal is-aligned-top">
<div class="field-label"> <div class="field-label">
<label class="label">HSTS</label> <label class="label">{{ i18n.templates.domainSections.https.hsts }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -82,7 +82,7 @@ limitations under the License.
<div class="checkbox"> <div class="checkbox">
<PrettyCheck v-model="hsts" class="p-default p-curve p-fill p-icon"> <PrettyCheck v-model="hsts" 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>
enable Strict Transport Security {{ i18n.templates.domainSections.https.enableStrictTransportSecurity }}
</PrettyCheck> </PrettyCheck>
</div> </div>
</div> </div>
@ -110,7 +110,7 @@ limitations under the License.
<div v-if="certTypeEnabled" class="field is-horizontal is-aligned-top"> <div v-if="certTypeEnabled" class="field is-horizontal is-aligned-top">
<div class="field-label"> <div class="field-label">
<label class="label">Certification type</label> <label class="label">{{ i18n.templates.domainSections.https.certificationType }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -130,7 +130,7 @@ limitations under the License.
<div v-if="letsEncryptEmailEnabled" class="field is-horizontal"> <div v-if="letsEncryptEmailEnabled" class="field is-horizontal">
<div class="field-label"> <div class="field-label">
<label class="label">Let's Encrypt email</label> <label class="label">{{ i18n.templates.domainSections.https.letsEncryptEmail }}</label>
</div> </div>
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
@ -216,8 +216,8 @@ limitations under the License.
certType: { certType: {
default: 'letsEncrypt', default: 'letsEncrypt',
options: { options: {
letsEncrypt: 'Let\'s Encrypt', letsEncrypt: i18n.templates.domainSections.https.letsEncrypt,
custom: 'Custom certificate', 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: 'HTTPS', // Display name for tab display: i18n.templates.domainSections.https.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: {