Procházet zdrojové kódy

fix translation issues

0xJacky před 3 roky
rodič
revize
e6344a6aab

+ 17 - 23
frontend/src/locale/en/LC_MESSAGES/app.po

@@ -10,10 +10,6 @@ msgstr ""
 "Generated-By: easygettext\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: src/views/other/Install.vue:50
-msgid "<translate>Install</translate>"
-msgstr ""
-
 #: src/router/index.js:99
 msgid "404 Not Found"
 msgstr ""
@@ -28,7 +24,6 @@ msgid "Action"
 msgstr ""
 
 #: src/router/index.js:47 src/views/domain/DomainAdd.vue:18
-#: src/views/domain/DomainEdit.vue:46
 msgid "Add Site"
 msgstr ""
 
@@ -49,7 +44,7 @@ msgstr ""
 msgid "Build with"
 msgstr ""
 
-#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:23
+#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:24
 msgid "Cancel"
 msgstr ""
 
@@ -97,7 +92,7 @@ msgstr ""
 msgid "Dashboard"
 msgstr ""
 
-#: src/views/other/Install.vue:106
+#: src/views/other/Install.vue:105
 msgid "Database (Optional, default: database)"
 msgstr ""
 
@@ -130,7 +125,7 @@ msgstr ""
 msgid "Do you want to change the template to support the TLS?"
 msgstr ""
 
-#: src/views/domain/DomainEdit.vue:46
+#: src/views/domain/DomainEdit.vue:38
 msgid "Edit %{n}"
 msgstr ""
 
@@ -138,7 +133,7 @@ msgstr ""
 msgid "Edit Configuration"
 msgstr ""
 
-#: src/views/domain/DomainEdit.vue:92
+#: src/views/domain/DomainEdit.vue:87
 msgid "Edit Configuration File"
 msgstr ""
 
@@ -146,7 +141,7 @@ msgstr ""
 msgid "Edit Site"
 msgstr ""
 
-#: src/views/other/Install.vue:32
+#: src/views/other/Install.vue:31
 msgid "Email (*)"
 msgstr ""
 
@@ -187,7 +182,7 @@ msgstr ""
 msgid "File Not Found"
 msgstr ""
 
-#: src/views/domain/DomainEdit.vue:9 src/views/domain/DomainEdit.vue:3
+#: src/views/domain/DomainEdit.vue:10 src/views/domain/DomainEdit.vue:4
 msgid "Getting Certificate from Let's Encrypt"
 msgstr ""
 
@@ -219,7 +214,7 @@ msgstr ""
 msgid "Intermediate Certification Authorities: %{issuer}"
 msgstr ""
 
-#: src/views/other/Install.vue:47
+#: src/views/other/Install.vue:46
 msgid "Invalid E-mail!"
 msgstr ""
 
@@ -248,11 +243,10 @@ msgstr ""
 msgid "Logout successful"
 msgstr ""
 
-#: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
+#: src/views/domain/DomainEdit.vue:13 src/views/domain/DomainEdit.vue:7
 msgid ""
-"Make sure you have configured a reverse proxy for <code>.well-known</code> "
-"directory to <code>HTTPChallengePort</code> (default: 9180) before getting "
-"the certificate."
+"Make sure you have configured a reverse proxy for .well-known directory to "
+"HTTPChallengePort (default: 9180) before getting the certificate."
 msgstr ""
 
 #: src/router/index.js:60
@@ -313,19 +307,19 @@ msgstr ""
 msgid "Password"
 msgstr ""
 
-#: src/views/other/Install.vue:84
+#: src/views/other/Install.vue:83
 msgid "Password (*)"
 msgstr ""
 
-#: src/views/other/Install.vue:51
+#: src/views/other/Install.vue:50
 msgid "Please input your E-mail!"
 msgstr ""
 
-#: src/views/other/Install.vue:97 src/views/other/Login.vue:69
+#: src/views/other/Install.vue:96 src/views/other/Login.vue:69
 msgid "Please input your password!"
 msgstr ""
 
-#: src/views/other/Install.vue:74 src/views/other/Login.vue:46
+#: src/views/other/Install.vue:73 src/views/other/Login.vue:46
 msgid "Please input your username!"
 msgstr ""
 
@@ -350,7 +344,7 @@ msgid "Root Directory (root)"
 msgstr ""
 
 #: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainAdd.vue:6
-#: src/views/domain/DomainEdit.vue:24
+#: src/views/domain/DomainEdit.vue:25
 msgid "Save"
 msgstr ""
 
@@ -413,7 +407,7 @@ msgid ""
 "from Let's Encrypt\" first."
 msgstr ""
 
-#: src/views/other/Install.vue:121
+#: src/views/other/Install.vue:120
 msgid "The filename cannot contain the following characters: %{c}"
 msgstr ""
 
@@ -441,7 +435,7 @@ msgstr ""
 msgid "Username"
 msgstr ""
 
-#: src/views/other/Install.vue:61
+#: src/views/other/Install.vue:60
 msgid "Username (*)"
 msgstr ""
 

binární
frontend/src/locale/zh_CN/LC_MESSAGES/app.mo


+ 19 - 25
frontend/src/locale/zh_CN/LC_MESSAGES/app.po

@@ -12,10 +12,6 @@ msgstr ""
 "Generated-By: easygettext\n"
 "X-Generator: Poedit 3.0.1\n"
 
-#: src/views/other/Install.vue:50
-msgid "<translate>Install</translate>"
-msgstr ""
-
 #: src/router/index.js:99
 msgid "404 Not Found"
 msgstr "404 未找到页面"
@@ -30,7 +26,6 @@ msgid "Action"
 msgstr "操作"
 
 #: src/router/index.js:47 src/views/domain/DomainAdd.vue:18
-#: src/views/domain/DomainEdit.vue:46
 msgid "Add Site"
 msgstr "添加站点"
 
@@ -51,7 +46,7 @@ msgstr "成功启用 %{name} 自动续签"
 msgid "Build with"
 msgstr "构建基于"
 
-#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:23
+#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:24
 msgid "Cancel"
 msgstr "取消"
 
@@ -99,7 +94,7 @@ msgstr "创建时间"
 msgid "Dashboard"
 msgstr "仪表盘"
 
-#: src/views/other/Install.vue:106
+#: src/views/other/Install.vue:105
 msgid "Database (Optional, default: database)"
 msgstr "数据库 (可选,默认: database)"
 
@@ -132,7 +127,7 @@ msgstr "磁盘 IO"
 msgid "Do you want to change the template to support the TLS?"
 msgstr "你想要改变模板以支持 TLS 吗?"
 
-#: src/views/domain/DomainEdit.vue:46
+#: src/views/domain/DomainEdit.vue:38
 msgid "Edit %{n}"
 msgstr "编辑 %{n}"
 
@@ -140,7 +135,7 @@ msgstr "编辑 %{n}"
 msgid "Edit Configuration"
 msgstr "编辑配置"
 
-#: src/views/domain/DomainEdit.vue:92
+#: src/views/domain/DomainEdit.vue:87
 msgid "Edit Configuration File"
 msgstr "编辑配置文件"
 
@@ -148,7 +143,7 @@ msgstr "编辑配置文件"
 msgid "Edit Site"
 msgstr "编辑站点"
 
-#: src/views/other/Install.vue:32
+#: src/views/other/Install.vue:31
 msgid "Email (*)"
 msgstr "邮箱 (*)"
 
@@ -189,7 +184,7 @@ msgstr "启用失败 %{msg}"
 msgid "File Not Found"
 msgstr "未找到文件"
 
-#: src/views/domain/DomainEdit.vue:9 src/views/domain/DomainEdit.vue:3
+#: src/views/domain/DomainEdit.vue:10 src/views/domain/DomainEdit.vue:4
 msgid "Getting Certificate from Let's Encrypt"
 msgstr "从 Let's Encrypt 获取证书"
 
@@ -221,7 +216,7 @@ msgstr "安装"
 msgid "Intermediate Certification Authorities: %{issuer}"
 msgstr "中级证书颁发机构: %{issuer}"
 
-#: src/views/other/Install.vue:47
+#: src/views/other/Install.vue:46
 msgid "Invalid E-mail!"
 msgstr "无效的邮箱!"
 
@@ -250,14 +245,13 @@ msgstr "登录成功"
 msgid "Logout successful"
 msgstr "登出成功"
 
-#: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
+#: src/views/domain/DomainEdit.vue:13 src/views/domain/DomainEdit.vue:7
 msgid ""
-"Make sure you have configured a reverse proxy for <code>.well-known</code> "
-"directory to <code>HTTPChallengePort</code> (default: 9180) before getting "
-"the certificate."
+"Make sure you have configured a reverse proxy for .well-known directory to "
+"HTTPChallengePort (default: 9180) before getting the certificate."
 msgstr ""
-"在获取签发证书前,请确保配置文件中已将 <code>.well-known</code> 目录反向代"
-"理到<code>HTTPChallengePort</code> (默认: 9180)"
+"在获取签发证书前,请确保配置文件中已将 .well-known 目录反向代理到 "
+"HTTPChallengePort (默认: 9180)"
 
 #: src/router/index.js:60
 msgid "Manage Configs"
@@ -317,19 +311,19 @@ msgstr ""
 msgid "Password"
 msgstr "密码"
 
-#: src/views/other/Install.vue:84
+#: src/views/other/Install.vue:83
 msgid "Password (*)"
 msgstr "密码 (*)"
 
-#: src/views/other/Install.vue:51
+#: src/views/other/Install.vue:50
 msgid "Please input your E-mail!"
 msgstr "请输入您的邮箱!"
 
-#: src/views/other/Install.vue:97 src/views/other/Login.vue:69
+#: src/views/other/Install.vue:96 src/views/other/Login.vue:69
 msgid "Please input your password!"
 msgstr "请输入您的密码!"
 
-#: src/views/other/Install.vue:74 src/views/other/Login.vue:46
+#: src/views/other/Install.vue:73 src/views/other/Login.vue:46
 msgid "Please input your username!"
 msgstr "请输入您的用户名!"
 
@@ -354,7 +348,7 @@ msgid "Root Directory (root)"
 msgstr "网站根目录 (root)"
 
 #: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainAdd.vue:6
-#: src/views/domain/DomainEdit.vue:24
+#: src/views/domain/DomainEdit.vue:25
 msgid "Save"
 msgstr "保存"
 
@@ -419,7 +413,7 @@ msgstr ""
 "系统将会每小时检测一次该域名证书,若距离上次签发已超过1个月,则将自动续签。"
 "<br/>如果您之前没有证书,请先点击 \"从 Let's Encrypt 获取证书\"。"
 
-#: src/views/other/Install.vue:121
+#: src/views/other/Install.vue:120
 msgid "The filename cannot contain the following characters: %{c}"
 msgstr "文件名不能包含以下字符: %{c}"
 
@@ -449,7 +443,7 @@ msgstr "运行时间:"
 msgid "Username"
 msgstr "用户名"
 
-#: src/views/other/Install.vue:61
+#: src/views/other/Install.vue:60
 msgid "Username (*)"
 msgstr "用户名 (*)"
 

+ 18 - 23
frontend/src/locale/zh_TW/LC_MESSAGES/app.po

@@ -13,10 +13,6 @@ msgstr ""
 "Generated-By: easygettext\n"
 "X-Generator: Poedit 2.2\n"
 
-#: src/views/other/Install.vue:50
-msgid "<translate>Install</translate>"
-msgstr ""
-
 #: src/router/index.js:99
 msgid "404 Not Found"
 msgstr "404 未找到頁面"
@@ -31,7 +27,6 @@ msgid "Action"
 msgstr "操作"
 
 #: src/router/index.js:47 src/views/domain/DomainAdd.vue:18
-#: src/views/domain/DomainEdit.vue:46
 msgid "Add Site"
 msgstr "新增站點"
 
@@ -52,7 +47,7 @@ msgstr "成功啟用 %{name} 自動續簽"
 msgid "Build with"
 msgstr "構建基於"
 
-#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:23
+#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:24
 msgid "Cancel"
 msgstr "取消"
 
@@ -101,7 +96,7 @@ msgstr "建立時間"
 msgid "Dashboard"
 msgstr "儀表盤"
 
-#: src/views/other/Install.vue:106
+#: src/views/other/Install.vue:105
 msgid "Database (Optional, default: database)"
 msgstr "資料庫 (可選,預設: database)"
 
@@ -134,7 +129,7 @@ msgstr ""
 msgid "Do you want to change the template to support the TLS?"
 msgstr "你想要改變模板以支援 TLS 嗎?"
 
-#: src/views/domain/DomainEdit.vue:46
+#: src/views/domain/DomainEdit.vue:38
 msgid "Edit %{n}"
 msgstr "編輯 %{n}"
 
@@ -142,7 +137,7 @@ msgstr "編輯 %{n}"
 msgid "Edit Configuration"
 msgstr "編輯配置"
 
-#: src/views/domain/DomainEdit.vue:92
+#: src/views/domain/DomainEdit.vue:87
 msgid "Edit Configuration File"
 msgstr "編輯配置檔案"
 
@@ -150,7 +145,7 @@ msgstr "編輯配置檔案"
 msgid "Edit Site"
 msgstr "編輯站點"
 
-#: src/views/other/Install.vue:32
+#: src/views/other/Install.vue:31
 msgid "Email (*)"
 msgstr "郵箱 (*)"
 
@@ -191,7 +186,7 @@ msgstr "啟用失敗 %{msg}"
 msgid "File Not Found"
 msgstr "未找到檔案"
 
-#: src/views/domain/DomainEdit.vue:9 src/views/domain/DomainEdit.vue:3
+#: src/views/domain/DomainEdit.vue:10 src/views/domain/DomainEdit.vue:4
 msgid "Getting Certificate from Let's Encrypt"
 msgstr "從 Let's Encrypt 獲取證書"
 
@@ -223,7 +218,7 @@ msgstr "安裝"
 msgid "Intermediate Certification Authorities: %{issuer}"
 msgstr "中級證書頒發機構: %{issuer}"
 
-#: src/views/other/Install.vue:47
+#: src/views/other/Install.vue:46
 msgid "Invalid E-mail!"
 msgstr "無效的郵箱!"
 
@@ -252,11 +247,11 @@ msgstr "登入成功"
 msgid "Logout successful"
 msgstr "登出成功"
 
-#: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
+#: src/views/domain/DomainEdit.vue:13 src/views/domain/DomainEdit.vue:7
+#, fuzzy
 msgid ""
-"Make sure you have configured a reverse proxy for <code>.well-known</code> "
-"directory to <code>HTTPChallengePort</code> (default: 9180) before getting "
-"the certificate."
+"Make sure you have configured a reverse proxy for .well-known directory to "
+"HTTPChallengePort (default: 9180) before getting the certificate."
 msgstr ""
 "在獲取證書前,請確保配置檔案中已將 <code>.well-known</code> 目錄反向代理到"
 "<code>HTTPChallengePort</code> (預設: 9180)"
@@ -319,19 +314,19 @@ msgstr ""
 msgid "Password"
 msgstr "密碼"
 
-#: src/views/other/Install.vue:84
+#: src/views/other/Install.vue:83
 msgid "Password (*)"
 msgstr "密碼 (*)"
 
-#: src/views/other/Install.vue:51
+#: src/views/other/Install.vue:50
 msgid "Please input your E-mail!"
 msgstr "請輸入您的郵箱!"
 
-#: src/views/other/Install.vue:97 src/views/other/Login.vue:69
+#: src/views/other/Install.vue:96 src/views/other/Login.vue:69
 msgid "Please input your password!"
 msgstr "請輸入您的密碼!"
 
-#: src/views/other/Install.vue:74 src/views/other/Login.vue:46
+#: src/views/other/Install.vue:73 src/views/other/Login.vue:46
 msgid "Please input your username!"
 msgstr "請輸入您的使用者名稱!"
 
@@ -356,7 +351,7 @@ msgid "Root Directory (root)"
 msgstr "網站根目錄 (root)"
 
 #: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainAdd.vue:6
-#: src/views/domain/DomainEdit.vue:24
+#: src/views/domain/DomainEdit.vue:25
 msgid "Save"
 msgstr "儲存"
 
@@ -422,7 +417,7 @@ msgstr ""
 "系統將會每小時檢測一次該域名證書,若距離上次簽發已超過1個月,則將自動續簽。"
 "<br/>如果您之前沒有證書,請先點選「從 Let's Encrypt 獲取證書」。"
 
-#: src/views/other/Install.vue:121
+#: src/views/other/Install.vue:120
 msgid "The filename cannot contain the following characters: %{c}"
 msgstr "檔名不能包含以下字元: %{c}"
 
@@ -453,7 +448,7 @@ msgstr "執行時間"
 msgid "Username"
 msgstr "使用者名稱"
 
-#: src/views/other/Install.vue:61
+#: src/views/other/Install.vue:60
 msgid "Username (*)"
 msgstr "使用者名稱 (*)"
 

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
frontend/src/translations.json


+ 19 - 12
frontend/src/views/domain/CertInfo.vue

@@ -1,20 +1,22 @@
 <template>
     <div v-if="ok">
         <h3 v-translate>Certificate Status</h3>
-        <p v-translate :translate-params="{issuer: cert.issuer_name}">Intermediate Certification Authorities: %{issuer}</p>
-        <p v-translate :translate-params="{name: cert.subject_name}">Subject Name: %{name}</p>
-        <p v-translate :translate-params="{date: moment(cert.not_after).format('YYYY-MM-DD HH:mm:ss')}">
+        <p v-translate="{issuer: cert.issuer_name}">Intermediate Certification Authorities: %{issuer}</p>
+        <p v-translate="{name: cert.subject_name}">Subject Name: %{name}</p>
+        <p v-translate="{date: moment(cert.not_after).format('YYYY-MM-DD HH:mm:ss').toString()}">
             Expiration Date: %{date}</p>
-        <p v-translate :translate-params="{date: moment(cert.not_before).format('YYYY-MM-DD HH:mm:ss')}">
+        <p v-translate="{date: moment(cert.not_before).format('YYYY-MM-DD HH:mm:ss').toString()}">
             Not Valid Before: %{date}</p>
-        <template v-if="new Date().toISOString() < cert.not_before || new Date().toISOString() > cert.not_after">
-            <a-icon :style="{ color: 'red' }" type="close-circle"/>
-            <translate>Certificate has expired</translate>
-        </template>
-        <template v-else>
-            <a-icon :style="{ color: 'green' }" type="check-circle"/>
-            <translate>Certificate is valid</translate>
-        </template>
+        <div class="status">
+            <template v-if="new Date().toISOString() < cert.not_before || new Date().toISOString() > cert.not_after">
+                <a-icon :style="{ color: 'red' }" type="close-circle"/>
+                <span v-translate>Certificate has expired</span>
+            </template>
+            <template v-else>
+                <a-icon :style="{ color: 'green' }" type="check-circle"/>
+                <span v-translate>Certificate is valid</span>
+            </template>
+        </div>
     </div>
 </template>
 
@@ -55,5 +57,10 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.status {
+    span {
+        margin-left: 10px;
+    }
+}
 
 </style>

+ 5 - 6
frontend/src/views/domain/DomainEdit.vue

@@ -1,16 +1,15 @@
 <template>
     <div>
         <a-collapse :bordered="false" default-active-key="1">
-            <a-collapse-panel key="1" :header="name ? $gettextInterpolate($gettext('Edit %{n}'), {n: name}) : $gettext('Add Site')">
+            <a-collapse-panel key="1" :header="$gettextInterpolate($gettext('Edit %{n}'), {n: name})">
                 <p v-translate>The following values will only take effect if you have the corresponding fields in your configuration file. The configuration filename cannot be changed after it has been created.</p>
                 <std-data-entry :data-list="columns" v-model="config"/>
                 <template v-if="config.support_ssl">
                     <cert-info :domain="name" ref="cert-info" v-if="name"/>
-                    <br/>
-                    <a-button @click="issue_cert" type="primary" ghost v-translate>
-                        Getting Certificate from Let's Encrypt
-                    </a-button><br/>
-                    <p v-translate>Make sure you have configured a reverse proxy for <code>.well-known</code> directory to <code>HTTPChallengePort</code> (default: 9180) before getting the certificate.</p>
+                    <a-button @click="issue_cert" type="primary" ghost style="margin: 10px 0">
+                        <translate>Getting Certificate from Let's Encrypt</translate>
+                    </a-button>
+                    <p v-translate>Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.</p>
                 </template>
             </a-collapse-panel>
         </a-collapse>

+ 1 - 1
frontend/src/views/other/Install.vue

@@ -66,7 +66,7 @@
                 </a-input>
             </a-form-item>
             <a-form-item>
-                <a-button type="primary" :block="true" html-type="submit" :loading="loading" v-translate>
+                <a-button type="primary" :block="true" html-type="submit" :loading="loading">
                     <translate>Install</translate>
                 </a-button>
             </a-form-item>

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů