mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-10 04:45:29 +08:00
Move strings to i18n for presets
This commit is contained in:
@@ -17,5 +17,6 @@ limitations under the License.
|
|||||||
import https from './https';
|
import https from './https';
|
||||||
import logging from './logging';
|
import logging from './logging';
|
||||||
import php from './php';
|
import php from './php';
|
||||||
|
import presets from './presets';
|
||||||
|
|
||||||
export default { https, logging, php };
|
export default { https, logging, php, presets };
|
||||||
|
28
src/nginxconfig/i18n/en/templates/domain_sections/presets.js
Normal file
28
src/nginxconfig/i18n/en/templates/domain_sections/presets.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
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 {
|
||||||
|
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',
|
||||||
|
};
|
@@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header-group">
|
<div class="header-group">
|
||||||
<h3>Presets</h3>
|
<h3>{{ i18n.templates.domainSections.presets.presets }}</h3>
|
||||||
<template v-if="$parent.$props.data.hasUserInteraction">
|
<template v-if="$parent.$props.data.hasUserInteraction">
|
||||||
<a v-if="expanded" class="button is-tiny" @click="expanded = false">
|
<a v-if="expanded" class="button is-tiny" @click="expanded = false">
|
||||||
<i class="fas fa-angle-up"></i>
|
<i class="fas fa-angle-up"></i>
|
||||||
@@ -31,8 +31,7 @@ limitations under the License.
|
|||||||
<template v-if="!$parent.$props.data.hasUserInteraction || expanded">
|
<template v-if="!$parent.$props.data.hasUserInteraction || expanded">
|
||||||
<div v-if="$parent.$props.data.hasUserInteraction" class="message is-warning">
|
<div v-if="$parent.$props.data.hasUserInteraction" class="message is-warning">
|
||||||
<div class="message-body">
|
<div class="message-body">
|
||||||
It looks like you've customised the configuration for this domain.
|
{{ i18n.templates.domainSections.presets.itLooksLikeYouCustomisedTheConfig }}
|
||||||
Choosing a new preset may reset or change some of the settings that you've customised.
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -56,7 +55,7 @@ limitations under the License.
|
|||||||
const defaults = {
|
const defaults = {
|
||||||
frontend: {
|
frontend: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'Frontend',
|
display: i18n.templates.domainSections.presets.frontend,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return !data.php.php.computed
|
return !data.php.php.computed
|
||||||
@@ -68,7 +67,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
php: {
|
php: {
|
||||||
default: true,
|
default: true,
|
||||||
display: 'PHP',
|
display: i18n.templates.domainSections.presets.php,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.php.php.computed
|
return data.php.php.computed
|
||||||
@@ -82,7 +81,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
django: {
|
django: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'Django',
|
display: i18n.templates.domainSections.presets.django,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.python.python.computed
|
return data.python.python.computed
|
||||||
@@ -92,7 +91,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
nodejs: {
|
nodejs: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'Node.js',
|
display: i18n.templates.domainSections.presets.nodeJs,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.reverseProxy.reverseProxy.computed
|
return data.reverseProxy.reverseProxy.computed
|
||||||
@@ -101,7 +100,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
singlePageApplication: {
|
singlePageApplication: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'Single-page application',
|
display: i18n.templates.domainSections.presets.singePageApplication,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.php.php.computed
|
return data.php.php.computed
|
||||||
@@ -111,7 +110,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
wordPress: {
|
wordPress: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'WordPress',
|
display: i18n.templates.domainSections.presets.wordPress,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.routing.index.computed === 'index.php'
|
return data.routing.index.computed === 'index.php'
|
||||||
@@ -124,7 +123,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
drupal: {
|
drupal: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'Drupal',
|
display: i18n.templates.domainSections.presets.drupal,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.routing.index.computed === 'index.php'
|
return data.routing.index.computed === 'index.php'
|
||||||
@@ -137,7 +136,7 @@ limitations under the License.
|
|||||||
},
|
},
|
||||||
magento: {
|
magento: {
|
||||||
default: false,
|
default: false,
|
||||||
display: 'Magento',
|
display: i18n.templates.domainSections.presets.magento,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
computedCheck (data) {
|
computedCheck (data) {
|
||||||
return data.routing.index.computed === 'index.php'
|
return data.routing.index.computed === 'index.php'
|
||||||
@@ -152,7 +151,7 @@ limitations under the License.
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DomainPresets', // Component name
|
name: 'DomainPresets', // Component name
|
||||||
display: 'Presets', // Display name for tab
|
display: i18n.templates.domainSections.presets.presets, // Display name for tab
|
||||||
key: 'presets', // Key for data in parent
|
key: 'presets', // 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: {
|
||||||
|
Reference in New Issue
Block a user