From 5ee9bbd33c5942ccfa8475588441261eb93425cc Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Thu, 5 Feb 2015 21:48:28 +0100 Subject: [PATCH] Fix trans tag in templates --- templates/web/common/dialog_export.html.twig | 2 +- templates/web/email-template.html.twig | 2 +- templates/web/setup/step2.html.twig | 2 +- templates/web/thesaurus/thesaurus.html.twig | 34 ++++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig index b101b6f286..e976b9728c 100644 --- a/templates/web/common/dialog_export.html.twig +++ b/templates/web/common/dialog_export.html.twig @@ -434,7 +434,7 @@
-

{% trans 'export::mail: fichiers joint' %}

+

{{ 'export::mail: fichiers joint' | trans }}

{% for name, values in download.get_display_ftp() %} {% if values.available > 0 %}
diff --git a/templates/web/email-template.html.twig b/templates/web/email-template.html.twig index c5b06292d9..6b991d7281 100644 --- a/templates/web/email-template.html.twig +++ b/templates/web/email-template.html.twig @@ -106,7 +106,7 @@ {% if expiration is not none %} - {% trans 'Ce lien est valable jusqu\'au' %} {{ app['date-formatter'].getDate(expiration) }} {{ app['date-formatter'].getTime(expiration) }} + {{ 'Ce lien est valable jusqu\'au' | trans }} {{ app['date-formatter'].getDate(expiration) }} {{ app['date-formatter'].getTime(expiration) }} {% endif %} diff --git a/templates/web/setup/step2.html.twig b/templates/web/setup/step2.html.twig index ad0726739a..8b913be6e7 100644 --- a/templates/web/setup/step2.html.twig +++ b/templates/web/setup/step2.html.twig @@ -245,7 +245,7 @@ return; } if (false === data.innodb) { - el_message.empty().append("{% trans 'Database server does not support InnoDB storage engine' %}"); + el_message.empty().append("{{ 'Database server does not support InnoDB storage engine' | trans }}"); return; } diff --git a/templates/web/thesaurus/thesaurus.html.twig b/templates/web/thesaurus/thesaurus.html.twig index 60571167b8..e3e3505c46 100644 --- a/templates/web/thesaurus/thesaurus.html.twig +++ b/templates/web/thesaurus/thesaurus.html.twig @@ -73,7 +73,7 @@ $("#SEARCH_DLG").dialog({ modal: true, - title: "{% trans 'Chercher' %}", + title: "{{ 'Chercher' | trans }}", autoOpen:false }); $("#NEWSY_DLG").dialog({ @@ -206,14 +206,14 @@
{{ 'phraseanet:: thesaurus' | trans }} - X + X
-
{{ 'thesaurus:: onglet stock' | trans }} X +
{{ 'thesaurus:: onglet stock' | trans }} X
{{ 'thesaurus:: afficher les termes refuses' | trans }} @@ -243,16 +243,16 @@
- - + + + +
{% trans 'thesaurus:: le terme' %}{% trans 'thesaurus:: est egal a ' %}{{ 'thesaurus:: le terme' | trans }}{{ 'thesaurus:: est egal a ' | trans }}
- {% trans 'thesaurus:: commence par' %}{{ 'thesaurus:: commence par' | trans }}
- {% trans 'thesaurus:: contient' %}{{ 'thesaurus:: contient' | trans }}

@@ -270,12 +270,12 @@ - {% trans 'thesaurus:: contexte' %} : + {{ 'thesaurus:: contexte' | trans }} : (   ) - {% trans 'phraseanet:: language' %} :  + {{ 'phraseanet:: language' %} :  {% for code, language in flags %} @@ -620,13 +620,13 @@ $("#SEARCH_DLG").dialog("option", "buttons", [ { - text:"{% trans 'boutton::annuler' %}", + text:"{{ 'boutton::annuler' %}", click: function() { $(this).dialog("close"); } } , { - text:"{% trans 'boutton::chercher' %}", + text:"{{ 'boutton::chercher' %}", click:function() { var zdialog = $(this); var nid = cbParm.id.substr(4).replace(".", "\\.", "g"); @@ -1012,19 +1012,19 @@ case "kterm_newsy": // nouveau synonyme var typ = menuelem_id=="kterm_newts" ? "TS" : "SY"; $("#NEWSY_DLG .label").html( - typ=="TS" ? "{% trans 'thesaurus:: terme' %}" : "{% trans 'thesaurus:: synonyme' %}" + typ=="TS" ? "{{ 'thesaurus:: terme' | trans }}" : "{{ 'thesaurus:: synonyme' | trans }}" ); - $("#NEWSY_DLG").dialog("option", "title", typ=="TS" ? "{% trans 'thesaurus:: Nouveau terme' %}" : "{% trans 'thesaurus:: Nouveau synonyme' %}"); + $("#NEWSY_DLG").dialog("option", "title", typ=="TS" ? "{{ 'thesaurus:: Nouveau terme' | trans }}" : "{{ 'thesaurus:: Nouveau synonyme' | trans }}"); $("#NEWSY_DLG").dialog("option", "buttons", [ { - text:"{% trans 'boutton::annuler' %}", + text:"{{ 'boutton::annuler' | trans }}", click: function() { $(this).dialog("close"); } } , { - text:"{% trans 'boutton::valider' %}", + text:"{{ 'boutton::valider' | trans }}", click:function() { var zdialog = $(this); var myObj = { "win":window }; @@ -1117,13 +1117,13 @@ $("#SEARCH_DLG").dialog("option", "buttons", [ { - text:"{% trans 'boutton::annuler' %}", + text:"{{ 'boutton::annuler' | trans }}", click: function() { $(this).dialog("close"); } } , { - text:"{% trans 'boutton::chercher' %}", + text:"{{ 'boutton::chercher' | trans }}", click:function() { var zdialog = $(this); var nid = cbParm.id.substr(4).replace(".", "\\.", "g");