From 953a16be21605ed2d324fa8df9bb6f5dafc17f36 Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 17 Mar 2023 15:30:18 +0100 Subject: [PATCH] extend transifex developer notes for label and name about `locationSet.include` countries --- lib/build.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/build.js b/lib/build.js index 5414e85..9a6e66b 100644 --- a/lib/build.js +++ b/lib/build.js @@ -409,6 +409,10 @@ function generateTranslations(fields, presets, tstrings, searchableFieldIDs) { }); } + if (field.locationSet?.include) { + yamlField['#label'] += ` | Local preset for countries ${field.locationSet.include.map(country => `"${country.toUpperCase()}"`).join(', ')}`; + } + if (yamlField.placeholder) { yamlField['#placeholder'] = `${fieldId} field placeholder`; } @@ -444,6 +448,10 @@ function generateTranslations(fields, presets, tstrings, searchableFieldIDs) { yamlPreset['#name'] += ' | Translate the primary name. Optionally, add equivalent synonyms on newlines in order of preference (press the Return key).'; } + if (preset.locationSet?.include) { + yamlPreset['#name'] += ` | Local preset for countries ${preset.locationSet.include.map(country => `"${country.toUpperCase()}"`).join(', ')}`; + } + if (preset.searchable !== false) { if (yamlPreset.terms) { yamlPreset['#terms'] = 'terms: ' + yamlPreset.terms;