Skip to content

Commit

Permalink
Fixed issue #14294: Multi-numeric labels not translated
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikvitt committed Nov 29, 2018
1 parent 0d5d8da commit 1aed20d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -13,7 +13,7 @@
{% if sumRemainingEqn %}
<li class="form-group ls-group-remaining ls-group-dynamic">
<div class="control-label col-xs-12 col-sm-{{sLabelWidth}}">
{{ gT('Remaining: ') }}
{{ gT('Remaining') }}:
</div>
<div class="ls-input-group col-xs-12 col-sm-{{sInputContainerWidth}} {% if sLabelWidth == 0 %} hidden{% endif %}">
{% if prefix %}
Expand All @@ -37,7 +37,7 @@
{% if sumEqn %}
<li class="form-group ls-group-total ls-group-dynamic">
<div class="control-label col-xs-12 col-sm-{{sLabelWidth}}">
{{ gT('Total: ') }}
{{ gT('Total:') }}
</div>
<div class="ls-input-group col-xs-12 col-sm-{{sInputContainerWidth}}">
{% if prefix %}
Expand Down
Expand Up @@ -14,7 +14,7 @@
<li class="form-group ls-group-remaining ls-group-dynamic">
<div class="col-xs-12 col-sm-{{ sInputContainerWidth }} col-md-offset-{{ sLabelWidth }}">
<div class="control-label">
{{ gT('Remaining: ') }}
{{ gT('Remaining') }}:
</div>
{% if prefix %}
<div class="prefix-text prefix"><!-- Suffix prefix are not shown inline, but only in the slider: completely diofferent concept : set hidden -->
Expand All @@ -37,7 +37,7 @@
<li class="form-group ls-group-total ls-group-dynamic">
<div class="col-xs-12 col-sm-{{ sInputContainerWidth }} col-md-offset-{{ sLabelWidth }}">
<div class="control-label">
{{gT('Total: ')}}
{{gT('Total:')}}
</div>
<div id="totalvalue_{{ id }}" class="form-control-static numeric dynamic-total" data-number="1">
{{ '{'~sumEqn~'}' }}
Expand Down

3 comments on commit 1aed20d

@Shnoulle
Copy link
Collaborator

@Shnoulle Shnoulle commented on 1aed20d Nov 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion : we must leave gT('Remaining:') (and gT('Total:')) but update translation file , no ?

For example in french : need a &nbsp; before a : : translation string must include : (except if added via css)

@dominikvitt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translations from twig files are not imported into translation database.
Also, it is better to have only one translation: gT('Remaining') and use it in both cases.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translations from twig files are not imported into translation database.

This must be … or add a twig.php file just for translation …

Here :

  1. why Total have : and not Remaining
  2. You disable frecnh translator to add &nbsp; when necessary for example;

I think translation string must always have punctuation …

Please sign in to comment.