Skip to content

Commit

Permalink
extend transifex developer notes for label and name about `locationSe…
Browse files Browse the repository at this point in the history
…t.include` countries
  • Loading branch information
tordans committed Mar 17, 2023
1 parent 358a499 commit 953a16b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 953a16b

Please sign in to comment.