Skip to content

Commit

Permalink
dev: Extract common translations keys
Browse files Browse the repository at this point in the history
  • Loading branch information
marien-probesys committed Mar 15, 2024
1 parent 783e7c0 commit 59281b9
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion templates/contracts/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
>
<summary class="popup__opener">
<span class="button button--caret">
{{ 'contracts.show.actions' | trans }}
{{ 'common.actions' | trans }}
</span>
</summary>

Expand Down
2 changes: 1 addition & 1 deletion templates/mailboxes/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@

{{ include('alerts/_alert.html.twig', {
type: 'warning',
title: 'mailboxes.deletion.caution' | trans,
title: 'common.caution' | trans,
message: 'mailboxes.deletion.going_delete' | trans({ mailbox: mailbox.name }),
}, with_context = false) }}

Expand Down
2 changes: 1 addition & 1 deletion templates/organizations/settings.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

{{ include('alerts/_alert.html.twig', {
type: 'warning',
title: 'organizations.settings.deletion.caution' | trans,
title: 'common.caution' | trans,
message: 'organizations.settings.deletion.going_delete' | trans({ organization: organization.name }),
}, with_context = false) }}

Expand Down
2 changes: 1 addition & 1 deletion templates/roles/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

{{ include('alerts/_alert.html.twig', {
type: 'warning',
title: 'roles.deletion.caution' | trans,
title: 'common.caution' | trans,
message: 'roles.deletion.going_delete' | trans({ role: role.name }),
}, with_context = false) }}

Expand Down
2 changes: 1 addition & 1 deletion templates/teams/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

{{ include('alerts/_alert.html.twig', {
type: 'warning',
title: 'teams.deletion.caution' | trans,
title: 'common.caution' | trans,
message: 'teams.deletion.going_delete' | trans({ team: team.name }),
}, with_context = false) }}

Expand Down
2 changes: 1 addition & 1 deletion templates/teams/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
>
<summary class="popup__opener">
<span class="button button--caret">
{{ 'teams.show.actions' | trans }}
{{ 'common.actions' | trans }}
</span>
</summary>

Expand Down
2 changes: 1 addition & 1 deletion templates/tickets/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
>
<summary class="popup__opener">
<span class="button button--caret">
{{ 'tickets.show.actions' | trans }}
{{ 'common.actions' | trans }}
</span>
</summary>

Expand Down
2 changes: 1 addition & 1 deletion templates/users/authorizations/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="wrapper wrapper--text">
{{ include('alerts/_alert.html.twig', {
type: 'warning',
title: 'common.warning' | trans,
title: 'common.caution' | trans,
message: 'users.no_organization_authorization' | trans({
path: path('new user authorization', { uid: user.uid, orga: user.organization.uid }),
}),
Expand Down
2 changes: 1 addition & 1 deletion templates/users/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
{% if user.organization and not is_granted_to_user(user, 'orga:create:tickets', user.organization) %}
{{ include('alerts/_alert.html.twig', {
type: 'warning',
title: 'common.warning' | trans,
title: 'common.caution' | trans,
message: 'users.no_organization_authorization' | trans({
path: path('new user authorization', { uid: user.uid, orga: user.organization.uid }),
}),
Expand Down
10 changes: 2 additions & 8 deletions translations/messages+intl-icu.en_GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ authorizations.new.title: 'New authorization'
authorizations.revoke: Revoke
authorizations.revoke.confirm: 'Are you sure that you want to revoke this authorization?'
authorizations.revoke.disabled: 'You can’t revoke this authorization.'
common.warning: Warning
common.actions: Actions
common.caution: Caution!
contracts.alerts.edit.date_alert.after: 'days before the end of the contract.'
contracts.alerts.edit.date_alert.before: Alert
contracts.alerts.edit.hours_alert.after: '% of the hours have been consumed.'
Expand All @@ -81,7 +82,6 @@ contracts.index.tickets: '{count, plural, =0 {No tickets} one {1 ticket} other {
contracts.index.title: Contracts
contracts.new.title: 'New contract'
contracts.notes: 'Private notes'
contracts.show.actions: Actions
contracts.show.alert: Alert
contracts.show.time_accounting_unit: 'Time accounting unit: {count, plural, one {1 minute} other {# minutes}}'
contracts.show.edit: 'Edit the contract'
Expand Down Expand Up @@ -129,7 +129,6 @@ layout.user_menu_title: 'Menu of {name}'
login.remember_me: 'Remember me'
login.submit: Login
login.title: 'Log in'
mailboxes.deletion.caution: Caution!
mailboxes.deletion.confirm: 'Are you sure that you want to delete this mailbox?'
mailboxes.deletion.going_delete: 'You’re going to delete the “{mailbox}” mailbox. Emails from this mailbox will no longer be fetched.'
mailboxes.deletion.submit: 'Delete the mailbox'
Expand Down Expand Up @@ -174,7 +173,6 @@ organizations.index.title: Organizations
organizations.name: Name
organizations.new.submit: 'Create the organization'
organizations.new.title: 'New organization'
organizations.settings.deletion.caution: Caution!
organizations.settings.deletion.confirm: 'Are you sure that you want to delete this organization?'
organizations.settings.deletion.going_delete: 'You’re going to delete the organization “{organization}”. This will also delete the associated tickets and authorizations.'
organizations.settings.deletion.submit: 'Delete the organization'
Expand All @@ -190,7 +188,6 @@ profile.leave_password: 'Leave these fields blank to keep your current password.
profile.new_password: 'New password'
profile.note: 'Note: the information of your profile can be visible to the other users.'
profile.title: Profile
roles.deletion.caution: Caution!
roles.deletion.confirm: 'Are you sure that you want to delete this role?'
roles.deletion.going_delete: 'You’re going to delete the “{role}” role. This will also delete the associated authorizations.'
roles.deletion.submit: 'Delete the role'
Expand Down Expand Up @@ -256,7 +253,6 @@ teams.agents.new.go_to_create_agent: 'Create a new agent instead'
teams.agents.new.go_to_select_agent: 'Select an agent instead'
teams.agents.new.select_agent: 'Select an agent'
teams.agents.new.title: 'New agent'
teams.deletion.caution: Caution!
teams.deletion.confirm: 'Are you sure that you want to delete this team?'
teams.deletion.going_delete: 'You’re going to delete the “{team}” team. This will also delete the associated authorizations. Tickets for which this team is responsible will no longer be assigned to it.'
teams.deletion.submit: 'Delete the team'
Expand All @@ -271,7 +267,6 @@ teams.index.title: 'Teams & Agents'
teams.name: Name
teams.new.submit: 'Create the team'
teams.new.title: 'New team'
teams.show.actions: Actions
teams.show.agents.new: 'New agent'
teams.show.agents.none: 'No agents'
teams.show.agents.number: '{count, plural, =0 {No agents} one {1 agent} other {# agents}}'
Expand Down Expand Up @@ -370,7 +365,6 @@ tickets.search.label: 'Search using keywords or by using the advanced syntax'
tickets.search.quick_search: 'Quick search'
tickets.search.submit: Search
tickets.search.tablist: 'Search modes'
tickets.show.actions: Actions
tickets.show.actions.rename: 'Rename the ticket'
tickets.show.actions.turn_into_incident: 'Turn into an incident'
tickets.show.actions.turn_into_request: 'Turn into a request'
Expand Down
10 changes: 2 additions & 8 deletions translations/messages+intl-icu.fr_FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ authorizations.new.title: 'Nouvelle autorisation'
authorizations.revoke: Révoquer
authorizations.revoke.confirm: "Êtes-vous sûr de vouloir révoquer cette autorisation\_?"
authorizations.revoke.disabled: 'Vous ne pouvez pas révoquer cette autorisation.'
common.warning: Attention
common.actions: Actions
common.caution: "Attention\_!"
contracts.alerts.edit.date_alert.after: 'jours de la fin du contrat.'
contracts.alerts.edit.date_alert.before: 'Alerter à'
contracts.alerts.edit.hours_alert.after: '% des heures seront consommées.'
Expand All @@ -81,7 +82,6 @@ contracts.index.tickets: '{count, plural, =0 {Aucun ticket} one {1 ticket} other
contracts.index.title: Contrats
contracts.new.title: 'Nouveau contrat'
contracts.notes: 'Notes privées'
contracts.show.actions: Actions
contracts.show.alert: Alerte
contracts.show.time_accounting_unit: "Unité de comptabilisation du temps\_: {count, plural, one {1 minute} other {# minutes}}"
contracts.show.edit: 'Modifier le contrat'
Expand Down Expand Up @@ -129,7 +129,6 @@ layout.user_menu_title: 'Menu de {name}'
login.remember_me: 'Se souvenir de moi'
login.submit: 'Se connecter'
login.title: Connexion
mailboxes.deletion.caution: "Attention\_!"
mailboxes.deletion.confirm: "Êtes-vous sûr de vouloir supprimer cette boite mail\_?"
mailboxes.deletion.going_delete: "Vous êtes sur le point de supprimer la boite mail «\_{mailbox}\_». Les emails de cette boite ne seront plus récupérés."
mailboxes.deletion.submit: 'Supprimer la boite mail'
Expand Down Expand Up @@ -174,7 +173,6 @@ organizations.index.title: Organisations
organizations.name: Nom
organizations.new.submit: 'Créer l’organisation'
organizations.new.title: 'Nouvelle organisation'
organizations.settings.deletion.caution: "Attention\_!"
organizations.settings.deletion.confirm: "Êtes-vous sûr de vouloir supprimer cette organisation\_?"
organizations.settings.deletion.going_delete: "Vous êtes sur le point de supprimer l’organisation «\_{organization}\_». Cela supprimera également les tickets et autorisations associées."
organizations.settings.deletion.submit: 'Supprimer l’organisation'
Expand All @@ -190,7 +188,6 @@ profile.leave_password: 'Laissez ces champs vides pour conserver votre mot de pa
profile.new_password: 'Nouveau mot de passe'
profile.note: "Note\_: les informations de votre profil peuvent être visibles par les autres utilisateurs."
profile.title: Profil
roles.deletion.caution: "Attention\_!"
roles.deletion.confirm: "Êtes-vous sûr de vouloir supprimer ce rôle\_?"
roles.deletion.going_delete: "Vous êtes sur le point de supprimer le rôle «\_{role}\_». Cela supprimera également les autorisations associées."
roles.deletion.submit: 'Supprimer le rôle'
Expand Down Expand Up @@ -256,7 +253,6 @@ teams.agents.new.go_to_create_agent: 'Créer plutôt un agent'
teams.agents.new.go_to_select_agent: 'Sélectionner plutôt un agent'
teams.agents.new.select_agent: 'Sélectionner un agent'
teams.agents.new.title: 'Nouvel agent'
teams.deletion.caution: "Attention\_!"
teams.deletion.confirm: "Êtes-vous sûr de vouloir supprimer cette équipe\_?"
teams.deletion.going_delete: "Vous êtes sur le point de supprimer l’équipe «\_{team}\_». Cela supprimera également les autorisations associées. Les tickets dont cette équipe est responsable n’y seront plus affectés."
teams.deletion.submit: 'Supprimer l’équipe'
Expand All @@ -271,7 +267,6 @@ teams.index.title: 'Équipes & Agents'
teams.name: Nom
teams.new.submit: 'Créer l’équipe'
teams.new.title: 'Nouvelle équipe'
teams.show.actions: Actions
teams.show.agents.new: 'Nouvel agent'
teams.show.agents.none: 'Aucun agent'
teams.show.agents.number: '{count, plural, =0 {Aucun agent} one {1 agent} other {# agents}}'
Expand Down Expand Up @@ -370,7 +365,6 @@ tickets.search.label: 'Rechercher par mots-clés ou avec la syntaxe avancée'
tickets.search.quick_search: 'Recherche rapide'
tickets.search.submit: Rechercher
tickets.search.tablist: 'Modes de recherche'
tickets.show.actions: Actions
tickets.show.actions.rename: 'Renommer le ticket'
tickets.show.actions.turn_into_incident: 'Changer en incident'
tickets.show.actions.turn_into_request: 'Changer en demande'
Expand Down

0 comments on commit 59281b9

Please sign in to comment.