Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve i18n text of export preview tooltips and infos #11420

Merged
merged 4 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@
"spellcheckTip": "After enabling, the browser's built-in spell check function will be used. Currently, only English spell check is supported",
"over": "over",
"preview": "Export Preview",
"desktop": "Desktop",
"tablet": "Tablet",
"mobileOrWechat": "Mobile/Wechat",
"copyToWechatMP": "Copy to Wechat MP",
"copyToZhihu": "Copy to Zhihu",
"copyToYuque": "Copy to Yuque",
"pasteToWechatMP": "Copied, ready to paste to Wechat MP",
"pasteToZhihu": "Copied, ready to paste to Zhihu",
"pasteToYuque": "Copied, ready to paste to Yuque",
"quote": "Blockquote",
"startRecord": "Start Record",
"endRecord": "End Record",
Expand Down
9 changes: 9 additions & 0 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@
"spellcheckTip": "Después de habilitar, se utilizará la función de revisión ortográfica integrada del navegador. Actualmente, solo se admite la revisión ortográfica en inglés",
"over": "sobre",
"preview": "Vista previa de la exportación",
"desktop": "Escritorio",
"tablet": "Tablet",
"mobileOrWechat": "Móvil/Wechat",
"copyToWechatMP": "Copiar a Wechat MP",
"copyToZhihu": "Copiar a Zhihu",
"copyToYuque": "Copiar a Yuque",
"pasteToWechatMP": "Copiado, listo para pegar en Wechat MP",
"pasteToZhihu": "Copiado, listo para pegar en Zhihu",
"pasteToYuque": "Copiado, listo para pegar en Yuque",
"quote": "Párrafo cita",
"startRecord": "Iniciar grabación",
"endRecord": "Finalizar grabación",
Expand Down
9 changes: 9 additions & 0 deletions app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@
"spellcheckTip": "Après l'activation, la fonction de vérification orthographique intégrée du navigateur sera utilisée. Actuellement, seule la vérification orthographique en anglais est prise en charge",
"over": "over",
"preview": "Aperçu de l'exportation",
"desktop": "bureau",
"tablet": "Tablette",
"mobileOrWechat": "Mobile/Wechat",
"copyToWechatMP": "Copier vers Wechat MP",
"copyToZhihu": "Copier vers Zhihu",
"copyToYuque": "Copier vers Yuque",
"pasteToWechatMP": "Copié, prêt à coller sur Wechat MP",
"pasteToZhihu": "Copié, prêt à coller sur Zhihu",
"pasteToYuque": "Copié, prêt à coller sur Yuque",
"quote": "Citation de bloc",
"startRecord": "Début d'enregistrement",
"endRecord": "fin d'enregistrement",
Expand Down
9 changes: 9 additions & 0 deletions app/appearance/langs/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@
"spellcheckTip": "ブラウザの組み込みスペルチェック機能を使用します。現時点では英語のスペルチェックのみがサポートされています",
"over": "以上",
"preview": "プレビュー",
"desktop": "デスクトップ",
"tablet": "タブレット",
"mobileOrWechat": "ケータイ/Wechat",
"copyToWechatMP": "Wechat MP にコピーする",
"copyToZhihu": "Zhihu にコピーする",
"copyToYuque": "Yuque にコピーする",
"pasteToWechatMP": "コピー完了、Wechat MP に貼り付け可能",
"pasteToZhihu": "コピー完了、Zhihu に貼り付け可能",
"pasteToYuque": "コピー完了、Yuque に貼り付け可能",
"quote": "引用",
"startRecord": "録音開始",
"endRecord": "録音停止",
Expand Down
9 changes: 9 additions & 0 deletions app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@
"spellcheckTip": "啟用後將使用瀏覽器內置的拼寫檢查功能,目前僅支持英文拼寫檢查",
"over": "超過",
"preview": "匯出預覽",
"desktop": "桌面",
"tablet": "平板",
"mobileOrWechat": "手機/微信",
"copyToWechatMP": "複製到公眾號",
"copyToZhihu": "複製到知乎",
"copyToYuque": "複製到語雀",
"pasteToWechatMP": "已複製,可貼到微信公眾號平臺",
"pasteToZhihu": "已複製,可貼到知乎",
"pasteToYuque": "已複製,可貼到語雀",
"quote": "引述",
"startRecord": "開始錄音",
"endRecord": "結束錄音",
Expand Down
9 changes: 9 additions & 0 deletions app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@
"spellcheckTip": "启用后将使用浏览器内置的拼写检查功能,目前仅支持英文拼写检查",
"over": "超过",
"preview": "导出预览",
"desktop": "桌面",
"tablet": "平板",
"mobileOrWechat": "手机/微信",
"copyToWechatMP": "复制到公众号",
"copyToZhihu": "复制到知乎",
"copyToYuque": "复制到语雀",
"pasteToWechatMP": "已复制,可粘贴到微信公众号平台",
"pasteToZhihu": "已复制,可粘贴到知乎",
"pasteToYuque": "已复制,可粘贴到语雀",
"quote": "引述",
"startRecord": "开始录音",
"endRecord": "结束录音",
Expand Down
16 changes: 8 additions & 8 deletions app/src/protyle/preview/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ export class Preview {
}
switch (action) {
case "desktop":
actionHtml.push('<button type="button" class="protyle-preview__action--current" data-type="desktop">Desktop</button>');
actionHtml.push(`<button type="button" class="protyle-preview__action--current" data-type="desktop">${window.siyuan.languages.desktop}</button>`);
break;
case "tablet":
actionHtml.push('<button type="button" data-type="tablet">Tablet</button>');
actionHtml.push(`<button type="button" data-type="tablet">${window.siyuan.languages.tablet}</button>`);
break;
case "mobile":
actionHtml.push('<button type="button" data-type="mobile">Mobile/Wechat</button>');
actionHtml.push(`<button type="button" data-type="mobile">${window.siyuan.languages.mobileOrWechat}</button>`);
break;
case "mp-wechat":
actionHtml.push('<button type="button" data-type="mp-wechat" class="b3-tooltips b3-tooltips__w" aria-label="复制到公众号"><svg><use xlink:href="#iconMp"></use></svg></button>');
actionHtml.push(`<button type="button" data-type="mp-wechat" class="b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.copyToWechatMP}"><svg><use xlink:href="#iconMp"></use></svg></button>`);
break;
case "zhihu":
actionHtml.push('<button type="button" data-type="zhihu" class="b3-tooltips b3-tooltips__w" aria-label="复制到知乎"><svg><use xlink:href="#iconZhihu"></use></svg></button>');
actionHtml.push(`<button type="button" data-type="zhihu" class="b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.copyToZhihu}"><svg><use xlink:href="#iconZhihu"></use></svg></button>`);
break;
case "yuque":
actionHtml.push('<button type="button" data-type="yuque" class="b3-tooltips b3-tooltips__w" aria-label="复制到语雀"><svg><use xlink:href="#iconYuque"></use></svg></button>');
actionHtml.push(`<button type="button" data-type="yuque" class="b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.copyToYuque}"><svg><use xlink:href="#iconYuque"></use></svg></button>`);
break;
}
}
Expand Down Expand Up @@ -259,7 +259,7 @@ export class Preview {
id: protyle.block.rootID,
}, (response) => {
writeText(response.data);
showMessage("已复制,可到语雀进行粘贴");
showMessage(`${window.siyuan.languages.pasteToYuque}`);
});
return;
}
Expand All @@ -281,7 +281,7 @@ export class Preview {
this.element.lastElementChild.remove();
focusByRange(cloneRange);
if (type) {
showMessage(`已复制,可到${type === "zhihu" ? "知乎" : "微信公众号平台"}进行粘贴`);
showMessage(`${type === "zhihu" ? window.siyuan.languages.pasteToZhihu : window.siyuan.languages.pasteToWechatMP}`);
}
}

Expand Down
Loading