i18n: extract hardcoded strings into l10n keys

Move hardcoded UI strings across multiple screens and the notification
service into ARB-backed l10n keys so they can be translated via Crowdin.
Adds 62 new keys covering sort labels, dialog copy, metadata error
snackbars, folder-picker errors, home-tab error states, extensions home
feed selector, and all notification titles/bodies. NotificationService
now caches an AppLocalizations instance (injected from MainShell via
didChangeDependencies) and falls back to English literals when no locale
is available.
This commit is contained in:
zarzet
2026-03-29 17:02:12 +07:00
parent fc70a912bf
commit 48eef0853d
24 changed files with 3161 additions and 66 deletions
+6 -6
View File
@@ -2174,13 +2174,13 @@ class _QueueTabState extends ConsumerState<QueueTab> {
),
),
FilterChip(
label: const Text('A-Z'),
label: Text(context.l10n.sortAlphaAsc),
selected: tempSortMode == 'a-z',
onSelected: (_) =>
setSheetState(() => tempSortMode = 'a-z'),
),
FilterChip(
label: const Text('Z-A'),
label: Text(context.l10n.sortAlphaDesc),
selected: tempSortMode == 'z-a',
onSelected: (_) =>
setSheetState(() => tempSortMode = 'z-a'),
@@ -5461,18 +5461,18 @@ class _QueueTabState extends ConsumerState<QueueTab> {
return await showDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
title: const Text('Cancel download?'),
title: Text(context.l10n.cancelDownloadTitle),
content: Text(
'This will cancel the active download for "${item.track.name}".',
context.l10n.cancelDownloadContent(item.track.name),
),
actions: [
TextButton(
onPressed: () => Navigator.of(ctx).pop(false),
child: const Text('Keep'),
child: Text(context.l10n.cancelDownloadKeep),
),
TextButton(
onPressed: () => Navigator.of(ctx).pop(true),
child: const Text('Cancel'),
child: Text(context.l10n.dialogCancel),
),
],
),