Skip to content

Commit

Permalink
fix: Hotkey 的国际化修复
Browse files Browse the repository at this point in the history
  • Loading branch information
luozefeng committed Nov 17, 2021
1 parent ed2e1af commit 0e5a431
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const ToolHotKey: React.FC<IProps> = ({ isSingleImg, style }) => {
setFlag(false);
}}
overlayClassName='tool-hotkeys-popover'
visible={svgFlag}
// visible={svgFlag}
>
<div
className='shortCutTitle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,43 @@ import {
tabChangeSelected,
tabReverseChangeSelected,
} from '../common';
import { i18n } from '@sensetime/lb-utils';

export const drawRect = {
name: i18n.t('AnnotateRect'),
name: 'AnnotateRect',
icon: DrawRectSvg,
shortCut: [MouseLeftSvg, MouseLeftSvg],
};

export const drawInvalidRect = {
name: i18n.t('AnnotateInvalidRect'),
name: 'AnnotateInvalidRect',
icon: DrawInvalidRectSvg,
shortCut: [MouseLeftSvg, 'Ctrl', MouseLeftSvg],
};

export const selectRect = {
name: i18n.t('SelectRect'),
name: 'SelectRect',
icon: SelectedRectSvg,
shortCut: [MouseRightSvg],
noticeInfo: i18n.t('RightClick'),
noticeInfo: 'RightClick',
};

export const changeValid = {
name: i18n.t('ToggleRectEffectiveness'),
name: 'ToggleRectEffectiveness',
icon: ChangeValidSvg,
shortCut: ['F'],
};

export const changeValidByClick = {
name: i18n.t('ToggleRectEffectiveness'),
name: 'ToggleRectEffectiveness',
icon: ChangeValidSvg,
shortCut: ['Ctrl', MouseLeftSvg],
};

export const deleteRect = {
name: i18n.t('DeleteRect'),
name: 'DeleteRect',
icon: DeleteRectSvg,
shortCut: [MouseRightSvg],
noticeInfo: i18n.t('SelectAndDoubleClick'),
noticeInfo: 'SelectAndDoubleClick',
};

const rectToolShortcutTable = [
Expand Down
2 changes: 1 addition & 1 deletion packages/lb-utils/lib/i18n/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"Number": "数字",
"Press": "长按",
"ToOriginalStep": "仅原图",
"Horizontal/Vertical": "标水平/垂直线",
"HorizontalOrVertical": "标水平/垂直线",
"AnnotateInvalidLine": "标无效线",
"AnnotateLine": "标线",
"SelectLine": "选中线",
Expand Down

0 comments on commit 0e5a431

Please sign in to comment.