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

feat: add description - how to delete info #292

4 changes: 4 additions & 0 deletions src/common/localization/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ export const english: IAppStrings = {
name: "Select multiple words",
description: "Click and hold on word. Then, hover over additional words.",
},
deleteInfoAssociatedWithTag: {
name: "Delete info associated with a tag",
description: "Either click on a tag and press Delete or Backspace. Or you can reselect an area on a canvas then press Delete or Backspace."
alex-krasn marked this conversation as resolved.
Show resolved Hide resolved
}
},
headers: {
keyboardShortcuts: "Keyboard shortcuts",
Expand Down
4 changes: 4 additions & 0 deletions src/common/localization/es-cl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ export const spanish: IAppStrings = {
name: "Selección de palabras múltiples",
description: "Haga clic y mantenga presionada la palabra, luego desplace el cursor sobre otras palabras para seleccionar varias palabras a la vez.",
},
deleteInfoAssociatedWithTag: {
name: "Eliminar información asociada a una etiqueta",
description: "Haga clic en una etiqueta y presione Eliminar o Retroceso. O puede volver a seleccionar un área en un lienzo y luego presionar Eliminar o Retroceso."
}
},
headers: {
keyboardShortcuts: "Atajos de teclado",
Expand Down
4 changes: 4 additions & 0 deletions src/common/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ export interface IAppStrings {
name: string,
description: string,
},
deleteInfoAssociatedWithTag: {
name: string,
description: string;
}
},
headers: {
keyboardShortcuts: string,
Expand Down
14 changes: 11 additions & 3 deletions src/react/components/shell/keyboardShortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ import "./keyboardShortcuts.scss";
export interface IHotKeysModalState {
showModal: boolean;
}
interface IKey {
interface IKeyItem {
key: string;
description: string;
}
interface ITipsItem {
name: string;
description: string;
}

export const KeyboardShortcuts: React.FC = () => {
const dark: ICustomizations = {
Expand All @@ -29,7 +33,7 @@ export const KeyboardShortcuts: React.FC = () => {
const [showModal, setShowModal] = useState(false);
const closeModal = () => setShowModal(false);

const shortcutsItems: IKey[] = [
const shortcutsItems: IKeyItem[] = [
{
key: strings.shortcuts.squareBrackets.keys.leftBracket,
description: strings.shortcuts.squareBrackets.description.prevWord,
Expand Down Expand Up @@ -69,7 +73,7 @@ export const KeyboardShortcuts: React.FC = () => {

];

const tipsItems = [
const tipsItems: ITipsItem[] = [
{
name: strings.shortcuts.tips.quickLabeling.name,
description: strings.shortcuts.tips.quickLabeling.description,
Expand All @@ -82,6 +86,10 @@ export const KeyboardShortcuts: React.FC = () => {
name: strings.shortcuts.tips.multipleWordSelection.name,
description: strings.shortcuts.tips.multipleWordSelection.description,
},
{
name: strings.shortcuts.tips.deleteInfoAssociatedWithTag.name,
description: strings.shortcuts.tips.deleteInfoAssociatedWithTag.description,
}
];
const ShortcutsListItems = ({ items }): JSX.Element => {
return items.map((item, idx) => (
Expand Down