From a5dd2153d6af76a90f9ea73ea8c6658883920315 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 12 May 2016 15:46:18 +0200 Subject: [PATCH] move i18n public profile --- app/assets/javascripts/router.coffee.erb | 2 +- config/locales/app.logged.en.yml | 8 ----- config/locales/app.logged.fr.yml | 8 ----- config/locales/app.shared.en.yml | 11 +++++++ config/locales/app.shared.fr.yml | 11 +++++++ doc/sso_authentication.md | 38 ++++++++++++------------ 6 files changed, 42 insertions(+), 36 deletions(-) diff --git a/app/assets/javascripts/router.coffee.erb b/app/assets/javascripts/router.coffee.erb index 5285a2975..f53e5bd98 100644 --- a/app/assets/javascripts/router.coffee.erb +++ b/app/assets/javascripts/router.coffee.erb @@ -139,7 +139,7 @@ angular.module('application.router', ['ui.router']). controller: 'DashboardController' resolve: translations: [ 'Translations', (Translations) -> - Translations.query(['app.logged.dashboard.profile']).$promise + Translations.query(['app.logged.dashboard.profile', 'app.shared.public_profile']).$promise ] .state 'app.logged.dashboard.settings', url: '/settings' diff --git a/config/locales/app.logged.en.yml b/config/locales/app.logged.en.yml index 270831c6e..6bb4cce2d 100644 --- a/config/locales/app.logged.en.yml +++ b/config/locales/app.logged.en.yml @@ -72,14 +72,6 @@ en: members_show: # public profil of a member members_list: "Members list" - last_activity_: "Last activity" - _on_: "on" - to_come: "to come" - approved: "approved" - projects: "Projects" - no_projects: "No projects" - author: "Author" - collaborator: "Collaborator" members: # list of members accepting to be contacted diff --git a/config/locales/app.logged.fr.yml b/config/locales/app.logged.fr.yml index 634f8f014..aa4acf287 100644 --- a/config/locales/app.logged.fr.yml +++ b/config/locales/app.logged.fr.yml @@ -72,14 +72,6 @@ fr: members_show: # profil public d'un membre members_list: "Liste des membres" - last_activity_: "Dernière activité" - _on_: "le" - to_come: "à venir" - approved: "validée" - projects: "Projets" - no_projects: "Aucun projet" - author: "Auteur" - collaborator: "Collaborateur" members: # liste des membres qui acceptent d'être contactés diff --git a/config/locales/app.shared.en.yml b/config/locales/app.shared.en.yml index 28a8c5429..8e7a70aa0 100644 --- a/config/locales/app.shared.en.yml +++ b/config/locales/app.shared.en.yml @@ -267,3 +267,14 @@ en: machine_reservation: "Machine reservation" you_must_wait_for_your_training_is_being_validated_by_the_fablab_team_to_book_this_machine: "You must wait for your training is being validated by the FabLab team to book this machine." your_training_will_occur_: "Your training will occur" + + public_profile: + # user public profile + last_activity_: "Last activity" + _on_: "on" + to_come: "to come" + approved: "approved" + projects: "Projects" + no_projects: "No projects" + author: "Author" + collaborator: "Collaborator" \ No newline at end of file diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index 5476d392a..25ad9a0b4 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -267,3 +267,14 @@ fr: machine_reservation: "Réservation machine" you_must_wait_for_your_training_is_being_validated_by_the_fablab_team_to_book_this_machine: "Il faut attendre que votre formation soit validée par l'équipe du Fab Lab pour réserver cette machine." your_training_will_occur_: "Votre formation aura lieu le" + + public_profile: + # profil publique d'un utilisateur + last_activity_: "Dernière activité" + _on_: "le" + to_come: "à venir" + approved: "validée" + projects: "Projets" + no_projects: "Aucun projet" + author: "Auteur" + collaborator: "Collaborateur" diff --git a/doc/sso_authentication.md b/doc/sso_authentication.md index af0c9d800..96da056d7 100644 --- a/doc/sso_authentication.md +++ b/doc/sso_authentication.md @@ -98,27 +98,27 @@ Finally you have to create an admin interface with AngularJS: - **app/assets/javascript/controllers/admin/authentifications.coffee** - ## list of supported authentication methods - METHODS = { - ... - 'LdapProvider' : 'LDAP' # add the name of your ActiveRecord model class here as a hash key, associated with a human readable name as a hash value (string) - } + ## list of supported authentication methods + METHODS = { + ... + 'LdapProvider' : 'LDAP' # add the name of your ActiveRecord model class here as a hash key, associated with a human readable name as a hash value (string) + } - Application.Controllers.controller "newAuthentificationController", ... - - $scope.updateProvidable = -> - ... - if $scope.provider.providable_type == 'LdapProvider' - # you may want to do some stuff to initialize your provider here + Application.Controllers.controller "newAuthentificationController", ... - $scope.registerProvider = -> - ... - # === LdapProvider === - else if $scope.provider.providable_type == 'LdapProvider' - # here you may want to do some data validation - # then: save the settings - AuthProvider.save auth_provider: $scope.provider, (provider) -> - # register was a success, display a message, redirect, etc. + $scope.updateProvidable = -> + ... + if $scope.provider.providable_type == 'LdapProvider' + # you may want to do some stuff to initialize your provider here + + $scope.registerProvider = -> + ... + # === LdapProvider === + else if $scope.provider.providable_type == 'LdapProvider' + # here you may want to do some data validation + # then: save the settings + AuthProvider.save auth_provider: $scope.provider, (provider) -> + # register was a success, display a message, redirect, etc. And to include this interface into the existing one ( **app/assets/templates/admin/authentifications/edit.html.erb**)