Skip to content

Commit

Permalink
fix: update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Apr 24, 2024
1 parent f34519a commit f645c6c
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 34 deletions.
46 changes: 29 additions & 17 deletions src/components/file/DropzoneHelper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useBuilderTranslation } from '@/config/i18n';
import { DROPZONE_HELPER_ID } from '@/config/selectors';
import { BUILDER } from '@/langs/constants';

import NewItemButton from '../main/NewItemButton';
import { UppyContext } from './UppyContext';

const DropzoneHelper = (): JSX.Element => {
Expand Down Expand Up @@ -55,24 +56,35 @@ const DropzoneHelper = (): JSX.Element => {
<Typography variant="h5" color="text.secondary">
{t(BUILDER.DROPZONE_HELPER_OPTIONAL_ACTION_TEXT)}
</Typography>
<Button
variant="contained"
size="large"
onClick={handleClick}
startIcon={<FolderOutlinedIcon />}
>
{t(BUILDER.DROPZONE_HELPER_ACTION)}
</Button>
<input
style={{ display: 'none' }}
type="file"
multiple
ref={ref}
onChange={handleFiles}
/>
<Typography variant="body1" sx={{ color: '#757575' }}>
{t(BUILDER.DROPZONE_HELPER_LIMIT_REMINDER_TEXT)}
<Stack alignItems="center" gap={1}>
<Button
variant="contained"
size="large"
onClick={handleClick}
startIcon={<FolderOutlinedIcon />}
>
{t(BUILDER.DROPZONE_HELPER_ACTION)}
</Button>
<input
style={{ display: 'none' }}
type="file"
multiple
ref={ref}
onChange={handleFiles}
/>
<Typography variant="body1" color="text.secondary">
{t(BUILDER.DROPZONE_HELPER_LIMIT_REMINDER_TEXT)}
</Typography>
</Stack>
<Typography variant="h5" color="text.secondary">
{t(BUILDER.DROPZONE_HELPER_OPTIONAL_ACTION_TEXT)}
</Typography>
<Stack alignItems="center" gap={1}>
<Typography variant="body1" color="text.secondary">
{t(BUILDER.NEW_ITEM_BUTTON_HELPER_TEXT)}
</Typography>
<NewItemButton />
</Stack>
</Stack>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/item/form/AppForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const AppForm = ({ onChange, updatedProperties = {} }: Props): JSX.Element => {
<Stack direction="column" height="100%" spacing={2} minHeight="0px">
<TextField
fullWidth
placeholder={translateBuilder('Search for an app')}
placeholder={translateBuilder(BUILDER.CREATE_APP_SEARCH_FIELD_HELPER)}
variant="outlined"
autoFocus
size="small"
Expand Down
3 changes: 2 additions & 1 deletion src/components/main/ItemsToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FormControlLabel, Stack, Switch, Typography } from '@mui/material';
import { useBuilderTranslation } from '@/config/i18n';
import { ACCESSIBLE_ITEMS_ONLY_ME_ID } from '@/config/selectors';
import { ShowOnlyMeChangeType } from '@/config/types';
import { BUILDER } from '@/langs/constants';

import SelectTypes from '../common/SelectTypes';

Expand Down Expand Up @@ -49,7 +50,7 @@ const ItemsToolbar = ({
onChange={(_, checked) => onShowOnlyMeChange(checked)}
/>
}
label={t('Show only created by me')}
label={t(BUILDER.HOME_SHOW_ONLY_CREATED_BY_ME)}
/>
)}
<SelectTypes />
Expand Down
4 changes: 3 additions & 1 deletion src/langs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const BUILDER = {
ACCESS_PUBLIC_TAG_TOOLTIP: 'ACCESS_PUBLIC_TAG_TOOLTIP',
ACCESS_PUBLIC_TAG: 'ACCESS_PUBLIC_TAG',
ACCESS_TITLE: 'ACCESS_TITLE',
HOME_SHOW_ONLY_CREATED_BY_ME: 'HOME_SHOW_ONLY_CREATED_BY_ME',
ANALYTICS_DASHBOARD_LABEL: 'ANALYTICS_DASHBOARD_LABEL',
AVATAR_DEFAULT_ALT: 'AVATAR_DEFAULT_ALT',
COLLAPSE_ITEM_COLLAPSE_TEXT: 'COLLAPSE_ITEM_COLLAPSE_TEXT',
Expand Down Expand Up @@ -277,6 +278,7 @@ export const BUILDER = {
NAVIGATION_SHARED_ITEMS_TITLE: 'NAVIGATION_SHARED_ITEMS_TITLE',
NEW_ITEM_APP_TAB_TEXT: 'NEW_ITEM_APP_TAB_TEXT',
NEW_ITEM_BUTTON_TOOLTIP: 'NEW_ITEM_BUTTON_TOOLTIP',
NEW_ITEM_BUTTON_HELPER_TEXT: 'NEW_ITEM_BUTTON_HELPER_TEXT',
NEW_ITEM_BUTTON: 'NEW_ITEM_BUTTON',
NEW_ITEM_DOCUMENT_TAB_TEXT: 'NEW_ITEM_DOCUMENT_TAB_TEXT',
NEW_ITEM_ETHERPAD_TAB_TEXT: 'NEW_ITEM_ETHERPAD_TAB_TEXT',
Expand Down Expand Up @@ -345,9 +347,9 @@ export const BUILDER = {
DELETE_LAST_ADMIN_ALERT_MESSAGE: 'DELETE_LAST_ADMIN_ALERT_MESSAGE',
APPROVE_BUTTON_TEXT: 'APPROVE_BUTTON_TEXT',
APP_URL: 'APP_URL',
CREATE_APP_SEARCH_FIELD_HELPER: 'CREATE_APP_SEARCH_FIELD_HELPER',
CREATE_CUSTOM_APP: 'CREATE_CUSTOM_APP',
CREATE_CUSTOM_APP_DESCRIPTION: 'CREATE_CUSTOM_APP_DESCRIPTION',
BACK_TO_APP_LIST: 'BACK_TO_APP_LIST',
DOWNGRADE_PERMISSION_TITLE: 'DOWNGRADE_PERMISSION_TITLE',
DOWNGRADE_PERMISSION_DESCRIPTION: 'DOWNGRADE_PERMISSION_DESCRIPTION',
CREATE_CUSTOM_APP_HELPER_TEXT: 'CREATE_CUSTOM_APP_HELPER_TEXT',
Expand Down
1 change: 0 additions & 1 deletion src/langs/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@
"APP_URL": "App-URL",
"CREATE_CUSTOM_APP": "Fügen Sie Ihre benutzerdefinierte App hinzu",
"CREATE_CUSTOM_APP_DESCRIPTION": "Erweiterte Option zum Erstellen einer benutzerdefinierten App",
"BACK_TO_APP_LIST": "Zurück zur App-Liste",
"DOWNGRADE_PERMISSION_TITLE": "Degradieren Sie Ihre eigene Erlaubnis",
"DOWNGRADE_PERMISSION_DESCRIPTION": "Sind Sie sicher, dass Sie Ihre eigene Berechtigung herabstufen möchten? Sobald es erledigt ist, können Sie es nicht mehr rückgängig machen.",
"CREATE_CUSTOM_APP_HELPER_TEXT": "Wenn Sie die URL einer interaktiven App kennen, die die API von Graasp nutzen kann, können Sie sie hier eingeben.",
Expand Down
22 changes: 12 additions & 10 deletions src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"CREATE_ITEM_LINK_LABEL": "Link",
"CREATE_ITEM_LINK_TITLE": "Add a Link",
"CREATE_ITEM_NEW_FOLDER_TITLE": "Create a Folder",
"CREATE_NEW_ITEM_APP_TITLE": "Create an App",
"CREATE_NEW_ITEM_APP_TITLE": "Add an Application",
"CREATE_NEW_ITEM_APP_URL_LABEL": "App URL",
"CREATE_NEW_ITEM_DOCUMENT_TITLE": "Add Text",
"CREATE_NEW_ITEM_DOCUMENT_TITLE": "Add a Text",
"CREATE_NEW_ITEM_ETHERPAD_INFORMATIONS": "Etherpad is a collaborative real-time text editor",
"CREATE_NEW_ITEM_ETHERPAD_LABEL": "Name",
"CREATE_NEW_ITEM_ETHERPAD_TITLE": "Create an Etherpad",
Expand Down Expand Up @@ -79,9 +79,10 @@
"HIDE_ITEM_HIDE_TEXT": "Hide",
"HIDE_ITEM_SHOW_TEXT": "Show",
"HOME_TITLE": "Home",
"HOME_SHOW_ONLY_CREATED_BY_ME": "Show only created by me",
"IMPORT_H5P_INFORMATIONS": "You can upload H5P rich content by uploading exported .h5p files (e.g. from H5P.com, external Moodle services, etc).",
"IMPORT_H5P_LIMITATIONS_TEXT": "You can upload up to one H5P of {{maxSize}} at a time.",
"IMPORT_H5P_TITLE": "Import H5P rich content",
"IMPORT_H5P_TITLE": "Import an H5P",
"IMPORT_H5P_WARNING": "Once your file is accepted, it will take several minutes for all imported files to be available.",
"IMPORT_ZIP_INFORMATION": "You can download your resources from graasp.eu by right clicking and choosing \"Download as ZIP\".",
"IMPORT_ZIP_LIMITATIONS_TEXT": "You can upload up to one ZIP of {{maxSize}} at a time. On error, try to upload a smaller zip.",
Expand Down Expand Up @@ -201,13 +202,14 @@
"NEW_ITEM_APP_TAB_TEXT": "Application",
"NEW_ITEM_BUTTON_TOOLTIP": "Create new item",
"NEW_ITEM_BUTTON": "New Item",
"NEW_ITEM_DOCUMENT_TAB_TEXT": "Add Text",
"NEW_ITEM_ETHERPAD_TAB_TEXT": "Create Etherpad",
"NEW_ITEM_FILE_TAB_TEXT": "Import File",
"NEW_ITEM_BUTTON_HELPER_TEXT": "Create content and add interactive elements",
"NEW_ITEM_DOCUMENT_TAB_TEXT": "Text",
"NEW_ITEM_ETHERPAD_TAB_TEXT": "Etherpad",
"NEW_ITEM_FILE_TAB_TEXT": "File",
"NEW_ITEM_FOLDER_TAB_TEXT": "Folder",
"NEW_ITEM_H5P_TAB_TEXT": "Import H5P",
"NEW_ITEM_H5P_TAB_TEXT": "H5P",
"NEW_ITEM_LINK_TAB_TEXT": "Link",
"NEW_ITEM_ZIP_TAB_TEXT": "Import ZIP",
"NEW_ITEM_ZIP_TAB_TEXT": "Archive",
"PIN_ITEM_PIN_TEXT": "Pin this item",
"PIN_ITEM_UNPIN_TEXT": "Unpin",
"PLAY_BUTTON_TOOLTIP": "Show Player View",
Expand Down Expand Up @@ -270,7 +272,7 @@
"UPLOAD_FILE_DROP_TEXT": "Drop here or",
"UPLOAD_FILE_INFORMATIONS": "If you drag-and-drop zip or H5P archives, or if you import as a new \"FILE\", they will be stored as such. To expand and use them, use the special \"IMPORT ZIP\" or \"IMPORT H5P\" option.",
"UPLOAD_FILE_LIMITATIONS_TEXT": "You can upload up to {{maxFiles}} files of {{maxSize}} at a time.",
"UPLOAD_FILE_TITLE": "Upload a file",
"UPLOAD_FILE_TITLE": "Upload a File",
"USER_SWITCH_PROFILE_BUTTON": "See Profile",
"USER_SWITCH_SIGN_OUT_BUTTON": "Sign Out",
"USER_SWITCH_SIGNED_OUT_TOOLTIP": "You are not signed in.",
Expand All @@ -294,8 +296,8 @@
"APPROVE_BUTTON_TEXT": "OK",
"APP_URL": "App Url",
"CREATE_CUSTOM_APP": "Add Your Custom App",
"CREATE_APP_SEARCH_FIELD_HELPER": "Search for an app",
"CREATE_CUSTOM_APP_DESCRIPTION": "Advanced option to create a custom app",
"BACK_TO_APP_LIST": "Back To App's List",
"DOWNGRADE_PERMISSION_TITLE": "Downgrade Your Own Permission",
"DOWNGRADE_PERMISSION_DESCRIPTION": "Are you sure you want to downgrade your own permission? Once it's done you can't undo.",
"CREATE_CUSTOM_APP_HELPER_TEXT": "If you know the URL of an interactive app that can leverage Graasp's API you can input it here.",
Expand Down
1 change: 0 additions & 1 deletion src/langs/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@
"APP_URL": "URL de la aplicación",
"CREATE_CUSTOM_APP": "Añade tu aplicación personalizada",
"CREATE_CUSTOM_APP_DESCRIPTION": "Opción avanzada para crear una aplicación personalizada",
"BACK_TO_APP_LIST": "Volver a la lista de aplicaciones",
"DOWNGRADE_PERMISSION_TITLE": "Degradar su propio permiso",
"DOWNGRADE_PERMISSION_DESCRIPTION": "¿Está seguro de que desea degradar su propio permiso? Una vez hecho esto no puedes deshacerlo.",
"CREATE_CUSTOM_APP_HELPER_TEXT": "Si conoce la URL de una aplicación interactiva que puede aprovechar la API de Graasp, puede ingresarla aquí.",
Expand Down
1 change: 0 additions & 1 deletion src/langs/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@
"APP_URL": "URL de l'application",
"CREATE_CUSTOM_APP": "Ajoutez votre application personnalisée",
"CREATE_CUSTOM_APP_DESCRIPTION": "Option avancée pour créer une application personnalisée",
"BACK_TO_APP_LIST": "Retour à la liste des applications",
"DOWNGRADE_PERMISSION_TITLE": "Rétrograder votre propre autorisation",
"DOWNGRADE_PERMISSION_DESCRIPTION": "Êtes-vous sûr de vouloir rétrograder votre propre autorisation ? Une fois que c'est fait, vous ne pouvez plus annuler.",
"CREATE_CUSTOM_APP_HELPER_TEXT": "Si vous connaissez l'URL d'une application interactive pouvant exploiter l'API de Graasp, vous pouvez la saisir ici.",
Expand Down
1 change: 0 additions & 1 deletion src/langs/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@
"APP_URL": "URL dell'app",
"CREATE_CUSTOM_APP": "Aggiungi la tua app personalizzata",
"CREATE_CUSTOM_APP_DESCRIPTION": "Opzione avanzata per creare un'app personalizzata",
"BACK_TO_APP_LIST": "Torna all'elenco delle app",
"DOWNGRADE_PERMISSION_TITLE": "Effettua il downgrade della tua autorizzazione",
"DOWNGRADE_PERMISSION_DESCRIPTION": "Sei sicuro di voler eseguire il downgrade della tua autorizzazione? Una volta completato, non puoi tornare indietro",
"CREATE_CUSTOM_APP_HELPER_TEXT": "Se conosci l'URL di un'app interattiva che può sfruttare l'API di Graasp, puoi inserirlo qui.",
Expand Down

0 comments on commit f645c6c

Please sign in to comment.