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.",
},
deleteAllLabelsForTag: {
name: "Delete all labels for a tag",
description: "Select all labels for a tag on document and press 'delete' key"
}
},
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.",
},
deleteAllLabelsForTag: {
name: "Eliminar información asociada a una etiqueta",
description: "Seleccione todas las etiquetas para una etiqueta en el documento y presione la tecla 'delete'"
}
},
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,
},
deleteAllLabelsForTag: {
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.deleteAllLabelsForTag.name,
description: strings.shortcuts.tips.deleteAllLabelsForTag.description,
}
];
const ShortcutsListItems = ({ items }): JSX.Element => {
return items.map((item, idx) => (
Expand Down