diff --git a/.gitignore b/.gitignore index cce175b385cde26ede9c188803caffeff7cc5b37..9409f83e304dba6e1a32fba9c5b65f60e2a9c4e0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /dist/lib/ /dist/oidc-client-config.json *.iml -/www/ +/www/* +!/www/index.html package-lock.json diff --git a/compile-pug.js b/compile-pug.js new file mode 100644 index 0000000000000000000000000000000000000000..4589b01d04d402e150e2eb683e976cd9c16f160d --- /dev/null +++ b/compile-pug.js @@ -0,0 +1,71 @@ +const path = require('path') +const fs = require('fs').promises +const objectAssignDeep = require(`object-assign-deep`) +const yaml = require('js-yaml') +const pug = require('pug') +const chokidar = require('chokidar') + +//Set default language +const default_lang = 'en' + +const pugFile = './src/index.pug' + +//Set the translation directory +const dataDir = './translation' +const outDir = './www' + +//Compile custom function +async function compile() { + //Retrieve langues proposed + const langs = (await fs.readdir(dataDir)) + .filter(f => path.extname(f) === '.yml') + .map(f => path.basename(f, '.yml')) + + const langData = {} + + //Retrieve traduction + await Promise.all( + langs.map(lang => + fs + .readFile(`${dataDir}/${lang}.yml`, 'utf8') + .then(text => (langData[lang] = yaml.safeLoad(text))), + ), + ) + + for (const lang in langData) { + if (lang === default_lang) continue + langData[lang] = objectAssignDeep( + {}, + langData[default_lang], + langData[lang], + ) + } + + const options = JSON.parse(await fs.readFile('./src/config.json', 'utf-8')) + const pugFct = pug.compileFile(pugFile) + + await fs.mkdir(outDir, { recursive: true }) + + //Creation of folders by language with their index.html dans wwww + await Promise.all( + Object.entries(langData).map(async([lang, data]) => { + const opt = Object.assign({}, options, { lang, data }); + const dir = `${outDir}/${lang}` + await fs.mkdir(dir, { recursive: true }) + const html = pugFct(opt) + const filename = `${dir}/index.html` + console.log(`write ${filename}`) + return fs.writeFile(filename, html) + }), + ) +} + +// Compile with --watch option +compile().then(() => { + if (!process.argv.includes('-w') && !process.argv.includes('--watch')) return + console.log('watching for changes…') + chokidar.watch([pugFile, dataDir]).on('change', editedFilePath => { + console.log(`\nchanged: ${editedFilePath}`) + compile() + }) +}) diff --git a/package.json b/package.json index c51b7fa784310d065108bb535517386f307f0351..c0eded1870a636c860ecb365eb7515dc68d96459 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "scss": "node-sass -w ./src/styles/index.scss -o ./www/styles/", - "pug": "pug --watch ./src/index.pug --out ./www/ --obj ./src/config.json", + "pug": "node ./compile-pug.js -w", "pugprod": "pug ./src/index.pug --out ./www/ --obj prod.json", "copy-js": "cp ./src/scripts/*.js ./www/scripts/", "copy-fonts": "cp -R ./src/fonts ./www", @@ -21,13 +21,17 @@ "@babel/core": "^7.1.0", "@babel/cli": "^7.1.0", "node-sass": "^4.9.3", - "pug-cli": "^1.0.0-alpha6", "browser-sync": "^2.24.7", - "express": "^4.16.3" + "express": "^4.16.3", + "chokidar": "^3.2.3", + "js-yaml": "^3.13.1", + "object-assign-deep": "^0.4.0", + "pug": "^2.0.4" }, "dependencies": { "@webcomponents/html-imports": "^1.2.0", "@webcomponents/webcomponentsjs": "^1.2.7", + "cookie-parser": "^1.4.4", "include-media": "^1.4.9", "normalize.css": "^8.0.0", "onchange": "^6.1.0", diff --git a/server.js b/server.js index 21a3c704467f9fc41505c7e7147b99d3cd8cac9f..6d3e1bf0c8289d5586ea6ec3558304447eca7c7f 100644 --- a/server.js +++ b/server.js @@ -9,9 +9,9 @@ const app = express(); app .use(express.static(distPath)) // .use('/src', express.static(join(__dirname, 'src'))) - .get(/^[^.]*$/, (req, rep) => - rep.sendFile(join(__dirname, distPath, '/index.html')) - ) + .get('/:lang/:path([^.]*)', (req, rep) => { + rep.sendFile(join(__dirname, distPath, `${req.params.lang}/index.html`)); + }) .listen(port); // browser sync diff --git a/src/includes/account-creation.pug b/src/includes/account-creation.pug index a268f923950a30d7ea33dedeea962b298879f9d7..583340fec96e078c39dae790714314ae87c1774c 100644 --- a/src/includes/account-creation.pug +++ b/src/includes/account-creation.pug @@ -7,21 +7,21 @@ sib-router(default-route='account-creation-index') figure(class="logo") img(src="../images/logo.png" alt="Coopstarter logo") - h2.title_lead Welcome to our international index of resources for cooperative mentors and entrepreneurs + h2.title_lead=`${data.welcome}` sib-link.block_log(next='mentor-new-account') div figure.img_log img(src="../images/mentor.png" alt="Create your account as mentor") - h2.button_base I am a mentor + h2.button_base=`${data.IAmMentor}` sib-link.block_log(next='entrepreneur-new-account') div figure.img_log img(src="../images/fusee.png" alt="Create your account as entrepreneur") - h2.button_base I am an entrepreneur + h2.button_base=`${data.IAmEntrepreneur}` #mentor-new-account(hidden).no-sidebar.container include mentor/profile/create.pug diff --git a/src/includes/entrepreneur/components/header.pug b/src/includes/entrepreneur/components/header.pug index 998a38c103cc0e8a80935667f2aadd208fa1fb4f..493c1cd6479d10fc9a915af5f453c765adb94009 100644 --- a/src/includes/entrepreneur/components/header.pug +++ b/src/includes/entrepreneur/components/header.pug @@ -7,7 +7,7 @@ include menu.pug div.flex.flex_espace.flex_item_center - sib-form( + sib-form.languageChoic( data-src=`${endpoints.languages}` fields='languages' range-languages=`${endpoints.languages}` @@ -27,10 +27,10 @@ ul li sib-link(next='entrepreneur-dashboard') - p Dashboard + p= data.Dashboard li sib-link(next='entrepreneur-account') - p My account + p= data.MyAccount li a.logout-button - p Logout \ No newline at end of file + p= data.Logout \ No newline at end of file diff --git a/src/includes/entrepreneur/dashboard.pug b/src/includes/entrepreneur/dashboard.pug index 5c795315b8800d64b96e7927dd2e4c26e197e1b9..681e6c66e22f6abdf31d01fffc6fd39aef38baac 100644 --- a/src/includes/entrepreneur/dashboard.pug +++ b/src/includes/entrepreneur/dashboard.pug @@ -28,7 +28,7 @@ section#home include ./requests/create.pug dialog#entrepreneur-request-validation.no-sidebar.container - p You request has been submitted + p=`${data.YouRequestHasBeenSubmitted}` p.flex sib-link(next='entrepreneur-resource-list', class='button_base') Ok diff --git a/src/includes/entrepreneur/profile/confirmation.pug b/src/includes/entrepreneur/profile/confirmation.pug index 69a6c69c2a0552b9f01031eb5a31aafb67c10bee..df14f292913fe58aca1ed1de4d6a8e7804fb0d09 100644 --- a/src/includes/entrepreneur/profile/confirmation.pug +++ b/src/includes/entrepreneur/profile/confirmation.pug @@ -1,9 +1,9 @@ div.container_min - h2.title_lead.fd_bleu Edit your account + h2.title_lead.fd_bleu= data.EditYourAccount -p.p_entete Your modifications have properly been saved. +p.p_entete= data.ModificationsProperlySaved div div.flex h3.button_base - sib-link(next='entrepreneur-resource-list') -> Back to the database \ No newline at end of file + sib-link(next='entrepreneur-resource-list')= data.BackToDashboard \ No newline at end of file diff --git a/src/includes/entrepreneur/profile/create.pug b/src/includes/entrepreneur/profile/create.pug index ccfda50e280d3eefc8f4e76528d13d55e200fb4a..a3dd7eadb3b8ed83e54dd22731ecf98123a530fc 100644 --- a/src/includes/entrepreneur/profile/create.pug +++ b/src/includes/entrepreneur/profile/create.pug @@ -8,7 +8,7 @@ figure.logo.img_log img(src="../images/fusee.png" alt="Create an entrepreneur account") -h2.title_create Complete your entrepreneur account +h2.title_create=`${data.CompleteEntrepreneurAccount}` sib-form#entrepreneur_profile_creation.block_log.block_creat_count( bind-user @@ -16,9 +16,9 @@ sib-form#entrepreneur_profile_creation.block_log.block_creat_count( range-entrepreneur_profile.organisation=`${endpoints.organisations}` - label-first_name="Surname" - label-last_name="Name" - label-entrepreneur_profile.organisation="Organisation *" + label-first_name=`${data.Surname}` + label-last_name=`${data.Name}` + label-entrepreneur_profile.organisation=`${data.Organisation}` class-entrepreneur_profile.organisation='form-label is-dark' widget-entrepreneur_profile.organisation='sib-form-auto-completion' @@ -29,7 +29,7 @@ sib-form#entrepreneur_profile_creation.block_log.block_creat_count( widget-account.picture='cs-form-file-custom' class-account.picture='input_photo w_25' - submit-button="COMPLETE YOUR ACCOUNT" + submit-button=`${data.CompleteYourAccount}` next="entrepreneur-dashboard" ) diff --git a/src/includes/entrepreneur/profile/detail.pug b/src/includes/entrepreneur/profile/detail.pug index e0099ead827d881b651c0edfca53d53d104f9637..eeea2edfd88d9d0e3c3e3c7bacaf1da1676c4408 100644 --- a/src/includes/entrepreneur/profile/detail.pug +++ b/src/includes/entrepreneur/profile/detail.pug @@ -1,23 +1,23 @@ include ../../components/widgets div.container_min - h2.title_lead.fd_bleu My Account + h2.title_lead.fd_bleu=`${data.MyAccount}` div.block_list.flex div.button__actions.w_25 div.dashboard__database sib-link(next='entrepreneur-database') - div.button_base.ico_gauche.ico_database Browse database + div.button_base.ico_gauche.ico_database=`${data.BrowseDatabase}` div.dashboard__database sib-link(next='entrepreneur-resource-list') - div.button_base.ico_gauche.ico_search Back to dashboard + div.button_base.ico_gauche.ico_search=`${data.BackToDashboard}` div.dashboard__database div.logout-button.button_base( role='log out' - ) Logout + )=`${data.Logout}` div.profile_information.block_log.w_75 sib-link(next='entrepreneur-account-edit') @@ -35,7 +35,7 @@ div.block_list.flex sib-display#entrepreneur_contact( bind-user fields='email' - label-email='Email:' + label-email=`${data.Email}` class-email="contact_profil" widget-email='cs-display-resource-property' ) \ No newline at end of file diff --git a/src/includes/entrepreneur/profile/edit.pug b/src/includes/entrepreneur/profile/edit.pug index 8028caf09c60e8ccb345e18e769a6c85f47da8af..f3f90cb1256d0d746ad950c2da72b2b1ef6dda6c 100644 --- a/src/includes/entrepreneur/profile/edit.pug +++ b/src/includes/entrepreneur/profile/edit.pug @@ -1,16 +1,16 @@ include ../../components/widgets -h2.title_create Edit your account +h2.title_create= data.EditYourAccount sib-form#entrepreneur_profile_edition.block_log.block_creat_count( bind-user fields="info(last_name, first_name, username, email, entrepreneur_profile.organisation, account.picture)" range-entrepreneur_profile.organisation=`${endpoints.organisations}` - label-first_name="Surname" - label-last_name="Name" - label-entrepreneur_profile.organisation="Organisation" - label-account.picture="Profile picture" + label-first_name=`${data.Surname}` + label-last_name=`${data.Name}` + label-entrepreneur_profile.organisation=`${data.Organisation}` + label-account.picture=`${data.Photo}` widget-username="sib-form-hidden" class-last_name='form-label is-dark input_big' @@ -25,8 +25,8 @@ sib-form#entrepreneur_profile_edition.block_log.block_creat_count( widget-account.picture='cs-form-file-custom' class-account.picture='input_photo w_25' - submit-button="Save modifications" + submit-button=`${data.SaveModification}` next='entrepreneur-account-edit-confirmation' ) -sib-link(class="backlink", next="entrepreneur-resource-list") Back to the dashboard \ No newline at end of file +sib-link(class="backlink", next="entrepreneur-resource-list")= data.BackToDashboard \ No newline at end of file diff --git a/src/includes/entrepreneur/requests/create.pug b/src/includes/entrepreneur/requests/create.pug index c08525499f777e26e1125f509e876d9bf64abdd9..8291703fb6d072715a1cf4374809180f8889ea55 100644 --- a/src/includes/entrepreneur/requests/create.pug +++ b/src/includes/entrepreneur/requests/create.pug @@ -4,11 +4,12 @@ p.backlink i.fas.fa-times div#resource-creation-form-loader - hidden Loading form, please wait... + hidden + i.fas.fa-spinner.fa-spin - h2.title_form Request a ressource + h2.title_form=`${data.RequestRessource}` - p.p_entete You can't find a resource you are looking for ? You need resources to acquire certain skills or progress in your cooperative developement ? It can be a book, a document model, a tutorial, anything you need, make a request to our mentors so they know how to help you. + p.p_entete=`${data.RequestRessourceInfo}` img(src="../images/asid_entre.png" alt="rechercher de ressources") sib-form#resource-creation-form( @@ -25,16 +26,16 @@ range-organisation=`${endpoints.organisations}` range-country=`${endpoints.countries}` - label-header_mandatory='Mandatory information' - label-header_complementary='Complementary information' + label-header_mandatory=`${data.MandatoryInformation}` + label-header_complementary=`${data.ComplementaryInformation}` - label-name='Title*' - label-description='Description' - label-language='Language*' - label-country='Country*' - label-field='Field*' - label-organisation='Organisation' - label-skills='What do you need to learn with this resource ?' + label-name=`${data.TitleRequired}` + label-description=`${data.Description}` + label-language=`${data.Language}` + label-country=`${data.Country}` + label-field=`${data.FieldRequired}` + label-organisation=`${data.Organisation}` + label-skills=`${data.SkillToLearn}` multiple-fields='sib-multiple-select' widget-fields='sib-form-auto-completion' @@ -47,7 +48,7 @@ widget-skills='sib-form-textarea' widget-organisation='sib-form-auto-completion' - submit-button='Send request' + submit-button=`${data.SendRequest}` next="entrepreneur-request-validation" ) diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index dbb6ea52497ec51c93319f1752fcccdfcc212f92..399d29fc5bdedcb50d3dace21641b3d606b78556 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -46,31 +46,31 @@ include ../../components/widgets class-review.reviewer.name="validator_ressource" widget-header_specifications='cs-section_header' - label-broken='Report broken link' - label-sharing='Access:' - label-language.name='Language:' - label-publication_year='Year of publication:' - label-header_specifications='Resource specifications' + label-broken=`${data.ReportBrokenLink}` + label-sharing=`${data.Access}` + label-language.name=`${data.Language}` + label-publication_year=`${data.DatePublication}` + label-header_specifications=`${data.ResourceSpecifications}` class-format.name='format_type' label-format.name='' widget-steps='cs-display-step-property' label-steps='' - each-label-steps="Step" + each-label-steps=`${data.Step}` multiple-steps widget-fields='cs-display-multiple-property' label-fields='' - each-label-fields='Field:' + each-label-fields=`${data.Field}` multiple-fields - label-skills='With this resource, you will be able to:' - label-uri='Link to resource' + label-skills=`${data.WithThisResourceBeAbleTo}` + label-uri=`${data.LinkToResource}` name-uri='original-link' - label-country.name='Country:' - label-submitter.mentor_profile.organisation.name='Organisation:' - label-author='Author :' - label-submitter.name='Resource posted by:' + label-country.name=`${data.Country}` + label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-author=`${data.Author}` + label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-entrepreneur' ) @@ -98,7 +98,7 @@ include ../../components/widgets bind-resources fields="" nested-field="conversations" - counter-template="<p>Comments (${counter})</p>" + counter-template=`<p>${data.Comments} (${counter})</p>` ) sib-conversation( @@ -106,7 +106,7 @@ include ../../components/widgets id-suffix="conversations" ) - h2.title_lead_avenir Related resources + h2.title_lead_avenir=`${data.RelatedResources}` sib-display( bind-resources, diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 20b2f8518e1afc64493d8750508ca65800a40446..b666e00bdcb242b956fcdd54c9f4323ee465003f 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -7,8 +7,8 @@ dialog#resource-report-broken-link-entrepreneur include ./resource-report-broken-link-entrepreneur div.container_min - h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs - button.button_dark.pull-right Watch the presentation + h2.title_lead.fd_bleu=`${data.generalLabel}` + button.button_dark.pull-right=`${data.WatchThePresentation}` i.far.fa-play-circle //-About : @@ -19,7 +19,7 @@ container.block_list div.flex.flex_espace div.w_75.block-g-entre div - h2.title_form Search for a resource + h2.title_form=`${data.SearchForResource}` div#resources-loader hidden i.fas.fa-spinner.fa-spin @@ -27,13 +27,13 @@ container.block_list data-src=`${endpoints.resources}`, loader-id="resources-loader" fields='keyword(name_keyword)' - label-name_keyword="Search by name..." + label-name_keyword=`${data.SearchByNam}` widget-name_keyword="sib-form-placeholder-text" naked ) div.keyword_submit.button__actions - div.button_base.ico_gauche Search + div.button_base.ico_gauche=`${data.Search}` sib-form.instance_database_only( data-src=`${endpoints.resources}`, @@ -47,12 +47,12 @@ container.block_list sib-form.more_criterias.flex.flex_espace( data-src=`${endpoints.resources}`, fields='header_criterias, format, publication_year, country, language, fields' - label-header_criterias='More criterias' - label-format='Format:' - label-publication_year='Year of publication' - label-country='Country of publication' - label-language='Language' - label-fields='Field' + label-header_criterias=`${data.Search}` + label-format=`${data.Format}` + label-publication_year=`${data.DatePublication}` + label-country=`${data.CountryPublication}` + label-language=`${data.Language}` + label-fields=`${data.Field}` widget-header_criterias='cs-section_header' range-language=`${endpoints.languages}` @@ -78,11 +78,11 @@ container.block_list div.w_25 div.block_aside_entre img(src="../images/asid_entre.png" alt="rechercher de ressources") - p Can't find the ressource you need ? + p=`${data.CantFindRessourceYouNeed}` div.button__actions sib-link(next='entrepreneur-request-create') div - div.button_base Make a request + div.button_base=`${data.MakeRequest}` //Fake tabs to filter by type. @@ -115,7 +115,7 @@ container.block_list fields='name' class="accordion active" - label-name ='Step 1 ' + label-name =`${data.Step} 1 ` label-resources='' widget-name='cs-steps-header' @@ -171,7 +171,7 @@ container.block_list fields='name' class="accordion" - label-name ='Step 2 ' + label-name =`${data.Step} 2 ` label-resources='' widget-name='cs-steps-header' @@ -225,7 +225,7 @@ container.block_list fields='name' class="accordion" - label-name ='Step 3 ' + label-name =`${data.Step} 3 ` label-resources='' widget-name='cs-steps-header' @@ -279,7 +279,7 @@ container.block_list fields='name' class="accordion" - label-name ='Step 4 ' + label-name =`${data.Step} 4 ` label-resources='' widget-name='cs-steps-header' @@ -335,7 +335,7 @@ container.block_list fields='name' class="accordion" - label-name ='Step 5 ' + label-name =`${data.Step} 5 ` label-resources='' widget-name='cs-steps-header' @@ -390,7 +390,7 @@ container.block_list fields='name' class="accordion" - label-name ='Step 6 ' + label-name =`${data.Step} 6 ` label-resources='' widget-name='cs-steps-header' @@ -438,3 +438,4 @@ container.block_list paginate-by="5" ) + diff --git a/src/includes/entrepreneur/resources/resource-report-broken-link-entrepreneur.pug b/src/includes/entrepreneur/resources/resource-report-broken-link-entrepreneur.pug index 288969241d28984e473810088d5b86c58f5585bb..4026a5595e9c1fbf1bb39a6dd1548ea88c369109 100644 --- a/src/includes/entrepreneur/resources/resource-report-broken-link-entrepreneur.pug +++ b/src/includes/entrepreneur/resources/resource-report-broken-link-entrepreneur.pug @@ -4,8 +4,8 @@ p i.fas.fa-times - h2.title_lead_avenir Thanks! - p The submitter of the resource will be advised that this link is broken. + h2.title_lead_avenir=`${data.Thanks}` + p=`${data.ConfirmSendBrokenLink}` sib-form#report-broken-link-entrepreneur( data-src=`${endpoints.brokenlinks}` fields = "resource, submitter" diff --git a/src/includes/mentor/browseDatabase.pug b/src/includes/mentor/browseDatabase.pug index 4b3d385ea11bef4c6d72bda027effc90a3bc39af..56b5016332076052853f35b82ddbbb972a93f56d 100644 --- a/src/includes/mentor/browseDatabase.pug +++ b/src/includes/mentor/browseDatabase.pug @@ -2,8 +2,8 @@ include ../components/widgets div.container_min - h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs - button.button_dark.pull-right Watch the presentation + h2.title_lead.fd_bleu=`${data.generalLabel}` + button.button_dark.pull-right= `${data.WatchThePresentation}` i.far.fa-play-circle div.block_list @@ -11,17 +11,17 @@ div.block_list div.resources__newresource sib-link(next='mentor-resource-create') div - div.button_base.ico_gauche.ico_plus Post a new Resource + div.button_base.ico_gauche.ico_plus= `${data.PostResource}` div.dashboard__database sib-link(next='mentor-resource-list') - div.button_base.ico_gauche.ico_database Back to dashboard + div.button_base.ico_gauche.ico_database= `${data.BackToDashboard}` container.block_list.flex.flex_espace div.w_75.block-g-entre div - h2.title_form Search for a resource + h2.title_form= `${data.SearchForResource}` div#resources-mentor-database-loader hidden i.fas.fa-spinner.fa-spin @@ -30,14 +30,14 @@ container.block_list.flex.flex_espace data-src=`${endpoints.resources}`, loader-id="resources-mentor-database-loader" fields='keyword(name_keyword)' - label-name_keyword="Search by name..." + label-name_keyword=`${data.SearchByNam}` widget-name_keyword="sib-form-placeholder-text" naked ) div.keyword_submit.button__actions - div.button_base.ico_gauche Search + div.button_base.ico_gauche=`${data.Search}` sib-form.instance_database_only( data-src=`${endpoints.resources}`, @@ -50,12 +50,12 @@ container.block_list.flex.flex_espace sib-form.more_criterias.flex.flex_espace( data-src=`${endpoints.resources}`, fields='header_criterias, format, publication_year, country, language, fields' - label-header_criterias='More criterias' - label-format='Format:' - label-publication_year='Year of publication' - label-country='Country of publication' - label-language='Language' - label-fields='Field' + label-header_criterias=`${data.MoreCriterias}` + label-format=`${data.Format}` + label-publication_year=`${data.DatePublication}` + label-country=`${data.CountryPublication}` + label-language=`${data.Language}` + label-fields=`${data.Field}` widget-header_criterias='cs-section_header' range-language=`${endpoints.languages}` @@ -108,7 +108,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion active" - label-name ='Step 1 ' + label-name =`${data.Step} 1`, label-resources='' widget-name='cs-steps-header' @@ -162,7 +162,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 2 ' + label-name =`${data.Step} 2`, label-resources='' widget-name='cs-steps-header' @@ -216,7 +216,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 3 ' + label-name =`${data.Step} 3`, label-resources='' widget-name='cs-steps-header' @@ -271,7 +271,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 4 ' + label-name =`${data.Step} 4`, label-resources='' widget-name='cs-steps-header' @@ -326,7 +326,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 5 ' + label-name =`${data.Step} 5`, label-resources='' widget-name='cs-steps-header' @@ -380,7 +380,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 6 ' + label-name =`${data.Step} 6`, label-resources='' widget-name='cs-steps-header' diff --git a/src/includes/mentor/components/header.pug b/src/includes/mentor/components/header.pug index 3e7b4a4612af679e9baa3adf62b7dda7673e2774..b9f62c266201792bc21d830aaaf3db320307be27 100644 --- a/src/includes/mentor/components/header.pug +++ b/src/includes/mentor/components/header.pug @@ -7,7 +7,7 @@ include menu.pug div.flex.flex_espace.flex_item_center - sib-form( + sib-form.languageChoice( data-src=`${endpoints.languages}` fields='languages' range-languages=`${endpoints.languages}` @@ -16,7 +16,6 @@ label-languages='' naked ) - .dropdownWrapper sib-display#mentor-account-picture.dropdownLabel( bind-user @@ -27,13 +26,13 @@ ul li sib-link(next='mentor-dashboard') - p Dashboard + p= data.Dashboard li sib-link(next='mentor-database') - p Resources database + p= data.ResourcesDatabase li sib-link(next='mentor-account') - p My account + p= data.MyAccount li a.logout-button - p Logout \ No newline at end of file + p= data.Logout \ No newline at end of file diff --git a/src/includes/mentor/components/menu.pug b/src/includes/mentor/components/menu.pug index fbf8d64030e52a11b7e07a12f159eaf3b69217f8..8aa5ce809310d6d42ca0725d72051dfc5bc4ca9f 100644 --- a/src/includes/mentor/components/menu.pug +++ b/src/includes/mentor/components/menu.pug @@ -1,4 +1,4 @@ -sib-router(default-route='mentor-resource-list') +sib-router(default-route='mentor-resource-list' route-prefix=lang) sib-route(name='mentor-resource-list') sib-route(name='mentor-account', id-prefix=`${endpoints.users}`, use-id) sib-route(name='mentor-account-edit', id-prefix=`${endpoints.users}`, use-id) diff --git a/src/includes/mentor/dashboard.pug b/src/includes/mentor/dashboard.pug index d34b539a2c3249111eaabe34a9267a0d444f75a5..470065c84dba52aa39d6ddfafb446a56500eccb6 100644 --- a/src/includes/mentor/dashboard.pug +++ b/src/includes/mentor/dashboard.pug @@ -33,11 +33,11 @@ section#home include ./browseDatabase.pug #mentor-resource-create(hidden).no-sidebar.container - sib-link(class="backlink", next="mentor-resource-list") Back to the dashboard + sib-link(class="backlink", next="mentor-resource-list")=`${data.BackToDashboard}` include resources/create.pug #mentor-resource-edit(hidden).no-sidebar.container - sib-link(class="backlink", next="mentor-resource-list") Back to the dashboard + sib-link(class="backlink", next="mentor-resource-list")=`${data.BackToDashboard}` include resources/edit.pug #resource-creation-confirmation(hidden).no-sidebar.container diff --git a/src/includes/mentor/profile/confirmation.pug b/src/includes/mentor/profile/confirmation.pug index d6b5438838ba4d658a28ca7cffe4f87d4add6550..7e318508b877cb04172fab5fd87cf00366583e58 100644 --- a/src/includes/mentor/profile/confirmation.pug +++ b/src/includes/mentor/profile/confirmation.pug @@ -1,9 +1,9 @@ div.container_min - h2.title_lead.fd_bleu Edit your account + h2.title_lead.fd_bleu= data.EditYourAccount -p.p_entete Your modifications have properly been saved. +p.p_entete= data.ModificationsProperlySaved div div.flex h3.button_base - sib-link(next='mentor-resource-list') -> Back to dashboard \ No newline at end of file + sib-link(next='mentor-resource-list')= data.BackToDashboard \ No newline at end of file diff --git a/src/includes/mentor/profile/create.pug b/src/includes/mentor/profile/create.pug index 677dd802b9e7576e7cde75500cc8189f160028cf..318cce1d3aefee711c86c602c6d85a2be743b9b1 100644 --- a/src/includes/mentor/profile/create.pug +++ b/src/includes/mentor/profile/create.pug @@ -8,7 +8,7 @@ figure.logo.img_log img(src="../images/mentor.png" alt="Create a mentor account") -h2.title_create Complete your mentor account +h2.title_create= data.CompleteMentorAccount sib-form#mentor_profile_creation.block_log.block_creat_count( bind-user @@ -23,25 +23,25 @@ sib-form#mentor_profile_creation.block_log.block_creat_count( range-mentor_profile.languages=`${endpoints.languages}` range-mentor_profile.country=`${endpoints.countries}` - label-header_about_you="About you" - label-header_social_media="Social medias" + label-header_about_you=`${data.AboutYou}` + label-header_social_media=`${data.SocialMedias}` widget-header_social_media="cs-section_header" widget-header_about_you="cs-section_introduction" - label-first_name="Surname" - label-last_name="Name" - label-mentor_profile.organisation="Organisation" - label-mentor_profile.phone="Phone number" - label-mentor_profile.languages="Languages" - label-mentor_profile.fields="Fields" - label-account.picture="Photo" - label-mentor_profile.headline="Headline or current position" + label-first_name=`${data.Surname}` + label-last_name=`${data.Name}` + label-mentor_profile.organisation=`${data.Organisation}` + label-mentor_profile.phone=`${data.PhoneNumber}` + label-mentor_profile.languages=`${data.Language}` + label-mentor_profile.fields=`${data.Field}` + label-account.picture=`${data.Photo}` + label-mentor_profile.headline=`${data.Headline}` class-mentor_profile.headline="w_75" - label-mentor_profile.city="City" - label-mentor_profile.country="Country" - label-mentor_profile.biography="Tell us more about your activities" - label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" + label-mentor_profile.city=`${data.City}` + label-mentor_profile.country=`${data.Country}` + label-mentor_profile.biography=`${data.ActivitiesMore}` + label-mentor_profile.skills=`${data.SkillForEntrepreneur}` label-mentor_profile.linkedin="Linkedin" label-mentor_profile.twitter="Twitter" @@ -66,6 +66,6 @@ sib-form#mentor_profile_creation.block_log.block_creat_count( class-account.picture='input_photo w_25' class-headline='w_75' - submit-button="COMPLETE YOUR ACCOUNT" + submit-button=`${data.CompleteYourAccount}` next='mentor-dashboard' ) diff --git a/src/includes/mentor/profile/detail.pug b/src/includes/mentor/profile/detail.pug index bdd0091f92a397942d70aded9c71da6becf520f2..147889288bef207a6ceb811c7a8563967ce809ed 100644 --- a/src/includes/mentor/profile/detail.pug +++ b/src/includes/mentor/profile/detail.pug @@ -1,27 +1,27 @@ include ../../components/widgets div.container_min - h2.title_lead.fd_bleu My Account + h2.title_lead.fd_bleu=`${data.MyAccount}` div.block_list.flex div.button__actions.w_25 div.resources__newresource sib-link(next='mentor-resource-create') div - div.button_base.ico_gauche.ico_plus Post a new Resource + div.button_base.ico_gauche.ico_plus=`${data.PostResource}` div.dashboard__database sib-link(next='mentor-database') - div.button_base.ico_gauche.ico_database Browse database + div.button_base.ico_gauche.ico_database=`${data.BrowseDatabase}` div.dashboard__database sib-link(next='mentor-resource-list') - div.button_base.ico_gauche.ico_search Back to dashboard + div.button_base.ico_gauche.ico_search=`${data.BackToDashboard}` div.dashboard__database div.logout-button.button_base( role='log out' - ) Logout + )=`${data.Logout}` div.profile_information.block_log.w_75 sib-link(next='mentor-account-edit') @@ -41,7 +41,7 @@ div.block_list.flex sib-display.bold( fields="" nested-field="resources" - counter-template="<p>${counter} resource(s) uploaded here</p>" + counter-template=`<p>${counter} ${data.resourcesUploadedHere}</p>` bind-user ) @@ -50,8 +50,8 @@ div.block_list.flex fields='biography_label, mentor_profile.biography, skills_label, mentor_profile.skills' widget-biography_label='cs-display-label' widget-skills_label='cs-display-label' - label-skills_label='Skills:' - label-biography_label='Activities:' + label-skills_label=`${data.Skills}` + label-biography_label=`${data.Activities}` widget-mentor_profile.skills='cs-display-property' widget-mentor_profile.biography='cs-display-property' ) @@ -59,9 +59,9 @@ div.block_list.flex sib-display#mentor_contact( bind-user fields='email, mentor_profile.phone, mentor_profile.linkedin, mentor_profile.twitter' - label-email='Email:' + label-email=`${data.Email}` class-email="contact_profil" - label-mentor_profile.phone='Phone number:' + label-mentor_profile.phone=`${data.PhoneNumber}` class-mentor_profile.phone="contact_profil" widget-email='cs-display-resource-property' widget-mentor_profile.phone='cs-display-resource-property' diff --git a/src/includes/mentor/profile/edit.pug b/src/includes/mentor/profile/edit.pug index 198a850a3b35ce05fb54806682eb33c30e7e4f1a..71402553350b961983f41668d19d6120795467c8 100644 --- a/src/includes/mentor/profile/edit.pug +++ b/src/includes/mentor/profile/edit.pug @@ -1,6 +1,6 @@ include ../../components/widgets -h2.title_create Edit your account +h2.title_create= data.EditYourAccount sib-form#mentor_profile_edition.block_log.block_creat_count( bind-user @@ -14,25 +14,25 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( range-mentor_profile.organisation=`${endpoints.organisations}` range-mentor_profile.languages=`${endpoints.languages}` - label-header_about_you="About you" - label-header_social_media="Social medias" + label-header_about_you=`${data.AboutYou}` + label-header_social_media=`${data.AboutYou}` widget-header_social_media="cs-section_header" widget-header_about_you="cs-section_introduction" - label-first_name="Surname" - label-last_name="Name" - label-mentor_profile.organisation="Organisation" - label-mentor_profile.phone="Phone number" - label-mentor_profile.languages="Languages" - label-mentor_profile.fields="Fields" - label-account.picture="Photo" - label-mentor_profile.headline="Headline or current position" + label-first_name=`${data.Surname}` + label-last_name=`${data.Name}` + label-mentor_profile.organisation=`${data.Organisation}` + label-mentor_profile.phone=`${data.PhoneNumber}` + label-mentor_profile.languages=`${data.Language}` + label-mentor_profile.fields=`${data.Field}` + label-account.picture=`${data.Photo}` + label-mentor_profile.headline=`${data.Headline}` class-mentor_profile.headline="w_75" - label-mentor_profile.city="City" - label-mentor_profile.country="Country" - label-mentor_profile.biography="Tell us more about your activities" - label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" + label-mentor_profile.city=`${data.City}` + label-mentor_profile.country=`${data.Country}` + label-mentor_profile.biography=`${data.ActivitiesMore}` + label-mentor_profile.skills=`${data.SkillForEntrepreneur}` label-mentor_profile.linkedin="Linkedin" label-mentor_profile.twitter="Twitter" @@ -57,9 +57,9 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( class-account.picture='input_photo w_25' class-headline='w_75' - submit-button="Save modifications" + submit-button=`${data.SaveModification}` next="mentor-account-edit-confirmation" ) -sib-link(class="backlink", next="mentor-account") Back to my account -sib-link(class="backlink", next="mentor-resource-list") Back to the dashboard +sib-link(class="backlink", next="mentor-account")= data.BackToMyAccount +sib-link(class="backlink", next="mentor-resource-list")= data.BackToDashboard diff --git a/src/includes/mentor/resources/confirmation-deletion.pug b/src/includes/mentor/resources/confirmation-deletion.pug index 93cfb47cea3c6e1ee99bd676d8322f8b17021fea..17d7e94ab6ba982ffe6d5b44a7200088f330e656 100644 --- a/src/includes/mentor/resources/confirmation-deletion.pug +++ b/src/includes/mentor/resources/confirmation-deletion.pug @@ -4,9 +4,9 @@ p i.fas.fa-times - h2.title_lead_avenir Delete a resource - p Are you sure you want to delete this resource ? + h2.title_lead_avenir=`${data.DeleteResource}` + p=`${data.AreYouSureDelete}` sib-delete( - data-label="Yes I am sure, delete " + data-label=`${data.YesSureDelete}` bind-resources ) diff --git a/src/includes/mentor/resources/confirmation-status-change.pug b/src/includes/mentor/resources/confirmation-status-change.pug index b4c9ebf06122c05352820691b5e69dd620cdb683..27d35a14b464bfb8a6f78eddc716b71a76c44f74 100644 --- a/src/includes/mentor/resources/confirmation-status-change.pug +++ b/src/includes/mentor/resources/confirmation-status-change.pug @@ -6,13 +6,13 @@ include ../../components/widgets p i.fas.fa-times - h2.title_lead_avenir Are you sur you want to archive this request ? + h2.title_lead_avenir=`${data.AreYouSurArchive}` sib-form#change_status_request( bind-resources fields='button(status, name, description, skills, reviewer)' value-status = "validated" widget-button = "hidden-widget" - submit-button = "Archive this request" + submit-button =`${data.ArchivethisRequest}` next="mentor-resource-list" ) diff --git a/src/includes/mentor/resources/confirmation.pug b/src/includes/mentor/resources/confirmation.pug index 5c2c310e8acdd87fc0f5ec8db87c9cc4be9d4d9e..e0b347a3df8ca9a47d02b9e158151be6c5c46994 100644 --- a/src/includes/mentor/resources/confirmation.pug +++ b/src/includes/mentor/resources/confirmation.pug @@ -1,5 +1,5 @@ div.container_min - h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs + h2.title_lead.fd_bleu=`${data.generalLabel}` sib-router sib-route(name='resource-validation-process-confirmation') @@ -8,11 +8,11 @@ dialog#resource-validation-process-confirmation.no-sidebar include ../validation-process.pug div.block_list - h2.title_lead_avenir Post a resource + h2.title_lead_avenir=`${data.PostResource}` - p.p_entete Thank you for enriching our database ! + p.p_entete=`${data.ThankYouEnrichingDatabase}` - p.p_entete Once one of your pair, a fellow mentor, validate your resource, it will be published online and we will send you a notification. + p.p_entete=`${data.ThanksMsg}` div p.flex @@ -20,4 +20,4 @@ div.block_list div.flex h3.button_base - sib-link(next='mentor-resource-list') -> Back to dashboard \ No newline at end of file + sib-link(next='mentor-resource-list')=`${data.BackToDashboard}` \ No newline at end of file diff --git a/src/includes/mentor/resources/create.pug b/src/includes/mentor/resources/create.pug index b45c0ea5c8e1aebf3ed4b36fcbe05ffbb6927798..ba098a3ca91e163e6d1daf21c1658b26b9cae38a 100644 --- a/src/includes/mentor/resources/create.pug +++ b/src/includes/mentor/resources/create.pug @@ -1,8 +1,8 @@ include ../../components/widgets -h2.title_lead_avenir Post a resource +h2.title_lead_avenir=`${data.PostResource}` -p.p_entete Thank you for enriching our database ! +p.p_entete=`${data.ThankYouEnrichingDatabase}` .block_log.block_creat_count sib-form#resource-creation-form( @@ -27,33 +27,33 @@ p.p_entete Thank you for enriching our database ! range-related=`${endpoints.resources}` range-country=`${endpoints.countries}` - label-header_mandatory='Mandatory information' - label-header_complementary='Complementary information' - label-header_classification='Classification' - label-header_access='Access' - label-header_related='Related resources' - - label-name='Title*' - label-country='Country*' - label-language='Language*' - label-uri='Location/weblink*' - label-format='Format*' - label-fields='Field*' - label-author='Resource author*' - label-publication_year='Year of publication*' - label-skills='Learning outcomes, skills*' - label-description='Description' - label-iframe_link='For videos, report iframe link' - label-preview_image='Upload preview image' - label-tags='Add tags' + label-header_mandatory=`${data.MandatoryInformation}` + label-header_complementary=`${data.ComplementaryInformation}` + label-header_classification=`${data.Classification}` + label-header_access=`${data.Access}` + label-header_related=`${data.RelatedResources}` + + label-name=`${data.TitleRequired}` + label-country=`${data.Country}` + label-language=`${data.Language}` + label-uri=`${data.LocationWeblinkReq}` + label-format=`${data.FormatReq}` + label-fields=`${data.FieldRequired}` + label-author=`${data.AuthorReq}` + label-publication_year=`${data.DatePublication}` + label-skills=`${data.SkillReq}` + label-description=`${data.Description}` + label-iframe_link=`${data.IframeLink}` + label-preview_image=`${data.UploadPreviewImage}` + label-tags=`${data.AddTags}` - label-target='Resource target*' - label-type='Type of content*' - label-steps='Categorisation*' + label-target=`${data.ResourceTargetReq}` + label-type=`${data.TypeContentReq}` + label-steps=`${data.CategorisationReq}` - label-sharing='Share with*' + label-sharing=`${data.ShareWithReq}` - label-related='Add a resource' + label-related=`${data.AddResource}` multiple-fields='sib-multiple-select' widget-fields='sib-form-auto-completion' @@ -81,6 +81,6 @@ p.p_entete Thank you for enriching our database ! widget-preview_image='cs-form-file-custom' class-preview_image='input_photo w_25' - submit-button='Send for validation ->' + submit-button=`${data.SendForValidation}` next="resource-creation-confirmation" ) \ No newline at end of file diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index cf20f6a78515dd973cbcb056b19221595ccf3042..b978db2a7d3c76e5dc72971c4cdc9693dff4283b 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -7,7 +7,8 @@ include ../../components/widgets i.fas.fa-times div#detail-mentor-loader - hidden Loading the resource, please wait... + hidden + i.fas.fa-spinner.fa-spin sib-display#detail-mentor( loader-id="detail-mentor-loader" @@ -47,30 +48,30 @@ include ../../components/widgets class-review.reviewer.name="validator_ressource" widget-header_specifications='cs-section_header' - label-broken='Report broken link' - label-sharing='Access:' - label-language.name='Language:' - label-publication_year='Year of publication:' - label-header_specifications='Resource specifications' + label-broken=`${data.ReportBrokenLink}` + label-sharing=`${data.Access}` + label-language.name=`${data.Language}` + label-publication_year=`${data.DatePublication}` + label-header_specifications=`${data.ResourceSpecifications}` label-format.name='' widget-steps='cs-display-step-property' label-steps='' - each-label-steps="Step" + each-label-steps=`${data.Step}` multiple-steps widget-fields='cs-display-multiple-property' label-fields='' - each-label-fields='Field:' + each-label-fields=`${data.Field}` multiple-fields - label-skills='With this resource, you will be able to:' - label-uri='Link to resource' + label-skills=`${data.WithThisResourceBeAbleTo}` + label-uri=`${data.LinkToResource}` name-uri='original-link' - label-country='Country:' - label-submitter.mentor_profile.organisation.name='Organisation:' - label-author='Author :' - label-submitter.name='Resource posted by:' + label-country=`${data.Country}` + label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-author=`${data.Author}` + label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-mentor' ) @@ -98,7 +99,7 @@ include ../../components/widgets bind-resources fields="" nested-field="conversations" - counter-template="<p>Comments (${counter})</p>" + counter-template=`<p>${data.Comments} (${counter})</p>` ) sib-conversation( @@ -106,7 +107,7 @@ include ../../components/widgets id-suffix="conversations" ) - h2.title_lead_avenir Related resources + h2.title_lead_avenir=`${data.RelatedResources}` sib-display( bind-resources, diff --git a/src/includes/mentor/resources/edit.pug b/src/includes/mentor/resources/edit.pug index 70fb42a71cd05c53c6d9c0cfc88983715f3aaa28..739e6cd3f58ecdc40681778415b8bc951663db2d 100644 --- a/src/includes/mentor/resources/edit.pug +++ b/src/includes/mentor/resources/edit.pug @@ -1,8 +1,8 @@ include ../../components/widgets -h2.title_lead_avenir Edit this resource +h2.title_lead_avenir=`${data.EditResource}` -p.p_entete Thank you for enriching our database ! +p.p_entete=`${data.ThankYouEnrichingDatabase}` .block_log.block_creat_count sib-form( @@ -27,33 +27,33 @@ p.p_entete Thank you for enriching our database ! range-related=`${endpoints.resources}` range-country=`${endpoints.countries}` - label-header_mandatory='Mandatory information' - label-header_complementary='Complementary information' - label-header_classification='Classification' - label-header_access='Access' - label-header_related='Related resources' - - label-name='Title*' - label-country='Country*' - label-language='Language*' - label-uri='Location/weblink*' - label-format='Format*' - label-field='Field*' - label-author='Resource author*' - label-publication_year='Year of publication*' - label-skills='Learning outcomes, skills*' - label-description='Description' - label-iframe_link='For videos, report iframe link' - label-preview_image='Upload preview image' - label-tags='Add tags' + label-header_mandatory=`${data.MandatoryInformation}` + label-header_complementary=`${data.ComplementaryInformation}` + label-header_classification=`${data.Classification}` + label-header_access=`${data.Access}` + label-header_related=`${data.RelatedResources}` + + label-name=`${data.TitleRequired}` + label-country=`${data.Country}` + label-language=`${data.Language}` + label-uri=`${data.LocationWeblinkReq}` + label-format=`${data.FormatReq}` + label-fields=`${data.FieldRequired}` + label-author=`${data.AuthorReq}` + label-publication_year=`${data.DatePublication}` + label-skills=`${data.SkillReq}` + label-description=`${data.Description}` + label-iframe_link=`${data.IframeLink}` + label-preview_image=`${data.UploadPreviewImage}` + label-tags=`${data.AddTags}` - label-target='Resource target*' - label-type='Type of content*' - label-steps='Categorisation*' + label-target=`${data.ResourceTargetReq}` + label-type=`${data.TypeContentReq}` + label-steps=`${data.CategorisationReq}` - label-sharing='Share with*' + label-sharing=`${data.ShareWithReq}` - label-related='Add a resource' + label-related=`${data.AddResource}` widget-country='sib-form-auto-completion' @@ -82,6 +82,6 @@ p.p_entete Thank you for enriching our database ! widget-preview_image='cs-form-file-custom' class-preview_image='input_photo w_25' - submit-button='Send for validation ->' + submit-button=`${data.SendForValidation}` next="resource-creation-confirmation" ) \ No newline at end of file diff --git a/src/includes/mentor/resources/list.pug b/src/includes/mentor/resources/list.pug index b6bb4bb154279adab61b1a75894565f000f6c993..1129599be190b542628a7d25a43c7ab1e456171d 100644 --- a/src/includes/mentor/resources/list.pug +++ b/src/includes/mentor/resources/list.pug @@ -15,8 +15,8 @@ dialog#confirm_status_change.no-sidebar include ./confirmation-status-change div.container_min - h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs - button.button_dark.pull-right Watch the presentation + h2.title_lead.fd_bleu=`${data.generalLabel}` + button.button_dark.pull-right=`${data.WatchThePresentation}` i.far.fa-play-circle div.block_list @@ -24,19 +24,19 @@ div.block_list div.resources__newresource sib-link(next='mentor-resource-create') div - div.button_base.ico_gauche.ico_plus Post a new Resource + div.button_base.ico_gauche.ico_plus=`${data.PostResource}` div.dashboard__database sib-link(next='mentor-database') - div.button_base.ico_gauche.ico_database Browse database + div.button_base.ico_gauche.ico_database=`${data.BrowseDatabase}` div.tabs div(class='tablink', onclick="openTab('reviews', this)") - h2 Resources requesting validation + h2=`${data.ResourcesRequestingValidation}` div(class='tablink', onclick="openTab('requests', this)") - h2 Requested resources + h2=`${data.RequestedResources}` div(class='tablink', onclick="openTab('history', this)", id='defaultOpen') - h2 History of your resources + h2=`${data.HistoryResources}` div.block_log.block_list @@ -109,7 +109,7 @@ div.block_list search-range-fields=`${endpoints.fields}` search-range-country=`${endpoints.countries}` - search-label-search_for_a_resource="Search by name..." + search-label-search_for_a_resource=`${data.SearchByNam}` search-widget-search_for_a_resource="sib-form-placeholder-text" widget-search_for_a_resource="hidden-widget" @@ -127,22 +127,22 @@ div.block_list search-widget-header_criterias="cs-section_header" search-label-header_criterias="More criterias" - search-label-format='Format' - search-label-publication_year='Year of publication' - search-label-country='Country of publication' - search-label-language='Language' - search-label-fields='Field' + search-label-format=`${data.Format}` + search-label-publication_year=`${data.DatePublication}` + search-label-country=`${data.CountryPublication}` + search-label-language=`${data.Language}` + search-label-fields=`${data.Field}` class-name="tit_element_list" widget-format.name='cs-display-resource-property' - label-format.name='Format:' + label-format.name=`${data.Format}` class-format.name="contenu_list" class-publication_year="contenu_list" widget-publication_year='cs-display-resource-property' - label-publication_year='Date of publication:' + label-publication_year=`${data.DatePublication}` class-content='content__left' class-actions='actions__right' diff --git a/src/includes/mentor/resources/resource-report-broken-link-mentor.pug b/src/includes/mentor/resources/resource-report-broken-link-mentor.pug index b2f1207b96403bb312e268d5390adc4bfe4b467a..b41423b95f7e480e266b10e2d7a900e5fe75322e 100644 --- a/src/includes/mentor/resources/resource-report-broken-link-mentor.pug +++ b/src/includes/mentor/resources/resource-report-broken-link-mentor.pug @@ -4,8 +4,8 @@ p i.fas.fa-times - h2.title_lead_avenir Thanks! - p The submitter of the resource will be advised that this link is broken. + h2.title_lead_avenir=`${data.Thanks}` + p=`${data.ConfirmSendBrokenLink}` sib-form#report-broken-link-mentor( data-src=`${endpoints.brokenlinks}` fields = "resource, submitter" diff --git a/src/includes/mentor/resources/validate.pug b/src/includes/mentor/resources/validate.pug index 3b1fee99dd110bcbcb942dff8a9918074f87d380..ce160a326ddf13d9a8b7d41230bae9d9578d2707 100644 --- a/src/includes/mentor/resources/validate.pug +++ b/src/includes/mentor/resources/validate.pug @@ -12,7 +12,8 @@ sib-router i.fas.fa-times div#detail-validation-loader - hidden Loading the resource, please wait... + hidden + i.fas.fa-spinner.fa-spin sib-display( loader-id="detail-validation-loader" @@ -48,30 +49,30 @@ sib-router widget-preview_image='cs-preview-picture' widget-header_specifications='cs-section_header' - label-broken='Report broken link' - label-sharing='Access:' - label-language.name='Language:' - label-publication_year='Year of publication:' - label-header_specifications='Resource specifications' + label-broken=`${data.ReportBrokenLink}` + label-sharing=`${data.Access}` + label-language.name=`${data.Language}` + label-publication_year=`${data.DatePublication}` + label-header_specifications=`${data.ResourceSpecifications}` label-format.name='' widget-steps='cs-display-step-property' label-steps='' - each-label-steps="Step" + each-label-steps=`${data.Step}` multiple-steps widget-fields='cs-display-multiple-property' label-fields='' - each-label-fields='Field:' + each-label-fields=`${data.Field}` multiple-fields - label-skills='With this resource, you will be able to:' - label-uri='Link to resource' + label-skills=`${data.WithResourceAbleTo}` + label-uri=`${data.LinkToResource}` name-uri='original-link' - label-country.name='Country:' - label-submitter.mentor_profile.organisation.name='Organisation:' - label-author='Author :' - label-submitter.name='Resource posted by:' + label-country.name=`${data.Country}` + label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-author=`${data.Author}` + label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-mentor' ) @@ -81,7 +82,7 @@ sib-router fields='improve' widget-improve='sib-action' - label-improve='Require improvement' + label-improve=`${data.RequireImprovement}` action-improve='improvement-dialog' class-improve='button_base' ) @@ -92,7 +93,7 @@ sib-router fields='refuse' widget-refuse='sib-action' - label-refuse='Report as inappropriate' + label-refuse=`${data.ReportInappropriate}` action-refuse='refusal-dialog' class-refuse='button_base' ) @@ -104,45 +105,45 @@ sib-router widget-reviewer='sib-form-hidden' widget-status='sib-form-hidden' value-status='validated' - submit-button='Validate' + submit-button=`${data.Validate}` next='review-submission-confirmation' ) dialog#refusal-dialog - h2.title_lead Report as inappropriate + h2.title_lead=`${data.ReportInappropriate}` sib-form#refusal-dialog-form( bind-resources nested-field='review' fields='comment, status, reviewer', - label-comment='Explain reasons of refusal*' + label-comment=`${data.ExplainReasonsRefusal}` widget-comment='sib-form-textarea' widget-reviewer='sib-form-hidden' widget-status='sib-form-hidden' value-status='inappropriate' - submit-button='Send ->' + submit-button=`${data.Send}` next='review-submission-confirmation' ) dialog#improvement-dialog - h2.title_lead Suggest improvement + h2.title_lead=`${data.SuggestImprovement}` sib-form#improvement-dialog-form( bind-resources nested-field='review' fields='comment, status, reviewer', - label-comment='Explain improvement required*' + label-comment=`${data.ExplainImprovementRequired}` widget-reviewer='sib-form-hidden' widget-comment='sib-form-textarea' widget-status='sib-form-hidden' value-status='to_improve' - submit-button='Send ->' + submit-button=`${data.Send}` next='review-submission-confirmation' ) dialog#review-submission-confirmation - h2.title_lead_avenir Thanks for your review - p.flex The submitter of the resource will now receive a notification of your review. - p.flex He will then be able to patch and send back the resource to validation + h2.title_lead_avenir=`${data.ThanksForReview}` + p.flex=`${data.SubmitterWillReceiveReview}` + p.flex=`${data.HeWillPatch}` p.flex - sib-link(next='mentor-resource-list', class='button_base') Back to dashboard \ No newline at end of file + sib-link(next='mentor-resource-list', class='button_base')=`${data.BackToDashboard}` \ No newline at end of file diff --git a/src/includes/mentor/validation-process.pug b/src/includes/mentor/validation-process.pug index 64b2a5f9411d0d43bc1b4a8f6e9cd8959cb62ed2..008fb788dcfba36b6ed4d531d3d5ff82b73e95c9 100644 --- a/src/includes/mentor/validation-process.pug +++ b/src/includes/mentor/validation-process.pug @@ -2,30 +2,30 @@ div.block_log.block_creat_count.no_shadow sib-link(class="backlink", next="mentor-resource-list") i.fas.fa-times div#validation-process - h2 What is a validation process ? + h2=`${data.WhatValidationProcess}` div.flex.w_100 figure.w_50 img( src="../images/valid_1.png" alt="") - figcaption.w_75 Mentor upload a resource to the database + figcaption.w_75=`${data.MentorUploadResourceToDatabase}` figure.w_50 img( src="../images/valid_2.png" alt="") - figcaption.w_75 Resource is sent to qualified peers for validation + figcaption.w_75=`${data.ResourceSentToQualifiedPeersForValidation}` figure.w_33 img( src="../images/valid_3.png" alt="") - figcaption.w_75 Resource is validated and becomes available in the database + figcaption.w_75=`${data.ResourceBecomesAvailableInDatabase}` figure.w_33 img( src="../images/valid_4.png" alt="") - figcaption.w_75 Resource is not validated and improvement is siggested. You get a list of improvement, can edit ans re-load the resource. It goes to validation process again.L0 + figcaption.w_75=`${data.ResourceIsNotValidated}` figure.w_33 img( src="../images/valid_5.png" alt="") - figcaption.w_75 Resource is reported inapropriate. You get a notification with a message from your peer explaning why. + figcaption.w_75=`${data.ResourceReportedInapropriate}` \ No newline at end of file diff --git a/src/includes/public/components/header.pug b/src/includes/public/components/header.pug index dcd974cb5ba4906aaecfa5cd44d38c7b06c45470..dd4fd78f828e80818f6dd91ef55836293adfe212 100644 --- a/src/includes/public/components/header.pug +++ b/src/includes/public/components/header.pug @@ -7,7 +7,7 @@ include menu.pug div.flex.flex_espace.flex_item_center - sib-form( + sib-form.languageChoic( data-src=`${endpoints.languages}` fields='languages' range-languages=`${endpoints.languages}` diff --git a/src/includes/public/resources/detail.pug b/src/includes/public/resources/detail.pug index 84d387e03b90f74ca5897bca30bcd5c221b4e81d..5d14346438f70026cac312394162edad5c7aa967 100644 --- a/src/includes/public/resources/detail.pug +++ b/src/includes/public/resources/detail.pug @@ -47,31 +47,31 @@ include ../../components/widgets class-review.reviewer.name="validator_ressource" widget-header_specifications='cs-section_header' - label-broken='Report broken link' - label-sharing='Access:' - label-language.name='Language:' - label-publication_year='Year of publication:' - label-header_specifications='Resource specifications' + label-broken=`${data.ReportBrokenLink}` + label-sharing=`${data.Access}` + label-language.name=`${data.Language}` + label-publication_year=`${data.DatePublication}` + label-header_specifications=`${data.ResourceSpecifications}` label-format.name='' class-format.name='format_type' widget-steps='cs-display-step-property' label-steps='' - each-label-steps="Step" + each-label-steps=`${data.Step}` multiple-steps widget-fields='cs-display-multiple-property' label-fields='' - each-label-fields='Field:' + each-label-fields=`${data.Field}` multiple-fields - label-skills='With this resource, you will be able to:' - label-uri='Link to resource' + label-skills=`${data.WithThisResourceBeAbleTo}` + label-uri=`${data.LinkToResource}` name-uri='original-link' - label-country.name='Country:' - label-submitter.mentor_profile.organisation.name='Organisation:' - label-author='Author :' - label-submitter.name='Resource posted by:' + label-country=`${data.Country}` + label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-author=`${data.Author}` + label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-public' ) @@ -99,7 +99,7 @@ include ../../components/widgets bind-resources fields="" nested-field="conversations" - counter-template="<p>Comments (${counter})</p>" + counter-template=`<p>${data.Comments} (${counter})</p>` ) sib-conversation( @@ -107,7 +107,7 @@ include ../../components/widgets id-suffix="conversations" ) - h2.title_lead_avenir Related resources + h2.title_lead_avenir=`${data.RelatedResources}` sib-display( bind-resources, diff --git a/src/includes/public/resources/list.pug b/src/includes/public/resources/list.pug index 4bcbb62babcb6df368eac1047208ad30b67fdb14..c8251099c32f182102df2c26f4bf13f557b724cf 100644 --- a/src/includes/public/resources/list.pug +++ b/src/includes/public/resources/list.pug @@ -7,14 +7,14 @@ dialog#resource-report-broken-link-public include ./resource-report-broken-link-public div.container_min - h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs - button.button_dark.pull-right Watch the presentation + h2.title_lead.fd_bleu=`${data.generalLabel}` + button.button_dark.pull-right=`${data.WatchThePresentation}` i.far.fa-play-circle container.block_list.flex.flex_espace div.w_75.block-g-entre div - h2.title_form Search for a resource + h2.title_form=`${data.SearchForResource}` div#public-resources-loader hidden i.fas.fa-spinner.fa-spin @@ -22,14 +22,14 @@ container.block_list.flex.flex_espace data-src=`${endpoints.resources}`, loader-id="public-resources-loader" fields='keyword(name_keyword)' - label-name_keyword="Search by name..." + label-name_keyword=`${data.SearchByNam}` widget-name_keyword="sib-form-placeholder-text" naked ) div.keyword_submit.button__actions - div.button_base.ico_gauche Search + div.button_base.ico_gauche=`${data.Search}` sib-form.instance_database_only( data-src=`${endpoints.resources}`, @@ -42,12 +42,12 @@ container.block_list.flex.flex_espace sib-form.more_criterias.flex.flex_espace( data-src=`${endpoints.resources}`, fields='header_criterias, format, publication_year, country, language, fields' - label-header_criterias='More criterias' - label-format='Format:' - label-publication_year='Year of publication' - label-country='Country of publication' - label-language='Language' - label-fields='Field' + label-header_criterias=`${data.Search}` + label-format=`${data.Format}` + label-publication_year=`${data.DatePublication}` + label-country=`${data.CountryPublication}` + label-language=`${data.Language}` + label-fields=`${data.Field}` widget-header_criterias='cs-section_header' range-language=`${endpoints.languages}` @@ -100,7 +100,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion active" - label-name ='Step 1 ' + label-name =`${data.Step} 1 ` label-resources='' widget-name='cs-steps-header' @@ -156,7 +156,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 2 ' + label-name =`${data.Step} 2 ` label-resources='' widget-name='cs-steps-header' @@ -212,7 +212,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 3 ' + label-name =`${data.Step} 3 ` label-resources='' widget-name='cs-steps-header' @@ -268,7 +268,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 4 ' + label-name =`${data.Step} 4 ` label-resources='' widget-name='cs-steps-header' @@ -325,7 +325,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 5 ' + label-name =`${data.Step} 5 ` label-resources='' widget-name='cs-steps-header' @@ -380,7 +380,7 @@ container.block_list.flex.flex_espace fields='name' class="accordion" - label-name ='Step 6 ' + label-name =`${data.Step} 6 ` label-resources='' widget-name='cs-steps-header' diff --git a/src/includes/public/resources/resource-report-broken-link-public.pug b/src/includes/public/resources/resource-report-broken-link-public.pug index b2ffd7531735a96505a40a37a1cdbf31d5b3b02c..8b7f94fb8511fec0f94807473abd88c91c03c8cd 100644 --- a/src/includes/public/resources/resource-report-broken-link-public.pug +++ b/src/includes/public/resources/resource-report-broken-link-public.pug @@ -4,8 +4,8 @@ p i.fas.fa-times - h2.title_lead_avenir Thanks! - p The submitter of the resource will be advised that this link is broken. + h2.title_lead_avenir=`${data.Thanks}` + p=`${data.ConfirmSendBrokenLink}` sib-form#report-broken-link-public( data-src=`${endpoints.brokenlinks}` fields = "resource, submitter" diff --git a/src/includes/splash.pug b/src/includes/splash.pug index be3106e6993fff407e1bbe21ca2456a9b170c924..23f0b1a8fe6c27a2952e707b468e698d2d8b68b2 100644 --- a/src/includes/splash.pug +++ b/src/includes/splash.pug @@ -4,7 +4,7 @@ sib-router(default-route='splash-index') figure(class="logo") img(src="../images/logo.png" alt="Coopstarter logo") -h2.title_lead Welcome to our international index of resources for cooperative mentors and entrepreneurs +h2.title_lead=`${data.welcome}` #splash-index(hidden).no-sidebar.block_log.flex.loggin figure.img_log @@ -12,9 +12,9 @@ h2.title_lead Welcome to our international index of resources for cooperative me alt="Connect as mentor") cs-login(bind-user) - button#mentor_login.button_base Connect to the knowledge base + button#mentor_login.button_base=`${data.ConnectKnowledgeBase}` sib-link(next='public-dashboard') - button#public-acces.button_base Access without registration + button#public-acces.button_base=`${data.AccessWithoutRegistration}` \ No newline at end of file diff --git a/src/index.pug b/src/index.pug index 20604cd66059d2a1260247cafb7a3a7d153d64af..fa56f8928be8bb64bb5beac88a61823f4c6316ff 100644 --- a/src/index.pug +++ b/src/index.pug @@ -2,7 +2,7 @@ doctype html html include includes/head.pug - sib-router(default-route='splash') + sib-router(default-route='splash' route-prefix=lang) sib-route(name='splash') sib-route(name='account-creation') sib-route(name='mentor-dashboard') @@ -56,7 +56,7 @@ script(type='module'). ); } user = await store.get(user); - + if (user && user.mentor_profile) { window.dispatchEvent( new CustomEvent('requestNavigation', { detail: { route: 'mentor-dashboard' } }) diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 0312cf457fad3984efc34ca292f5e3d7e70e53c7..bed5c99e10cfe98531f44874380aba7050aff864 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -325,6 +325,38 @@ function manageLogoutButton() { } } + +/** + * Manage the select language + */ +function manageSelectLanguage() { + const languageSelects = document.getElementsByClassName("languageChoice") + for (let item of languageSelects) { + item.addEventListener("change", function() { + //We listen the selected option for the language + uriLanguge = item.querySelector("option:checked").value + + //We retrieve element of the url + var pathAfterThePrefix = window.location.pathname.split('/')[2]; + var base_url = location.host + + //If the selected language is french + if (uriLanguge === '{"@id": "http://localhost:8000/languages/1/"}') { + //Redirection with the appropriate prefixe. + var redirect = "http://"+base_url+'/fr/'+pathAfterThePrefix + + document.location.href = redirect + } else { + var redirect = "http://"+base_url+'/en/'+pathAfterThePrefix + document.location.href = redirect + + } + + }) + } + +} + /** * Initi the custom form file behaviour * Todo : we can improve the performance adding param to reduce the loop @@ -589,6 +621,9 @@ jQuery(document).ready(function($) { //Manage the logout action manageLogoutButton(); + //Manage the select language + manageSelectLanguage(); + /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX MENTOR DASHBOARD XXXXXXXXXXXXXXXXXXXX diff --git a/translation/en.yml b/translation/en.yml new file mode 100644 index 0000000000000000000000000000000000000000..474b04d2f325f124ec620839c733962cf724529f --- /dev/null +++ b/translation/en.yml @@ -0,0 +1,116 @@ +--- +Dashboard : Dashboard +ResourcesDatabase : Resources database +MyAccount : My account +Logout : Logout +BackToDashboard : -> Back to dashboard +BackToMyAccount : Back to my account +welcome : Welcome to our international index of resources for cooperative mentors and entrepreneurs +generalLabel : International index of resources for cooperative mentors and entrepreneurs +PostResource: Post a new Resource +BrowseDatabase: Browse database +ResourcesRequestingValidation: Resources requesting validation +RequestedResources: Requested resources +HistoryResources : History of your resources +ConnectKnowledgeBase : Connect to the knowledge base +AccessWithoutRegistration : Access without registration +SearchByNam : Search by name.. +MoreCriterias : More criterias +Language : Language +CountryPublication : Country of publication +Photo: Avatar +Field : Field +Refused : Refused +DatePublication : Date of publication +Format: Format +Step: Step +ResourcePostedBy : Resource posted by +WithResourceAbleTo : With this resource, you will be able to +LinkToResource : Link to resource +ReportBrokenLink : Report broken link +ResourceValidatedBy : Resource validated by +ResourceSpecifications : Resource specifications +Author : Author +Access : Access +Comments : Comments +RelatedResources : Related resources +resourcesUploadedHere : resource(s) uploaded here +Activities : Activities +Skills : Skills +PhoneNumber : Phone number +Email: Email +EditYourAccount : Edit your account +Name : Name +Surname : Surname +AboutYou : About you +Organisation: Organisation +EditAbout : Informations will appear on your profile to inform entrepreneurs about your skills and activities. We will also use those information to address specific resources for validation. +Headline : Headline or current position +City : City +Country : Country +ActivitiesMore : Tell us more about your activities +SkillForEntrepreneur : What skills can you share with our entrepreneurs ? +SocialMedias : Social medias +SaveModification : Save modifications +Search : Search +ModificationsProperlySaved: Your modifications have properly been saved. +CompleteMentorAccount : Complete your mentor account +CompleteEntrepreneurAccount : Complete your entrepreneur account +CompleteYourAccount : COMPLETE YOUR ACCOUNT +RequestRessource : Request a ressource +RequestRessourceInfo : You can't find a resource you are looking for ? You need resources to acquire certain skills or progress in your cooperative developement ? It can be a book, a document model, a tutorial, anything you need, make a request to our mentors so they know how to help you. +TitleRequired : Title* +Description : Description +FieldRequired: Field* +SkillToLearn : What do you need to learn with this resource ? +SendRequest : Send request +MandatoryInformation : Mandatory information +ComplementaryInformation : Complementary information +WithThisResourceBeAbleTo : With this resource, you will be able to +WatchThePresentation : Watch the presentation +SearchForResource : Search for a resource +CantFindRessourceYouNeed : Can't find the ressource you need ? +MakeRequest: Make a request +Thanks : Thanks! +ConfirmSendBrokenLink : The submitter of the resource will be advised that this link is broken. +YouRequestHasBeenSubmitted : Your request has been submitted +WhatValidationProcess : What is a validation process ? +MentorUploadResourceToDatabase: Mentor upload a resource to the database +ResourceSentToQualifiedPeersForValidation : Resource is sent to qualified peers for validation +ResourceBecomesAvailableInDatabase: Resource is validated and becomes available in the database +ResourceIsNotValidated: Resource is not validated and improvement is siggested. You get a list of improvement, can edit ans re-load the resource. It goes to validation process again. +ResourceReportedInapropriate: Resource is reported inapropriate. You get a notification with a message from your peer explaning why. +DeleteResource: Delete a resource +AreYouSureDelete: Are you sure you want to delete this resource ? +YesSureDelete : Yes I am sure, delete +AreYouSurArchive: Are you sur you want to archive this request ? +ArchivethisRequest: Archive this request +ThankYouEnrichingDatabase : Thank you for enriching our database ! +ThanksMsg: Once one of your pair, a fellow mentor, validate your resource, it will be published online and we will send you a notification. +Classification : Classification +FormatReq: Format* +LocationWeblinkReq: Location/weblink* +AuthorReq : Resource author* +SkillReq : Learning outcomes, skills* +IframeLink: For videos, report iframe link +UploadPreviewImage: Upload preview image +AddTags: Add tags +ResourceTargetReq: Resource target* +TypeContentReq: Type of content* +CategorisationReq: Categorisation* +ShareWithReq: Share with* +AddResource: Add a resource +SendForValidation : Send for validation -> +EditResource : Edit this resource +RequireImprovement: Require improvement +ReportInappropriate: Report as inappropriate +Validate: Validate +Send: Send -> +SuggestImprovement: Suggest improvement +ExplainImprovementRequired: Explain improvement required* +ThanksForReview: Thanks for your review +SubmitterWillReceiveReview.: The submitter of the resource will now receive a notification of your review. +HeWillPatch : He will then be able to patch and send back the resource to validation +ExplainReasonsRefusal: Explain reasons of refusal* +IAmMentor: I am a mentor +IAmEntrepreneur: I am an entrepreneur \ No newline at end of file diff --git a/translation/fr.yml b/translation/fr.yml new file mode 100644 index 0000000000000000000000000000000000000000..2e78a58824c607095befcfda17ce11a0d7f109e8 --- /dev/null +++ b/translation/fr.yml @@ -0,0 +1,110 @@ +--- +Dashboard : Tableau de board +ResourcesDatabase : Base de donnée de ressource +MyAccount : Mon compte +Logout : Déconnexion +BackToDashboard : Retour au tableau de bord +BackToMyAccount : Retour à mon compte +welcome : Bienvenue dans notre répertoire international de ressources pour les mentors et les entrepreneurs coopératifs. +generalLabel : Index international de ressources pour les mentors et les entrepreneurs coopératifs +PostResource: Poster une nouvelle ressource +BrowseDatabase: Rechercher dans la base de donnée +ResourcesRequestingValidation: Ressources demandant une validation +RequestedResources: Ressources demandées +HistoryResources : Historique de vos ressources +ConnectKnowledgeBase : Connexion à la base de connaissances +AccessWithoutRegistration : Accès sans inscription +SearchByNam : Rechercher par nom +MoreCriterias : PLus de critère +Language : Langue +CountryPublication : Pays de publication +Photo: Avatar +Field : Domaine +Refused : Refusé +DatePublication : Date de publication +Format: Format +Step: Étape +ResourcePostedBy : Ressource posté par +WithResourceAbleTo : Avec cette ressource vous serez capable de +LinkToResource : Lien vers la ressource +ReportBrokenLink : Signaler un lien brisé +ResourceValidatedBy : Ressource validée par +ResourceSpecifications : Spécification de la ressource +Author : Auteur +Access : Accés +Comments : Commentaires +RelatedResources : Ressources connexes +resourcesUploadedHere : ressource(s) téléchargé ici +Activities : Activités +Skills : Compétences +PhoneNumber : Numéro de téléphone +Email: Email +EditYourAccount : Modifier votre compte +Name : Nom +Surname : Nom de famille +AboutYou : A propos de vous +Organisation: Organisation +EditAbout : Des informations apparaîtront sur votre profil pour informer les entrepreneurs de vos compétences et de vos activités. Nous utiliserons également ces informations pour adresser des ressources spécifiques pour la validation. +Headline : Titre ou position actuelle +City : Ville +Country : Pays +ActivitiesMore : Parlez-nous de vos activités +SkillForEntrepreneur : Quelles compétences pouvez-vous partager avec nos entrepreneurs ? +SocialMedias : Médias sociaux +SaveModification : Enregistrer les modifications +Search : Rechercher +ModificationsProperlySaved: Vos modifications ont bien été enregistrées. +CompleteMentorAccount : Completer votre compte mentor +CompleteEntrepreneurAccount : Completer votre compte entrepreneur +CompleteYourAccount : Completer votre compte +RequestRessource : Demander une ressource +RequestRessourceInfo : Vous ne trouvez pas la ressource que vous recherchez ? Vous avez besoin de ressources pour acquérir certaines compétences ou progresser dans votre développement coopératif ? Il peut s'agir d'un livre, d'un modèle de document, d'un tutoriel, de tout ce dont vous avez besoin, faites une demande à nos mentors pour qu'ils sachent comment vous aider. +Title* : Title* +Description : Description +Field*: Domaine* +SkillToLearn : Que devez-vous apprendre avec cette ressource ? +SendRequest : Envoyer la demande +MandatoryInformation : Informations obligatoires +ComplementaryInformation : Informations complémentaires +WithThisResourceBeAbleTo : Grâce à cette ressource, vous serez en mesure de +WatchThePresentation : Regarder la présentation +WhatValidationProcess : Qu'est-ce qu'un processus de validation ? +MentorUploadResourceToDatabase: Le mentor télécharge une ressource dans la base de données +ResourceSentToQualifiedPeersForValidation : La ressource est envoyée à des pairs qualifiés pour validation. +ResourceBecomesAvailableInDatabase: La ressource est validée et devient disponible dans la base de données +ResourceIsNotValidated: La ressource n'est pas validée et l'amélioration est signalée. Vous obtenez une liste des améliorations, vous pouvez modifier et recharger la ressource. Il est de nouveau soumis au processus de validation. +ResourceReportedInapropriate: La ressource est jugée inadéquate. Vous recevez une notification avec un message de votre pair vous expliquant pourquoi. +DeleteResource: Supprimer une ressource +AreYouSureDelete: Êtes-vous sûr de vouloir supprimer cette ressource ? +YesSureDelete : Oui, j'en suis sûr, supprimer +AreYouSurArchive: Êtes-vous sur de vouloir archiver cette demande ? +ArchivethisRequest: Archiver cette demande +ThankYouEnrichingDatabase : Merci d'enrichir notre base de données ! +ThanksMsg: Une fois que l'un de vos pairs, un collègue mentor, aura validé votre ressource, elle sera publiée en ligne et nous vous enverrons un avis. +Classification : Classification +FormatReq: Format* +LocationWeblinkReq: Location/weblink* +AuthorReq : Auteur de la ressource* +SkillReq : Résultats d'apprentissage, compétences* +IframeLink: Pour les vidéos, signalez le lien iframe +UploadPreviewImage: Télécharger l'image de prévisualisation +AddTags: Ajouter des tags +ResourceTargetReq : Cible en matière de ressources* +TypeContentReq: Type de contenu* +CategorisationReq: Categorisation* +ShareWithReq: Partager avec* +AddResource: Ajouter une ressource +SendForValidation : Envoyer pour validation -> +EditResource : Modifier cette ressource +RequireImprovement: Besoin d'amélioration +ReportInappropriate: Signaler comme inapproprié +Validate: Valider +Send: Envoyer -> +SuggestImprovement: Suggérer des améliorations +ExplainImprovementRequired: Expliquez les améliorations nécessaires*. +ThanksForReview: Merci pour votre avis +SubmitterWillReceiveReview.: L'auteur de la ressource recevra maintenant un avis de votre examen. +HeWillPatch : Il pourra alors corriger et renvoyer la ressource à la validation. +ExplainReasonsRefusal: Expliquez les raisons du refus*. +IAmMentor: Je suis un mentor +IAmEntrepreneur: je suis un entrepreneur diff --git a/www/index.html b/www/index.html new file mode 100644 index 0000000000000000000000000000000000000000..df0e7f8e6e996d7351fdcae97dfa4f7e17921d12 --- /dev/null +++ b/www/index.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + </head> + <body> + <script> + //Language given in translation + const langs = ['fr', 'en']; + const defLang = 'en'; + + //Get the favorite language of the user's navigator + const userLangs = (navigator.languages || [navigator.language]).map( + a => a.split('-').shift(), + ); + userLangs.push(defLang); + const selectedLang = userLangs.find(lang => langs.indexOf(lang) !== -1); + + //Redirection to the appropriate index.html + document.location.replace(selectedLang); + </script> + </body> +</html>