auto-load extension i18n catalogs; add the missing tab-title ones
Five builtins (tickets, decisions, git, pql, problems) declared a localized tab title but shipped no catalog and weren't in the hand-kept preload list, so each logged "namespace not registered" on boot. ExtensionManager now loads the i18n namespace of every localized TabContribution when its extension activates — no manual list edit for a new tab — and the five missing en_US catalogs are added. T-155. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -146,6 +146,16 @@ class ExtensionManager extends ChangeNotifier {
|
||||
for (final c in ext.contributions) {
|
||||
_applyContribution(c);
|
||||
}
|
||||
// Eagerly load the i18n catalog for any localized tab this extension
|
||||
// contributes, so its title resolves without a "namespace not
|
||||
// registered" warning — and without the namespace having to be listed
|
||||
// by hand at boot (T-155).
|
||||
for (final ns in {
|
||||
for (final c in ext.contributions)
|
||||
if (c is TabContribution && c.i18nNamespace != null) c.i18nNamespace!,
|
||||
}) {
|
||||
await i18n.ensureNamespaceLoaded(ns);
|
||||
}
|
||||
_activated.add(id);
|
||||
_failed.remove(id);
|
||||
events.emit(ExtensionActivated(id: id));
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tab.title": { "translation": "Decisions" }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tab.title": { "translation": "Git" }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tab.title": { "translation": "pql" }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tab.title": { "translation": "Problems" }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tab.title": { "translation": "Tickets" }
|
||||
}
|
||||
Reference in New Issue
Block a user