From 207a90e6e209f3fc970f79565754d4b93032312e Mon Sep 17 00:00:00 2001 From: myl7 Date: Tue, 8 Feb 2022 17:48:25 +0800 Subject: [PATCH] fix entity encoding problem in i18n the extracter we use, i18next-parser, can not handle entity encoding in keys while using --- components/FourOhFour.tsx | 2 +- pages/onedrive-vercel-index-oauth/step-2.tsx | 2 +- pages/onedrive-vercel-index-oauth/step-3.tsx | 4 ++-- public/locales/en/common.json | 8 ++++---- public/locales/zh-CN/common.json | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/FourOhFour.tsx b/components/FourOhFour.tsx index 8e4650d..caaca06 100644 --- a/components/FourOhFour.tsx +++ b/components/FourOhFour.tsx @@ -10,7 +10,7 @@ const FourOhFour: React.FC<{ errorMsg: string }> = ({ errorMsg }) => {
- Oops, that's a four-oh-four. + Oops, that's a four-oh-four.
diff --git a/pages/onedrive-vercel-index-oauth/step-2.tsx b/pages/onedrive-vercel-index-oauth/step-2.tsx index faa0f17..4ef37c1 100644 --- a/pages/onedrive-vercel-index-oauth/step-2.tsx +++ b/pages/onedrive-vercel-index-oauth/step-2.tsx @@ -74,7 +74,7 @@ export default function OAuthStep2() { The OAuth link for getting the authorisation code has been created. Click on the link above to get the{' '} authorisation code. Your browser will - open a new tab to Microsoft's account login page. After logging in and authenticating with your + open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste{' '} the entire redirected URL down below. diff --git a/pages/onedrive-vercel-index-oauth/step-3.tsx b/pages/onedrive-vercel-index-oauth/step-3.tsx index 0dde295..f18a454 100644 --- a/pages/onedrive-vercel-index-oauth/step-3.tsx +++ b/pages/onedrive-vercel-index-oauth/step-3.tsx @@ -139,7 +139,7 @@ export default function OAuthStep3({ accessToken, expiryTime, refreshToken, erro rel="noopener noreferrer" className="text-blue-600 hover:underline dark:text-blue-500" > - Microsoft's official explanation + Microsoft's official explanation {' '} on the error message. @@ -195,7 +195,7 @@ export default function OAuthStep3({ accessToken, expiryTime, refreshToken, erro } ) + t( - 'Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.' + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live." )}

diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 3253f8f..22b1fc0 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -14,7 +14,7 @@ "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.": "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.", "Cancel": "Cancel", "Cannot preview {{path}}": "Cannot preview {{path}}", - "Check out <2>Microsoft's official explanation on the error message.": "Check out <2>Microsoft's official explanation on the error message.", + "Check out <2>Microsoft's official explanation on the error message.": "Check out <2>Microsoft's official explanation on the error message.", "Clear all": "Clear all", "Clear all tokens?": "Clear all tokens?", "Cleared all tokens": "Cleared all tokens", @@ -27,7 +27,7 @@ "Copy raw file permalink": "Copy raw file permalink", "Copy the permalink to the file to the clipboard": "Copy the permalink to the file to the clipboard", "Do not pretend to be the site owner": "Do not pretend to be the site owner", - "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.", + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.", "Download": "Download", "Download file": "Download file", "Download folder": "Download folder", @@ -76,7 +76,7 @@ "of {{count}} file(s) -——loaded——other": "of {{count}} files -", "of {{count}} file(s) -——loading——one": "of ... file(s) -", "of {{count}} file(s) -——loading——other": "of ... file(s) -", - "Oops, that's a <1>four-oh-four.": "Oops, that's a <1>four-oh-four.", + "Oops, that's a <1>four-oh-four.": "Oops, that's a <1>four-oh-four.", "Open URL": "Open URL", "Open URL{{url}}": "Open URL{{url}}", "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.", @@ -97,7 +97,7 @@ "Storing tokens": "Storing tokens", "Success! The API returned what we needed.": "Success! The API returned what we needed.", "The authorisation code extracted is:": "The authorisation code extracted is:", - "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser will open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <5>the entire redirected URL down below.": "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser will open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <5>the entire redirected URL down below.", + "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser will open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <5>the entire redirected URL down below.": "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser will open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <5>the entire redirected URL down below.", "These tokens are used to authenticate yourself into password protected folders, ": "These tokens are used to authenticate yourself into password protected folders, ", "These tokens may take a few seconds to populate after you click the button below. ": "These tokens may take a few seconds to populate after you click the button below. ", "This route (the folder itself and the files inside) is password protected. ": "This route (the folder itself and the files inside) is password protected. ", diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index 3bb6e6c..87485f5 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -12,7 +12,7 @@ "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.": "此次部署收到了无效的 <2>access_token 和 <5>refresh_token 而无法完成授权。在继续对 onedrive-vercel-index 授权你的 Microsoft 帐号前,请检查一下下方的配置信息。", "Cancel": "取消", "Cannot preview {{path}}": "无法预览 {{path}}", - "Check out <2>Microsoft's official explanation on the error message.": "请查阅 <2>Microsoft 官方解释 以获取详细的错误信息。", + "Check out <2>Microsoft's official explanation on the error message.": "请查阅 <2>Microsoft 官方解释 以获取详细的错误信息。", "Clear all": "清楚所有密钥", "Clear all tokens?": "清楚所有密钥?", "Cleared all tokens": "已清楚所有密钥", @@ -25,7 +25,7 @@ "Copy raw file permalink": "复制文件永久链接", "Copy the permalink to the file to the clipboard": "复制文件永久链接到剪贴板", "Do not pretend to be the site owner": "不要假装网站所有者", - "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "别担心,存储它们之后,onedrive-vercel-index 会在网站运行中自行维护 token 更新", + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "别担心,存储它们之后,onedrive-vercel-index 会在网站运行中自行维护 token 更新", "Download": "下载", "Download file": "下载此文件", "Download folder": "下载此文件夹", @@ -72,7 +72,7 @@ "OAuth Step 3 - {{title}}": "OAuth 第 3 步 - {{title}}", "of {{count}} file(s) -——loaded——other": "共 {{count}} 个文件", "of {{count}} file(s) -——loading——other": "共……个文件", - "Oops, that's a <1>four-oh-four.": "Oops,这里是 <1>404 页面。", + "Oops, that's a <1>four-oh-four.": "Oops,这里是 <1>404 页面。", "Open URL": "打开 URL", "Open URL{{url}}": "打开 URL{{url}}", "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "请按下 <2>F12 来打开开发者工具窗口以获取详细信息,或是到 <6>onedrive-vercel-index 社区讨论 处寻求帮助。", @@ -93,7 +93,7 @@ "Storing tokens": "正在存储 tokens……", "Success! The API returned what we needed.": "成功!此 API 返回了我们需要的东西。", "The authorisation code extracted is:": "提取出的授权码为:", - "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser will open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <5>the entire redirected URL down below.": "创建出的这个 OAuth 链接是用来获取授权码的。点击下方链接以获取所需的 <2>授权码。你的浏览器将打开一个新的标签页到 Microsoft 的帐号登录页面。在登录并验证你的 Microsoft 帐号之后,你将被重定向到一个域名为 localhost 的空白页面。请将<5>完整的重定向后的 URL 复制粘贴到下方。", + "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser will open a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <5>the entire redirected URL down below.": "创建出的这个 OAuth 链接是用来获取授权码的。点击上方链接以获取所需的 <2>授权码。你的浏览器将打开一个新的标签页到 Microsoft 的帐号登录页面。在登录并验证你的 Microsoft 帐号之后,你将被重定向到一个域名为 localhost 的空白页面。请将<5>完整的重定向后的 URL 复制粘贴到下方。", "These tokens are used to authenticate yourself into password protected folders, ": "这些密钥是用来验证您的身份以访问密钥保护下的文件夹的,", "These tokens may take a few seconds to populate after you click the button below. ": "当你点击下方按钮之后,这些 tokens 可能需要几秒钟来生成出现。", "This route (the folder itself and the files inside) is password protected. ": "此路由(此文件夹和其中的文件)是受密钥保护的。",