Skip to content

Commit

Permalink
fix: Nutri Score Nutriments with an asterisk (#8205)
Browse files Browse the repository at this point in the history
  • Loading branch information
MonalikaPatnaik authored Mar 20, 2023
1 parent 9253e4e commit 4ba6017
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions po/common/common.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,11 @@ msgid ""
"by typing the first letters of their name in the last row of the table."
msgstr ""

msgctxt "nutrition_data_table_asterisk"
msgid ""
"Essential nutrients to calculate the Nutri-Score."
msgstr ""

msgctxt "nutrition_grades_p"
msgid "Nutrition grades"
msgstr ""
Expand Down
4 changes: 4 additions & 0 deletions po/common/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,10 @@ msgid "The table lists by default nutriments that are often specified. Leave the
msgstr "The table lists by default nutriments that are often specified. Leave the field blank if it's not on the label.<br/>You can add extra nutriments (vitamins, minerals, cholesterol etc.)\n"
"by typing the first letters of their name in the last row of the table."

msgctxt "nutrition_data_table_asterisk"
msgid "Essential nutrients to calculate the Nutri-Score."
msgstr "Essential nutrients to calculate the Nutri-Score."

msgctxt "nutrition_data_table_sub"
msgid "-"
msgstr "-"
Expand Down
4 changes: 2 additions & 2 deletions scss/_off.scss
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ nav.tab-bar > div {
font-size: 0.8em;
}

.note {
.note ,.asterisk {
font-size: 0.8em;
}

.example,
.note {
.note,.asterisk {
margin: 4px 0 0 4px;
}

Expand Down
2 changes: 1 addition & 1 deletion taxonomies/nutrient_levels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2231,4 +2231,4 @@ yi:זאלץ in high quantity
yo:Iyọ̀ in high quantity
za:Salt in high quantity
zh:食盐在最高含量中
zu:Salt in high quantity
zu:Salt in high quantity
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ <h1>[% title %]</h1>

[% IF errors_index >=0 %]
<p>[% lang("correct_the_following_errors") %]</p>

[% FOREACH error IN errors %]
<p class="error">[% error %]</p><br/>
[% END %]
Expand Down Expand Up @@ -59,6 +60,7 @@ <h1>[% title %]</h1>
<p id="barcode_paragraph"> [% lang("barcode") %][% sep %]:
<span id="barcode" property="food:code" itemprop="gtin13" style="speak-as:digits;">[% code %]</span>
</p>


[% IF moderator %]
<label for="new_code" id="label_new_code">[% label_new_code %]</label>
Expand Down Expand Up @@ -209,7 +211,11 @@ <h1>[% title %]</h1>
<td>
<!--label starts-->
[% IF nutriment.name.defined %]
[% IF nutriment.nid == 'energy-kj' || nutriment.nid == 'saturated-fat' || nutriment.nid == 'salt'|| nutriment.nid =='sugars' || nutriment.nid == 'fiber' || nutriment.nid =='fat' || nutriment.nid =='proteins' %]
<label class="nutriment_label" for="nutriment_[% nutriment.enid %]">[% nutriment.prefix %][% nutriment.name %]*</label>
[% ELSE %]
<label class="nutriment_label" for="nutriment_[% nutriment.enid %]">[% nutriment.prefix %][% nutriment.name %]</label>
[% END %]
[% ELSIF nutriment.label_value.defined %]
<input class="nutriment_label" id="nutriment_[% nutriment.enid %]_label" name="nutriment_[% nutriment.enid %]_label" value="[% nutriment.label_value %]" />
[% ELSE %]
Expand Down Expand Up @@ -255,7 +261,8 @@ <h1>[% title %]</h1>
[% IF moderator %]
<div><a class="small button" onclick="\$('.nutriment_value').val('')">[% lang('remove_all_nutrient_values') %]</a></div>
[% END %]


<p class="asterisk">&rarr;*[% sep %]:[% lang('nutrition_data_table_asterisk') %]</p>
<p class="note">&rarr; [% lang('nutrition_data_table_note') %]</p>

</div>
Expand Down

0 comments on commit 4ba6017

Please sign in to comment.