diff --git a/lib/core/error/enhanced_error_service.dart b/lib/core/error/enhanced_error_service.dart index 11ff82b..2b75048 100644 --- a/lib/core/error/enhanced_error_service.dart +++ b/lib/core/error/enhanced_error_service.dart @@ -226,6 +226,7 @@ class EnhancedErrorService { /// Build error widget for displaying in UI Widget buildErrorWidget( + BuildContext context, dynamic error, { VoidCallback? onRetry, bool showTechnicalDetails = false, @@ -282,7 +283,7 @@ class EnhancedErrorService { ElevatedButton.icon( onPressed: onRetry, icon: const Icon(Icons.refresh), - label: const Text('Retry'), + label: Text(AppLocalizations.of(context)!.retry), ), ], ], diff --git a/lib/core/services/navigation_service.dart b/lib/core/services/navigation_service.dart index ff35c70..34adc55 100644 --- a/lib/core/services/navigation_service.dart +++ b/lib/core/services/navigation_service.dart @@ -5,6 +5,7 @@ import '../../features/chat/views/chat_page.dart'; import '../../features/files/views/workspace_page.dart'; import '../../features/profile/views/profile_page.dart'; import '../../shared/widgets/themed_dialogs.dart'; +import 'package:conduit/l10n/app_localizations.dart'; /// Service for handling navigation throughout the app class NavigationService { @@ -139,8 +140,15 @@ class NavigationService { // Removed navigation drawer route default: - page = Scaffold( - body: Center(child: Text('Route not found: ${settings.name}')), + page = Builder( + builder: (context) => Scaffold( + body: Center( + child: Text( + AppLocalizations.of(context)! + .routeNotFound(settings.name ?? ''), + ), + ), + ), ); } diff --git a/lib/features/navigation/widgets/chats_drawer.dart b/lib/features/navigation/widgets/chats_drawer.dart index 1618e7e..a540a77 100644 --- a/lib/features/navigation/widgets/chats_drawer.dart +++ b/lib/features/navigation/widgets/chats_drawer.dart @@ -13,6 +13,7 @@ import '../../chat/providers/chat_providers.dart' as chat; import '../../profile/views/profile_page.dart'; import '../../../shared/utils/ui_utils.dart'; import '../../../core/auth/auth_state_manager.dart'; +import 'package:conduit/l10n/app_localizations.dart'; class ChatsDrawer extends ConsumerStatefulWidget { const ChatsDrawer({super.key}); @@ -114,7 +115,7 @@ class _ChatsDrawerState extends ConsumerState { chat.startNewChat(ref); if (mounted) Navigator.of(context).maybePop(); }, - tooltip: 'New Chat', + tooltip: AppLocalizations.of(context)!.newChat, ), ), ], @@ -151,7 +152,7 @@ class _ChatsDrawerState extends ConsumerState { fontSize: AppTypography.bodyMedium, ), decoration: InputDecoration( - hintText: 'Search conversations...', + hintText: AppLocalizations.of(context)!.searchConversations, hintStyle: TextStyle( color: theme.inputPlaceholder.withValues(alpha: 0.8), fontSize: AppTypography.bodyMedium, @@ -282,7 +283,7 @@ class _ChatsDrawerState extends ConsumerState { const SizedBox(height: Spacing.md), if (regular.isNotEmpty) ...[ - _buildSectionHeader('Recent', regular.length), + _buildSectionHeader(AppLocalizations.of(context)!.recent, regular.length), const SizedBox(height: Spacing.xs), ...regular.map(_buildTileFor), ], @@ -299,7 +300,7 @@ class _ChatsDrawerState extends ConsumerState { child: Padding( padding: const EdgeInsets.all(Spacing.md), child: Text( - 'Failed to load chats', + AppLocalizations.of(context)!.failedToLoadChats, style: AppTypography.bodyMediumStyle.copyWith( color: theme.textSecondary, ), @@ -397,7 +398,7 @@ class _ChatsDrawerState extends ConsumerState { ), const SizedBox(height: Spacing.md), if (regular.isNotEmpty) ...[ - _buildSectionHeader('Recent', regular.length), + _buildSectionHeader(AppLocalizations.of(context)!.recent, regular.length), const SizedBox(height: Spacing.xs), ...regular.map(_buildTileFor), ], @@ -470,7 +471,7 @@ class _ChatsDrawerState extends ConsumerState { const Spacer(), IconButton( visualDensity: VisualDensity.compact, - tooltip: 'New Folder', + tooltip: AppLocalizations.of(context)!.newFolder, icon: Icon( Platform.isIOS ? CupertinoIcons.folder_badge_plus : Icons.create_new_folder_outlined, color: theme.iconPrimary, @@ -488,13 +489,13 @@ class _ChatsDrawerState extends ConsumerState { context: context, builder: (ctx) => AlertDialog( backgroundColor: theme.surfaceBackground, - title: Text('New Folder', style: TextStyle(color: theme.textPrimary)), + title: Text(AppLocalizations.of(context)!.newFolder, style: TextStyle(color: theme.textPrimary)), content: TextField( controller: controller, autofocus: true, style: TextStyle(color: theme.inputText), decoration: InputDecoration( - hintText: 'Folder name', + hintText: AppLocalizations.of(context)!.folderName, hintStyle: TextStyle(color: theme.inputPlaceholder), enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: theme.inputBorder)), focusedBorder: UnderlineInputBorder(borderSide: BorderSide(color: theme.buttonPrimary)), @@ -504,11 +505,11 @@ class _ChatsDrawerState extends ConsumerState { actions: [ TextButton( onPressed: () => Navigator.pop(ctx), - child: const Text('Cancel'), + child: Text(AppLocalizations.of(context)!.cancel), ), TextButton( onPressed: () => Navigator.pop(ctx, controller.text.trim()), - child: const Text('Create'), + child: Text(AppLocalizations.of(context)!.create), ), ], ), @@ -523,10 +524,10 @@ class _ChatsDrawerState extends ConsumerState { HapticFeedback.lightImpact(); ref.invalidate(foldersProvider); if (!mounted) return; - UiUtils.showMessage(context, 'Folder created'); + UiUtils.showMessage(context, AppLocalizations.of(context)!.folderCreated); } catch (e) { if (!mounted) return; - UiUtils.showMessage(context, 'Failed to create folder', isError: true); + UiUtils.showMessage(context, AppLocalizations.of(context)!.failedToCreateFolder, isError: true); } } @@ -554,11 +555,14 @@ class _ChatsDrawerState extends ConsumerState { ref.invalidate(conversationsProvider); ref.invalidate(foldersProvider); if (mounted) { - UiUtils.showMessage(context, 'Moved "${details.data.title}" to "$name"'); + UiUtils.showMessage( + context, + AppLocalizations.of(context)!.movedChatToFolder(details.data.title, name), + ); } } catch (_) { if (mounted) { - UiUtils.showMessage(context, 'Failed to move chat', isError: true); + UiUtils.showMessage(context, AppLocalizations.of(context)!.failedToMoveChat, isError: true); } } }, @@ -654,7 +658,7 @@ class _ChatsDrawerState extends ConsumerState { } } catch (_) { if (mounted) { - UiUtils.showMessage(context, 'Failed to move chat', isError: true); + UiUtils.showMessage(context, AppLocalizations.of(context)!.failedToMoveChat, isError: true); } } }, @@ -948,7 +952,7 @@ class _ChatsDrawerState extends ConsumerState { MaterialPageRoute(builder: (_) => const ProfilePage()), ); }, - child: const Text('Manage'), + child: Text(AppLocalizations.of(context)!.manage), ) ], ), @@ -984,7 +988,12 @@ class _ChatsDrawerState extends ConsumerState { : (Platform.isIOS ? CupertinoIcons.pin_fill : Icons.push_pin_rounded), color: theme.iconPrimary, ), - title: Text(isPinned ? 'Unpin' : 'Pin', style: TextStyle(color: theme.textPrimary)), + title: Text( + isPinned + ? AppLocalizations.of(context)!.unpin + : AppLocalizations.of(context)!.pin, + style: TextStyle(color: theme.textPrimary), + ), onTap: () async { HapticFeedback.lightImpact(); Navigator.pop(sheetContext); @@ -992,7 +1001,7 @@ class _ChatsDrawerState extends ConsumerState { await chat.pinConversation(ref, conv.id, !isPinned); } catch (_) { if (!mounted) return; - UiUtils.showMessage(this.context, 'Failed to update pin', isError: true); + UiUtils.showMessage(this.context, AppLocalizations.of(context)!.failedToUpdatePin, isError: true); } }, ), @@ -1003,7 +1012,12 @@ class _ChatsDrawerState extends ConsumerState { : (Platform.isIOS ? CupertinoIcons.archivebox : Icons.archive_rounded), color: theme.iconPrimary, ), - title: Text(isArchived ? 'Unarchive' : 'Archive', style: TextStyle(color: theme.textPrimary)), + title: Text( + isArchived + ? AppLocalizations.of(context)!.unarchive + : AppLocalizations.of(context)!.archive, + style: TextStyle(color: theme.textPrimary), + ), onTap: () async { HapticFeedback.lightImpact(); Navigator.pop(sheetContext); @@ -1011,7 +1025,7 @@ class _ChatsDrawerState extends ConsumerState { await chat.archiveConversation(ref, conv.id, !isArchived); } catch (_) { if (!mounted) return; - UiUtils.showMessage(this.context, 'Failed to update archive', isError: true); + UiUtils.showMessage(this.context, AppLocalizations.of(context)!.failedToUpdateArchive, isError: true); } }, ), @@ -1020,7 +1034,7 @@ class _ChatsDrawerState extends ConsumerState { Platform.isIOS ? CupertinoIcons.pencil : Icons.edit_rounded, color: theme.iconPrimary, ), - title: Text('Rename', style: TextStyle(color: theme.textPrimary)), + title: Text(AppLocalizations.of(context)!.rename, style: TextStyle(color: theme.textPrimary)), onTap: () async { HapticFeedback.selectionClick(); Navigator.pop(sheetContext); @@ -1033,7 +1047,7 @@ class _ChatsDrawerState extends ConsumerState { Platform.isIOS ? CupertinoIcons.delete : Icons.delete_rounded, color: theme.error, ), - title: Text('Delete', style: TextStyle(color: theme.error)), + title: Text(AppLocalizations.of(context)!.delete, style: TextStyle(color: theme.error)), onTap: () async { HapticFeedback.mediumImpact(); Navigator.pop(sheetContext); @@ -1060,13 +1074,13 @@ class _ChatsDrawerState extends ConsumerState { builder: (dialogContext) { return AlertDialog( backgroundColor: theme.surfaceBackground, - title: Text('Rename Chat', style: TextStyle(color: theme.textPrimary)), + title: Text(AppLocalizations.of(context)!.renameChat, style: TextStyle(color: theme.textPrimary)), content: TextField( controller: controller, autofocus: true, style: TextStyle(color: theme.inputText), decoration: InputDecoration( - hintText: 'Enter chat name', + hintText: AppLocalizations.of(context)!.enterChatName, hintStyle: TextStyle(color: theme.inputPlaceholder), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: theme.inputBorder), @@ -1081,14 +1095,14 @@ class _ChatsDrawerState extends ConsumerState { actions: [ TextButton( onPressed: () => Navigator.pop(dialogContext), - child: const Text('Cancel'), + child: Text(AppLocalizations.of(context)!.cancel), ), TextButton( onPressed: () { HapticFeedback.lightImpact(); Navigator.pop(dialogContext, controller.text.trim()); }, - child: const Text('Save'), + child: Text(AppLocalizations.of(context)!.save), ), ], ); @@ -1112,7 +1126,7 @@ class _ChatsDrawerState extends ConsumerState { } } catch (_) { if (!mounted) return; - UiUtils.showMessage(this.context, 'Failed to rename chat', isError: true); + UiUtils.showMessage(this.context, AppLocalizations.of(context)!.failedToRenameChat, isError: true); } } @@ -1122,9 +1136,9 @@ class _ChatsDrawerState extends ConsumerState { ) async { final confirmed = await UiUtils.showConfirmationDialog( context, - title: 'Delete Chat', - message: 'This chat will be permanently deleted.', - confirmText: 'Delete', + title: AppLocalizations.of(context)!.deleteChatTitle, + message: AppLocalizations.of(context)!.deleteChatMessage, + confirmText: AppLocalizations.of(context)!.delete, isDestructive: true, ); if (!confirmed) return; @@ -1143,7 +1157,7 @@ class _ChatsDrawerState extends ConsumerState { ref.invalidate(conversationsProvider); } catch (_) { if (!mounted) return; - UiUtils.showMessage(this.context, 'Failed to delete chat', isError: true); + UiUtils.showMessage(this.context, AppLocalizations.of(context)!.failedToDeleteChat, isError: true); } } } @@ -1219,7 +1233,7 @@ class _ConversationTile extends StatelessWidget { size: IconSize.md, ), onPressed: onMorePressed, - tooltip: 'More', + tooltip: AppLocalizations.of(context)!.more, ), ], ), diff --git a/lib/features/profile/views/profile_page.dart b/lib/features/profile/views/profile_page.dart index 885c087..2271957 100644 --- a/lib/features/profile/views/profile_page.dart +++ b/lib/features/profile/views/profile_page.dart @@ -537,27 +537,27 @@ class ProfilePage extends ConsumerWidget { children: [ const SizedBox(height: Spacing.sm), ListTile( - title: const Text('System'), + title: Text(AppLocalizations.of(context)!.system), trailing: current == 'system' ? const Icon(Icons.check) : null, onTap: () => Navigator.pop(context, 'system'), ), ListTile( - title: const Text('English'), + title: Text(AppLocalizations.of(context)!.english), trailing: current == 'en' ? const Icon(Icons.check) : null, onTap: () => Navigator.pop(context, 'en'), ), ListTile( - title: const Text('Deutsch'), + title: Text(AppLocalizations.of(context)!.deutsch), trailing: current == 'de' ? const Icon(Icons.check) : null, onTap: () => Navigator.pop(context, 'de'), ), ListTile( - title: const Text('Français'), + title: Text(AppLocalizations.of(context)!.francais), trailing: current == 'fr' ? const Icon(Icons.check) : null, onTap: () => Navigator.pop(context, 'fr'), ), ListTile( - title: const Text('Italiano'), + title: Text(AppLocalizations.of(context)!.italiano), trailing: current == 'it' ? const Icon(Icons.check) : null, onTap: () => Navigator.pop(context, 'it'), ), @@ -640,8 +640,8 @@ class ProfilePage extends ConsumerWidget { ios: CupertinoIcons.info, android: Icons.info_outline, ), - title: 'About App', - subtitle: 'Conduit information and links', + title: AppLocalizations.of(context)!.aboutApp, + subtitle: AppLocalizations.of(context)!.aboutAppSubtitle, onTap: () => _showAboutDialog(context), ); } diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 6303a46..0c9d046 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -141,5 +141,64 @@ "openSettings": "Einstellungen öffnen", "chooseDifferentFile": "Andere Datei wählen", "goBack": "Zurück", - "technicalDetails": "Technische Details" + "technicalDetails": "Technische Details", + "save": "Speichern", + "chooseModel": "Modell wählen", + "reviewerMode": "REVIEWER MODE", + "selectLanguage": "Sprache auswählen", + "newFolder": "Neuer Ordner", + "folderName": "Ordnername", + "newChat": "Neuer Chat", + "more": "Mehr", + "clear": "Leeren", + "searchHint": "Suchen...", + "searchConversations": "Konversationen durchsuchen...", + "create": "Erstellen", + "folderCreated": "Ordner erstellt", + "failedToCreateFolder": "Ordner konnte nicht erstellt werden", + "movedChatToFolder": "\"{title}\" nach \"{folder}\" verschoben", + "@movedChatToFolder": { + "placeholders": { + "title": {"type": "String"}, + "folder": {"type": "String"} + } + }, + "failedToMoveChat": "Chat konnte nicht verschoben werden", + "failedToLoadChats": "Chats konnten nicht geladen werden", + "failedToUpdatePin": "Pin konnte nicht aktualisiert werden", + "failedToDeleteChat": "Chat konnte nicht gelöscht werden", + "manage": "Verwalten", + "rename": "Umbenennen", + "delete": "Löschen", + "renameChat": "Chat umbenennen", + "enterChatName": "Chat-Namen eingeben", + "failedToRenameChat": "Chat konnte nicht umbenannt werden", + "failedToUpdateArchive": "Archiv konnte nicht aktualisiert werden", + "unarchive": "Archivierung aufheben", + "archive": "Archivieren", + "pin": "Anheften", + "unpin": "Lösen", + "recent": "Zuletzt", + "system": "System", + "english": "Englisch", + "deutsch": "Deutsch", + "francais": "Französisch", + "italiano": "Italienisch", + "deleteMessagesTitle": "Nachrichten löschen", + "deleteMessagesMessage": "{count} Nachrichten löschen?", + "@deleteMessagesMessage": { + "placeholders": { + "count": {"type": "int"} + } + }, + "routeNotFound": "Route nicht gefunden: {routeName}", + "@routeNotFound": { + "placeholders": { + "routeName": {"type": "String"} + } + }, + "deleteChatTitle": "Chat löschen", + "deleteChatMessage": "Dieser Chat wird dauerhaft gelöscht.", + "aboutApp": "Über die App", + "aboutAppSubtitle": "Conduit Informationen und Links" } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index f024d88..e2e97f3 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -165,5 +165,64 @@ "openSettings": "Open Settings", "chooseDifferentFile": "Choose Different File", "goBack": "Go Back", - "technicalDetails": "Technical Details" + "technicalDetails": "Technical Details", + "save": "Save", + "chooseModel": "Choose Model", + "reviewerMode": "REVIEWER MODE", + "selectLanguage": "Select Language", + "newFolder": "New Folder", + "folderName": "Folder name", + "newChat": "New Chat", + "more": "More", + "clear": "Clear", + "searchHint": "Search...", + "searchConversations": "Search conversations...", + "create": "Create", + "folderCreated": "Folder created", + "failedToCreateFolder": "Failed to create folder", + "movedChatToFolder": "Moved \"{title}\" to \"{folder}\"", + "@movedChatToFolder": { + "placeholders": { + "title": {"type": "String"}, + "folder": {"type": "String"} + } + }, + "failedToMoveChat": "Failed to move chat", + "failedToLoadChats": "Failed to load chats", + "failedToUpdatePin": "Failed to update pin", + "failedToDeleteChat": "Failed to delete chat", + "manage": "Manage", + "rename": "Rename", + "delete": "Delete", + "renameChat": "Rename Chat", + "enterChatName": "Enter chat name", + "failedToRenameChat": "Failed to rename chat", + "failedToUpdateArchive": "Failed to update archive", + "unarchive": "Unarchive", + "archive": "Archive", + "pin": "Pin", + "unpin": "Unpin", + "recent": "Recent", + "system": "System", + "english": "English", + "deutsch": "Deutsch", + "francais": "Français", + "italiano": "Italiano", + "deleteMessagesTitle": "Delete Messages", + "deleteMessagesMessage": "Delete {count} messages?", + "@deleteMessagesMessage": { + "placeholders": { + "count": {"type": "int"} + } + }, + "routeNotFound": "Route not found: {routeName}", + "@routeNotFound": { + "placeholders": { + "routeName": {"type": "String"} + } + }, + "deleteChatTitle": "Delete Chat", + "deleteChatMessage": "This chat will be permanently deleted.", + "aboutApp": "About App", + "aboutAppSubtitle": "Conduit information and links" } diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index 274694b..62c7870 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -141,5 +141,64 @@ "openSettings": "Ouvrir les réglages", "chooseDifferentFile": "Choisir un autre fichier", "goBack": "Retour", - "technicalDetails": "Détails techniques" + "technicalDetails": "Détails techniques", + "save": "Enregistrer", + "chooseModel": "Choisir le modèle", + "reviewerMode": "REVIEWER MODE", + "selectLanguage": "Sélectionner la langue", + "newFolder": "Nouveau dossier", + "folderName": "Nom du dossier", + "newChat": "Nouveau chat", + "more": "Plus", + "clear": "Effacer", + "searchHint": "Rechercher...", + "searchConversations": "Rechercher des conversations...", + "create": "Créer", + "folderCreated": "Dossier créé", + "failedToCreateFolder": "Échec de la création du dossier", + "movedChatToFolder": "\"{title}\" déplacé vers \"{folder}\"", + "@movedChatToFolder": { + "placeholders": { + "title": {"type": "String"}, + "folder": {"type": "String"} + } + }, + "failedToMoveChat": "Échec du déplacement du chat", + "failedToLoadChats": "Échec du chargement des chats", + "failedToUpdatePin": "Échec de la mise à jour de l'épingle", + "failedToDeleteChat": "Échec de la suppression du chat", + "manage": "Gérer", + "rename": "Renommer", + "delete": "Supprimer", + "renameChat": "Renommer le chat", + "enterChatName": "Saisir le nom du chat", + "failedToRenameChat": "Échec du renommage du chat", + "failedToUpdateArchive": "Échec de la mise à jour de l'archive", + "unarchive": "Désarchiver", + "archive": "Archiver", + "pin": "Épingler", + "unpin": "Détacher", + "recent": "Récent", + "system": "Système", + "english": "Anglais", + "deutsch": "Allemand", + "francais": "Français", + "italiano": "Italien", + "deleteMessagesTitle": "Supprimer les messages", + "deleteMessagesMessage": "Supprimer {count} messages ?", + "@deleteMessagesMessage": { + "placeholders": { + "count": {"type": "int"} + } + }, + "routeNotFound": "Route introuvable : {routeName}", + "@routeNotFound": { + "placeholders": { + "routeName": {"type": "String"} + } + }, + "deleteChatTitle": "Supprimer le chat", + "deleteChatMessage": "Ce chat sera supprimé définitivement.", + "aboutApp": "À propos de l'application", + "aboutAppSubtitle": "Informations et liens Conduit" } diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index 6334c6e..a31dd13 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -141,5 +141,64 @@ "openSettings": "Apri impostazioni", "chooseDifferentFile": "Scegli un altro file", "goBack": "Indietro", - "technicalDetails": "Dettagli tecnici" + "technicalDetails": "Dettagli tecnici", + "save": "Salva", + "chooseModel": "Scegli modello", + "reviewerMode": "REVIEWER MODE", + "selectLanguage": "Seleziona lingua", + "newFolder": "Nuova cartella", + "folderName": "Nome cartella", + "newChat": "Nuova chat", + "more": "Altro", + "clear": "Pulisci", + "searchHint": "Cerca...", + "searchConversations": "Cerca conversazioni...", + "create": "Crea", + "folderCreated": "Cartella creata", + "failedToCreateFolder": "Impossibile creare la cartella", + "movedChatToFolder": "\"{title}\" spostata in \"{folder}\"", + "@movedChatToFolder": { + "placeholders": { + "title": {"type": "String"}, + "folder": {"type": "String"} + } + }, + "failedToMoveChat": "Impossibile spostare la chat", + "failedToLoadChats": "Impossibile caricare le chat", + "failedToUpdatePin": "Impossibile aggiornare il pin", + "failedToDeleteChat": "Impossibile eliminare la chat", + "manage": "Gestisci", + "rename": "Rinomina", + "delete": "Elimina", + "renameChat": "Rinomina chat", + "enterChatName": "Inserisci nome chat", + "failedToRenameChat": "Impossibile rinominare la chat", + "failedToUpdateArchive": "Impossibile aggiornare l'archivio", + "unarchive": "Ripristina", + "archive": "Archivia", + "pin": "Fissa", + "unpin": "Sblocca", + "recent": "Recenti", + "system": "Sistema", + "english": "Inglese", + "deutsch": "Tedesco", + "francais": "Francese", + "italiano": "Italiano", + "deleteMessagesTitle": "Elimina messaggi", + "deleteMessagesMessage": "Eliminare {count} messaggi?", + "@deleteMessagesMessage": { + "placeholders": { + "count": {"type": "int"} + } + }, + "routeNotFound": "Percorso non trovato: {routeName}", + "@routeNotFound": { + "placeholders": { + "routeName": {"type": "String"} + } + }, + "deleteChatTitle": "Elimina chat", + "deleteChatMessage": "Questa chat verrà eliminata definitivamente.", + "aboutApp": "Informazioni sull'app", + "aboutAppSubtitle": "Informazioni e link di Conduit" } diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index b6ca4b6..f1f7c2e 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -932,6 +932,264 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Technical Details'** String get technicalDetails; + + /// No description provided for @save. + /// + /// In en, this message translates to: + /// **'Save'** + String get save; + + /// No description provided for @chooseModel. + /// + /// In en, this message translates to: + /// **'Choose Model'** + String get chooseModel; + + /// No description provided for @reviewerMode. + /// + /// In en, this message translates to: + /// **'REVIEWER MODE'** + String get reviewerMode; + + /// No description provided for @selectLanguage. + /// + /// In en, this message translates to: + /// **'Select Language'** + String get selectLanguage; + + /// No description provided for @newFolder. + /// + /// In en, this message translates to: + /// **'New Folder'** + String get newFolder; + + /// No description provided for @folderName. + /// + /// In en, this message translates to: + /// **'Folder name'** + String get folderName; + + /// No description provided for @newChat. + /// + /// In en, this message translates to: + /// **'New Chat'** + String get newChat; + + /// No description provided for @more. + /// + /// In en, this message translates to: + /// **'More'** + String get more; + + /// No description provided for @clear. + /// + /// In en, this message translates to: + /// **'Clear'** + String get clear; + + /// No description provided for @searchHint. + /// + /// In en, this message translates to: + /// **'Search...'** + String get searchHint; + + /// No description provided for @searchConversations. + /// + /// In en, this message translates to: + /// **'Search conversations...'** + String get searchConversations; + + /// No description provided for @create. + /// + /// In en, this message translates to: + /// **'Create'** + String get create; + + /// No description provided for @folderCreated. + /// + /// In en, this message translates to: + /// **'Folder created'** + String get folderCreated; + + /// No description provided for @failedToCreateFolder. + /// + /// In en, this message translates to: + /// **'Failed to create folder'** + String get failedToCreateFolder; + + /// No description provided for @movedChatToFolder. + /// + /// In en, this message translates to: + /// **'Moved \"{title}\" to \"{folder}\"'** + String movedChatToFolder(String title, String folder); + + /// No description provided for @failedToMoveChat. + /// + /// In en, this message translates to: + /// **'Failed to move chat'** + String get failedToMoveChat; + + /// No description provided for @failedToLoadChats. + /// + /// In en, this message translates to: + /// **'Failed to load chats'** + String get failedToLoadChats; + + /// No description provided for @failedToUpdatePin. + /// + /// In en, this message translates to: + /// **'Failed to update pin'** + String get failedToUpdatePin; + + /// No description provided for @failedToDeleteChat. + /// + /// In en, this message translates to: + /// **'Failed to delete chat'** + String get failedToDeleteChat; + + /// No description provided for @manage. + /// + /// In en, this message translates to: + /// **'Manage'** + String get manage; + + /// No description provided for @rename. + /// + /// In en, this message translates to: + /// **'Rename'** + String get rename; + + /// No description provided for @delete. + /// + /// In en, this message translates to: + /// **'Delete'** + String get delete; + + /// No description provided for @renameChat. + /// + /// In en, this message translates to: + /// **'Rename Chat'** + String get renameChat; + + /// No description provided for @enterChatName. + /// + /// In en, this message translates to: + /// **'Enter chat name'** + String get enterChatName; + + /// No description provided for @failedToRenameChat. + /// + /// In en, this message translates to: + /// **'Failed to rename chat'** + String get failedToRenameChat; + + /// No description provided for @failedToUpdateArchive. + /// + /// In en, this message translates to: + /// **'Failed to update archive'** + String get failedToUpdateArchive; + + /// No description provided for @unarchive. + /// + /// In en, this message translates to: + /// **'Unarchive'** + String get unarchive; + + /// No description provided for @archive. + /// + /// In en, this message translates to: + /// **'Archive'** + String get archive; + + /// No description provided for @pin. + /// + /// In en, this message translates to: + /// **'Pin'** + String get pin; + + /// No description provided for @unpin. + /// + /// In en, this message translates to: + /// **'Unpin'** + String get unpin; + + /// No description provided for @recent. + /// + /// In en, this message translates to: + /// **'Recent'** + String get recent; + + /// No description provided for @system. + /// + /// In en, this message translates to: + /// **'System'** + String get system; + + /// No description provided for @english. + /// + /// In en, this message translates to: + /// **'English'** + String get english; + + /// No description provided for @deutsch. + /// + /// In en, this message translates to: + /// **'Deutsch'** + String get deutsch; + + /// No description provided for @francais. + /// + /// In en, this message translates to: + /// **'Français'** + String get francais; + + /// No description provided for @italiano. + /// + /// In en, this message translates to: + /// **'Italiano'** + String get italiano; + + /// No description provided for @deleteMessagesTitle. + /// + /// In en, this message translates to: + /// **'Delete Messages'** + String get deleteMessagesTitle; + + /// No description provided for @deleteMessagesMessage. + /// + /// In en, this message translates to: + /// **'Delete {count} messages?'** + String deleteMessagesMessage(int count); + + /// No description provided for @routeNotFound. + /// + /// In en, this message translates to: + /// **'Route not found: {routeName}'** + String routeNotFound(String routeName); + + /// No description provided for @deleteChatTitle. + /// + /// In en, this message translates to: + /// **'Delete Chat'** + String get deleteChatTitle; + + /// No description provided for @deleteChatMessage. + /// + /// In en, this message translates to: + /// **'This chat will be permanently deleted.'** + String get deleteChatMessage; + + /// No description provided for @aboutApp. + /// + /// In en, this message translates to: + /// **'About App'** + String get aboutApp; + + /// No description provided for @aboutAppSubtitle. + /// + /// In en, this message translates to: + /// **'Conduit information and links'** + String get aboutAppSubtitle; } class _AppLocalizationsDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 830e9f3..cbd39d2 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -441,4 +441,139 @@ class AppLocalizationsDe extends AppLocalizations { @override String get technicalDetails => 'Technische Details'; + + @override + String get save => 'Speichern'; + + @override + String get chooseModel => 'Modell wählen'; + + @override + String get reviewerMode => 'REVIEWER MODE'; + + @override + String get selectLanguage => 'Sprache auswählen'; + + @override + String get newFolder => 'Neuer Ordner'; + + @override + String get folderName => 'Ordnername'; + + @override + String get newChat => 'Neuer Chat'; + + @override + String get more => 'Mehr'; + + @override + String get clear => 'Leeren'; + + @override + String get searchHint => 'Suchen...'; + + @override + String get searchConversations => 'Konversationen durchsuchen...'; + + @override + String get create => 'Erstellen'; + + @override + String get folderCreated => 'Ordner erstellt'; + + @override + String get failedToCreateFolder => 'Ordner konnte nicht erstellt werden'; + + @override + String movedChatToFolder(String title, String folder) { + return '\"$title\" nach \"$folder\" verschoben'; + } + + @override + String get failedToMoveChat => 'Chat konnte nicht verschoben werden'; + + @override + String get failedToLoadChats => 'Chats konnten nicht geladen werden'; + + @override + String get failedToUpdatePin => 'Pin konnte nicht aktualisiert werden'; + + @override + String get failedToDeleteChat => 'Chat konnte nicht gelöscht werden'; + + @override + String get manage => 'Verwalten'; + + @override + String get rename => 'Umbenennen'; + + @override + String get delete => 'Löschen'; + + @override + String get renameChat => 'Chat umbenennen'; + + @override + String get enterChatName => 'Chat-Namen eingeben'; + + @override + String get failedToRenameChat => 'Chat konnte nicht umbenannt werden'; + + @override + String get failedToUpdateArchive => 'Archiv konnte nicht aktualisiert werden'; + + @override + String get unarchive => 'Archivierung aufheben'; + + @override + String get archive => 'Archivieren'; + + @override + String get pin => 'Anheften'; + + @override + String get unpin => 'Lösen'; + + @override + String get recent => 'Zuletzt'; + + @override + String get system => 'System'; + + @override + String get english => 'Englisch'; + + @override + String get deutsch => 'Deutsch'; + + @override + String get francais => 'Französisch'; + + @override + String get italiano => 'Italienisch'; + + @override + String get deleteMessagesTitle => 'Nachrichten löschen'; + + @override + String deleteMessagesMessage(int count) { + return '$count Nachrichten löschen?'; + } + + @override + String routeNotFound(String routeName) { + return 'Route nicht gefunden: $routeName'; + } + + @override + String get deleteChatTitle => 'Chat löschen'; + + @override + String get deleteChatMessage => 'Dieser Chat wird dauerhaft gelöscht.'; + + @override + String get aboutApp => 'Über die App'; + + @override + String get aboutAppSubtitle => 'Conduit Informationen und Links'; } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 8058663..48713d8 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -441,4 +441,139 @@ class AppLocalizationsEn extends AppLocalizations { @override String get technicalDetails => 'Technical Details'; + + @override + String get save => 'Save'; + + @override + String get chooseModel => 'Choose Model'; + + @override + String get reviewerMode => 'REVIEWER MODE'; + + @override + String get selectLanguage => 'Select Language'; + + @override + String get newFolder => 'New Folder'; + + @override + String get folderName => 'Folder name'; + + @override + String get newChat => 'New Chat'; + + @override + String get more => 'More'; + + @override + String get clear => 'Clear'; + + @override + String get searchHint => 'Search...'; + + @override + String get searchConversations => 'Search conversations...'; + + @override + String get create => 'Create'; + + @override + String get folderCreated => 'Folder created'; + + @override + String get failedToCreateFolder => 'Failed to create folder'; + + @override + String movedChatToFolder(String title, String folder) { + return 'Moved \"$title\" to \"$folder\"'; + } + + @override + String get failedToMoveChat => 'Failed to move chat'; + + @override + String get failedToLoadChats => 'Failed to load chats'; + + @override + String get failedToUpdatePin => 'Failed to update pin'; + + @override + String get failedToDeleteChat => 'Failed to delete chat'; + + @override + String get manage => 'Manage'; + + @override + String get rename => 'Rename'; + + @override + String get delete => 'Delete'; + + @override + String get renameChat => 'Rename Chat'; + + @override + String get enterChatName => 'Enter chat name'; + + @override + String get failedToRenameChat => 'Failed to rename chat'; + + @override + String get failedToUpdateArchive => 'Failed to update archive'; + + @override + String get unarchive => 'Unarchive'; + + @override + String get archive => 'Archive'; + + @override + String get pin => 'Pin'; + + @override + String get unpin => 'Unpin'; + + @override + String get recent => 'Recent'; + + @override + String get system => 'System'; + + @override + String get english => 'English'; + + @override + String get deutsch => 'Deutsch'; + + @override + String get francais => 'Français'; + + @override + String get italiano => 'Italiano'; + + @override + String get deleteMessagesTitle => 'Delete Messages'; + + @override + String deleteMessagesMessage(int count) { + return 'Delete $count messages?'; + } + + @override + String routeNotFound(String routeName) { + return 'Route not found: $routeName'; + } + + @override + String get deleteChatTitle => 'Delete Chat'; + + @override + String get deleteChatMessage => 'This chat will be permanently deleted.'; + + @override + String get aboutApp => 'About App'; + + @override + String get aboutAppSubtitle => 'Conduit information and links'; } diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 5a46386..2c6eac8 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -441,4 +441,139 @@ class AppLocalizationsFr extends AppLocalizations { @override String get technicalDetails => 'Détails techniques'; + + @override + String get save => 'Enregistrer'; + + @override + String get chooseModel => 'Choisir le modèle'; + + @override + String get reviewerMode => 'REVIEWER MODE'; + + @override + String get selectLanguage => 'Sélectionner la langue'; + + @override + String get newFolder => 'Nouveau dossier'; + + @override + String get folderName => 'Nom du dossier'; + + @override + String get newChat => 'Nouveau chat'; + + @override + String get more => 'Plus'; + + @override + String get clear => 'Effacer'; + + @override + String get searchHint => 'Rechercher...'; + + @override + String get searchConversations => 'Rechercher des conversations...'; + + @override + String get create => 'Créer'; + + @override + String get folderCreated => 'Dossier créé'; + + @override + String get failedToCreateFolder => 'Échec de la création du dossier'; + + @override + String movedChatToFolder(String title, String folder) { + return '\"$title\" déplacé vers \"$folder\"'; + } + + @override + String get failedToMoveChat => 'Échec du déplacement du chat'; + + @override + String get failedToLoadChats => 'Échec du chargement des chats'; + + @override + String get failedToUpdatePin => 'Échec de la mise à jour de l\'épingle'; + + @override + String get failedToDeleteChat => 'Échec de la suppression du chat'; + + @override + String get manage => 'Gérer'; + + @override + String get rename => 'Renommer'; + + @override + String get delete => 'Supprimer'; + + @override + String get renameChat => 'Renommer le chat'; + + @override + String get enterChatName => 'Saisir le nom du chat'; + + @override + String get failedToRenameChat => 'Échec du renommage du chat'; + + @override + String get failedToUpdateArchive => 'Échec de la mise à jour de l\'archive'; + + @override + String get unarchive => 'Désarchiver'; + + @override + String get archive => 'Archiver'; + + @override + String get pin => 'Épingler'; + + @override + String get unpin => 'Détacher'; + + @override + String get recent => 'Récent'; + + @override + String get system => 'Système'; + + @override + String get english => 'Anglais'; + + @override + String get deutsch => 'Allemand'; + + @override + String get francais => 'Français'; + + @override + String get italiano => 'Italien'; + + @override + String get deleteMessagesTitle => 'Supprimer les messages'; + + @override + String deleteMessagesMessage(int count) { + return 'Supprimer $count messages ?'; + } + + @override + String routeNotFound(String routeName) { + return 'Route introuvable : $routeName'; + } + + @override + String get deleteChatTitle => 'Supprimer le chat'; + + @override + String get deleteChatMessage => 'Ce chat sera supprimé définitivement.'; + + @override + String get aboutApp => 'À propos de l\'application'; + + @override + String get aboutAppSubtitle => 'Informations et liens Conduit'; } diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index d5fcc83..75403ac 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -441,4 +441,139 @@ class AppLocalizationsIt extends AppLocalizations { @override String get technicalDetails => 'Dettagli tecnici'; + + @override + String get save => 'Salva'; + + @override + String get chooseModel => 'Scegli modello'; + + @override + String get reviewerMode => 'REVIEWER MODE'; + + @override + String get selectLanguage => 'Seleziona lingua'; + + @override + String get newFolder => 'Nuova cartella'; + + @override + String get folderName => 'Nome cartella'; + + @override + String get newChat => 'Nuova chat'; + + @override + String get more => 'Altro'; + + @override + String get clear => 'Pulisci'; + + @override + String get searchHint => 'Cerca...'; + + @override + String get searchConversations => 'Cerca conversazioni...'; + + @override + String get create => 'Crea'; + + @override + String get folderCreated => 'Cartella creata'; + + @override + String get failedToCreateFolder => 'Impossibile creare la cartella'; + + @override + String movedChatToFolder(String title, String folder) { + return '\"$title\" spostata in \"$folder\"'; + } + + @override + String get failedToMoveChat => 'Impossibile spostare la chat'; + + @override + String get failedToLoadChats => 'Impossibile caricare le chat'; + + @override + String get failedToUpdatePin => 'Impossibile aggiornare il pin'; + + @override + String get failedToDeleteChat => 'Impossibile eliminare la chat'; + + @override + String get manage => 'Gestisci'; + + @override + String get rename => 'Rinomina'; + + @override + String get delete => 'Elimina'; + + @override + String get renameChat => 'Rinomina chat'; + + @override + String get enterChatName => 'Inserisci nome chat'; + + @override + String get failedToRenameChat => 'Impossibile rinominare la chat'; + + @override + String get failedToUpdateArchive => 'Impossibile aggiornare l\'archivio'; + + @override + String get unarchive => 'Ripristina'; + + @override + String get archive => 'Archivia'; + + @override + String get pin => 'Fissa'; + + @override + String get unpin => 'Sblocca'; + + @override + String get recent => 'Recenti'; + + @override + String get system => 'Sistema'; + + @override + String get english => 'Inglese'; + + @override + String get deutsch => 'Tedesco'; + + @override + String get francais => 'Francese'; + + @override + String get italiano => 'Italiano'; + + @override + String get deleteMessagesTitle => 'Elimina messaggi'; + + @override + String deleteMessagesMessage(int count) { + return 'Eliminare $count messaggi?'; + } + + @override + String routeNotFound(String routeName) { + return 'Percorso non trovato: $routeName'; + } + + @override + String get deleteChatTitle => 'Elimina chat'; + + @override + String get deleteChatMessage => 'Questa chat verrà eliminata definitivamente.'; + + @override + String get aboutApp => 'Informazioni sull\'app'; + + @override + String get aboutAppSubtitle => 'Informazioni e link di Conduit'; } diff --git a/lib/shared/utils/platform_utils.dart b/lib/shared/utils/platform_utils.dart index 58f29f6..534096d 100644 --- a/lib/shared/utils/platform_utils.dart +++ b/lib/shared/utils/platform_utils.dart @@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; import 'package:flutter/cupertino.dart'; import 'dart:io' show Platform; import '../theme/theme_extensions.dart'; +import 'package:conduit/l10n/app_localizations.dart'; /// Platform-specific utilities for enhanced user experience class PlatformUtils { @@ -210,7 +211,7 @@ class IOSEnhancements { .toList(), cancelButton: CupertinoActionSheetAction( onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), + child: Text(AppLocalizations.of(context)!.cancel), ), ), );