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 @@
-
-
{{ '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 @@ |
---|
{{ '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 %}
{% endfor %}
@@ -62,7 +62,7 @@
{{ form_start(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) }}
-{{ form_row(form.memo, {'label' : 'views.Person.view.memo'} ) }}
+{{ form_row(form.memo, {'label' : 'Memo'} ) }}
{{ form_rest(form) }}
{{ 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 @@
{{ 'views.Person.review.you_will_create_this_person'|trans }}+{{ 'You will create this person'|trans }}
{% trans %}Name{% endtrans %} |
- {% trans %}person.dateOfBirth{% endtrans %} |
- {% trans %}person.nationality{% endtrans %} |
+ {% trans %}Date of birth{% endtrans %} |
+ {% trans %}Nationality{% endtrans %} |
|
@@ -40,13 +40,13 @@
- {{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 %} | 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) }}
---|