mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 16:06:32 +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:
@@ -34,10 +34,10 @@ function walk(dir: string, out: string[] = []): string[] {
|
||||
return out;
|
||||
}
|
||||
|
||||
// Literal keys: t('a.b.c', …). Template-literal keys (`settings.tabs.${id}`)
|
||||
// are checked by prefix below.
|
||||
const LITERAL_KEY_RE = /\bt\(\s*'([^']+)'/g;
|
||||
const TEMPLATE_KEY_RE = /\bt\(\s*`([^`$]+)\$\{/g;
|
||||
// Literal keys: t('a.b.c', …), or tr(…) where `t` is taken. Template-literal
|
||||
// keys (`settings.tabs.${id}`) are checked by prefix below.
|
||||
const LITERAL_KEY_RE = /\btr?\(\s*'([^']+)'/g;
|
||||
const TEMPLATE_KEY_RE = /\btr?\(\s*`([^`$]+)\$\{/g;
|
||||
|
||||
// Walking and reading all of src/ synchronously takes under a second on its
|
||||
// own, but went past the 5 s default (16.8 s) while gradle was building.
|
||||
|
||||
Reference in New Issue
Block a user