Skip to content

Commit

Permalink
fix: more l10n for sendtiddlere message
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Nov 2, 2024
1 parent c676c4b commit d7b7932
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion l10n/bundle.l10n.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"Setup Language": "设置太微助手语言",
"Select Language": "选择语言",
"Undo": "撤回",
"Undo And Edit": "重新编辑","Successfully Undone":"已成功撤回"
"Undo And Edit": "重新编辑",
"Successfully Undone": "已成功撤回",
"Successfully Sent": "已成功发送:",
"Send Failed": "发送失败:"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"publisher": "oeyoews",
"name": "usewiki2",
"displayName": "usewiki2",
"version": "2.8.2",
"version": "2.8.3",
"private": true,
"packageManager": "[email protected]",
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion src/generated/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Meta info
export const publisher = "oeyoews"
export const name = "usewiki2"
export const version = "2.8.2"
export const version = "2.8.3"
export const displayName = "usewiki2"
export const description = undefined
export const extensionId = `${publisher}.${name}`
Expand Down
7 changes: 5 additions & 2 deletions src/sendTiddler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export default async function sendTiddler(
});

if (response.status === 204) {
notify(`发送成功(${title})`, 'info', [UNDO, UNDOEDIT]).then((data) => {
notify(`${l10n.t('Successfully Sent')}(${title})`, 'info', [
UNDO,
UNDOEDIT,
]).then((data) => {
if (data === UNDO) {
undoSendTiddler();
} else if (data === UNDOEDIT) {
Expand All @@ -65,7 +68,7 @@ export default async function sendTiddler(
}
});
} else {
notify('发送失败', 'error');
notify(l10n.t('Send Failed'), 'error');
}
} catch (error) {
notify((error as Error).message, 'error');
Expand Down

0 comments on commit d7b7932

Please sign in to comment.