mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 10:46:10 +08:00
Allow language selection (#191)
* Add dropdown for language * Use vue-i18n to translate strings * Tweak header styling * Add Chinese languages in * Typo * Get language from browser (#193) * adaptive system language * Modify the adaptive system language * Remove dead code * Delete lang default values * Move browser language detection to util * Remove todos * Fix global PHP dropdown Co-authored-by: 墨娘 <61287199+moniang@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7d3290d850
commit
ff88e2f322
27
src/nginxconfig/i18n/default.js
Normal file
27
src/nginxconfig/i18n/default.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
https://github.com/digitalocean/nginxconfig.io/blob/master/LICENSE or https://mit-license.org/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
export default 'en';
|
||||
@@ -46,5 +46,5 @@ export default {
|
||||
reverseProxy: 'Reverse proxy',
|
||||
reverseProxyLower: 'reverse proxy',
|
||||
restrict: 'Restrict',
|
||||
listen: 'listen',
|
||||
path: 'Path',
|
||||
};
|
||||
|
||||
@@ -29,6 +29,9 @@ import common from '../common';
|
||||
export default {
|
||||
title: `${common.nginx}Config`,
|
||||
description: `The easiest way to configure a performant, secure, and stable ${common.nginx} server.`,
|
||||
en: 'English',
|
||||
zhCN: 'Chinese (simplified)',
|
||||
zhTW: 'Chinese (traditional)',
|
||||
singleColumnMode: 'Single column mode',
|
||||
splitColumnMode: 'Split column mode',
|
||||
perWebsiteConfig: 'Per-website config',
|
||||
|
||||
@@ -31,5 +31,4 @@ export default {
|
||||
reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} cannot be enabled whilst ${common.php} is enabled.`,
|
||||
reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} cannot be enabled whilst ${common.python} is enabled.`,
|
||||
enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`,
|
||||
path: 'Path',
|
||||
};
|
||||
|
||||
@@ -31,6 +31,5 @@ export default {
|
||||
fallbackRoutingPhpPath: `Fallback routing ${common.php} path`,
|
||||
legacyPhpRouting: `Legacy ${common.php} routing`,
|
||||
enableLegacyRouting: `${common.enable} legacy routing`,
|
||||
path: 'Path',
|
||||
routing: 'Routing',
|
||||
};
|
||||
|
||||
@@ -26,13 +26,12 @@ THE SOFTWARE.
|
||||
|
||||
export default {
|
||||
domain: 'Domain',
|
||||
path: 'Path',
|
||||
documentRoot: 'Document root',
|
||||
oneOrMoreOtherDomainsAreAlsoNamed: 'One or more other domains are also named',
|
||||
thisWillCauseIssuesWithConfigGeneration: 'This will cause issues with config generation.',
|
||||
wwwSubdomain: 'www subdomain',
|
||||
cdnSubdomain: 'CDN subdomain',
|
||||
redirectSubdomains: 'Redirect subdomains',
|
||||
routing: 'Routing',
|
||||
server: 'Server',
|
||||
listen: 'listen',
|
||||
};
|
||||
|
||||
@@ -24,9 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import en from './en';
|
||||
|
||||
const lang = 'en';
|
||||
const packs = { en };
|
||||
|
||||
export default packs[lang];
|
||||
export { default as en } from './en';
|
||||
export { default as zhCN } from './zh-cn';
|
||||
export { default as zhTW } from './zh-tw';
|
||||
|
||||
@@ -46,5 +46,5 @@ export default {
|
||||
reverseProxy: '反向代理',
|
||||
reverseProxyLower: '反向代理',
|
||||
restrict: '限制',
|
||||
listen: '监听',
|
||||
path: '路径',
|
||||
};
|
||||
|
||||
@@ -29,6 +29,9 @@ import common from '../common';
|
||||
export default {
|
||||
title: `${common.nginx} 配置`,
|
||||
description: `配置高性能、安全、稳定的${common.nginx}服务器的最简单方法。`,
|
||||
en: '英语',
|
||||
zhCN: '简体中文',
|
||||
zhTW: '繁体中文',
|
||||
singleColumnMode: '垂直模式',
|
||||
splitColumnMode: '水平模式',
|
||||
perWebsiteConfig: '站点配置',
|
||||
|
||||
@@ -31,5 +31,4 @@ export default {
|
||||
reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy}在启用${common.php}时无法启用。`,
|
||||
reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy}在启用${common.python}时无法启用。`,
|
||||
enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`,
|
||||
path: '路径',
|
||||
};
|
||||
|
||||
@@ -31,6 +31,5 @@ export default {
|
||||
fallbackRoutingPhpPath: `后备路由${common.php}路径`,
|
||||
legacyPhpRouting: `传统${common.php}路由`,
|
||||
enableLegacyRouting: `${common.enable}传统路由`,
|
||||
path: '路径',
|
||||
routing: '路由设置',
|
||||
};
|
||||
|
||||
@@ -26,13 +26,12 @@ THE SOFTWARE.
|
||||
|
||||
export default {
|
||||
domain: '站点',
|
||||
path: '路径',
|
||||
documentRoot: '运行目录',
|
||||
oneOrMoreOtherDomainsAreAlsoNamed: '发现了重复的域名',
|
||||
thisWillCauseIssuesWithConfigGeneration: '这将导致生成配置出现问题。',
|
||||
wwwSubdomain: 'www 子域名',
|
||||
cdnSubdomain: 'CDN 子域名',
|
||||
redirectSubdomains: '子域名重定向',
|
||||
routing: '路由设置',
|
||||
server: '服务',
|
||||
listen: '监听',
|
||||
};
|
||||
|
||||
@@ -46,5 +46,5 @@ export default {
|
||||
reverseProxy: '反向代理',
|
||||
reverseProxyLower: '反向代理',
|
||||
restrict: '限制',
|
||||
listen: '監聽',
|
||||
path: '路徑',
|
||||
};
|
||||
|
||||
@@ -29,6 +29,9 @@ import common from '../common';
|
||||
export default {
|
||||
title: `${common.nginx} 配寘`,
|
||||
description: `配寘高性能、安全、穩定的${common.nginx}服務器的最簡單方法。`,
|
||||
en: '英語',
|
||||
zhCN: '簡體中文',
|
||||
zhTW: '繁體中文',
|
||||
singleColumnMode: '垂直模式',
|
||||
splitColumnMode: '水准模式',
|
||||
perWebsiteConfig: '網站配寘',
|
||||
|
||||
@@ -31,5 +31,4 @@ export default {
|
||||
reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy}在啟用${common.php}時無法啟用。`,
|
||||
reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy}在啟用${common.python}時無法啟用。`,
|
||||
enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`,
|
||||
path: '路徑',
|
||||
};
|
||||
|
||||
@@ -31,6 +31,5 @@ export default {
|
||||
fallbackRoutingPhpPath: `後備路由${common.php}路徑`,
|
||||
legacyPhpRouting: `傳統${common.php}路由`,
|
||||
enableLegacyRouting: `${common.enable}傳統路由`,
|
||||
path: '路徑',
|
||||
routing: '路由設定',
|
||||
};
|
||||
|
||||
@@ -26,13 +26,12 @@ THE SOFTWARE.
|
||||
|
||||
export default {
|
||||
domain: '網站',
|
||||
path: '路徑',
|
||||
documentRoot: '運行目錄',
|
||||
oneOrMoreOtherDomainsAreAlsoNamed: '發現了重復的域名',
|
||||
thisWillCauseIssuesWithConfigGeneration: '這將導致生成配置出現問題。',
|
||||
wwwSubdomain: 'www 子域名',
|
||||
cdnSubdomain: 'CDN 子域名',
|
||||
redirectSubdomains: '子域名重定向',
|
||||
routing: '路由設定',
|
||||
server: '服務',
|
||||
listen: '監聽',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user