diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c30cb7a2..8e02eccd7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [1.14.0] - 2019-11-23 + ### Added - Add a template to the section plugin to allow rendering unordered list, @@ -670,7 +672,8 @@ us: - finish integrating the missing pages and improve the sandbox environment; - test and polish the use of richie as a django app / node dependency. -[unreleased]: https://github.com/openfun/richie/compare/v1.13.0...master +[unreleased]: https://github.com/openfun/richie/compare/v1.14.0...master +[1.14.0]: https://github.com/openfun/richie/compare/v1.13.0...v1.14.0 [1.13.0]: https://github.com/openfun/richie/compare/v1.12.1...v1.13.0 [1.12.1]: https://github.com/openfun/richie/compare/v1.12.0...v1.12.1 [1.12.0]: https://github.com/openfun/richie/compare/v1.11.0...v1.12.0 diff --git a/setup.cfg b/setup.cfg index d4047d334f..926382b210 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ ;; [metadata] name = richie -version = 1.13.0 +version = 1.14.0 description = A FUN portal for Open edX long_description = file:README.md long_description_content_type = text/markdown diff --git a/src/frontend/js/translations/fr-CA.json b/src/frontend/js/translations/fr-CA.json index ffd522c204..35a1115a4b 100644 --- a/src/frontend/js/translations/fr-CA.json +++ b/src/frontend/js/translations/fr-CA.json @@ -1 +1 @@ -{"components.CourseGlimpse.cover":"Couverture","components.CourseGlimpseList.courseCount":"Résultats {start, number} à {end, number} sur {courseCount, number} {courseCount, plural, one {cours} other {cours}} correspondant à votre recherche","components.CloseIcon.closeLabel":"Fermer","components.SearchFilterGroupModal.closeModal":"Fermer","components.PaginateCourseSearch.currentlyReadingLastPageN":"Actuellement sur la dernière page: {page}","components.PaginateCourseSearch.currentlyReadingPageN":"Actuellement sur la page {page}","components.PaginateCourseSearch.lastPageN":"Dernière page: {page}","components.PaginateCourseSearch.nextPageN":"Page suivante: {page}","components.PaginateCourseSearch.pageN":"Page {page}","components.PaginateCourseSearch.pagination":"Pagination","components.PaginateCourseSearch.previousPageN":"Page précédente: {page}","components.SearchSuggestField.searchFieldPlaceholder":"Recherche des cours, des institutions, des catégories","components.Search.hideFiltersPane":"Masquer les filtres","components.Search.showFiltersPane":"Afficher les filtres","components.Search.spinnerText":"","components.SearchFilterGroup.SearchFilterGroupSuggestField.placeholder":"","components.SearchFilterGroupModal.error":"La recherche de filtres pour {filterName} a rencontré une erreur.","components.SearchFilterGroupModal.modalTitle":"Ajouter des filtres pour {filterName}","components.SearchFilterGroupModal.moreOptionsButton":"Plus de choix","components.SearchFilterGroupModal.queryTooShort":"Tapez 3 caractères ou plus pour commencer à chercher.","components.SearchFiltersPane.clearFilters":"Retirer {activeFilterCount, number} {activeFilterCount, plural, one {filtre actif} other {filtres actifs}}","components.SearchFiltersPane.title":"Filtrer les cours","components.SearchFilterValueParent.ariaHideChildren":"Afficher moins de filtres pour {filterValueName}","components.SearchFilterValueParent.ariaShowChildren":"Afficher plus de filtres pour {filterValueName}","components.UserLogin.logIn":"","components.UserLogin.logOut":"","components.UserLogin.signup":"","components.UserLogin.spinnerText":"","settings.filters.availability.title":"","settings.filters.availability.values.coming_soon":"","settings.filters.availability.values.current":"","settings.filters.availability.values.open":"","settings.filters.language.title":"","settings.filters.language.en":"","settings.filters.language.fr":"","settings.filters.new.title":"","settings.filters.new.new":"","common.categoriesHumanName":"","common.coursesHumanName":"","common.organizationsHumanName":"","common.personsHumanName":""} \ No newline at end of file +{"components.CourseGlimpse.cover":"Couverture","components.CourseGlimpseList.courseCount":"Résultats {start, number} à {end, number} sur {courseCount, number} {courseCount, plural, one {cours} other {cours}} correspondant à votre recherche","components.CloseIcon.closeLabel":"Fermer","components.SearchFilterGroupModal.closeModal":"Fermer","components.PaginateCourseSearch.currentlyReadingLastPageN":"Actuellement sur la dernière page: {page}","components.PaginateCourseSearch.currentlyReadingPageN":"Actuellement sur la page {page}","components.PaginateCourseSearch.lastPageN":"Dernière page: {page}","components.PaginateCourseSearch.nextPageN":"Page suivante: {page}","components.PaginateCourseSearch.pageN":"Page {page}","components.PaginateCourseSearch.pagination":"Pagination","components.PaginateCourseSearch.previousPageN":"Page précédente: {page}","components.SearchSuggestField.searchFieldPlaceholder":"Recherche des cours, des institutions, des catégories","components.Search.hideFiltersPane":"Masquer les filtres","components.Search.showFiltersPane":"Afficher les filtres","components.Search.spinnerText":"","components.SearchFilterGroupModal.error":"La recherche de filtres pour {filterName} a rencontré une erreur.","components.SearchFilterGroupModal.modalTitle":"Ajouter des filtres pour {filterName}","components.SearchFilterGroupModal.moreOptionsButton":"Plus de choix","components.SearchFilterGroupModal.queryTooShort":"Tapez 3 caractères ou plus pour commencer à chercher.","components.SearchFiltersPane.clearFilters":"Retirer {activeFilterCount, number} {activeFilterCount, plural, one {filtre actif} other {filtres actifs}}","components.SearchFiltersPane.title":"Filtrer les cours","components.SearchFilterValueParent.ariaHideChildren":"Afficher moins de filtres pour {filterValueName}","components.SearchFilterValueParent.ariaShowChildren":"Afficher plus de filtres pour {filterValueName}","components.UserLogin.logIn":"","components.UserLogin.logOut":"","components.UserLogin.signup":"","components.UserLogin.spinnerText":"","settings.filters.availability.title":"","settings.filters.availability.values.coming_soon":"","settings.filters.availability.values.ongoing":"","settings.filters.availability.values.open":"","settings.filters.language.title":"","settings.filters.language.en":"","settings.filters.language.fr":"","settings.filters.new.title":"","settings.filters.new.new":"","common.categoriesHumanName":"","common.coursesHumanName":"","common.organizationsHumanName":"","common.personsHumanName":""} \ No newline at end of file diff --git a/src/frontend/js/translations/fr-FR.json b/src/frontend/js/translations/fr-FR.json index 1b50e951c3..9fad095084 100644 --- a/src/frontend/js/translations/fr-FR.json +++ b/src/frontend/js/translations/fr-FR.json @@ -1 +1 @@ -{"components.CourseGlimpse.cover":"Couverture","components.CourseGlimpseList.courseCount":"Résultats {start, number} à {end, number} sur {courseCount, number} {courseCount, plural, one {cours} other {cours}} correspondant à votre recherche","components.CloseIcon.closeLabel":"Fermer","components.SearchFilterGroupModal.closeModal":"Fermer","components.PaginateCourseSearch.currentlyReadingLastPageN":"Actuellement sur la dernière page: {page}","components.PaginateCourseSearch.currentlyReadingPageN":"Actuellement sur la page {page}","components.PaginateCourseSearch.lastPageN":"Dernière page: {page}","components.PaginateCourseSearch.nextPageN":"Page suivante: {page}","components.PaginateCourseSearch.pageN":"Page {page}","components.PaginateCourseSearch.pagination":"Pagination","components.PaginateCourseSearch.previousPageN":"Page précédente: {page}","components.SearchSuggestField.searchFieldPlaceholder":"Recherche des cours, des organisations, des catégories","components.Search.hideFiltersPane":"Cacher le menu des filtres","components.Search.showFiltersPane":"Montrer le menu des filtres","components.Search.spinnerText":"Chargement des résultats de recherche...","components.SearchFilterGroup.SearchFilterGroupSuggestField.placeholder":"Plus de {kindName}","components.SearchFilterGroupModal.error":"La recherche de filtres pour {filterName} a rencontré une erreur.","components.SearchFilterGroupModal.modalTitle":"Ajouter des filtres pour {filterName}","components.SearchFilterGroupModal.moreOptionsButton":"Plus de choix","components.SearchFilterGroupModal.queryTooShort":"Tapez 3 caractères ou plus pour commencer à chercher.","components.SearchFiltersPane.clearFilters":"Retirer {activeFilterCount, number} {activeFilterCount, plural, one {filtre actif} other {filtres actifs}}","components.SearchFiltersPane.title":"Filtrer les cours","components.SearchFilterValueParent.ariaHideChildren":"Cacher les filtres supplémentaires pour {filterValueName}","components.SearchFilterValueParent.ariaShowChildren":"Montrer plus de filtres pour {filterValueName}","components.UserLogin.logIn":"Connexion","components.UserLogin.logOut":"Déconnexion","components.UserLogin.signup":"Inscription","components.UserLogin.spinnerText":"Vérification de l'état de connexion...","settings.filters.availability.title":"Disponibilité","settings.filters.availability.values.coming_soon":"Bientôt","settings.filters.availability.values.current":"Session en cours","settings.filters.availability.values.open":"Ouvert à l'inscription","settings.filters.language.title":"Langue","settings.filters.language.en":"Anglais","settings.filters.language.fr":"Français","settings.filters.new.title":"Nouveaux cours","settings.filters.new.new":"Première session","common.categoriesHumanName":"Catégories","common.coursesHumanName":"Cours","common.organizationsHumanName":"Organisations","common.personsHumanName":"Personnes"} \ No newline at end of file +{"components.CourseGlimpse.cover":"Couverture","components.CourseGlimpseList.courseCount":"Résultats {start, number} à {end, number} sur {courseCount, number} {courseCount, plural, one {cours} other {cours}} correspondant à votre recherche","components.CloseIcon.closeLabel":"Fermer","components.SearchFilterGroupModal.closeModal":"Fermer","components.PaginateCourseSearch.currentlyReadingLastPageN":"Actuellement sur la dernière page: {page}","components.PaginateCourseSearch.currentlyReadingPageN":"Actuellement sur la page {page}","components.PaginateCourseSearch.lastPageN":"Dernière page: {page}","components.PaginateCourseSearch.nextPageN":"Page suivante: {page}","components.PaginateCourseSearch.pageN":"Page {page}","components.PaginateCourseSearch.pagination":"Pagination","components.PaginateCourseSearch.previousPageN":"Page précédente: {page}","components.SearchSuggestField.searchFieldPlaceholder":"Recherche des cours, des organisations, des catégories","components.Search.hideFiltersPane":"Cacher le menu des filtres","components.Search.showFiltersPane":"Montrer le menu des filtres","components.Search.spinnerText":"Chargement des résultats de recherche...","components.SearchFilterGroupModal.error":"La recherche de filtres pour {filterName} a rencontré une erreur.","components.SearchFilterGroupModal.modalTitle":"Ajouter des filtres pour {filterName}","components.SearchFilterGroupModal.moreOptionsButton":"Plus de choix","components.SearchFilterGroupModal.queryTooShort":"Tapez 3 caractères ou plus pour commencer à chercher.","components.SearchFiltersPane.clearFilters":"Retirer {activeFilterCount, number} {activeFilterCount, plural, one {filtre actif} other {filtres actifs}}","components.SearchFiltersPane.title":"Filtrer les cours","components.SearchFilterValueParent.ariaHideChildren":"Cacher les filtres supplémentaires pour {filterValueName}","components.SearchFilterValueParent.ariaShowChildren":"Montrer plus de filtres pour {filterValueName}","components.UserLogin.logIn":"Connexion","components.UserLogin.logOut":"Déconnexion","components.UserLogin.signup":"Inscription","components.UserLogin.spinnerText":"Vérification de l'état de connexion...","settings.filters.availability.title":"Disponibilité","settings.filters.availability.values.coming_soon":"Bientôt","settings.filters.availability.values.ongoing":"","settings.filters.availability.values.open":"Ouvert à l'inscription","settings.filters.language.title":"Langue","settings.filters.language.en":"Anglais","settings.filters.language.fr":"Français","settings.filters.new.title":"Nouveaux cours","settings.filters.new.new":"Première session","common.categoriesHumanName":"Catégories","common.coursesHumanName":"Cours","common.organizationsHumanName":"Organisations","common.personsHumanName":"Personnes"} \ No newline at end of file diff --git a/src/frontend/package.json b/src/frontend/package.json index b654f28c58..2efb9531f4 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -1,6 +1,6 @@ { "name": "richie-education", - "version": "1.13.0", + "version": "1.14.0", "description": "A CMS for Open Education", "main": "sandbox/manage.py", "scripts": { diff --git a/src/richie/locale/fr_FR/LC_MESSAGES/django.mo b/src/richie/locale/fr_FR/LC_MESSAGES/django.mo index cde980a739..9ccf97566a 100644 Binary files a/src/richie/locale/fr_FR/LC_MESSAGES/django.mo and b/src/richie/locale/fr_FR/LC_MESSAGES/django.mo differ diff --git a/src/richie/locale/fr_FR/LC_MESSAGES/django.po b/src/richie/locale/fr_FR/LC_MESSAGES/django.po index 9a1d05f508..2c95e37913 100644 --- a/src/richie/locale/fr_FR/LC_MESSAGES/django.po +++ b/src/richie/locale/fr_FR/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: richie\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-11-12 14:50+0100\n" -"PO-Revision-Date: 2019-11-12 14:03\n" +"POT-Creation-Date: 2019-11-23 07:09+0000\n" +"PO-Revision-Date: 2019-11-23 08:02\n" "Last-Translator: Samuel Paccoud (sampaccoud)\n" "Language-Team: French\n" "Language: fr_FR\n" @@ -94,17 +94,17 @@ msgstr "L'enregistrement de {:d} choix nécessite l'enregistrement d'un CharFiel msgid "Your browser doesn't support this video format." msgstr "Votre navigateur ne supporte pas ce format de vidéo." -#: apps/core/templates/menu/language_menu.html:10 +#: apps/core/templates/menu/language_menu.html:11 #, python-format msgid "%(code)s, currently in %(name)s" msgstr "%(code)s, actuellement en %(name)s" -#: apps/core/templates/menu/language_menu.html:17 +#: apps/core/templates/menu/language_menu.html:18 #, python-format msgid "%(code)s, switch to %(name)s" msgstr "%(code)s, basculer vers %(name)s" -#: apps/core/templates/richie/base.html:104 +#: apps/core/templates/richie/base.html:99 msgid "All Rights Reserved." msgstr "Tous droits réservés." @@ -193,15 +193,15 @@ msgstr "Page Twitter" msgid "Twitter" msgstr "Twitter" -#: apps/courses/admin.py:78 +#: apps/courses/admin.py:76 msgid "Course could not be found." msgstr "Le cours n'a pas pu être trouvé." -#: apps/courses/admin.py:139 +#: apps/courses/admin.py:136 msgid "See user group" msgstr "Voir le groupe d'utilisateurs" -#: apps/courses/admin.py:140 +#: apps/courses/admin.py:137 msgid "See filer folder" msgstr "Voir le dossier du classeur" @@ -485,7 +485,7 @@ msgstr "variante" #: apps/courses/models/course.py:565 apps/courses/models/organization.py:228 #: apps/courses/models/organization.py:263 msgid "Optional glimpse variant for a custom look." -msgstr "Variante optionnelle d'aperçu pour un design personnalisé." +msgstr "Variante d'aperçu optionnelle pour un affichage personnalisé." #: apps/courses/models/course.py:572 msgid "course plugin" @@ -533,7 +533,7 @@ msgstr "plugin d'établissement" #: apps/courses/models/organization.py:270 msgid "organizations by category plugin" -msgstr "" +msgstr "plugin d'établissements par catégorie" #: apps/courses/models/person.py:33 msgid "person" @@ -655,12 +655,16 @@ msgstr "Page d'accueil" msgid "Single column" msgstr "Colonne unique" -#: apps/courses/settings/__init__.py:53 apps/courses/settings/__init__.py:69 +#: apps/courses/settings/__init__.py:54 +msgid "Footer" +msgstr "Pied de page" + +#: apps/courses/settings/__init__.py:61 apps/courses/settings/__init__.py:77 msgid "Main content" msgstr "Contenu principal" -#: apps/courses/settings/__init__.py:93 apps/courses/settings/__init__.py:238 -#: apps/courses/settings/__init__.py:253 +#: apps/courses/settings/__init__.py:101 apps/courses/settings/__init__.py:246 +#: apps/courses/settings/__init__.py:261 #: apps/courses/templates/courses/cms/blogpost_detail.html:49 #: apps/courses/templates/courses/cms/fragment_blogpost_glimpse.html:8 #: apps/courses/templates/courses/cms/fragment_course_glimpse.html:14 @@ -669,83 +673,83 @@ msgstr "Contenu principal" msgid "Cover" msgstr "Couverture" -#: apps/courses/settings/__init__.py:98 +#: apps/courses/settings/__init__.py:106 msgid "Catch phrase" msgstr "Slogan" -#: apps/courses/settings/__init__.py:103 +#: apps/courses/settings/__init__.py:111 msgid "Teaser" msgstr "Accroche" -#: apps/courses/settings/__init__.py:108 +#: apps/courses/settings/__init__.py:116 #: apps/courses/templates/courses/cms/fragment_course_content.html:14 msgid "About the course" msgstr "À propos du cours" -#: apps/courses/settings/__init__.py:112 +#: apps/courses/settings/__init__.py:120 #: apps/courses/templates/courses/cms/fragment_course_content.html:27 msgid "What you will learn" msgstr "Ce que vous allez apprendre" -#: apps/courses/settings/__init__.py:116 +#: apps/courses/settings/__init__.py:124 #: apps/courses/templates/courses/cms/fragment_course_content.html:37 msgid "Format" msgstr "Format" -#: apps/courses/settings/__init__.py:120 +#: apps/courses/settings/__init__.py:128 #: apps/courses/templates/courses/cms/fragment_course_content.html:48 msgid "Prerequisites" msgstr "Prérequis" -#: apps/courses/settings/__init__.py:124 +#: apps/courses/settings/__init__.py:132 msgid "Team" msgstr "Équipe" -#: apps/courses/settings/__init__.py:128 +#: apps/courses/settings/__init__.py:136 msgid "Plan" msgstr "Plan" -#: apps/courses/settings/__init__.py:132 +#: apps/courses/settings/__init__.py:140 msgid "Complementary information" msgstr "Informations complémentaires" -#: apps/courses/settings/__init__.py:141 +#: apps/courses/settings/__init__.py:149 #: apps/courses/templates/courses/cms/fragment_course_content.html:127 msgid "License for the course content" msgstr "Licence pour le contenu du cours" -#: apps/courses/settings/__init__.py:146 +#: apps/courses/settings/__init__.py:154 #: apps/courses/templates/courses/cms/fragment_course_content.html:136 msgid "License for the content created by course participants" msgstr "Licence pour le contenu créé par les participants du cours" -#: apps/courses/settings/__init__.py:151 apps/courses/settings/__init__.py:179 -#: apps/courses/settings/__init__.py:210 apps/courses/settings/__init__.py:234 +#: apps/courses/settings/__init__.py:159 apps/courses/settings/__init__.py:187 +#: apps/courses/settings/__init__.py:218 apps/courses/settings/__init__.py:242 msgid "Categories" msgstr "Catégories" -#: apps/courses/settings/__init__.py:155 apps/courses/settings/__init__.py:199 +#: apps/courses/settings/__init__.py:163 apps/courses/settings/__init__.py:207 msgid "Icon" msgstr "Icône" -#: apps/courses/settings/__init__.py:160 apps/courses/settings/__init__.py:224 +#: apps/courses/settings/__init__.py:168 apps/courses/settings/__init__.py:232 #: apps/courses/templates/courses/cms/fragment_course_content.html:84 #: apps/courses/templates/courses/cms/person_detail.html:55 #: apps/search/defaults.py:95 msgid "Organizations" msgstr "Établissements" -#: apps/courses/settings/__init__.py:164 +#: apps/courses/settings/__init__.py:172 msgid "Assessment and Certification" msgstr "Évaluation et certification" -#: apps/courses/settings/__init__.py:169 apps/courses/settings/__init__.py:189 +#: apps/courses/settings/__init__.py:177 apps/courses/settings/__init__.py:197 #: apps/courses/templates/courses/cms/category_detail.html:14 #: apps/courses/templates/courses/cms/organization_detail.html:14 msgid "Banner" msgstr "Bannière" -#: apps/courses/settings/__init__.py:174 apps/courses/settings/__init__.py:194 +#: apps/courses/settings/__init__.py:182 apps/courses/settings/__init__.py:202 #: apps/courses/templates/courses/cms/category_detail.html:32 #: apps/courses/templates/courses/cms/fragment_category_glimpse.html:9 #: apps/courses/templates/courses/cms/fragment_organization_glimpse.html:14 @@ -753,42 +757,42 @@ msgstr "Bannière" msgid "Logo" msgstr "Logo" -#: apps/courses/settings/__init__.py:183 apps/courses/settings/__init__.py:204 +#: apps/courses/settings/__init__.py:191 apps/courses/settings/__init__.py:212 msgid "Description" msgstr "Description" -#: apps/courses/settings/__init__.py:214 +#: apps/courses/settings/__init__.py:222 #: apps/courses/templates/courses/cms/fragment_person_glimpse.html:10 #: apps/courses/templates/courses/cms/person_detail.html:15 msgid "Portrait" msgstr "Portrait" -#: apps/courses/settings/__init__.py:219 +#: apps/courses/settings/__init__.py:227 msgid "Bio" msgstr "Bio" -#: apps/courses/settings/__init__.py:229 +#: apps/courses/settings/__init__.py:237 msgid "Author" msgstr "Auteur" -#: apps/courses/settings/__init__.py:243 apps/courses/settings/__init__.py:258 +#: apps/courses/settings/__init__.py:251 apps/courses/settings/__init__.py:266 msgid "Excerpt" msgstr "Extrait" -#: apps/courses/settings/__init__.py:248 apps/courses/settings/__init__.py:263 +#: apps/courses/settings/__init__.py:256 apps/courses/settings/__init__.py:271 msgid "Body" msgstr "Corps" -#: apps/courses/settings/__init__.py:267 +#: apps/courses/settings/__init__.py:275 #: apps/courses/templates/courses/cms/person_detail.html:67 msgid "Courses" msgstr "Cours" -#: apps/courses/settings/__init__.py:349 +#: apps/courses/settings/__init__.py:357 msgid "Button caesura" msgstr "Bouton caesura" -#: apps/courses/settings/__init__.py:351 +#: apps/courses/settings/__init__.py:359 msgid "Full width" msgstr "Pleine largeur" @@ -1051,6 +1055,10 @@ msgstr "image de couverture de parcours" msgid "No associated programs" msgstr "Aucun parcours associé" +#: apps/search/cms_toolbars.py:30 +msgid "Regenerate search index..." +msgstr "Regénérer l'index de recherche..." + #: apps/search/defaults.py:29 msgid "New courses" msgstr "Nouveaux cours" @@ -1075,22 +1083,30 @@ msgstr "Niveaux" msgid "Persons" msgstr "Personnes" -#: apps/search/filter_definitions/courses.py:379 +#: apps/search/filter_definitions/courses.py:389 msgid "Open for enrollment" msgstr "Ouvert pour inscription" -#: apps/search/filter_definitions/courses.py:380 +#: apps/search/filter_definitions/courses.py:390 msgid "Coming soon" msgstr "À venir" -#: apps/search/filter_definitions/courses.py:381 +#: apps/search/filter_definitions/courses.py:391 msgid "On-going" msgstr "En cours" -#: apps/search/filter_definitions/courses.py:382 +#: apps/search/filter_definitions/courses.py:392 msgid "Archived" msgstr "Archivé" +#: apps/search/views.py:22 +msgid "You are not allowed to manage the search index." +msgstr "Vous n'êtes pas autorisé à modifier l'index de recherche." + +#: apps/search/views.py:28 +msgid "The search index was successfully bootstrapped" +msgstr "L'index de recherche a été initialisé avec succès" + #: plugins/html_sitemap/cms_plugins.py:59 plugins/html_sitemap/models.py:59 msgid "HTML Sitemap" msgstr "Plan de site HTML" @@ -1187,6 +1203,10 @@ msgstr "Section" msgid "Highlighted items" msgstr "Eléments mis en avant" +#: plugins/section/defaults.py:13 +msgid "Unordered list" +msgstr "Liste non-ordonnée" + #: plugins/section/models.py:30 msgid "Optional template for custom look." msgstr "Modèle optionnel pour un rendu personnalisé." diff --git a/website/package.json b/website/package.json index 72c759d2a7..d99c73690b 100644 --- a/website/package.json +++ b/website/package.json @@ -1,6 +1,6 @@ { "name": "richie-education-docs", - "version": "1.13.0", + "version": "1.14.0", "description": "Documentation website for the Richie project", "scripts": { "build": "docusaurus-build", diff --git a/website/versioned_docs/version-1.14/django-react-interop.md b/website/versioned_docs/version-1.14/django-react-interop.md new file mode 100644 index 0000000000..7050209ad2 --- /dev/null +++ b/website/versioned_docs/version-1.14/django-react-interop.md @@ -0,0 +1,101 @@ +--- +id: version-1.14-django-react-interop +title: Connecting React components with Django +sidebar_label: Django & React +original_id: django-react-interop +--- + +`richie` is a hybrid app, that relies on both HTML pages generated by the backend (Django/DjangoCMS) based on templates, and React components rendered on the frontend for parts of these HTML pages. + +## Rendering components + +We needed a convention that enables us to easily mark those areas of the page that React needs to take control of, and to tell React which component to load there. + +We decided to use a specific CSS class name along with its modifiers. We reserve the `richie-react` class and its modified children for this purpose. + +Additionally, components including internationalized data or strings need to know which locale to use. They will pick up the locale specified through the `lang` attribute of the `` element, which is a requirement to have an accessible page anyway. + +They use the BCP47/RFC5646 format. + + + +### Example + +Here is how we would call a `` component from a template, a plugin or a snippet: + + + +When our JS is loaded, it will recognize this as an element it must take over, and render the FeaturedCourses component in this element. + +## Passing properties to components + +Some of Richie's React components, and some of those you might want to write, require arguments or "props" to be passed to them. We could work around that by adding API routes to fetch these props, but that would add complexity and reduce performance. + +Instead, we decided to normalize a simpler way for components in Richie to accept input from the Django template that is adding them to the DOM. + +We can add a `data-props` attribute on the element with the `richie-react` class and write a JSON object as the value for this attribute. Each key-value pair in this object will be passed as a `propName={propValue}` to the React component. + +### Example + +Here is how we would pass a `categories={[ "sociology", "anthropology" ]}` prop to our `` component: + + + +When the component is rendered, it will be passed a `categories` prop with the relevant categories. + +## Built-in components + +Here are the React component that Richie comes with and uses out of the box. + +### <RootSearchSuggestField /> + +Renders a course search bar, like the one that appears in the default `Search` page. + +Interactions will send the user to the `courseSearchPageUrl` url passed in the props, including the selected filter and/or search terms. + +It also autocompletes user input with course names and allows users to go directly to the course page if they select a course name among the selected results. + +Props: +- `courseSearchPageUrl` [required] — URL for the course search page users should be sent to when they select a suggestion that is not a course, or launch a search with text terms. +- `context` [optional] — see [context](#context). + +### <Search /> + +Renders the full-page course search engine interface, including the search bar, search results, and filters pane. + +NB: the `Search` Django template basically renders just this page. If you need this, use it instead. It is included here for completeness' sake. + +Props: +- `pageTitle` [required] — title for the page, will be used inside the `

` in the rendered component. +- `context` [required] — see [context](#context). + +### <UserLogin /> + +Renders a component that uses the `/users/whoami` endpoint to determine if the user is logged in and show them the appropriate interface: Signup/Login buttons or their name along with a Logout button. + +Props: +- `loginUrl` [required] — the URL where the user is sent when they click on "Log in"; +- `logoutUrl` [required] — a link that logs the user out and redirects them (can be the standard django logout URL); +- `signupUrl` [required] — the URL where the user is sent when they click on "Sign up". + +## Context + +All built-in components for Richie accept a `context` prop, that may be required or optional, depending on the component. + +It is used to pass app-wide contextual information pertaining to the current instance, deployment or theme of Richie. + +Here is the expected shape for this object: + + { + assets: { + // SVG sprite used throughout Richie + icons: "/path/to/icons/sprite.svg" + } + } + +Note that it might be expanded in further versions of Richie. diff --git a/website/versions.json b/website/versions.json index e54f18f5c8..33fb2e6c39 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1 +1 @@ -["1.13", "1.12"] +["1.14", "1.13", "1.12"]