refactor: enhance localization support in chat and voice input features

- Integrated localization for various dialog messages and UI elements in the chat and voice input components.
- Updated the confirmation dialog to utilize localized strings for delete messages, improving user experience across different languages.
- Enhanced voice input sheet to reflect localized text for status updates, action buttons, and prompts, ensuring consistency in user interactions.
- Improved the file attachment widget to display the attachment label in a localized manner, enhancing accessibility for users in different regions.
- Streamlined localization management by centralizing string retrieval, promoting maintainability and clarity in the codebase.
This commit is contained in:
cogwheel0
2025-10-05 00:05:58 +05:30
parent 072453d588
commit 8629e1e039
14 changed files with 455 additions and 66 deletions

View File

@@ -804,6 +804,12 @@ abstract class AppLocalizations {
/// **'Add attachment'**
String get addAttachment;
/// Label shown beside attachment chips in messages.
///
/// In en, this message translates to:
/// **'Attachment'**
String get attachmentLabel;
/// Header for a tools/actions section.
///
/// In en, this message translates to:
@@ -816,6 +822,66 @@ abstract class AppLocalizations {
/// **'Voice input'**
String get voiceInput;
/// Title for the voice input bottom sheet.
///
/// In en, this message translates to:
/// **'Voice'**
String get voice;
/// Indicates the app is actively listening during voice input.
///
/// In en, this message translates to:
/// **'Listening…'**
String get voiceStatusListening;
/// Indicates the app is recording audio for speech recognition.
///
/// In en, this message translates to:
/// **'Recording…'**
String get voiceStatusRecording;
/// Toggle label for hold-to-talk mode in voice input.
///
/// In en, this message translates to:
/// **'Hold to talk'**
String get voiceHoldToTalk;
/// Toggle label for automatically sending the final transcript.
///
/// In en, this message translates to:
/// **'Auto-send'**
String get voiceAutoSend;
/// Label above the transcribed voice input text.
///
/// In en, this message translates to:
/// **'Transcript'**
String get voiceTranscript;
/// Placeholder prompting the user to start speaking.
///
/// In en, this message translates to:
/// **'Speak now…'**
String get voicePromptSpeakNow;
/// Placeholder instructing the user to tap Start to begin recording.
///
/// In en, this message translates to:
/// **'Tap Start to begin'**
String get voicePromptTapStart;
/// Button label to stop voice recording.
///
/// In en, this message translates to:
/// **'Stop'**
String get voiceActionStop;
/// Button label to start voice recording.
///
/// In en, this message translates to:
/// **'Start'**
String get voiceActionStart;
/// Accessibility label for the message input.
///
/// In en, this message translates to:
@@ -846,6 +912,12 @@ abstract class AppLocalizations {
/// **'Send'**
String get send;
/// Snack bar message confirming code was copied.
///
/// In en, this message translates to:
/// **'Code copied to clipboard.'**
String get codeCopiedToClipboard;
/// Semantic label for sending a message.
///
/// In en, this message translates to:
@@ -1584,6 +1656,24 @@ abstract class AppLocalizations {
/// **'Pick up to two shortcuts to pin near the composer'**
String get quickActionsDescription;
/// Section header for chat-related customization options.
///
/// In en, this message translates to:
/// **'Chat'**
String get chatSettings;
/// Toggle title for sending messages when pressing Enter.
///
/// In en, this message translates to:
/// **'Send on Enter'**
String get sendOnEnter;
/// Explanation of how the Send on Enter toggle behaves.
///
/// In en, this message translates to:
/// **'Enter sends (soft keyboard). Cmd/Ctrl+Enter also available'**
String get sendOnEnterDescription;
/// Section header for visual and layout related settings.
///
/// In en, this message translates to: