Skip to content

Commit

Permalink
Add import vocabulary button to vocabulary management view.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Mar 12, 2024
1 parent 51aa3a4 commit c59d76e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/component/vocabulary/VocabularyManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import WindowTitle from "../misc/WindowTitle";
import IfUserIsEditor from "../authorization/IfUserIsEditor";
import { useI18n } from "../hook/useI18n";
import IfUserIsAdmin from "../authorization/IfUserIsAdmin";
import { FaFileImport } from "react-icons/fa";

interface VocabularyManagementProps {
loadVocabularies: () => void;
Expand All @@ -41,6 +42,15 @@ export const VocabularyManagement: React.FC<VocabularyManagementProps> = (
<GoPlus />
&nbsp;{i18n("vocabulary.management.new")}
</Link>
<Link
id="vocabularies-import"
className="btn btn-primary btn-sm"
title={i18n("vocabulary.vocabularies.import.tooltip")}
to={Routes.importVocabulary.path}
>
<FaFileImport />
&nbsp;{i18n("main.nav.import-vocabulary")}
</Link>
</IfUserIsEditor>,
<IfUserIsAdmin key="analyze-vocabularies">
<Button
Expand Down
1 change: 1 addition & 0 deletions src/i18n/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ const cs = {
"Spustit textovou analýzu definic všech termínů ve všech slovnících",
"vocabulary.management.new": "Nový slovník",
"vocabulary.vocabularies.create.tooltip": "Vytvořit nový slovník",
"vocabulary.vocabularies.import.tooltip": "Vytvořit slovník importem dat",
"vocabulary.vocabularies.select.placeholder":
"Začněte psát pro filtrování slovníků dle názvu",
"vocabulary.title": "Název",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ const en = {
"Start text analysis on definitions of terms in all vocabularies",
"vocabulary.management.new": "New Vocabulary",
"vocabulary.vocabularies.create.tooltip": "Create new vocabulary",
"vocabulary.vocabularies.import.tooltip":
"Create vocabulary by importing data",
"vocabulary.vocabularies.select.placeholder":
"Start typing to filter vocabularies by name",
"vocabulary.title": "Title",
Expand Down

0 comments on commit c59d76e

Please sign in to comment.