diff --git a/packages/collection/src/webapp/components/atoms/AddToCollectionButton/AddToCollectionButtons.tsx b/packages/collection/src/webapp/components/atoms/AddToCollectionButton/AddToCollectionButtons.tsx index 7ca3b282b..0de374e53 100644 --- a/packages/collection/src/webapp/components/atoms/AddToCollectionButton/AddToCollectionButtons.tsx +++ b/packages/collection/src/webapp/components/atoms/AddToCollectionButton/AddToCollectionButtons.tsx @@ -9,6 +9,7 @@ import { import type { SelectOptionsMulti } from '@moodlenet/react-app/ui' import type { FC } from 'react' import { useMemo, useState } from 'react' +import { t } from '@moodlenet/react-app/webapp' export type AddToCollectionButtonProps = { collections: SelectOptionsMulti @@ -29,14 +30,14 @@ export const AddToCollectionButton: FC = ({ const modal = isAddingToCollection && collections && ( { setIsAddingToCollection(false) }} > - Done + {t('done')} } onClose={() => setIsAddingToCollection(false)} @@ -50,7 +51,7 @@ export const AddToCollectionButton: FC = ({ value={selectedValues} > {collections.opts.map(({ label, value }) => ( - + ))} @@ -60,7 +61,7 @@ export const AddToCollectionButton: FC = ({ <> {modal} setIsAddingToCollection(true)}> - Add to collection + {t('add_to_collection')} ) diff --git a/packages/collection/src/webapp/components/molecules/CollectionContributorCard/CollectionContributorCard.tsx b/packages/collection/src/webapp/components/molecules/CollectionContributorCard/CollectionContributorCard.tsx index 7a4e541fc..45190328d 100644 --- a/packages/collection/src/webapp/components/molecules/CollectionContributorCard/CollectionContributorCard.tsx +++ b/packages/collection/src/webapp/components/molecules/CollectionContributorCard/CollectionContributorCard.tsx @@ -2,6 +2,7 @@ import { Card } from '@moodlenet/component-library' import type { Href } from '@moodlenet/react-app/common' import { Link } from '@moodlenet/react-app/ui' import type { FC } from 'react' +import { t } from '@moodlenet/react-app/webapp' import defaultAvatar from '../../../assets/img/default-avatar.svg' import './CollectionContributorCard.scss' @@ -22,7 +23,7 @@ export const CollectionContributorCard: FC = ({ Avatar
- Collection curated by {displayName} + {t('collection_curated_by')} {displayName}
) diff --git a/packages/react-app/src/locales/de/translation.mts b/packages/react-app/src/locales/de/translation.mts index fe453db22..2fdb29920 100644 --- a/packages/react-app/src/locales/de/translation.mts +++ b/packages/react-app/src/locales/de/translation.mts @@ -2,21 +2,30 @@ import type { Translations } from '../../webapp/types/i18n.mjs' export const translations: Translations = { add_content: 'Inhalte hinzufügen', + add_to_collection: 'Zur Sammlung hinzufügen', admin: 'Admin', + agree_terms_conditions: 'Du stimmst den Nutzungsbedingungen zu', ambitious_seed: 'Ehrgeiziger Samen', approve: 'Freigeben', approved_badge: 'Freigabe erteilt, dein Inhalt ist jetzt für alle sichtbar.', + avatar: 'Profilbild', + background: 'Hintergrund', back_soon: 'Wir sind bald wieder da', best_collection_ever: 'Beste Sammlung überhaupt', bookmark: 'Lesezeichen', bookmark_needs_login: 'Einloggen oder registieren um ein Lesezeichen zu setzen', bookmark_remove: 'Lesezeichen entfernen', bookmarks: 'Lesezeichen', + collection_curated_by: 'Sammlung kuratiert von', create_account: 'Neues Nutzendenkonto erstellen', curated_collections: 'Kuratierte Sammlungen', - dont_show_again: 'Nicht mehr anzeigen', dazzling_biome: 'Faszinierendes Biotop', determined_sprout: 'Entschlossener Spross', + display_name: 'Anzeigename', + done: 'Fertig', + dont_show_again: 'Nicht mehr anzeigen', + edit_background: 'Hintergrund bearbeiten', + edit_profile_picture: 'Profilbild bearbeiten', enter_your_account: 'Zum Nutzendenkonto', file_too_big: 'Die Datei ist zu gross, reduziere die Grösse oder gib eine URL an', firmly_grounded: 'Fest verwurzelt', @@ -34,16 +43,25 @@ export const translations: Translations = { interest_title: 'Verbessere deine Erfahrung!', image_too_big: 'Das Bild ist zu gross, reduziere die Grösse oder verwende ein anderes Bild', join_now: 'Jetzt beitreten', + learn_more: 'Mehr erfahren', + leaves: 'Blätter', + level: 'Level', + level_avatar: 'Level-Symbol', like: 'Gefällt mir', like_needs_login: 'Einloggen oder registieren um zu liken', like_own_content: 'Du kannst nicht deinen eigenen Inhalten liken', like_remove: 'Gefällt mir entfernen', load_more: 'Mehr laden', + location: 'Ort', login: 'Einloggen', + login_or_signup_to_send_messages: 'Einloggen oder registieren um Nachrichten zu senden', logout: 'Ausloggen', log_in_desc: 'Einloggen oder registieren um Inhalt zu veröffentlichen', moodlenet_community: 'MoodleNet Community', + more_actions: 'Mehr Aktionen', + myfollowers: 'Meine Folgenden', new_collection: 'Neue Sammlung', + new_like_on_your_resource: 'Neuer Like auf deiner Ressource', new_resource: 'Neue Ressource', override_subtitle: 'Dies ist das OER-Repository der Berner Fachhochschule.', override_title: 'Die Lehre von morgen gestalten', @@ -56,9 +74,11 @@ export const translations: Translations = { please_select_year: 'Bitte ein Jahr auswählen', please_upload_content: 'Bitte einen Inhalt hochladen', profile: 'Profil', + publish_collection: 'Sammlung veröffentlichen', publish_content: 'Inhalte veröffentlichen', + publish_resource: 'Ressource veröffentlichen', resources: 'Ressourcen', - rooted_learner: 'Verwurzelter Lernender', + rooted_learner: 'Verwurzelte*r Lernende*r', scheduled_maintenance: 'MoodleNet ist für eine geplante Wartung nicht verfügbar und wird in wenigen Minuten wieder online sein', search_placeholder: 'Nach OER-Inhalten suchen', @@ -69,8 +89,14 @@ export const translations: Translations = { see_more_resources: 'Weitere Ressourcen', select_language: 'Sprache auswählen', settings: 'Einstellungen', + select_collections: 'Sammlungen auswählen', select_license: 'Lizenz auswählen', + send_a_message: 'Nachricht senden', + sfollowers: '\'s Folgende', + sfollowing: ' folgt', + set_up_interests: 'Interessen einrichten', share_content: 'Inhalte teilen', + signup: 'Registrieren', sky_reacher: 'Himmelstürmer*in', sort_by: 'Sortieren nach', signup: 'Registrieren', @@ -92,6 +118,7 @@ export const translations: Translations = { title_featured_resources: 'Aktuelle Ressourcen', title_leaderboard: 'Leaderboard', unapprove: 'Sperren', + unnamed: 'Unbenannt', user_menu: 'Nutzendenmenü', user_subtitle_featured_authors: 'Top Autor*innen, die dich ansprechen könnten', user_subtitle_featured_collections: @@ -103,7 +130,10 @@ export const translations: Translations = { versatile_canopy: 'Vielseitiges Blätterdach', visibility_required: 'Sichtbarkeit ist erforderlich', we_love_to_get: 'Wir freuen uns über', + website: 'Webseite', what_do_you_want_to_publish: 'Was möchtest du gerne veröffentlichen?', + what_should_others_know_about_you: 'Was sollten andere über dich wissen?', you_can_suggest: 'Du kannst neue Funktionen vorschlagen und Fehler melden in der', your_feedback: 'Dein Feedback zu MoodleNet', + your_resource_added_in_a_collection: 'Deine Ressource wurde in einer Sammlung hinzugefügt', } diff --git a/packages/react-app/src/locales/en/translation.mts b/packages/react-app/src/locales/en/translation.mts index 904b7bbad..695b5e6aa 100644 --- a/packages/react-app/src/locales/en/translation.mts +++ b/packages/react-app/src/locales/en/translation.mts @@ -2,25 +2,41 @@ import type { Translations } from '../../webapp/types/i18n.mjs' export const translations: Translations = { add_content: 'Add content', + add_someone_elses_resource_in_published_collection: + "Add someone else's resource in your published collection", + add_to_collection: 'Add to collection', admin: 'Admin', + agree_terms_conditions: 'You agree to our Terms & Conditions', ambitious_seed: 'Ambitious seed', approve: 'Approve', approve_badge: 'Approved, your published content is visible to all', + avatar: 'Avatar', + background: 'Background', back_soon: "We'll be back soon", + become_a_publisher: 'Become a publisher', best_collection_ever: 'Best collection ever', bookmark: 'Bookmark', + bookmark_a_contribution_or_user: 'Bookmark a contribution or a user', bookmark_needs_login: 'Login or signup to bookmark', bookmark_remove: 'Remove bookmark', bookmarks: 'Bookmarks', + collection_curated_by: 'Collection curated by', + complete_profile: 'Complete profile', + congrats_you_already_did_it: 'Congrats! You already did it!', create_account: 'Create a new account', curated_collections: 'Curated collections', - dont_show_again: 'Do not show again', dazzling_biome: 'Dazzling biome', determined_sprout: 'Determined sprout', + display_name: 'Display name', + done: 'Done', + dont_show_again: 'Do not show again', + edit_background: 'Edit background', + edit_profile_picture: 'Edit profile picture', enter_your_account: 'Enter to your account', file_too_big: 'The file is too big, reduce the size or provide a url', firmly_grounded: 'Firmly grounded', follow: 'Follow', + follow_a_user_a_collection_or_a_subject: 'Follow a user, a collection, or a subject', follow_needs_login: 'Login or signup to follow', follow_own_content: 'Creators cannot follow their own content', follow_remove_user: 'Unfollow user', @@ -29,21 +45,36 @@ export const translations: Translations = { followers_cnt_sing: '{1} follower', followers_cnt_pl: '{1} followers', following: 'Following', + get_a_point_for_each_detail: 'Get a point for each detail filled, profile and background images, location, website, description', + get_a_point_interests: 'Get a point when setting the interests type in your settings page', goto_settings: 'Go to settings', interest_description: 'Select your interests to get the most out of MoodleNet', interest_title: 'Enhance your experience!', image_too_big: 'The image is too big, reduce the size or use another image', join_now: 'Join now', + learn_more: 'Learn more', + leaves: 'Leaves', + level: 'Level', + level_avatar: 'Level avatar', like: 'Like', + like_a_resource: 'Like a resource', like_needs_login: 'Login or signup to like', like_own_content: 'Creators cannot like their own content', like_remove: 'Remove like', load_more: 'Load more', + location: 'Location', login: 'Log in', + login_or_signup_to_send_messages: 'Login or signup to send messages', logout: 'Log out', log_in_desc: 'Log in or create an account to start publishing content', moodlenet_community: 'MoodleNet Community', + more_actions: 'More actions', + myfollowers: 'My followers', + new_bookmark_on_your_profile_or_contribution: 'New bookmark on your profile or contribution', new_collection: 'New collection', + new_follower: 'New follower', + new_follower_on_your_collection: 'New follower on your collection', + new_like_on_your_resource: 'New like on your resource', new_resource: 'New resource', override_subtitle: 'This is the OER Repository of the Bern University of Applied Sciences.', override_title: 'Shaping the teaching of tomorrow', @@ -56,7 +87,9 @@ export const translations: Translations = { please_select_year: 'Please select a year', please_upload_content: 'Please upload a content', profile: 'Profile', + publish_collection: 'Publish collection', publish_content: 'Publish content', + publish_resource: 'Publish resource', resources: 'Resources', rooted_learner: 'Rooted learner', scheduled_maintenance: @@ -69,7 +102,12 @@ export const translations: Translations = { seedling_scholar: 'Seedling scholar', select_language: 'Select language', settings: 'Settings', + select_collections: 'Select collections', select_license: 'Select a license', + send_a_message: 'Send a message', + set_up_interests: 'Set up interests', + sfollowers: '\'s followers', + sfollowing: '\'s following', share_content: 'Share content', signup: 'Sign up', sky_reacher: 'Sky reacher', @@ -90,6 +128,7 @@ export const translations: Translations = { title_featured_resources: 'Featured resources', title_leaderboard: 'Leaderboard', unapprove: 'Unapprove', + unnamed: 'Unnamed', user_menu: 'User menu', user_subtitle_featured_authors: 'Top contributors you might appreciate', user_subtitle_featured_collections: 'High quality collections you might enjoy', @@ -97,10 +136,13 @@ export const translations: Translations = { user_title_featured_authors: 'Authors selection', user_title_featured_collections: 'Collections selection', user_title_featured_resources: 'Resources selection', - what_do_you_want_to_publish: 'What would you like to publish?', versatile_canopy: 'Versatile canopy', visibility_required: 'Visibility is required', - we_love_to_get: "We'd love to get", + we_love_to_get: 'We\'d love to get', + website: 'Website', + what_do_you_want_to_publish: 'What would you like to publish?', + what_should_others_know_about_you: 'What should others know about you?', you_can_suggest: 'You can suggest new features and report bugs in the', your_feedback: 'your feedback on MoodleNet', + your_resource_added_in_a_collection: 'Your resource added in a collection', } diff --git a/packages/web-user/src/common/gamification/user-levels.mts b/packages/web-user/src/common/gamification/user-levels.mts index f9ec2474d..d476e7bfc 100644 --- a/packages/web-user/src/common/gamification/user-levels.mts +++ b/packages/web-user/src/common/gamification/user-levels.mts @@ -50,20 +50,20 @@ export const actionsAndPointsObtained: { action: string; points: number; abbr?: abbr: 'Get a point for each detail filled, profile and background images, location, website, description', }, { - action: 'Set up interests', + action: {t('set_up_interests')}, points: P.engagement.profile.interestsSet.points, abbr: 'Get a point when setting the interests type in your settings page', }, - { action: 'Publish collection', points: P.contribution.collection.published.toCreator.points }, + { action: {t('publish_collection')}, points: P.contribution.collection.published.toCreator.points }, { action: "Add someone else's resource in your published collection", points: P.contribution.collection.listCuration.toCollectionCreator.points, }, { - action: 'Your resource added in a collection', + action: {t('your_resource_added_in_a_collection')}, points: P.contribution.collection.listCuration.toResourceCreator.points, }, - { action: 'Publish resource', points: P.contribution.resource.published.toCreator.points }, + { action: {t('publish_resource')}, points: P.contribution.resource.published.toCreator.points }, { action: 'Follow a user a collection or a subject', points: P.engagement.follow.followerProfile.points, diff --git a/packages/web-user/src/webapp/ui/components/organisms/MainProfileCard/MainProfileCard.tsx b/packages/web-user/src/webapp/ui/components/organisms/MainProfileCard/MainProfileCard.tsx index 0d07cf245..995bf0040 100644 --- a/packages/web-user/src/webapp/ui/components/organisms/MainProfileCard/MainProfileCard.tsx +++ b/packages/web-user/src/webapp/ui/components/organisms/MainProfileCard/MainProfileCard.tsx @@ -16,6 +16,7 @@ import { useFormik } from 'formik' import { Share } from '@mui/icons-material' import type { FC } from 'react' import { useEffect, useLayoutEffect, useRef, useState } from 'react' +import { t } from '@moodlenet/react-app/webapp' import type { ProfileAccess, ProfileActions, @@ -222,7 +223,7 @@ export const MainProfileCard: FC = ({ const title = isEditing ? ( = ({ textAreaAutoSize noBorder edit={isEditing} - placeholder={`What should others know about you?`} + placeholder={t('what_should_others_know_about_you')} value={form.values.aboutMe} error={isEditing && shouldShowErrors && form.errors.aboutMe} /> @@ -287,7 +288,7 @@ export const MainProfileCard: FC = ({ = ({ value={form.values.siteUrl ?? undefined} onChange={form.handleChange} noBorder - placeholder="Website" + placeholder={t('website')} name="siteUrl" edit={isEditing} error={isEditing && shouldShowErrors && form.errors.siteUrl} @@ -353,7 +354,7 @@ export const MainProfileCard: FC = ({ , @@ -371,7 +372,7 @@ export const MainProfileCard: FC = ({ , @@ -418,7 +419,7 @@ export const MainProfileCard: FC = ({ style={{ maxWidth: '90%', maxHeight: '90%' }} key="background-modal" > - Background + {t('background')} )} {isShowingAvatar && avatarImageUrl && ( @@ -429,7 +430,7 @@ export const MainProfileCard: FC = ({ style={{ maxWidth: '90%', maxHeight: '90%' }} key="avatar-modal" > - Avatar + {t('avatar')} )} {isSendingMessage && ( @@ -507,7 +508,7 @@ export const MainProfileCard: FC = ({ className={`message`} disabled={!isAuthenticated} onClick={() => setIsSendingMessage(true)} - abbr={!isAuthenticated ? 'Login or signup to send messages' : 'Send a message'} + abbr={!isAuthenticated ? {t('login_or_signup_to_send_messages')} : {t('send_a_message')}} > Message @@ -539,11 +540,11 @@ export const MainProfileCard: FC = ({ ]} hoverElement={ isShowingSmallCard ? ( - +
...
) : ( - +
More
) diff --git a/packages/web-user/src/webapp/ui/components/organisms/UserProgressCard/UserProgressCard.tsx b/packages/web-user/src/webapp/ui/components/organisms/UserProgressCard/UserProgressCard.tsx index 34e55f5c6..9e6482370 100644 --- a/packages/web-user/src/webapp/ui/components/organisms/UserProgressCard/UserProgressCard.tsx +++ b/packages/web-user/src/webapp/ui/components/organisms/UserProgressCard/UserProgressCard.tsx @@ -4,6 +4,7 @@ import { Card, Modal } from '@moodlenet/component-library' import { useEffect, useRef, useState, type FC } from 'react' // import { Href, Link } from '../../../../elements/link' import { InfoOutlined } from '@mui/icons-material' +import { t } from '@moodlenet/react-app/webapp' import { actionsAndPointsObtained, getUserLevelDetails, @@ -26,7 +27,7 @@ export const UserProgressCard: FC = ({ const progressBarWidth = ((points - minPoints) / (maxPoints - minPoints)) * 100 const learnMore = ( - setShowInfoModal(true)}> + setShowInfoModal(true)}> ) @@ -86,7 +87,7 @@ export const UserProgressCard: FC = ({ ))}
-
Leaves
+
{t('leaves')}
{actionsAndPointsObtained.map((action, index) => (
@@ -108,14 +109,14 @@ export const UserProgressCard: FC = ({ {infoModal}
- level avatar + {t('level_avatar')}
{title} {learnMore}
- Level {level} + {t('level')} {level}
diff --git a/packages/web-user/src/webapp/ui/components/pages/Access/Signup/Signup.tsx b/packages/web-user/src/webapp/ui/components/pages/Access/Signup/Signup.tsx index 7cad61115..e0b8ca9b8 100644 --- a/packages/web-user/src/webapp/ui/components/pages/Access/Signup/Signup.tsx +++ b/packages/web-user/src/webapp/ui/components/pages/Access/Signup/Signup.tsx @@ -51,17 +51,17 @@ export const Signup: FC = ({ {/*
*/} - Log in + {t('login')}
-
Sign up
+
{t('signup')}
{currSignupEntry ? ( - You agree to our Terms & Conditions + {t('agree_terms_conditions')} ) : ( diff --git a/packages/web-user/src/webapp/ui/components/pages/Bookmarks/Bookmarks.tsx b/packages/web-user/src/webapp/ui/components/pages/Bookmarks/Bookmarks.tsx index 59540f4a5..89b40f0e9 100644 --- a/packages/web-user/src/webapp/ui/components/pages/Bookmarks/Bookmarks.tsx +++ b/packages/web-user/src/webapp/ui/components/pages/Bookmarks/Bookmarks.tsx @@ -10,7 +10,7 @@ export const Bookmarks: FC = ({ mainLayoutProps, browserProps }) return (
- +
) diff --git a/packages/web-user/src/webapp/ui/components/pages/Followers/Followers.tsx b/packages/web-user/src/webapp/ui/components/pages/Followers/Followers.tsx index 0ffa1249c..1727db09d 100644 --- a/packages/web-user/src/webapp/ui/components/pages/Followers/Followers.tsx +++ b/packages/web-user/src/webapp/ui/components/pages/Followers/Followers.tsx @@ -1,6 +1,7 @@ import type { BrowserPropsData, MainLayoutProps } from '@moodlenet/react-app/ui' import { Browser, MainLayout } from '@moodlenet/react-app/ui' import type { FC } from 'react' +import { t } from '@moodlenet/react-app/webapp' export type FollowersProps = { mainLayoutProps: MainLayoutProps @@ -19,7 +20,7 @@ export const Followers: FC = ({
diff --git a/packages/web-user/src/webapp/ui/components/pages/Following/Following.tsx b/packages/web-user/src/webapp/ui/components/pages/Following/Following.tsx index 7ccdab292..cd0158c67 100644 --- a/packages/web-user/src/webapp/ui/components/pages/Following/Following.tsx +++ b/packages/web-user/src/webapp/ui/components/pages/Following/Following.tsx @@ -1,6 +1,7 @@ import type { BrowserPropsData, MainLayoutProps } from '@moodlenet/react-app/ui' import { Browser, MainLayout } from '@moodlenet/react-app/ui' import type { FC } from 'react' +import { t } from '@moodlenet/react-app/webapp' export type FollowingProps = { mainLayoutProps: MainLayoutProps @@ -19,7 +20,7 @@ export const Following: FC = ({