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

minor: make i18n support and Chinese translation #3790

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
chore: bind some translations
according to a suggestion of @lurch
  • Loading branch information
RoderickQiu committed Jul 22, 2022
commit f8a73e7663ebd5492a7d2042dbaedd193ab2c564
6 changes: 3 additions & 3 deletions lib/gui/app/i18n/en.ts
Expand Up @@ -42,10 +42,10 @@ const translation = {
'You are currently flashing a drive. Closing Etcher may leave your drive in an unusable state.',
looksLikeWindowsImage:
'It looks like you are trying to burn a Windows image.\n\nUnlike other images, Windows images require special processing to be made bootable. We suggest you use a tool specially designed for this purpose, such as <a href="https://rufus.akeo.ie">Rufus</a> (Windows), <a href="https://github.com/slacka/WoeUSB">WoeUSB</a> (Linux), or Boot Camp Assistant (macOS).',
image: 'image',
drive: 'drive',
missingPartitionTable:
'It looks like this is not a bootable image.\n\nThe image does not appear to contain a partition table, and might not be recognized or bootable by your device.',
driveMissingPartitionTable:
'It looks like this is not a bootable drive.\nThe drive does not appear to contain a partition table,\nand might not be recognized or bootable by your device.',
'It looks like this is not a bootable {{type}}.\n\nThe {{type}} does not appear to contain a partition table, and might not be recognized or bootable by your device.',
largeDriveSize:
"This is a large drive! Make sure it doesn't contain files that you want to keep.",
systemDrive:
Expand Down
6 changes: 3 additions & 3 deletions lib/gui/app/i18n/zh-CN.ts
Expand Up @@ -42,10 +42,10 @@ const translation = {
'您当前正在刷机。 关闭 Etcher 可能会导致您的磁盘无法使用。',
looksLikeWindowsImage:
'看起来您正在尝试刻录 Windows 镜像。\n\n与其他镜像不同,Windows 镜像需要特殊处理才能使其可启动。 我们建议您使用专门为此目的设计的工具,例如 <a href="https://rufus.akeo.ie">Rufus</a> (Windows)、<a href="https://github. com/slacka/WoeUSB">WoeUSB</a> (Linux) 或 Boot Camp 助理 (macOS)。',
image: '镜像',
drive: '磁盘',
missingPartitionTable:
'看起来这不是一个可启动的镜像。\n\n这个镜像似乎不包含分区表,因此您的设备可能无法识别或无法正确启动。',
driveMissingPartitionTable:
'看起来这不是可引导磁盘。\n这个磁盘似乎不包含分区表,\n因此您的设备可能无法识别或无法正确启动。',
'看起来这不是一个可启动的{{type}}。\n\n这个{{type}}似乎不包含分区表,因此您的设备可能无法识别或无法正确启动。',
largeDriveSize: '这是个很大的磁盘!请检查并确认它不包含对您很重要的信息',
systemDrive: '选择系统盘很危险,因为这将会删除你的系统',
sourceDrive: '源镜像位于这个分区中',
Expand Down
6 changes: 3 additions & 3 deletions lib/gui/app/i18n/zh-TW.ts
Expand Up @@ -42,10 +42,10 @@ const translation = {
'您當前正在刷機。 關閉 Etcher 可能會導致您的磁盤無法使用。',
looksLikeWindowsImage:
'看起來您正在嘗試刻錄 Windows 鏡像。\n\n與其他鏡像不同,Windows 鏡像需要特殊處理才能使其可啓動。 我們建議您使用專門爲此目的設計的工具,例如 <a href="https://rufus.akeo.ie">Rufus</a> (Windows)、<a href="https://github. com/slacka/WoeUSB">WoeUSB</a> (Linux) 或 Boot Camp 助理 (macOS)。',
image: '鏡像',
drive: '磁盤',
missingPartitionTable:
'看起來這不是一個可啓動的鏡像。\n\n這個鏡像似乎不包含分區表,因此您的設備可能無法識別或無法正確啓動。',
driveMissingPartitionTable:
'看起來這不是可引導磁盤。\n這個磁盤似乎不包含分區表,\n因此您的設備可能無法識別或無法正確啓動。',
'看起來這不是一個可啓動的{{type}}。\n\n這個{{type}}似乎不包含分區表,因此您的設備可能無法識別或無法正確啓動。',
largeDriveSize: '這是個很大的磁盤!請檢查並確認它不包含對您很重要的信息',
systemDrive: '選擇系統盤很危險,因爲這將會刪除你的系統',
sourceDrive: '源鏡像位於這個分區中',
Expand Down
8 changes: 6 additions & 2 deletions lib/shared/messages.ts
Expand Up @@ -111,11 +111,15 @@ export const warning = {
},

missingPartitionTable: () => {
return i18next.t('message.missingPartitionTable');
return i18next.t('message.missingPartitionTable', {
type: i18next.t('message.image'),
});
},

driveMissingPartitionTable: () => {
return i18next.t('message.driveMissingPartitionTable');
return i18next.t('message.missingPartitionTable', {
type: i18next.t('message.drive'),
});
},

largeDriveSize: () => {
Expand Down