Skip to content

Commit

Permalink
fix: do not concatenate labels without separators
Browse files Browse the repository at this point in the history
Closes #4152
  • Loading branch information
VaiTon committed Aug 13, 2021
1 parent 987f711 commit d24907c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Expand Up @@ -733,11 +733,10 @@ class SummaryProductFragment : BaseFragment(), ISummaryProductPresenter.View {

binding.labelsText.text = SpannableStringBuilder()
.bold { append(getString(R.string.txtLabels)) }
.append(" ")
.apply {
state.data.map(::getLabelTag).forEachIndexed { i, el ->
append(el)
if (i == state.data.size) append(", ")
if (i != state.data.size) append(", ")
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/values/strings.xml
Expand Up @@ -224,17 +224,17 @@
<string name="alert_dialog_warning_title">Warning</string>
<string name="alert_dialog_warning_msg_user">User/password has changed, please update information</string>
<string name="toast_retrieving">Loading…</string>
<string name="txtBarcode">Barcode :</string>
<string name="txtCategories">Categories :</string>
<string name="txtLabels">Labels, certifications, awards :</string>
<string name="txtEMB">Traceability codes:</string>
<string name="txtIngredients">Ingredients list :</string>
<string name="txtBarcode">Barcode:</string>
<string name="txtCategories">Categories:</string>
<string name="txtLabels">Labels, certifications, awards: </string>
<string name="txtEMB">Traceability codes: </string>
<string name="txtIngredients">Ingredients list: </string>
<string name="Donate">Donate</string>
<string name="Donation">Click here to donate to Open Food Facts</string>
<string name="txtSubstances">Substances or products causing allergies or intolerances :</string>
<string name="txtAdditives">Additives :</string>
<string name="txtTraces">Traces :</string>
<string name="txtMayBeFromPalmOilProduct">Ingredients that may be from palm oil :</string>
<string name="txtSubstances">Substances or products causing allergies or intolerances: </string>
<string name="txtAdditives">Additives: </string>
<string name="txtTraces">Traces: </string>
<string name="txtMayBeFromPalmOilProduct">Ingredients that may be from palm oil: </string>
<string name="txtPalmOilProduct">Ingredients from palm oil :</string>
<string name="txtServingSize">Serving size :</string>
<string name="txtNutrientLevel100g">Nutrient levels for 100g :</string>
Expand Down

0 comments on commit d24907c

Please sign in to comment.