Skip to content

Commit

Permalink
bug #972 Fixed some missing translations (javiereguiluz)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the master branch (closes #972).

Discussion
----------

Fixed some missing translations

This fixes #957.

Commits
-------

7536b57 Fixed some missing translations
  • Loading branch information
javiereguiluz committed Mar 10, 2016
2 parents 29f042e + 7536b57 commit 0480f7d
Show file tree
Hide file tree
Showing 19 changed files with 127 additions and 27 deletions.
7 changes: 7 additions & 0 deletions Resources/translations/messages.bg.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<source>action.list</source>
<target>Обратно към списъка</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.ca.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Ningú</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Prázdné</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>kein Wert</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>None</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Ninguno</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.eu.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<source>action.list</source>
<target>Zerrendara itzuli</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Aucun(e)</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Nessun valore</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.nl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<source>action.list</source>
<target>Terug naar overzicht</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Pusta wartość</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.pt.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<source>action.list</source>
<target>Voltar para a lista</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.ro.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Gol</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Пусто</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.sl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Noben</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.sv.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<source>action.list</source>
<target>Åter till lista</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 7 additions & 0 deletions Resources/translations/messages.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<source>label.form.empty_value</source>
<target>Boş</target>
</trans-unit>

<!-- forms -->
<trans-unit id="form.label.collections">
<!-- don't change this "translation" -->
<source>__name__label__</source>
<target>__name__label__</target>
</trans-unit>
</body>
</file>
</xliff>
13 changes: 3 additions & 10 deletions Resources/views/form/bootstrap_3_horizontal_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,16 @@
{% endspaceless %}
{%- endblock form_label %}

{% block form_label_class -%}
col-sm-2
{%- endblock form_label_class %}
{% block form_label_class 'col-sm-2' %}

{# Rows #}

{% block form_row -%}
{% spaceless %}
{% set _field_type = easyadmin.field.fieldType|default('default') %}
<div class="form-group {% if (not compound or force_error|default(false)) and not valid %}has-error{% endif %} field-{{ block_prefixes|slice(-2)|first }}">

{% set _trans_parameters = { '%entity_name%': easyadmin.entity.name|trans, '%entity_label%': easyadmin.entity.label|trans } %}
{% set _field_label = easyadmin.field['label']|default(null) %}

{{ form_label(form, _field_label|trans(_trans_parameters)) }}
{{ form_label(form, _field_label, { translation_domain: 'messages' }) }}
<div class="{{ block('form_group_class') }}">
{{ form_widget(form) }}

Expand Down Expand Up @@ -97,6 +92,4 @@ col-sm-2
{% endspaceless %}
{% endblock reset_row %}

{% block form_group_class -%}
col-sm-10
{%- endblock form_group_class %}
{% block form_group_class 'col-sm-10' %}
22 changes: 5 additions & 17 deletions Resources/views/form/bootstrap_3_layout.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{% use "form_div_layout.html.twig" %}

{# needed to force translation of labels #}
{% set translation_domain = 'messages' %}
{% use 'form_div_layout.html.twig' %}

{% block form_start -%}
{% if 'easyadmin' == block_prefixes|slice(-2)|first %}
Expand Down Expand Up @@ -175,8 +172,6 @@
{# Labels #}

{% block form_label -%}
{# needed to force translation of labels #}
{% set translation_domain = 'messages' %}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' control-label')|trim}) -%}
{{- parent() -}}
{%- endblock form_label %}
Expand All @@ -196,9 +191,6 @@
{%- endblock radio_label %}

{% block checkbox_radio_label %}
{# needed to force translation of labels #}
{% set translation_domain = 'messages' %}

{# Do no display the label if widget is not defined in order to prevent double label rendering #}
{% if widget is defined %}
{% if required %}
Expand All @@ -212,7 +204,7 @@
{% endif %}
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
{{- widget|raw -}}
{{- label is not same as(false) ? label|trans({}, translation_domain) -}}
{{- label is not same as(false) ? label|trans({}, 'messages') -}}
</label>
{% endif %}
{% endblock checkbox_radio_label %}
Expand All @@ -222,11 +214,8 @@
{% block form_row -%}
{% set _field_type = easyadmin.field.fieldType|default('default') %}
<div class="form-group {% if (not compound or force_error|default(false)) and not valid %}has-error{% endif %} field-{{ block_prefixes|slice(-2)|first }}">

{% set _trans_parameters = { '%entity_name%': easyadmin.entity.name|trans, '%entity_label%': easyadmin.entity.label|trans } %}
{% set _field_label = easyadmin.field['label']|default(null) %}

{{- form_label(form, _field_label|trans(_trans_parameters)) -}}
{{- form_label(form, _field_label, { translation_domain: 'messages' }) -}}
{{- form_widget(form) -}}

{% if _field_type in ['datetime', 'datetimetz', 'date', 'time'] and easyadmin.field.nullable|default(false) %}
Expand Down Expand Up @@ -358,7 +347,7 @@
<div class="row">
{% if form.delete is defined %}
<div class="col-sm-3 col-md-2">
{{ form_row(form.delete) }}
{{ form_row(form.delete, { label: 'action.delete' }) }}
</div>
{% endif %}
<div class="{{ form.delete is defined ? 'col-sm-9 col-md-10' : 'col-sm-12' }}">
Expand All @@ -374,7 +363,7 @@
<div class="easyadmin-vich-image">
{{ form_widget(form.file) }}
{% if form.delete is defined %}
{{ form_row(form.delete) }}
{{ form_row(form.delete, { label: 'action.delete' }) }}
{% endif %}

{% if download_uri|default('') is not empty %}
Expand All @@ -394,7 +383,6 @@

{# Easy admin form type #}
{% block easyadmin_widget %}

{% set _trans_parameters = { '%entity_name%': easyadmin.entity.name|trans, '%entity_label%': easyadmin.entity.label|trans } %}

{% if form.vars.errors|length > 0 %}
Expand Down

0 comments on commit 0480f7d

Please sign in to comment.