mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
i18n authentication provider type
This commit is contained in:
parent
305e887112
commit
d83e44d26f
@ -4,17 +4,15 @@
|
||||
|
||||
## list of supported authentication methods
|
||||
METHODS = {
|
||||
'DatabaseProvider' : 'Base de données locale',
|
||||
#'OAuthProvider' : 'OAuth 1.0',
|
||||
'OAuth2Provider' : 'OAuth 2.0',
|
||||
#'LdapProvider' : 'LDAP'
|
||||
'DatabaseProvider' : 'local_database',
|
||||
'OAuth2Provider' : 'o_auth2',
|
||||
}
|
||||
|
||||
##
|
||||
# Iterate through the provided array and return the index of the requested element
|
||||
# @param elements {Array} array of objects with property 'id'
|
||||
# @param id {Number} id of the element to retrieve in the list
|
||||
# @returns {Number} index of the requested element, in the provided array
|
||||
# @param elements {Array<{id:*}>}
|
||||
# @param id {*} id of the element to retrieve in the list
|
||||
# @returns {number} index of the requested element, in the provided array
|
||||
##
|
||||
findIdxById = (elements, id)->
|
||||
(elements.map (elem)->
|
||||
@ -58,7 +56,7 @@ Application.Controllers.controller "AuthentificationController", ["$scope", "$st
|
||||
$scope.getType = (type) ->
|
||||
text = METHODS[type]
|
||||
if typeof text != 'undefined'
|
||||
return text
|
||||
return _t(text)
|
||||
else
|
||||
return _t('unknown')+type
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
class="form-control"
|
||||
name="auth_provider[providable_type]"
|
||||
id="provider_type"
|
||||
ng-options="key as value for (key, value) in authMethods"
|
||||
ng-options="key as (value | translate) for (key, value) in authMethods"
|
||||
ng-disabled="mode == 'edition'"
|
||||
required>
|
||||
</select>
|
||||
|
@ -297,6 +297,8 @@ en:
|
||||
do_you_really_want_to_delete_the_TYPE_authentication_provider_NAME: "Do you really want to delete the {{TYPE}} authentication provider: {{NAME}}?" # angular interpolation
|
||||
authentication_provider_successfully_deleted: "Authentication provider successfully deleted."
|
||||
an_error_occurred_unable_to_delete_the_specified_provider: "An error occurred: unable to delete the specified provider."
|
||||
local_database: "Local database"
|
||||
o_auth2: "OAuth 2.0"
|
||||
|
||||
members_new:
|
||||
# add a member
|
||||
|
@ -297,6 +297,8 @@ fr:
|
||||
do_you_really_want_to_delete_the_TYPE_authentication_provider_NAME: "Êtes-vous sûr(e) de vouloir supprimer le fournisseur d'authentification {{TYPE}} : {{NAME}} ?" # angular interpolation
|
||||
authentication_provider_successfully_deleted: "Le fournisseur d'authentification a bien été supprimée."
|
||||
an_error_occurred_unable_to_delete_the_specified_provider: "Une erreur est survenue : impossible de supprimer le fournisseur spécifié."
|
||||
local_database: "Base de données locale"
|
||||
o_auth2: "OAuth 2.0"
|
||||
|
||||
members_new:
|
||||
# ajouter un membre
|
||||
|
Loading…
x
Reference in New Issue
Block a user