Added localization support for multiple languages, including Russian and English, and integrated language selection in the login and country selection screens. Updated pubspec.yaml and pubspec.lock to include necessary dependencies.

This commit is contained in:
klockky
2026-04-03 21:29:45 +03:00
parent 4b2e5e5c47
commit 1caa8c1049
16 changed files with 996 additions and 163 deletions
+95
View File
@@ -0,0 +1,95 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for English (`en`).
class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale);
@override
String get loginTitle => 'Sign in to Komet';
@override
String get loginSubtitle =>
'Check your country code and enter your\nphone number.';
@override
String get loginCountry => 'Country';
@override
String get loginPhoneNumber => 'Phone number';
@override
String get loginPhoneHint => '(000) 000-00-00';
@override
String get loginOtherSignInMethods => 'Other sign-in methods';
@override
String get loginTermsIntro => 'By continuing, you agree to \n';
@override
String get loginTermsLink => 'the terms of use';
@override
String get loginTermsOfUse => 'Terms of use';
@override
String get loginConfirmPhoneTitle => 'Is this the correct number?';
@override
String get loginEdit => 'Change';
@override
String get loginDone => 'Done';
@override
String get loginReadTermsNotification => 'Please read the terms of use first';
@override
String get loginSpoofRedacted => 'Spoof redaction';
@override
String get loginProxy => 'Proxy';
@override
String get loginSignInWithQr => 'Sign in with QR code';
@override
String get loginSignInWithToken => 'Sign in with token';
@override
String get loginSignInWithSessionFile => 'Sign in with session file';
@override
String get loginLanguage => 'Language';
@override
String get languageNameRu => 'Русский';
@override
String get languageNameEn => 'English';
@override
String get selectCountryTitle => 'Select country';
@override
String get selectCountrySearchHint => 'Search countries…';
@override
String get codeConfirmationSmsSent =>
'We sent an SMS with a verification code to your phone number.';
@override
String codeResendInSeconds(int seconds) {
return 'Resend in $seconds s.';
}
@override
String get codeResendSms => 'Resend code via SMS';
@override
String get codeError2faMissing => 'Error: missing data for 2FA';
}