refactor: update localization strings for onboarding context and attachment instructions across multiple languages

This commit is contained in:
cogwheel0
2025-08-26 17:01:46 +05:30
parent 675fa9bd7f
commit 0af1060f66
9 changed files with 173 additions and 732 deletions

View File

@@ -64,8 +64,7 @@ import 'app_localizations_it.dart';
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property.
abstract class AppLocalizations {
AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
final String localeName;
@@ -73,8 +72,7 @@ abstract class AppLocalizations {
return Localizations.of<AppLocalizations>(context, AppLocalizations);
}
static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();
static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();
/// A list of this localizations delegate along with the default localizations
/// delegates.
@@ -86,20 +84,19 @@ abstract class AppLocalizations {
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('de'),
Locale('en'),
Locale('fr'),
Locale('it'),
Locale('it')
];
/// No description provided for @appTitle.
@@ -669,25 +666,25 @@ abstract class AppLocalizations {
/// No description provided for @onboardAttachTitle.
///
/// In en, this message translates to:
/// **'Attach context'**
/// **'Add context'**
String get onboardAttachTitle;
/// No description provided for @onboardAttachSubtitle.
///
/// In en, this message translates to:
/// **'Ground responses by adding files or images.'**
/// **'Ground replies with content from Workspace or photos.'**
String get onboardAttachSubtitle;
/// No description provided for @onboardAttachBullet1.
///
/// In en, this message translates to:
/// **'Files: PDFs, docs, datasets'**
/// **'Workspace: PDFs, docs, datasets'**
String get onboardAttachBullet1;
/// No description provided for @onboardAttachBullet2.
///
/// In en, this message translates to:
/// **'Images: photos or screenshots'**
/// **'Photos: camera or library'**
String get onboardAttachBullet2;
/// No description provided for @onboardSpeakTitle.
@@ -723,19 +720,19 @@ abstract class AppLocalizations {
/// No description provided for @onboardQuickSubtitle.
///
/// In en, this message translates to:
/// **'Use the topleft menu to open the chats list and navigation.'**
/// **'Open the menu to switch between Chats, Workspace, and Profile.'**
String get onboardQuickSubtitle;
/// No description provided for @onboardQuickBullet1.
///
/// In en, this message translates to:
/// **'Tap the menu to open the chats list and navigation'**
/// **'Tap the menu to access Chats, Workspace, Profile'**
String get onboardQuickBullet1;
/// No description provided for @onboardQuickBullet2.
///
/// In en, this message translates to:
/// **'Jump instantly to New Chat, Files, or Profile'**
/// **'Start New Chat or manage models from the top bar'**
String get onboardQuickBullet2;
/// No description provided for @addAttachment.
@@ -1193,154 +1190,9 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Conduit information and links'**
String get aboutAppSubtitle;
/// No description provided for @appLanguage.
///
/// In en, this message translates to:
/// **'App language'**
String get appLanguage;
/// No description provided for @typeBelowToBegin.
///
/// In en, this message translates to:
/// **'Type below to begin'**
String get typeBelowToBegin;
/// No description provided for @listening.
///
/// In en, this message translates to:
/// **'Listening…'**
String get listening;
/// No description provided for @recording.
///
/// In en, this message translates to:
/// **'Recording…'**
String get recording;
/// No description provided for @transcribing.
///
/// In en, this message translates to:
/// **'Transcribing…'**
String get transcribing;
/// No description provided for @speakNow.
///
/// In en, this message translates to:
/// **'Speak now…'**
String get speakNow;
/// No description provided for @chats.
///
/// In en, this message translates to:
/// **'Chats'**
String get chats;
/// No description provided for @darkMode.
///
/// In en, this message translates to:
/// **'Dark Mode'**
String get darkMode;
/// No description provided for @transcript.
///
/// In en, this message translates to:
/// **'Transcript'**
String get transcript;
/// No description provided for @pinned.
///
/// In en, this message translates to:
/// **'Pinned'**
String get pinned;
/// No description provided for @folders.
///
/// In en, this message translates to:
/// **'Folders'**
String get folders;
/// No description provided for @archived.
///
/// In en, this message translates to:
/// **'Archived'**
String get archived;
/// No description provided for @holdToTalk.
///
/// In en, this message translates to:
/// **'Hold to talk'**
String get holdToTalk;
/// No description provided for @autoSend.
///
/// In en, this message translates to:
/// **'Auto-send'**
String get autoSend;
/// No description provided for @stopListening.
///
/// In en, this message translates to:
/// **'Stop listening'**
String get stopListening;
/// No description provided for @startListening.
///
/// In en, this message translates to:
/// **'Start listening'**
String get startListening;
/// No description provided for @start.
///
/// In en, this message translates to:
/// **'Start'**
String get start;
/// No description provided for @stop.
///
/// In en, this message translates to:
/// **'Stop'**
String get stop;
/// No description provided for @web.
///
/// In en, this message translates to:
/// **'Web'**
String get web;
/// No description provided for @imageGen.
///
/// In en, this message translates to:
/// **'Image Gen'**
String get imageGen;
/// No description provided for @webSearch.
///
/// In en, this message translates to:
/// **'Web Search'**
String get webSearch;
/// No description provided for @webSearchDescription.
///
/// In en, this message translates to:
/// **'Let the assistant search the internet while answering.'**
String get webSearchDescription;
/// No description provided for @imageGeneration.
///
/// In en, this message translates to:
/// **'Image Generation'**
String get imageGeneration;
/// No description provided for @imageGenerationDescription.
///
/// In en, this message translates to:
/// **'Generate images from your prompt and attach them.'**
String get imageGenerationDescription;
}
class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();
@override
@@ -1349,30 +1201,27 @@ class _AppLocalizationsDelegate
}
@override
bool isSupported(Locale locale) =>
<String>['de', 'en', 'fr', 'it'].contains(locale.languageCode);
bool isSupported(Locale locale) => <String>['de', 'en', 'fr', 'it'].contains(locale.languageCode);
@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
}
AppLocalizations lookupAppLocalizations(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'de':
return AppLocalizationsDe();
case 'en':
return AppLocalizationsEn();
case 'fr':
return AppLocalizationsFr();
case 'it':
return AppLocalizationsIt();
case 'de': return AppLocalizationsDe();
case 'en': return AppLocalizationsEn();
case 'fr': return AppLocalizationsFr();
case 'it': return AppLocalizationsIt();
}
throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.',
'that was used.'
);
}