mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 00:06:17 +00:00
fix: add the template settings strings to the catalog
TemplateSettings calls the translate function `tr` because `t` is a
template variable there, and both the key harvester and the coverage
test only looked for `t('...')`. Ten of its keys were never added to
locales/rn/en.json, so they could not be translated and the test did
not notice. Both now also match `tr('...')`, and the missing keys are
added.
This commit is contained in:
@@ -61,9 +61,10 @@ const overlayFlat = flatten(overlay);
|
||||
|
||||
// t('key', 'fallback') / t('key', "fallback") / t('key', `fallback`) - the
|
||||
// fallback may span lines; keep it simple: single-quoted or double-quoted,
|
||||
// non-nested strings.
|
||||
const CALL_RE = /\bt\(\s*'([^']+)'\s*,\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")/g;
|
||||
const KEY_ONLY_RE = /\bt\(\s*'([^']+)'/g;
|
||||
// non-nested strings. `tr` is the same function where `t` is taken (a
|
||||
// template or timer variable).
|
||||
const CALL_RE = /\btr?\(\s*'([^']+)'\s*,\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")/g;
|
||||
const KEY_ONLY_RE = /\btr?\(\s*'([^']+)'/g;
|
||||
|
||||
const added = [];
|
||||
const missingNoFallback = [];
|
||||
|
||||
Reference in New Issue
Block a user