Skip to content

Commit

Permalink
fix(web/translations): support locales without EMSCH_LOCALES (#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 authored Dec 16, 2024
1 parent fec4931 commit 9bc747d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
19 changes: 9 additions & 10 deletions skeleton/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ emsch_login:
config:
controller: emsch.controller.security.login
path: /login
method: [ POST, GET ]
method: [POST, GET]
template_static: template/security/login.html.twig
ems:
config:
Expand All @@ -135,29 +135,28 @@ ems_versions:
template_static: template/security/versions.html.twig
ems_version_new:
config:
method: [ GET ]
method: [GET]
path: /ems/versions/new
defaults: { _authenticated: true }
template_static: template/security/version.html.twig
ems_version_detail:
config:
method: [ GET ]
path: /ems/versions/{ouuid}
method: [GET]
path: '/ems/versions/{ouuid}'
defaults: { _authenticated: true }
query: '{"query":{"bool":{"must":[{"term":{"_contenttype":{"value":"release"}}},{"term":{"_id":{"value":"%ouuid%"}}}]}}}'
template_static: template/security/version.html.twig
ems_version_create:
config:
method: [ POST ]
method: [POST]
path: /ems/versions/create
controller: 'EMS\ClientHelperBundle\Controller\ApiController::createDocumentFromForm'
defaults: { _authenticated: true, apiName: backend, contentType: release, redirectUrl: '/ems/versions/%ouuid%', validationTemplate: '@EMSCH/template/security/version_validate.twig' }
defaults: { _authenticated: true, apiName: backend, contentType: release, redirectUrl: /ems/versions/%ouuid%, validationTemplate: '@EMSCH/template/security/version_validate.twig' }
query: '{"query":{"bool":{"must":[{"term":{"_contenttype":{"value":"release"}}},{"term":{"_id":{"value":"%id%"}}}]}}}'
ems_version_update:
config:
method: [ POST ]
path: /ems/versions/{ouuid}
method: [POST]
path: '/ems/versions/{ouuid}'
controller: 'EMS\ClientHelperBundle\Controller\ApiController::updateDocumentFromForm'
defaults: { _authenticated: true, apiName: backend, contentType: release, redirectUrl: '/ems/versions/%ouuid%', validationTemplate: '@EMSCH/template/security/version_validate.twig' }
defaults: { _authenticated: true, apiName: backend, contentType: release, redirectUrl: /ems/versions/%ouuid%, validationTemplate: '@EMSCH/template/security/version_validate.twig' }
query: '{"query":{"bool":{"must":[{"term":{"_contenttype":{"value":"release"}}},{"term":{"_id":{"value":"%id%"}}}]}}}'

10 changes: 10 additions & 0 deletions skeleton/translations/messages.fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ ems:
back_to_ems: 'Retour à eMS'
ems_form:
loading: 'en cours de chargement...'
emsch:
security:
exception:
bad_credentials: 'Nom d''utilisateur ou mot de passe invalide'
error: 'Une erreur s''est produite !'
form:
password: 'Mot de passe'
submit: 'Se connecter'
username: 'Nom d''utilisateur'
features:
discover: 'Découvrez toutes les fonctionnalités'
files_browse: 'Choisir des fichiers'
Expand All @@ -41,6 +50,7 @@ js:
language:
selection: 'select language'
locale: Français
login: 'Se connecter'
missing:
description: 'Changer de langue pour voir les versions alternatives.'
title: 'Ce contenu n''est pas disponible en français'
Expand Down
10 changes: 10 additions & 0 deletions skeleton/translations/messages.nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ ems:
back_to_ems: 'Terug naar eMS'
ems_form:
loading: 'bezig met laden...'
emsch:
security:
exception:
bad_credentials: 'Ongeldige gebruikersnaam of wachtwoord'
error: 'Er is iets fout gegaan!'
form:
password: Wachtwoord
submit: Login
username: Gebruikersnaam
features:
discover: 'Ontdek alle features'
files_browse: 'Kiezen bestanden'
Expand All @@ -41,6 +50,7 @@ js:
language:
selection: 'select language'
locale: Nederlands
login: Login
missing:
description: 'Wijzig de taal om alternatieve versies te zien.'
title: 'Deze inhoud is niet beschikbaar in het Nederlands'
Expand Down

0 comments on commit 9bc747d

Please sign in to comment.