diff --git a/Controller/HistoryController.php b/Controller/HistoryController.php index 52e7c80c1..d73076f95 100644 --- a/Controller/HistoryController.php +++ b/Controller/HistoryController.php @@ -59,14 +59,14 @@ class HistoryController extends Controller $flashBag->add('success', $this->get('translator')->trans( - 'controller.Person.history.create.done')); + 'History created!')); return $this->redirect($this->generateUrl('chill_person_history_list', array('person_id' => $person->getId()))); } else { $flashBag->add('danger', $this->get('translator') - ->trans('controller.Person.history.create.error')); + ->trans('Error! History not created!')); foreach($errors as $error) { $flashBag->add('info', $error->getMessage()); @@ -117,14 +117,14 @@ class HistoryController extends Controller $flashBag->add('success', $this->get('translator')->trans( - 'controller.Person.history.update.done')); + 'Updating history done')); return $this->redirect($this->generateUrl('chill_person_history_list', array('person_id' => $person->getId()))); } else { $flashBag->add('danger', $this->get('translator') - ->trans('controller.Person.history.edit.error')); + ->trans('Error when updating history')); foreach($errors as $error) { $flashBag->add('info', $error->getMessage()); @@ -152,7 +152,7 @@ class HistoryController extends Controller if ($person->isOpen() === false) { $this->get('session')->getFlashBag() ->add('danger', $this->get('translator') - ->trans('controller.Person.history.close.is_closed', + ->trans('Beware history is closed', array('%name%' => $person->__toString()))); return $this->redirect( @@ -179,7 +179,7 @@ class HistoryController extends Controller if (count($errors) === 0) { $this->get('session')->getFlashBag() ->add('success', $this->get('translator') - ->trans('controller.Person.history.close.done', + ->trans('History closed!', array('%name%' => $person->__toString()))); $this->getDoctrine()->getManager()->flush(); @@ -192,7 +192,7 @@ class HistoryController extends Controller } else { $this->get('session')->getFlashBag() ->add('danger', $this->get('translator') - ->trans('controller.Person.history.close.error')); + ->trans('Error! History not closed!')); foreach ($errors as $error) { $this->get('session')->getFlashBag() @@ -207,7 +207,7 @@ class HistoryController extends Controller } else { //if form is not valid $this->get('session')->getFlashBag() ->add('danger', $this->get('translator') - ->trans('controller.Person.history.close.error_in_form')); + ->trans('History closing form is not valide')); } } @@ -255,7 +255,7 @@ class HistoryController extends Controller if ($person->isOpen() === true) { $this->get('session')->getFlashBag() ->add('danger', $this->get('translator') - ->trans('controller.Person.history.open.is_not_closed', + ->trans('Error! History %name% is not closed ; it can be open', array('%name%' => $person->__toString()))); return $this->redirect( @@ -280,7 +280,7 @@ class HistoryController extends Controller if (count($errors) <= 0) { $this->get('session')->getFlashBag() ->add('success', $this->get('translator') - ->trans('controller.Person.history.open.done', + ->trans('History %name% opened!', array('%name%' => $person->__toString()))); $this->getDoctrine()->getManager()->flush(); @@ -293,7 +293,7 @@ class HistoryController extends Controller } else { $this->get('session')->getFlashBag() ->add('danger', $this->get('translator') - ->trans('controller.Person.history.open.error')); + ->trans('History not opened')); foreach ($errors as $error) { $this->get('session')->getFlashBag() @@ -304,7 +304,7 @@ class HistoryController extends Controller } else { // if errors in forms $this->get('session')->getFlashBag() ->add('danger', $this->get('translator') - ->trans('controller.Person.history.open.error_in_form')); + ->trans('History not opened : form is invalid')); } } diff --git a/Controller/PersonController.php b/Controller/PersonController.php index 377c27775..a0c0152f2 100644 --- a/Controller/PersonController.php +++ b/Controller/PersonController.php @@ -107,7 +107,7 @@ class PersonController extends Controller $this->get('session')->getFlashBag() ->add('success', $this->get('translator') - ->trans('validation.Person.form.person.success') + ->trans('The person has been created') ); $em = $this->getDoctrine()->getManager(); @@ -131,7 +131,7 @@ class PersonController extends Controller ->getFlashBag() ->add('info', $this->get('translator') - ->trans('search.q_is_empty') + ->trans('Your query is empty. Be more explicive') ); } @@ -166,7 +166,7 @@ class PersonController extends Controller ->getFlashBag() ->add('info', $this->get('translator') - ->trans('search.no_results', array( + ->trans('Your query %q% gives no results', array( '%q%' => $q )) ); @@ -268,7 +268,7 @@ class PersonController extends Controller $flashBag = $this->get('session')->getFlashBag(); $translator = $this->get('translator'); - $flashBag->add('danger', $translator->trans('controller.Person.review.problem_with_data')); + $flashBag->add('danger', $translator->trans('The person data are not valid')); foreach($errors as $error) { $flashBag->add('info', $error->getMessage()); @@ -309,7 +309,7 @@ class PersonController extends Controller $this->get('session')->getFlashBag()->add('info', $this->get('translator')->trans( - 'controller.Person.review.people_with_similar_name', + '%nb% person with similar name. Please verify that this is a new person', array('%nb%' => count($alternatePersons))) ); diff --git a/Entity/Person.php b/Entity/Person.php index a657bce8a..6b29261e2 100644 --- a/Entity/Person.php +++ b/Entity/Person.php @@ -541,13 +541,13 @@ class Person { if ($r['result'] === self::ERROR_OPENING_NOT_CLOSED_IS_BEFORE_NEW_LINE) { $context->addViolationAt('history', - 'validation.Person.constraint.history.open_history_without_closing', + 'History not closed is before the new line', array() ); return; } $context->addViolationAt('history', - 'validation.Person.constraint.history.opening_is_before_closing', + 'Periods are collapsing', array( '%dateOpening%' => $r['dateOpening']->format('d-m-Y'), '%dateClosing%' => $r['dateClosing']->format('d-m-Y'), diff --git a/Form/Type/GenderType.php b/Form/Type/GenderType.php index 7b8874021..73ac65b9f 100644 --- a/Form/Type/GenderType.php +++ b/Form/Type/GenderType.php @@ -24,18 +24,16 @@ class GenderType extends AbstractType { public function setDefaultOptions(OptionsResolverInterface $resolver) { - $rootTranslate = 'person.gender.'; - $a = array( - Person::GENRE_MAN => $rootTranslate.Person::GENRE_MAN, - Person::GENRE_WOMAN => $rootTranslate.Person::GENRE_WOMAN + Person::GENRE_MAN => Person::GENRE_MAN, + Person::GENRE_WOMAN => Person::GENRE_WOMAN ); $resolver->setDefaults(array( 'choices' => $a, 'expanded' => true, 'multiple' => false, - 'empty_value' => $rootTranslate.'undefined' + 'empty_value' => 'Not given' )); } diff --git a/Resources/config/validation.yml b/Resources/config/validation.yml index 577872fcc..142eca251 100644 --- a/Resources/config/validation.yml +++ b/Resources/config/validation.yml @@ -6,8 +6,8 @@ Chill\PersonBundle\Entity\Person: - Length: min: 2 max: 255 - minMessage: validation.Person.constraint.name_min - maxMessage: validation.Person.constraint.name_max + minMessage: 'This name is too short. It must containt {{ limit }} chars' + maxMessage: 'This name is too long. It must containt {{ limit }} chars' groups: [general, creation] lastName: - NotBlank: @@ -15,12 +15,12 @@ Chill\PersonBundle\Entity\Person: - Length: min: 2 max: 255 - minMessage: validation.Person.constraint.name_min - maxMessage: validation.Person.constraint.name_max + minMessage: 'This name is too short. It must containt {{ limit }} chars' + maxMessage: 'This name is too long. It must containt {{ limit }} chars' groups: [general] dateOfBirth: - Date: - message: validation.Person.constraint.dateOfBirth.not_valid + message: 'Birthdate not valid' groups: [general, creation] history: - Valid: @@ -34,14 +34,14 @@ Chill\PersonBundle\Entity\PersonHistoryFile: properties: date_opening: - Date: - message: validation.history.date_opening.not_valid + message: 'Opening date is not valid' - NotNull: - message: validation.history.date_opening.not_null + message: 'Opening date can not be null' date_closing: - Date: - message: validation.history.date_closing.not_valid + message: 'Closing date is not valid' - NotNull: - message: validation.history.date_closing.not_null + message: 'Closing date can not be null' groups: [closed] constraints: - Callback: diff --git a/Resources/translations/messages.fr.xlf b/Resources/translations/messages.fr.xlf deleted file mode 100644 index fd59e6c16..000000000 --- a/Resources/translations/messages.fr.xlf +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Symfony2 is great - J'aime Symfony2 - - - - diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index ecc034130..e9b3d5fb3 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -1,137 +1,100 @@ -person: - name: Nom - surname: Prénom - dateOfBirth: Date de naissance - without_date_of_birth: Date de naissance inconnue - nationality: Nationalité - without_nationality: Sans nationalité - civil_union: - divorced: Divorcé - separated: Séparé - widow: Veuf - unknow: Inconnu - cohab: Cohabitation légale - single: Célibataire - gender: - MAN: Homme - WOM: Femme - undefined: Non renseigné - history: - close: - motives: - not_come: Plus venu - finished: Accompagnement terminé +#General +'Edit': Modifier +'First name': Prénom +'Last name': Nom +'Name': Nom +'Date of birth': Date de naissance +'Unknown date of birth': Date de naissance inconnue +'Nationality': Nationalité +'Without nationality': Sans nationalité +'Gender': Genre +'Creation date': "Date d'ouverture" +'Not given': Non renseigné +'Place of birth': Lieu de naissance +'Country of birth': Pays de naissance +'Unknown country of birth': Pays inconnu +'Marital status': État civil +'Number of children': "Nombre d'enfants" +'{0} No child|{1} One child | ]1,Inf] %nb% children': '{0} Aucun enfant|{1} Un enfant | ]1,Inf] %nb% enfants' +'National number': Numéro national +'Email': Courrier électronique +'Address': Adresse +'Memo': Mémo +'Phonenumber': Numéro de téléphone +'{0} Born the %date | {1} Born the %date': '{0} Né le %date% | {1} Née le %date%' -search: - q_is_empty: Votre requête est vide. Veuillez introduire un terme de recherche - no_results: La requête %q% ne renvoie aucun résultat. +#Gender +'Male': Homme +'Female': Femme +'man': Homme +'woman': Femme -validation: - Person: - form: - person: - success: Bravo ! Les données ont été mises à jour. - error: '{1} Le champs %field% est incorrect. Veuillez le corriger. | ]1, Inf] Plusieurs champs sont incorrects. Veuillez les vérifier.' -controller: - Person: - review: - people_with_similar_name: %nb% personnes ont un nom similaire. Vérifiez qu'il ne s'agit pas de l'une d'elles. - problem_with_data: Les données de votre formulaire sont invalides. - history: - close: - done: Bravo ! Le dossier de %name% a été clotûré. - error: Les informations introduites ne sont pas valides. Le dossier n'a pu être clos. - error_in_form: Le formulaire n'est pas valide. - is_not_open: Le dossier de %name% n'est pas ouvert. Il ne peut donc être fermé. - open: - done: Bravo ! Le dossier de %name% est maintenant ouvert. - error: Les informations introduites ne sont pas valides. Le dossier n'a pu être ouvert. - error_in_form: Le formulaire n'est pas valide. - is_not_closed: Le dossier de %name% n'est pas fermé. Il ne peut donc être ouvert. - update: - done: Bravo ! La mise à jour de l'historique a réussi ! - error: Les données introduites ne sont pas valides. Veuillez vérifier les informations ci-dessous. - create: - done: Bravo ! L'historique a été modifié. - error: Les données introduites ne sont pas valides. Veuillez vérifier les informations ci-dessous. +#Marital Status +'Divorced': Divorcé(e) +'Separated': Séparé(e) +'Widow': Veuf(ve) +'Unknow marital status': Indéterminé +'Legal cohabitant': Cohabitant légal +'Single': Célibataire +'Married': Marié(e) -views: - layout: - born: '{0} Né le %date% | {1} Née le %date%' - without_nationality: Nationalité inconnue - common: - edit: Modifier - Person: - view: - general: Généralités - birth: Naissance - dateOfBirth: Date de naissance - placeOfBirth: Lieu de naissance - contry_of_birth: Pays de naissance - country_of_birth_unknow: Pays inconnu - without_nationality: Nationalité inconnue - family: Famille - civil_union: État civil - nb_of_childs: Nombre d'enfants - nb_of_childs_count: '{0} Aucun enfant|{1} Un enfant | ]1,Inf] %nb% enfants' - nationality: Nationalité - national_number: Numéro national - contact: Informations de contact - email: Courrier électronique - address: Adresse - administrative: Administratif - surname: Prénom - name: Nom - gender: Genre - memo: Mémo - edit: - cancel: Retour - reset: Remise à zéro - submit: Envoi - list: - without_nationality: Nationalité inconnue - #History - hlist: - title: Historique du dossier - %name% - dateOpening_title: Date d'ouverture - dateClosing_title: Date de fermeture - still_open: Toujours en cours - edit: Modifier - close: Clôre le dossier - open: Ouvrir le dossier - create: Nouvel ouverture-fermeture à une autre date - close: - last_opening_since: Dernière ouverture le %last_opening%. - action: Clotûrer - select_a_motive: Choisissez un motif - date_of_closing: Date de clotûre - motive_of_closing: Motif de clôture - texto: Mémo - open: - action: Ouvrir - date_of_opening: Date d'ouverture - texto: Mémo - hupdate: - dateOpening: Date d'ouverture - dateClosing: Date de fermeture - motive_of_closing: Motif de clôture - texto: Mémo - action: Modifier - creation: - add: Ajouter - open: Ouverture d'un dossier - review: - altName: Nom - altDateOfBirth: Prénom - altNationality: Nationalité - confirm_creation: Confirmer la création - creation_date: Date d'ouverture - you_will_create_this_person: Vous allez créer le dossier suivant +#Heading +'General information': Généralités +'Birth information': Naissance +'Family information': Famille +'Contact information': Informations de contact +'Administrative information': Administratif -menu: - person: - history: Historique - general_view: Informations personnelles - admin: - index: Personnes - helper: Pas de sous-menu actuellement. \ No newline at end of file +#Title +'Alreay existing person': Dossiers déjà encodés + +#Action +'Add the person': Ajouter la personne +'Confirm the creation': Confirmer la création +'You will create this person': Vous allez créer le dossier suivant +'Return': Retour +'Submit': Envoi +'Reset': Remise à zéro + +#Validation +'The person data has been updated': Bravo ! Les données ont été mises à jour. +'{1} The person field %field% is incorrect. Please check. | ]1, Inf] Several person fields are incorrect. Please check.': '{1} Le champs %field% est incorrect. Veuillez le corriger. | ]1, Inf] Plusieurs champs sont incorrects. Veuillez les vérifier.' + +#Creation +'Add a person': "Ajout d'une personne" + +#Navigation +'Person Menu': "Menu personne" + +#Person Controller +'Your query is empty. Be more explicive': Votre requête est vide. Veuillez introduire un terme de recherche +'Your query %q% gives no results': La requête %q% ne renvoie aucun résultat. +'The person data are not valid': Les données de votre formulaire sont invalides. +'%nb% person with similar name. Please verify that this is a new person': %nb% personnes ont un nom similaire. Vérifiez qu'il ne s'agit pas de l'une d'elles. +'The person has been created': Le dossier a été créé + +#History +'Last opening since %last_opening%': Dernière ouverture le %last_opening%. +'Close person history': Clotûrer +'Person history - %name%': Historique du dossier - %name% +'Opening date': "Date d'ouverture" +'Closing date': "Date de fermeture" +'Still open': Toujours en cours +'Close history': Clôre le dossier +'Open history': Ouvrir le dossier +'Create history': Nouvel ouverture-fermeture à une autre date +'Closing date': Date de clotûre +'Closing motive': Motif de clôture + +#History Controller +'History created!': Bravo ! Le dossier est maintenant ouvert. +'Error! History not created!': "Erreur ! Le dossier n'a pas pu être ouvert." +'Updating history done': "Bravo ! La mise à jour de l'historique a réussi !" +'Error when updating history': Les données introduites ne sont pas valides. Veuillez vérifier les informations ci-dessous. +'Beware history is closed': Attention le dossier est déjà fermé +'History closed!': Bravo ! Le dossier de %name% a été clotûré. +'Error! History not closed!': "Les informations introduites ne sont pas valides. Le dossier n'a pu être clos." +'History closing form is not valide': "Le formulaire n'est pas valide." +'Error! History %name% is not closed ; it can be open': "Le dossier de %name% n'est pas fermé. Il ne peut donc être ouvert." +'History %name% opened!': Bravo ! Le dossier de %name a été ouvert +'History not opened' : "Les informations introduites ne sont pas valides. Le dossier n'a pu être ouvert." \ No newline at end of file diff --git a/Resources/translations/validators.fr.yml b/Resources/translations/validators.fr.yml index 584dca9d5..d24cf52c5 100644 --- a/Resources/translations/validators.fr.yml +++ b/Resources/translations/validators.fr.yml @@ -1,16 +1,13 @@ -validation: - Person: - constraint: - name_min: Ce nom est trop court. Il devrait contenir {{ limit }} caractères. - name_max: Ce nom est trop long. Il devrait contenir {{ limit }} caractères. - nbOfChild_min: Ce nombre est négatif. Il ne peut y avoir moins de 0 enfants. - nbOfChild_max: Ce nombre est trop élevé. Il ne peut être supérieur à {{ limit }}. - nbOfChild_invalid: La valeur introduite n'est pas un nombre. - dateOfBirth: - not_valid: La date de naissance n'est pas valide. - history: - opening_is_before_closing: L'historique des ouvertures et fermetures de dossier n'est pas cohérent. Des historiques d'ouverture et de fermeture se chevauchent. Vérifiez la liste des ouvertures et fermetures. - open_history_without_closing: Vous tentez d'ouvrir un dossier à une date passée alors qu'il est réouvert plus tard. Veuillez insérer une nouvelle ligne d'ouverture avant de la clotûrer avant la suivante. - PersonHistoryFile: - constraint: - dateOfClosing_before_dateOfOpening: La date de fermeture du dossier ne peut pas être avant la date d'ouverture. +'This name is too short. It must containt {{ limit }} chars': Ce nom est trop court. Il devrait contenir {{ limit }} caractères. +'This name is too long. It must containt {{ limit }} chars': Ce nom est trop long. Il devrait contenir {{ limit }} caractères. +'This number is negative. It must have at least 0 child': Ce nombre est négatif. Il ne peut y avoir moins de 0 enfants. +'This number is too high. It can not be superior of {{ limit }}': Ce nombre est trop élevé. Il ne peut être supérieur à {{ limit }}. +'This is not a number': "La valeur introduite n'est pas un nombre." +'Birthdate not valid': "La date de naissance n'est pas valide." +'Periods are collapsing': "L'historique des ouvertures et fermetures de dossier n'est pas cohérent. Des historiques d'ouverture et de fermeture se chevauchent. Vérifiez la liste des ouvertures et fermetures." +"History not closed is before the new line": "Vous tentez d'ouvrir un dossier à une date passée alors qu'il est réouvert plus tard. Veuillez insérer une nouvelle ligne d'ouverture avant de la clotûrer avant la suivante." +'Closing date can not be before opening date': "La date de fermeture du dossier ne peut pas être avant la date d'ouverture." +'Opening date is not valid': "La date d'ouverture n'est pas valide" +'Opening date can not be null': "La date d'ouverure ne peut être nulle" +'Closing date is not valid': "La date de fermeture n'est pas valide" +'Closing date can not be null': "La date de fermeture ne peut être nulle" \ No newline at end of file diff --git a/Resources/views/Form/go_to_form.html.twig b/Resources/views/Form/go_to_form.html.twig index 61d1b871a..9dfddf864 100644 --- a/Resources/views/Form/go_to_form.html.twig +++ b/Resources/views/Form/go_to_form.html.twig @@ -1,6 +1,6 @@
- +
diff --git a/Resources/views/History/form.html.twig b/Resources/views/History/form.html.twig index e338fd538..440a21777 100644 --- a/Resources/views/History/form.html.twig +++ b/Resources/views/History/form.html.twig @@ -9,23 +9,23 @@ {{ form_start(form) }} -{{ 'views.Person.close.last_opening_since'|trans( +{{ 'Last opening since %last_opening%'|trans( { '%last_opening%' : history.dateOpening|date(date_format) }) }} {% if form.dateClosing is defined %} - {{ form_row(form.dateClosing, {'label' : 'views.Person.close.date_of_closing'} ) }} + {{ form_row(form.dateClosing, {'label' : 'Closing date'} ) }} {% endif %} {% if form.closingMotive is defined %} - {{ form_row(form.closingMotive, {'label' : 'views.Person.close.motive_of_closing'} ) }} + {{ form_row(form.closingMotive, {'label' : 'Closing motive'} ) }} {% endif %} -{{ form_row(form.memo, {'label' : 'views.Person.close.texto' } ) }} +{{ form_row(form.memo, {'label' : 'Memo' } ) }} {{ form_rest(form) }}
- +
{{ form_end(form) }} diff --git a/Resources/views/History/list.html.twig b/Resources/views/History/list.html.twig index bb47ff996..ab33bf14a 100644 --- a/Resources/views/History/list.html.twig +++ b/Resources/views/History/list.html.twig @@ -2,14 +2,14 @@ {% set activeRouteKey = 'chill_person_history_list' %} -{% block title %}{{ 'views.Person.hlist.title'|trans({ '%name%' : person.__toString}) }}{% endblock title %} +{% block title %}{{ 'Person history - %name%'|trans({ '%name%' : person.__toString}) }}{% endblock title %} {% block personcontent %} - - + + @@ -21,7 +21,7 @@ @@ -50,7 +50,7 @@
- {{ 'views.Person.hlist.create'|trans }} + {{ 'Create history'|trans }}
@@ -64,11 +64,11 @@ {% spaceless %} {% if person.isOpen == true %} - {{'views.Person.hlist.close'|trans }} + {{'Close history'|trans }} {% else %} - {{'views.Person.hlist.open'|trans }} + {{'Open history'|trans }} {% endif %} {% endspaceless %} diff --git a/Resources/views/Person/create.html.twig b/Resources/views/Person/create.html.twig index 21b140b3b..b059f3590 100644 --- a/Resources/views/Person/create.html.twig +++ b/Resources/views/Person/create.html.twig @@ -16,28 +16,28 @@ #} {% extends "ChillMainBundle::layout.html.twig" %} -{% block title %}{{ 'views.Person.creation.title'|trans }}{% endblock title %} +{% block title %}{{ 'Add a person'|trans }}{% endblock title %} {% block content %}
{{ form_start(form) }} -

{{ 'views.Person.creation.open'|trans }}

+

{{ 'Add a person'|trans }}

{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }} {{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }} - {{ form_row(form.dateOfBirth, { 'label' : 'views.Person.view.dateOfBirth'|trans }) }} + {{ form_row(form.dateOfBirth, { 'label' : 'Date of birth'|trans }) }} - {{ form_row(form.genre, { 'label' : 'views.Person.view.gender'|trans }) }} + {{ form_row(form.genre, { 'label' : 'Gender'|trans }) }} - {{ form_row(form.creation_date, { 'label' : 'views.Person.review.creation_date'|trans }) }} + {{ form_row(form.creation_date, { 'label' : 'Creation date'|trans }) }} {{ form_rest(form) }} - + {{ form_end(form) }}
diff --git a/Resources/views/Person/create_review.html.twig b/Resources/views/Person/create_review.html.twig index 86ca878ab..4721e79e5 100644 --- a/Resources/views/Person/create_review.html.twig +++ b/Resources/views/Person/create_review.html.twig @@ -16,7 +16,7 @@ #} {% extends "ChillMainBundle::layout.html.twig" %} -{% block title %}{{ 'views.Person.review.title'|trans }}{% endblock title %} +{% block title %}{{ 'Alreay existing person'|trans }}{% endblock title %} {% block css %} @@ -35,9 +35,9 @@
{{ 'views.Person.hlist.dateOpening_title'|trans }}{{ 'views.Person.hlist.dateClosing_title'|trans }}{{ 'Opening date'|trans }}{{ 'Closing date'|trans }}  
{{ history.dateOpening|date(date_format) }} {% spaceless %} {% if history.isOpen %} - {{ 'views.Person.hlist.still_open'|trans }} + {{ 'Still open'|trans }} {% else %} {{ history.dateClosing|date(date_format) }} @@ -30,7 +30,7 @@ {% endspaceless %}
- - - + + + @@ -50,7 +50,7 @@ - {% endfor %} @@ -62,7 +62,7 @@
{{ form_start(form) }} -

{{ 'views.Person.review.you_will_create_this_person'|trans }}

+

{{ 'You will create this person'|trans }}

{{ 'First name'|trans }}
@@ -71,19 +71,19 @@
{{ 'Last name'|trans }}
{{ lastName }}
-
{{ 'views.Person.view.dateOfBirth'|trans }}
-
{{ dateOfBirth|date(date_format)|default( 'person.without_date_of_birth'|trans ) }}
+
{{ 'Date of birth'|trans }}
+
{{ dateOfBirth|date(date_format)|default( 'Unknown date of birth'|trans ) }}
-
{{ 'views.Person.view.gender'|trans }}
-
{{ ('person.gender.' ~ genre)|trans }}
+
{{ 'Gender'|trans }}
+
{{ genre|trans }}
-
{{ 'views.Person.review.creation_date'|trans }}
+
{{ 'Creation date'|trans }}
{{ creation_date|date(date_format) }}
{{ form_rest(form) }} - + {{ form_end(form) }}
diff --git a/Resources/views/Person/edit.html.twig b/Resources/views/Person/edit.html.twig index acfda7645..6edeb5ce3 100644 --- a/Resources/views/Person/edit.html.twig +++ b/Resources/views/Person/edit.html.twig @@ -27,41 +27,42 @@ {{ form_start(form) }}
-

{{ 'views.Person.view.general'|trans }}

+

{{ 'General information'|trans }}

{{ form_row(form.firstName, {'label' : 'First name'}) }} {{ form_row(form.lastName, {'label' : 'Last name'}) }} - {{ form_row(form.genre, {'label' : 'views.Person.view.gender'}) }} + {{ form_row(form.genre, {'label' : 'Gender'}) }}
-

{{ 'views.Person.view.birth'|trans }}

- {{ form_row(form.dateOfBirth, {'label': 'views.Person.view.dateOfBirth'} ) }} - {{ form_row(form.placeOfBirth, { 'label' : 'views.Person.view.placeOfBirth'} ) }} - {{ form_row(form.countryOfBirth, { 'label' : 'views.Person.view.contry_of_birth' } ) }} +

{{ 'Birth information'|trans }}

+ {{ form_row(form.dateOfBirth, {'label': 'Date of birth'} ) }} + {{ form_row(form.placeOfBirth, { 'label' : 'Place of birth'} ) }} + {{ form_row(form.countryOfBirth, { 'label' : 'Country of birth' } ) }}
-

{{ 'views.Person.view.administrative'|trans }}

- {{ form_row(form.nationality, { 'label' : 'views.Person.view.nationality'|trans} ) }} +

{{ 'Administrative information'|trans }}

+ {{ form_row(form.nationality, { 'label' : 'Nationality'|trans} ) }}
-

{{ 'views.Person.view.contact'|trans }}

- {{ form_row(form.email, {'label': 'views.Person.view.email'}) }} +

{{ 'Contact information'|trans }}

+ {{ form_row(form.email, {'label': 'Email'}) }} + {{ form_row(form.phonenumber, {'label': 'Phonenumber'}) }}
-{{ form_row(form.memo, {'label' : 'views.Person.view.memo'} ) }} +{{ form_row(form.memo, {'label' : 'Memo'} ) }} {{ form_rest(form) }}
- {{ 'views.Person.edit.cancel'|trans }} + {{ 'Return'|trans }} - - + +
{{ form_end(form) }} diff --git a/Resources/views/Person/list.html.twig b/Resources/views/Person/list.html.twig index 3642eeb33..00ad0c294 100644 --- a/Resources/views/Person/list.html.twig +++ b/Resources/views/Person/list.html.twig @@ -22,8 +22,8 @@ - - + + @@ -40,13 +40,13 @@ diff --git a/Resources/views/Person/view.html.twig b/Resources/views/Person/view.html.twig index 47668dae4..ac69385ce 100644 --- a/Resources/views/Person/view.html.twig +++ b/Resources/views/Person/view.html.twig @@ -39,7 +39,7 @@ This view should receive those arguments: {{ include(edit_tmp_name, edit_tmp_args) }}
-

{{ 'views.Person.view.general'|trans }}

+

{{ 'General information'|trans }}

{{ 'First name'|trans }}
@@ -48,28 +48,28 @@ This view should receive those arguments:
{{ 'Last name'|trans }}
{{ person.lastName }}
-
{{ 'views.Person.view.gender'|trans }}
-
{{ ( 'person.gender.' ~ person.genre|default('undefined'))|trans }}
+
{{ 'Gender'|trans }}
+
{{ ( person.genre|default('Not given'))|trans }}
-

{{ 'views.Person.view.birth'|trans }}

+

{{ 'Birth information'|trans }}

-
{{ 'views.Person.view.dateOfBirth'|trans }}
+
{{ 'Date of birth'|trans }}
{{ person.dateOfBirth.format(date_format) - |default( 'person.without_date_of_birth'|trans ) }}
+ |default( 'Unknown date of birth'|trans ) }} -
{{ 'views.Person.view.placeOfBirth'|trans }}
+
{{ 'Place of birth'|trans }}
{{ person.placeOfBirth }}
{% spaceless %} {% if person.countryOfBirth is not null %} {{ person.countryOfBirth.name|localize_translatable_string }} {% else %} - {{ 'views.Person.view.country_of_birth_unknow'|trans }} + {{ 'Unknown country of birth'|trans }} {% endif %} {% endspaceless %}
@@ -81,15 +81,15 @@ This view should receive those arguments: {{ include(edit_tmp_name, edit_tmp_args) }}
-

{{ 'views.Person.view.administrative'|trans }}

+

{{ 'Administrative information'|trans }}

-
{{ 'views.Person.view.nationality'|trans }}
+
{{ 'Nationality'|trans }}
{% if person.nationality is not null %} {{ person.nationality.name|localize_translatable_string }} {% else %} - {{ 'views.Person.view.without_nationality'|trans }} + {{ 'Without nationality'|trans }} {% endif %}
@@ -98,14 +98,14 @@ This view should receive those arguments: {{ include(edit_tmp_name, edit_tmp_args) }}
-

{{ 'views.Person.view.contact'|trans }}

+

{{ 'Contact information'|trans }}

-
{{ 'views.Person.view.email'|trans }}
+
{{ 'Email'|trans }}
{{ person.email}} 
-
{{ 'views.Person.view.phonenumber'|trans }}
+
{{ 'Phonenumber'|trans }}
{{ person.phonenumber}} 
diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index 00faf4be4..31ab4e68c 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -46,12 +46,12 @@

{% spaceless %} {% if person.dateOfBirth == null %} - {{ 'person.without_date_of_birth'|trans }}, {{ ('person.gender.' ~ + {{ 'Unknown date of birth'|trans }}, {{ ('person.gender.' ~ person.genre)|trans }} {% else %} {% transchoice person.genreNumeric with {'%date%' : person.dateOfBirth.format('d-m-Y')} %} - views.layout.born + {0} Born the %date | {1} Born the %date {% endtranschoice %} {% endif %} {% endspaceless %}

@@ -59,7 +59,7 @@ {% if person.nationality is not null %}

{{ person.nationality.name|localize_translatable_string }}

{% else %} -

{% trans %}views.layout.without_nationality{% endtrans %}

+

{% trans %}Without nationality{% endtrans %}

{% endif %}
diff --git a/Resources/views/menu.html.twig b/Resources/views/menu.html.twig index 333dc1316..f363f80f3 100644 --- a/Resources/views/menu.html.twig +++ b/Resources/views/menu.html.twig @@ -16,7 +16,7 @@ #}
{{ 'views.Person.review.altName'|trans }}{{ 'views.Person.review.altDateOfBirth'|trans }}{{ 'views.Person.review.altNationality'|trans }}{{ 'Name'|trans }}{{ 'Date of birth'|trans }}{{ 'Nationality'|trans }}
{{ person.dateOfBirth|date(date_format) }}{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'views.Person.view.without_nationality'|trans }}{% endif %} + {% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
{% trans %}Name{% endtrans %}{% trans %}person.dateOfBirth{% endtrans %}{% trans %}person.nationality{% endtrans %}{% trans %}Date of birth{% endtrans %}{% trans %}Nationality{% endtrans %}
- {{person.dateOfBirth.format(date_format)|default( 'person.without_date_of_birth'|trans )}} + {{person.dateOfBirth.format(date_format)|default( 'Unknown date of birth'|trans )}} {% if person.nationality is not null %} {{person.nationality.label}} {% else %} - {{ 'views.Person.list.without_nationality'|trans }} + {{ 'Without nationality'|trans }} {% endif %}