Skip to content

Commit

Permalink
refactor: apply PR requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed Dec 19, 2024
1 parent c2d942b commit 4ec9e94
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
12 changes: 10 additions & 2 deletions src/components/item/publish/customizedTags/CustomizedTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Chip, Stack, Typography } from '@mui/material';
import { DiscriminatedItem, TagCategory } from '@graasp/sdk';

import { MultiSelectTagChipInput } from '@/components/input/MultiSelectTagChipInput';
import { TAGS_DOCUMENTATION } from '@/config/constants';
import { useBuilderTranslation } from '@/config/i18n';
import {
ITEM_TAGS_OPEN_MODAL_BUTTON_CY,
Expand Down Expand Up @@ -46,11 +47,18 @@ export const CustomizedTags = ({ item }: Props): JSX.Element => {
isOpen={isOpen}
modalContent={
<Stack gap={2}>
<Typography variant="body1">
<Typography>
<Trans
i18nKey={BUILDER.TAGS_DESCRITPION}
t={t}
components={{ 1: <a href="graasp.org" aria-label="wef" /> }}
components={{
1: (
<a
href={TAGS_DOCUMENTATION}
aria-label="tags documentation"
/>
),
}}
/>
</Typography>
<MultiSelectTagChipInput
Expand Down
2 changes: 2 additions & 0 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ export const EXPORT_CSV_HEADERS = [
// TODO: refer from specific endpoint /tutorials?
export const TUTORIALS_LINK =
'https://player.graasp.org/9d80d81f-ec9d-4bfb-836a-1c6b125aef2f';
export const TAGS_DOCUMENTATION =
'https://graasp.github.io/docs/user/library/tags/';

export const SHORT_LINK_ID_MAX_LENGTH = 10;
export const SHORT_LINK_API_CALL_DEBOUNCE_MS = 500;
Expand Down
2 changes: 1 addition & 1 deletion src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
"DELETE_GUESTS_MODAL_DELETE_BUTTON": "Delete permanently",
"ADD_TAG_OPTION_BUTTON_TEXT": "Add {{value}}",
"CREATE_FOLDER_BUTTON_TEXT": "Create Folder",
"TAGS_DESCRITPION": "Tags are pieces of data that you can attach to your items. They describe the subject, context, project, or intended audience of your items. They help other users to find your content when they search in the library. You can find out more about tags in <1>the documentation</1>.",
"TAGS_DESCRITPION": "Tags are keywords or terms that you can attach to your items. They describe the subject, context, project, or intended audience of your items. They help other users to find your content when they search in the library if your collection is published. You can find out more about tags in <1>the documentation</1>.",
"TAGS_DISCIPLINE_PLACEHOLDER": "Example: mathematics, history, biology",
"TAGS_LEVEL_PLACEHOLDER": "Example: elementary, high school, undergraduate",
"TAGS_RESOURCE_TYPE_PLACEHOLDER": "Example: article, video, quiz"
Expand Down
8 changes: 4 additions & 4 deletions src/langs/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@
"DELETE_GUESTS_MODAL_DELETE_BUTTON": "Supprimer définitivement",
"ADD_TAG_OPTION_BUTTON_TEXT": "Ajouter {{value}}",
"CREATE_FOLDER_BUTTON_TEXT": "Nouveau Dossier",
"TAGS_DESCRITPION": "Les tags sont des bouts d'informations qui peuvent être attachés aux éléments. Ils permettent de décrire le sujet, contexte, projet, ou l'audience attendue pour leurs éléments. Ils aident les autres utilisateurs à trouver votre contenu quand ils cherchent dans la librarie. Vous pouvez en apprendre plus sur les tags dans <1>la documentation</1>.",
"TAGS_DISCIPLINE_PLACEHOLDER": "Exemple: mathematics, history, biology",
"TAGS_LEVEL_PLACEHOLDER": "Exemple: elementary, high school, undergraduate",
"TAGS_RESOURCE_TYPE_PLACEHOLDER": "Exemple: article, video, quiz"
"TAGS_DESCRITPION": "Les tags sont des mots-clés ou des termes qui peuvent être attachés aux éléments. Ils permettent de décrire le sujet, contexte, projet, ou l'audience de votre collection. Ils aident les autres utilisateurs à trouver votre contenu quand ils cherchent dans la librairie, si votre collection est publiée. Vous pouvez en apprendre plus sur les tags dans <1>la documentation</1>.",
"TAGS_DISCIPLINE_PLACEHOLDER": "Exemple: mathématiques, histoire, biologie",
"TAGS_LEVEL_PLACEHOLDER": "Exemple: école primaire, université, école préparatoire",
"TAGS_RESOURCE_TYPE_PLACEHOLDER": "Exemple: article, vidéo, quiz"
}

0 comments on commit 4ec9e94

Please sign in to comment.