refactor(i18n): route remaining extension labels through the catalog (T-468)
Migrate the user-facing strings in menubar, output, search, deeplink, editor, files, terminal, markdown, and vim to ClideSettings.i18n.string/.interpolated; extend the existing catalogs and create the missing ones (deeplink, output, search, markdown, menubar, vim). vim mode labels now resolve through builtin.vim (default still `-- NORMAL --`, now localizable). A dock-status test seeds builtin.output so the widget's own i18n lookups resolve instead of warning into the logRing it counts. No en_US behaviour change (D-21). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,14 +17,11 @@ class VimModeIndicator extends StatelessWidget {
|
||||
builder: (context, _) {
|
||||
if (!service.enabled) return const SizedBox.shrink();
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
final mode = service.mode;
|
||||
final label = ClideSettings.i18n.string(context, 'mode.${mode.name}', namespace: 'builtin.vim', placeholder: mode.label);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: ClideText(
|
||||
'-- ${service.mode.label} --',
|
||||
fontFamily: ClideSettings.fonts.monoOf(context),
|
||||
fontSize: clideFontCaption,
|
||||
color: tokens.statusBarForeground,
|
||||
),
|
||||
child: ClideText('-- $label --', fontFamily: ClideSettings.fonts.monoOf(context), fontSize: clideFontCaption, color: tokens.statusBarForeground),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -31,8 +31,9 @@ enum VimMode {
|
||||
/// The keymap scope flag set true exactly when this mode is active.
|
||||
final String scopeFlag;
|
||||
|
||||
/// Status-bar label, shown as `-- NORMAL --` (Vim's own vocabulary;
|
||||
/// intentionally untranslated, like Vim itself).
|
||||
/// English status-bar label, shown as `-- NORMAL --`. Used as the i18n
|
||||
/// placeholder for `mode.<name>` in the builtin.vim catalog (T-462); the
|
||||
/// default keeps Vim's own vocabulary, but a locale may override it.
|
||||
final String label;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user