Skip to content

开源白板工具(SaaS),一体化白板,包含思维导图、流程图、自由画等。All in one open-source whiteboard tool with mind, flowchart, freehand and etc.

feat(eraser): adding i18n for eraser

Andy Lu (Lu, Yu-An)427a7308c931
diff --git a/packages/drawnix/src/components/toolbar/creation-toolbar.tsx b/packages/drawnix/src/components/toolbar/creation-toolbar.tsx
index 012ef4b..5e50ced 100644
--- a/packages/drawnix/src/components/toolbar/creation-toolbar.tsx
+++ b/packages/drawnix/src/components/toolbar/creation-toolbar.tsx
@@ -91,7 +91,7 @@ export const BUTTONS: AppToolButtonProps[] = [
{
icon: EraseIcon,
pointer: FreehandShape.eraser,
- title: 'Erase — E',
+ titleKey: 'toolbar.eraser',
},
{
icon: StraightArrowLineIcon,
diff --git a/packages/drawnix/src/i18n.tsx b/packages/drawnix/src/i18n.tsx
index 24a31aa..381f5d4 100644
--- a/packages/drawnix/src/i18n.tsx
+++ b/packages/drawnix/src/i18n.tsx
@@ -11,6 +11,7 @@ export interface Translations {
'toolbar.mind': string;
'toolbar.text': string;
'toolbar.pen': string;
+ 'toolbar.eraser': string;
'toolbar.arrow': string;
'toolbar.shape': string;
'toolbar.image': string;
@@ -83,6 +84,7 @@ const translations: Record<Language, Translations> = {
'toolbar.mind': '思维导图 — M',
'toolbar.text': '文本 — T',
'toolbar.pen': '画笔 — P',
+ 'toolbar.eraser': '橡皮擦 — E',
'toolbar.arrow': '箭头 — A',
'toolbar.shape': '形状',
'toolbar.image': '图片 — Cmd+U',
@@ -152,6 +154,7 @@ const translations: Record<Language, Translations> = {
'toolbar.mind': 'Mind — M',
'toolbar.text': 'Text — T',
'toolbar.pen': 'Pen — P',
+ 'toolbar.eraser': 'Eraser — E',
'toolbar.arrow': 'Arrow — A',
'toolbar.shape': 'Shape',
'toolbar.image': 'Image — Cmd+U',