Fix deprecation of transchoice

This commit is contained in:
Julien Fastré 2023-10-02 17:44:21 +02:00
parent 41f4bbfdce
commit ef8ac6041a
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
16 changed files with 71 additions and 39 deletions

View File

@ -1,6 +1,11 @@
<h2>{{ 'Event search'|trans }}</h2>
<p>{% transchoice total with { '%pattern%' : pattern } %}%total% events match the search %pattern%{% endtranschoice %}</p>
<p>
{{ 'total events match the search'|trans({'total' : total}) }}&nbsp;:
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>
</p>
<style>
table.events td:last-child {

View File

@ -67,7 +67,7 @@
<h2>{{ 'Participations'|trans }}</h2>
{% set count = event.participations|length %}
<p>{% transchoice count %}%count% participations to this event{% endtranschoice %}</p>
<p>{{ 'count participations to this event'|trans({'count': count}) }}</p>
{% if count > 0 %}
<table class="table table-bordered border-dark align-middle">

View File

@ -0,0 +1,13 @@
total events match the search: >-
{ total, plural,
=0 {Aucun événement ne correspond aux termes de recherche}
one {Un événement correspond aux termes de recherche}
other {# événements correspondent aux termes de recherche}
}
count participations to this event: >-
{ count, plural,
=0 {Aucun participant à l'événement}
one {Un participant à l'événement}
other {# participants à l'événement}
}

View File

@ -11,7 +11,6 @@ Participation: Participation
Participations: Participations
Status: Statut
Last update: Dernière mise à jour
'%count% participations to this event': '{0} Aucun participant à l''événement | {1} Un participant à l''événement | ]1,Inf] %count% participants à l''événement'
Moderator: Animateur
#CRUD event
@ -54,7 +53,6 @@ Are you sure you want to remove that event ?: Êtes-vous certain de vouloir supp
#search
Event search: Recherche d'événements
'%total% events match the search %pattern%' : '{0} Aucun événement ne correspond aux termes de recherche "%pattern%" | {1} Un événement a été trouvé par la recherche "%pattern%" | ]1,Inf] %total% événements correspondent aux termes de recherche "%pattern%".'
CHILL_EVENT_UPDATE: Modifier un événement
CHILL_EVENT_CREATE: Créer un événement

View File

@ -25,9 +25,7 @@
{% if alternatePersons is not empty %}
<div class="alert alert-warning flash_message">
<span>
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %}
%nb% person with similar name. Please verify that this is a new person
{% endtranschoice %}
{{ 'nb person with similar name. Please verify that this is a new person'|trans({'nb' : alternatePersons|length}) }}
</span>
</div>

View File

@ -18,7 +18,7 @@
<h2>{{ title|default('Person search results')|trans }}</h2>
<p>
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
{{ 'total persons matching the search pattern'|trans({'total' : total}) }}&nbsp;:
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>

View File

@ -18,7 +18,7 @@
<h2>{{ title|default('Person search results by phonenumber')|trans }}</h2>
<p>
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
{{ 'total persons matching the search pattern'|trans({'total' : total}) }}&nbsp;:
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>

View File

@ -201,9 +201,9 @@
<h2>{{ title|default('Person search results')|trans }}</h2>
<p>
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
{{ 'total persons matching the search pattern'|trans({'total' : total}) }}&nbsp;:
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ pattern }}
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>
</p>

View File

@ -135,3 +135,18 @@ exports:
by_person:
Filtered by person\'s geographical unit (based on address) computed at date, only units:
"Filtré par zone géographique sur base de l'adresse, calculé à {datecalc, date, short}, seulement les zones suivantes: {units}"
'total persons matching the search pattern': >-
{ total, plural,
=0 {Aucun usager ne correspond aux termes de recherche}
one {Un usager correspond aux termes de recherche}
many {# usagers correspondent aux terms de recherche}
other {# usagers correspondent aux terms de recherche}
}
'nb person with similar name. Please verify that this is a new person': >-
{ nb, plural,
=0 {Aucun usager n'a un nom similaire}
one {Un usager a un nom similaire. Vérifiez qu'il ne s'agit pas de lui.}
other {# usagers ont un nom similaire. Vérifiez qu'il ne s'agit pas de l'un d'eux}
}

View File

@ -151,14 +151,12 @@ Reset: 'Remise à zéro'
'Add a person': 'Ajout d''un usager'
'Person Menu': 'Menu usager'
'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': '{1} Une usager a un nom similaire. Vérifiez qu''il ne s''agit pas d''elle. | ]1, Inf] %nb% usagers 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éé'
'Person search results': 'Recherche de usagers'
Person search results by phonenumber: Recherche d'usager par numéro de téléphone
'Search within persons': 'Recherche parmi les usagers'
Open person file: Ouvrir le dossier de l'usager
and %number% other: '{0} et aucun autre| {1} et une autre |]1, Inf] et %number% autres'
'%total% persons matching the search pattern:': '{0} Aucune usager ne correspond aux termes de recherche : | {1} Un usager a été trouvé par la recherche : | ]1,Inf] %total% usagers correspondent aux termes de recherche :'
'Last opening since %last_opening%': 'Dernière ouverture le %last_opening%.'
'Person accompanying period - %name%': 'Historique du dossier - %name%'
'Opening date': 'Date d''ouverture'

View File

@ -1,22 +1,11 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
<h2>{{ 'Reports search results'|trans }}</h2>
<p>{{ '%total% reports matching the search "%pattern%"'|transchoice( total, {'%pattern%': pattern, '%total%' : total}) }}</p>
<p>
{{ 'total reports matching the search'|trans({'total' : total}) }}&nbsp;:
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>
</p>
{% if reports|length > 0 %}
<table class="striped rounded">

View File

@ -34,7 +34,6 @@ No report registered for this person.: Aucun rapport pour cet usager.
'You may not set a date argument and a date in default': Vous avez introduit deux dates, l'une avec l'argument date et l'autre en zone de recherche par défaut. Merci d'indiquer l'un ou l'autre
'You must provide either a date:YYYY-mm-dd argument or a YYYY-mm-dd default search': Merci d'indiquer soit un argument date:YYYY-mm-dd, soit une date dans la recherche par défaut.
'Reports search results': Recherche dans les rapports
'%total% reports matching the search "%pattern%"': '{0} Aucun rapport ne correspond à la recherche "%pattern%" | {1} Un rapport correspond à la recherche "%pattern%" | ]1,Inf]%total% rapports correspondent à la recherche "%pattern%"'
#timeline
'%user% has filled a %report_label% report': "%user% a ajouté un rapport '%report_label%'"

View File

@ -0,0 +1,7 @@
total reports matching the search: >-
{ total, plural,
=0 {Aucun rapport ne correspond à la recherche}
one {Un rapport correspond à la recherche}
many {# rapports correspondent à la recherche}
other {# rapports correspondent à la recherche}
}

View File

@ -66,7 +66,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
if (0 < $ended) {
$this->addItemInMenu(
$menu,
'%number% tasks over deadline',
'nb tasks over deadline',
$ended,
-15,
['new', 'in_progress'],
@ -77,7 +77,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
if (0 < $warning) {
$this->addItemInMenu(
$menu,
'%number% tasks near deadline',
'nb tasks near deadline',
$warning,
-14,
['new', 'in_progress'],
@ -103,7 +103,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
{
if (0 < $number) {
$menu->addChild(
$this->translator->transChoice($message, $number),
$this->translator->trans($message, $number),
[
'route' => 'chill_task_singletask_my_tasks',
'routeParameters' => [

View File

@ -95,10 +95,6 @@ Are you sure you want to start this task ?: Êtes-vous sûrs de vouloir démarre
"The transition is successfully applied": "La transition a bien été effectuée"
"The transition could not be applied": "La transition n'a pas pu être appliquée"
#widget
"%number% tasks over deadline": "{0} Aucune tâche dépassée|{1} Une tâche dépassée | ]1,Inf[ %count% tâches dépassées"
"%number% tasks near deadline": "{0} Aucune tâche en rappel|{1} Une tâche en rappel | ]1,Inf[ %count% tâches en rappel"
Tasks near deadline: Tâches à échéance proche
Tasks over deadline: Tâches à échéance dépassée
Tasks without alert: Tâches à échéance future ou sans échéance

View File

@ -0,0 +1,14 @@
#widget
nb tasks over deadline: >-
{nb, plural,
=0 {Aucune tâche dépassée}
one {Une tâche dépassée}
other {# tâches dépassées}
}
nb tasks near deadline: >-
{nb, plural,
=0 {Aucune tâche en rappel}
one {Une tâche en rappel}
other {# tâches en rappel}
}