Improved translations for filter operators.

This commit is contained in:
Jan Böhmer 2022-08-20 01:04:53 +02:00
parent b11ef1d60d
commit fc1bf5d037
5 changed files with 64 additions and 10 deletions

View file

@ -37,7 +37,7 @@ class DateTimeConstraintType extends AbstractType
'>' => '>', '>' => '>',
'<=' => '<=', '<=' => '<=',
'>=' => '>=', '>=' => '>=',
'BETWEEN' => 'BETWEEN', 'filter.number_constraint.value.operator.BETWEEN' => 'BETWEEN',
]; ];
$builder->add('value1', DateTimeType::class, array_merge_recursive([ $builder->add('value1', DateTimeType::class, array_merge_recursive([

View file

@ -39,7 +39,7 @@ class NumberConstraintType extends AbstractType
'>' => '>', '>' => '>',
'<=' => '<=', '<=' => '<=',
'>=' => '>=', '>=' => '>=',
'BETWEEN' => 'BETWEEN', 'filter.number_constraint.value.operator.BETWEEN' => 'BETWEEN',
]; ];
$builder->add('value1', NumberType::class, array_merge_recursive([ $builder->add('value1', NumberType::class, array_merge_recursive([

View file

@ -27,13 +27,13 @@ class TextConstraintType extends AbstractType
{ {
$choices = [ $choices = [
'' => '', '' => '',
'=' => '=', 'filter.text_constraint.value.operator.EQ' => '=',
'!=' => '!=', 'filter.text_constraint.value.operator.NEQ' => '!=',
'STARTS' => 'STARTS', 'filter.text_constraint.value.operator.STARTS' => 'STARTS',
'ENDS' => 'ENDS', 'filter.text_constraint.value.operator.ENDS' => 'ENDS',
'CONTAINS' => 'CONTAINS', 'filter.text_constraint.value.operator.CONTAINS' => 'CONTAINS',
'LIKE' => 'LIKE', 'filter.text_constraint.value.operator.LIKE' => 'LIKE',
'REGEX' => 'REGEX', 'filter.text_constraint.value.operator.REGEX' => 'REGEX',
]; ];
$builder->add('value', SearchType::class, [ $builder->add('value', SearchType::class, [

View file

@ -6,7 +6,7 @@
"data-action": "change->filters--number-constraint#update" "data-action": "change->filters--number-constraint#update"
}}) }} }}) }}
{{ form_widget(form.value1) }} {{ form_widget(form.value1) }}
<span class="input-group-text d-none" {{ stimulus_target('filters/number_constraint', 'thingsToHide') }}>AND</span> <span class="input-group-text d-none" {{ stimulus_target('filters/number_constraint', 'thingsToHide') }}>{% trans %}filter.number_constraint.AND{% endtrans %}</span>
{{ form_widget(form.value2, {"attr": {"class": "d-none", "data-filters--number-constraint-target": "thingsToHide"}}) }} {{ form_widget(form.value2, {"attr": {"class": "d-none", "data-filters--number-constraint-target": "thingsToHide"}}) }}
{% if form.vars["text_suffix"] %} {% if form.vars["text_suffix"] %}
<span class="input-group-text">{{ form.vars["text_suffix"] }}</span> <span class="input-group-text">{{ form.vars["text_suffix"] }}</span>

View file

@ -9357,5 +9357,59 @@ Element 3</target>
<target>Do you really want to delete this attachment?</target> <target>Do you really want to delete this attachment?</target>
</segment> </segment>
</unit> </unit>
<unit id="JtGEdQP" name="filter.text_constraint.value.operator.EQ">
<segment>
<source>filter.text_constraint.value.operator.EQ</source>
<target>Is</target>
</segment>
</unit>
<unit id="9RAGNGw" name="filter.text_constraint.value.operator.NEQ">
<segment>
<source>filter.text_constraint.value.operator.NEQ</source>
<target>Is not</target>
</segment>
</unit>
<unit id="N1AQsNF" name="filter.text_constraint.value.operator.STARTS">
<segment>
<source>filter.text_constraint.value.operator.STARTS</source>
<target>Starts with</target>
</segment>
</unit>
<unit id="3Rr21xj" name="filter.text_constraint.value.operator.CONTAINS">
<segment>
<source>filter.text_constraint.value.operator.CONTAINS</source>
<target>Contains</target>
</segment>
</unit>
<unit id="S_U21kw" name="filter.text_constraint.value.operator.ENDS">
<segment>
<source>filter.text_constraint.value.operator.ENDS</source>
<target>Ends with</target>
</segment>
</unit>
<unit id="l2ojG4Z" name="filter.text_constraint.value.operator.LIKE">
<segment>
<source>filter.text_constraint.value.operator.LIKE</source>
<target>LIKE pattern</target>
</segment>
</unit>
<unit id="hAcin33" name="filter.text_constraint.value.operator.REGEX">
<segment>
<source>filter.text_constraint.value.operator.REGEX</source>
<target>Regular expression</target>
</segment>
</unit>
<unit id="hWtqvI3" name="filter.number_constraint.value.operator.BETWEEN">
<segment>
<source>filter.number_constraint.value.operator.BETWEEN</source>
<target>Between</target>
</segment>
</unit>
<unit id="Pho_nY5" name="filter.number_constraint.AND">
<segment>
<source>filter.number_constraint.AND</source>
<target>and</target>
</segment>
</unit>
</file> </file>
</xliff> </xliff>