add locale to app using intl

This commit is contained in:
周强
2021-12-09 09:24:36 +08:00
parent 1a07bcd7a0
commit 13bd12cfe9
21 changed files with 1466 additions and 101 deletions

View File

@@ -0,0 +1,66 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that looks up messages for specific locales by
// delegating to the appropriate library.
// Ignore issues from commonly used lints in this file.
// ignore_for_file:implementation_imports, file_names, unnecessary_new
// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
// ignore_for_file:argument_type_not_assignable, invalid_assignment
// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
// ignore_for_file:comment_references
import 'dart:async';
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
import 'package:intl/src/intl_helpers.dart';
import 'messages_en.dart' as messages_en;
import 'messages_zh.dart' as messages_zh;
typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
'zh': () => new Future.value(null),
};
MessageLookupByLibrary? _findExact(String localeName) {
switch (localeName) {
case 'en':
return messages_en.messages;
case 'zh':
return messages_zh.messages;
default:
return null;
}
}
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
}
var lib = _deferredLibraries[availableLocale];
await (lib == null ? new Future.value(false) : lib());
initializeInternalMessageLookup(() => new CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return new Future.value(true);
}
bool _messagesExistFor(String locale) {
try {
return _findExact(locale) != null;
} catch (e) {
return false;
}
}
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}

View File

@@ -0,0 +1,131 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a en locale. All the
// messages from the main program should be duplicated here with the same
// function name.
// Ignore issues from commonly used lints in this file.
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes
// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
final messages = new MessageLookup();
typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"No": MessageLookupByLibrary.simpleMessage("No"),
"OR": MessageLookupByLibrary.simpleMessage("OR"),
"Yes": MessageLookupByLibrary.simpleMessage("Yes"),
"actionData": MessageLookupByLibrary.simpleMessage("Action data"),
"active": MessageLookupByLibrary.simpleMessage("Active"),
"address": MessageLookupByLibrary.simpleMessage("Address"),
"address2": MessageLookupByLibrary.simpleMessage("Address 2"),
"alarmAcknowledgeText": MessageLookupByLibrary.simpleMessage(
"Are you sure you want to acknowledge Alarm?"),
"alarmAcknowledgeTitle":
MessageLookupByLibrary.simpleMessage("Acknowledge Alarm"),
"alarmClearText": MessageLookupByLibrary.simpleMessage(
"Are you sure you want to clear Alarm?"),
"alarmClearTitle": MessageLookupByLibrary.simpleMessage("Clear Alarm"),
"alarms": MessageLookupByLibrary.simpleMessage("Alarms"),
"allDevices": MessageLookupByLibrary.simpleMessage("All devices"),
"appTitle": MessageLookupByLibrary.simpleMessage("Athings"),
"asserts": MessageLookupByLibrary.simpleMessage("Asserts"),
"assetName": MessageLookupByLibrary.simpleMessage("Asset name"),
"assignedToCustomer":
MessageLookupByLibrary.simpleMessage("Assigned to customer"),
"auditLogDetails":
MessageLookupByLibrary.simpleMessage("Audit log details"),
"auditLogs": MessageLookupByLibrary.simpleMessage("Audit Logs"),
"changePassword":
MessageLookupByLibrary.simpleMessage("Change Password"),
"city": MessageLookupByLibrary.simpleMessage("City"),
"country": MessageLookupByLibrary.simpleMessage("Country"),
"currentPassword":
MessageLookupByLibrary.simpleMessage("currentPassword"),
"currentPasswordRequireText": MessageLookupByLibrary.simpleMessage(
"Current password is required."),
"currentPasswordStar":
MessageLookupByLibrary.simpleMessage("Current password *"),
"customer": MessageLookupByLibrary.simpleMessage("Customer"),
"customers": MessageLookupByLibrary.simpleMessage("Customers"),
"devices": MessageLookupByLibrary.simpleMessage("Devices"),
"email": MessageLookupByLibrary.simpleMessage("Email"),
"emailInvalidText":
MessageLookupByLibrary.simpleMessage("Invalid email format."),
"emailRequireText":
MessageLookupByLibrary.simpleMessage("Email is required."),
"emailStar": MessageLookupByLibrary.simpleMessage("Email *"),
"entityType": MessageLookupByLibrary.simpleMessage("Entity Type"),
"failureDetails":
MessageLookupByLibrary.simpleMessage("Failure details"),
"firstName": MessageLookupByLibrary.simpleMessage("firstName"),
"firstNameUpper": MessageLookupByLibrary.simpleMessage("First Name"),
"home": MessageLookupByLibrary.simpleMessage("Home"),
"inactive": MessageLookupByLibrary.simpleMessage("Inactive"),
"label": MessageLookupByLibrary.simpleMessage("Label"),
"lastName": MessageLookupByLibrary.simpleMessage("lastName"),
"lastNameUpper": MessageLookupByLibrary.simpleMessage("Last Name"),
"listIsEmptyText": MessageLookupByLibrary.simpleMessage(
"The list is currently empty."),
"login": MessageLookupByLibrary.simpleMessage("Log In"),
"loginNotification":
MessageLookupByLibrary.simpleMessage("Login to your account"),
"logoDefaultValue":
MessageLookupByLibrary.simpleMessage("Athings Logo"),
"logout": MessageLookupByLibrary.simpleMessage("Log Out"),
"more": MessageLookupByLibrary.simpleMessage("More"),
"newPassword": MessageLookupByLibrary.simpleMessage("newPassword"),
"newPassword2": MessageLookupByLibrary.simpleMessage("newPassword2"),
"newPassword2RequireText": MessageLookupByLibrary.simpleMessage(
"New password again is required."),
"newPassword2Star":
MessageLookupByLibrary.simpleMessage("New password again *"),
"newPasswordRequireText":
MessageLookupByLibrary.simpleMessage("New password is required."),
"newPasswordStar":
MessageLookupByLibrary.simpleMessage("New password *"),
"notImplemented":
MessageLookupByLibrary.simpleMessage("Not implemented!"),
"password": MessageLookupByLibrary.simpleMessage("Password"),
"passwordErrorNotification": MessageLookupByLibrary.simpleMessage(
"Entered passwords must be same!"),
"passwordForgotText":
MessageLookupByLibrary.simpleMessage("Forgot Password?"),
"passwordRequireText":
MessageLookupByLibrary.simpleMessage("Password is required."),
"passwordReset": MessageLookupByLibrary.simpleMessage("Reset password"),
"passwordResetLinkSuccessfullySentNotification":
MessageLookupByLibrary.simpleMessage(
"Password reset link was successfully sent!"),
"passwordResetText": MessageLookupByLibrary.simpleMessage(
"Enter the email associated with your account and we\\\'ll send an email with password reset link"),
"passwordSuccessNotification": MessageLookupByLibrary.simpleMessage(
"Password successfully changed"),
"phone": MessageLookupByLibrary.simpleMessage("Phone"),
"postalCode": MessageLookupByLibrary.simpleMessage("Zip / Postal Code"),
"profileSuccessNotification": MessageLookupByLibrary.simpleMessage(
"Profile successfully updated"),
"requestPasswordReset":
MessageLookupByLibrary.simpleMessage("Request password reset"),
"stateOrProvince":
MessageLookupByLibrary.simpleMessage("State / Province"),
"systemAdministrator":
MessageLookupByLibrary.simpleMessage("System Administrator"),
"tenantAdministrator":
MessageLookupByLibrary.simpleMessage("Tenant Administrator"),
"title": MessageLookupByLibrary.simpleMessage("Title"),
"tryAgain": MessageLookupByLibrary.simpleMessage("Try Again"),
"type": MessageLookupByLibrary.simpleMessage("Type"),
"username": MessageLookupByLibrary.simpleMessage("username")
};
}

View File

@@ -0,0 +1,108 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a zh locale. All the
// messages from the main program should be duplicated here with the same
// function name.
// Ignore issues from commonly used lints in this file.
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes
// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
final messages = new MessageLookup();
typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'zh';
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"No": MessageLookupByLibrary.simpleMessage(""),
"OR": MessageLookupByLibrary.simpleMessage(""),
"Yes": MessageLookupByLibrary.simpleMessage(""),
"actionData": MessageLookupByLibrary.simpleMessage("动作数据"),
"active": MessageLookupByLibrary.simpleMessage("激活"),
"address": MessageLookupByLibrary.simpleMessage("地址"),
"address2": MessageLookupByLibrary.simpleMessage("地址 2"),
"alarmAcknowledgeText":
MessageLookupByLibrary.simpleMessage("你确定要确认告警吗?"),
"alarmAcknowledgeTitle": MessageLookupByLibrary.simpleMessage("确认告警"),
"alarmClearText": MessageLookupByLibrary.simpleMessage("你确定要清除告警吗?"),
"alarmClearTitle": MessageLookupByLibrary.simpleMessage("清除告警"),
"alarms": MessageLookupByLibrary.simpleMessage("告警"),
"allDevices": MessageLookupByLibrary.simpleMessage("所有设备"),
"appTitle": MessageLookupByLibrary.simpleMessage("Athings"),
"asserts": MessageLookupByLibrary.simpleMessage("资产"),
"assetName": MessageLookupByLibrary.simpleMessage("资产名"),
"assignedToCustomer": MessageLookupByLibrary.simpleMessage("分配给客户"),
"auditLogDetails": MessageLookupByLibrary.simpleMessage("审计日志详情"),
"auditLogs": MessageLookupByLibrary.simpleMessage("审计报告"),
"changePassword": MessageLookupByLibrary.simpleMessage("修改密码"),
"city": MessageLookupByLibrary.simpleMessage("城市"),
"country": MessageLookupByLibrary.simpleMessage("国家"),
"currentPassword": MessageLookupByLibrary.simpleMessage("当前密码"),
"currentPasswordRequireText":
MessageLookupByLibrary.simpleMessage("输入当前密码"),
"currentPasswordStar": MessageLookupByLibrary.simpleMessage("当前密码 *"),
"customer": MessageLookupByLibrary.simpleMessage("客户"),
"customers": MessageLookupByLibrary.simpleMessage("客户"),
"devices": MessageLookupByLibrary.simpleMessage("设备"),
"email": MessageLookupByLibrary.simpleMessage("Email"),
"emailInvalidText": MessageLookupByLibrary.simpleMessage("Email格式错误"),
"emailRequireText": MessageLookupByLibrary.simpleMessage("输入Email"),
"emailStar": MessageLookupByLibrary.simpleMessage("Email *"),
"entityType": MessageLookupByLibrary.simpleMessage("实体类型"),
"failureDetails": MessageLookupByLibrary.simpleMessage("失败详情"),
"firstName": MessageLookupByLibrary.simpleMessage(""),
"firstNameUpper": MessageLookupByLibrary.simpleMessage(""),
"home": MessageLookupByLibrary.simpleMessage("主页"),
"inactive": MessageLookupByLibrary.simpleMessage("失活"),
"label": MessageLookupByLibrary.simpleMessage("标签"),
"lastName": MessageLookupByLibrary.simpleMessage(""),
"lastNameUpper": MessageLookupByLibrary.simpleMessage(""),
"listIsEmptyText": MessageLookupByLibrary.simpleMessage("列表当前为空"),
"login": MessageLookupByLibrary.simpleMessage("登录"),
"loginNotification": MessageLookupByLibrary.simpleMessage("登录你的账号"),
"logoDefaultValue":
MessageLookupByLibrary.simpleMessage("Athings Logo"),
"logout": MessageLookupByLibrary.simpleMessage("登出"),
"more": MessageLookupByLibrary.simpleMessage("更多"),
"newPassword": MessageLookupByLibrary.simpleMessage("新密码"),
"newPassword2": MessageLookupByLibrary.simpleMessage("新密码2"),
"newPassword2RequireText":
MessageLookupByLibrary.simpleMessage("再次输入新密码"),
"newPassword2Star": MessageLookupByLibrary.simpleMessage("再次输入新密码 *"),
"newPasswordRequireText": MessageLookupByLibrary.simpleMessage("输入新密码"),
"newPasswordStar": MessageLookupByLibrary.simpleMessage("新密码 *"),
"notImplemented": MessageLookupByLibrary.simpleMessage("未实现!"),
"password": MessageLookupByLibrary.simpleMessage("密码"),
"passwordErrorNotification":
MessageLookupByLibrary.simpleMessage("输入的密码必须相同"),
"passwordForgotText": MessageLookupByLibrary.simpleMessage("忘记密码?"),
"passwordRequireText": MessageLookupByLibrary.simpleMessage("输入密码"),
"passwordReset": MessageLookupByLibrary.simpleMessage("重置密码"),
"passwordResetLinkSuccessfullySentNotification":
MessageLookupByLibrary.simpleMessage("密码重置链接已发送"),
"passwordResetText": MessageLookupByLibrary.simpleMessage(
"输入和账号关联的Email我们将发送一个密码重置链接到的Email"),
"passwordSuccessNotification":
MessageLookupByLibrary.simpleMessage("密码修改成功"),
"phone": MessageLookupByLibrary.simpleMessage("电话"),
"postalCode": MessageLookupByLibrary.simpleMessage("邮编"),
"profileSuccessNotification":
MessageLookupByLibrary.simpleMessage("配置更新成功"),
"requestPasswordReset": MessageLookupByLibrary.simpleMessage("要求重置密码"),
"stateOrProvince": MessageLookupByLibrary.simpleMessage("州 / 省"),
"systemAdministrator": MessageLookupByLibrary.simpleMessage("系统管理员"),
"tenantAdministrator": MessageLookupByLibrary.simpleMessage("租户管理员"),
"title": MessageLookupByLibrary.simpleMessage("标题"),
"tryAgain": MessageLookupByLibrary.simpleMessage("再试一次"),
"type": MessageLookupByLibrary.simpleMessage("类型"),
"username": MessageLookupByLibrary.simpleMessage("用户名")
};
}

809
lib/generated/l10n.dart Normal file
View File

@@ -0,0 +1,809 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'intl/messages_all.dart';
// **************************************************************************
// Generator: Flutter Intl IDE plugin
// Made by Localizely
// **************************************************************************
// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes
class S {
S();
static S? _current;
static S get current {
assert(_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
return _current!;
}
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
static Future<S> load(Locale locale) {
final name = (locale.countryCode?.isEmpty ?? false)
? locale.languageCode
: locale.toString();
final localeName = Intl.canonicalizedLocale(name);
return initializeMessages(localeName).then((_) {
Intl.defaultLocale = localeName;
final instance = S();
S._current = instance;
return instance;
});
}
static S of(BuildContext context) {
final instance = S.maybeOf(context);
assert(instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
return instance!;
}
static S? maybeOf(BuildContext context) {
return Localizations.of<S>(context, S);
}
/// `Athings`
String get appTitle {
return Intl.message(
'Athings',
name: 'appTitle',
desc: '',
args: [],
);
}
/// `Home`
String get home {
return Intl.message(
'Home',
name: 'home',
desc: '',
args: [],
);
}
/// `Alarms`
String get alarms {
return Intl.message(
'Alarms',
name: 'alarms',
desc: '',
args: [],
);
}
/// `Devices`
String get devices {
return Intl.message(
'Devices',
name: 'devices',
desc: '',
args: [],
);
}
/// `More`
String get more {
return Intl.message(
'More',
name: 'more',
desc: '',
args: [],
);
}
/// `Customers`
String get customers {
return Intl.message(
'Customers',
name: 'customers',
desc: '',
args: [],
);
}
/// `Asserts`
String get asserts {
return Intl.message(
'Asserts',
name: 'asserts',
desc: '',
args: [],
);
}
/// `Audit Logs`
String get auditLogs {
return Intl.message(
'Audit Logs',
name: 'auditLogs',
desc: '',
args: [],
);
}
/// `Log Out`
String get logout {
return Intl.message(
'Log Out',
name: 'logout',
desc: '',
args: [],
);
}
/// `Log In`
String get login {
return Intl.message(
'Log In',
name: 'login',
desc: '',
args: [],
);
}
/// `Athings Logo`
String get logoDefaultValue {
return Intl.message(
'Athings Logo',
name: 'logoDefaultValue',
desc: '',
args: [],
);
}
/// `Login to your account`
String get loginNotification {
return Intl.message(
'Login to your account',
name: 'loginNotification',
desc: '',
args: [],
);
}
/// `Email`
String get email {
return Intl.message(
'Email',
name: 'email',
desc: '',
args: [],
);
}
/// `Email is required.`
String get emailRequireText {
return Intl.message(
'Email is required.',
name: 'emailRequireText',
desc: '',
args: [],
);
}
/// `Invalid email format.`
String get emailInvalidText {
return Intl.message(
'Invalid email format.',
name: 'emailInvalidText',
desc: '',
args: [],
);
}
/// `username`
String get username {
return Intl.message(
'username',
name: 'username',
desc: '',
args: [],
);
}
/// `Password`
String get password {
return Intl.message(
'Password',
name: 'password',
desc: '',
args: [],
);
}
/// `Password is required.`
String get passwordRequireText {
return Intl.message(
'Password is required.',
name: 'passwordRequireText',
desc: '',
args: [],
);
}
/// `Forgot Password?`
String get passwordForgotText {
return Intl.message(
'Forgot Password?',
name: 'passwordForgotText',
desc: '',
args: [],
);
}
/// `Reset password`
String get passwordReset {
return Intl.message(
'Reset password',
name: 'passwordReset',
desc: '',
args: [],
);
}
/// `Enter the email associated with your account and we\'ll send an email with password reset link`
String get passwordResetText {
return Intl.message(
'Enter the email associated with your account and we\\\'ll send an email with password reset link',
name: 'passwordResetText',
desc: '',
args: [],
);
}
/// `Request password reset`
String get requestPasswordReset {
return Intl.message(
'Request password reset',
name: 'requestPasswordReset',
desc: '',
args: [],
);
}
/// `Password reset link was successfully sent!`
String get passwordResetLinkSuccessfullySentNotification {
return Intl.message(
'Password reset link was successfully sent!',
name: 'passwordResetLinkSuccessfullySentNotification',
desc: '',
args: [],
);
}
/// `OR`
String get OR {
return Intl.message(
'OR',
name: 'OR',
desc: '',
args: [],
);
}
/// `No`
String get No {
return Intl.message(
'No',
name: 'No',
desc: '',
args: [],
);
}
/// `Yes`
String get Yes {
return Intl.message(
'Yes',
name: 'Yes',
desc: '',
args: [],
);
}
/// `Title`
String get title {
return Intl.message(
'Title',
name: 'title',
desc: '',
args: [],
);
}
/// `Country`
String get country {
return Intl.message(
'Country',
name: 'country',
desc: '',
args: [],
);
}
/// `City`
String get city {
return Intl.message(
'City',
name: 'city',
desc: '',
args: [],
);
}
/// `State / Province`
String get stateOrProvince {
return Intl.message(
'State / Province',
name: 'stateOrProvince',
desc: '',
args: [],
);
}
/// `Zip / Postal Code`
String get postalCode {
return Intl.message(
'Zip / Postal Code',
name: 'postalCode',
desc: '',
args: [],
);
}
/// `Address`
String get address {
return Intl.message(
'Address',
name: 'address',
desc: '',
args: [],
);
}
/// `Address 2`
String get address2 {
return Intl.message(
'Address 2',
name: 'address2',
desc: '',
args: [],
);
}
/// `Phone`
String get phone {
return Intl.message(
'Phone',
name: 'phone',
desc: '',
args: [],
);
}
/// `Clear Alarm`
String get alarmClearTitle {
return Intl.message(
'Clear Alarm',
name: 'alarmClearTitle',
desc: '',
args: [],
);
}
/// `Are you sure you want to clear Alarm?`
String get alarmClearText {
return Intl.message(
'Are you sure you want to clear Alarm?',
name: 'alarmClearText',
desc: '',
args: [],
);
}
/// `Acknowledge Alarm`
String get alarmAcknowledgeTitle {
return Intl.message(
'Acknowledge Alarm',
name: 'alarmAcknowledgeTitle',
desc: '',
args: [],
);
}
/// `Are you sure you want to acknowledge Alarm?`
String get alarmAcknowledgeText {
return Intl.message(
'Are you sure you want to acknowledge Alarm?',
name: 'alarmAcknowledgeText',
desc: '',
args: [],
);
}
/// `Asset name`
String get assetName {
return Intl.message(
'Asset name',
name: 'assetName',
desc: '',
args: [],
);
}
/// `Type`
String get type {
return Intl.message(
'Type',
name: 'type',
desc: '',
args: [],
);
}
/// `Label`
String get label {
return Intl.message(
'Label',
name: 'label',
desc: '',
args: [],
);
}
/// `Assigned to customer`
String get assignedToCustomer {
return Intl.message(
'Assigned to customer',
name: 'assignedToCustomer',
desc: '',
args: [],
);
}
/// `Audit log details`
String get auditLogDetails {
return Intl.message(
'Audit log details',
name: 'auditLogDetails',
desc: '',
args: [],
);
}
/// `Entity Type`
String get entityType {
return Intl.message(
'Entity Type',
name: 'entityType',
desc: '',
args: [],
);
}
/// `Action data`
String get actionData {
return Intl.message(
'Action data',
name: 'actionData',
desc: '',
args: [],
);
}
/// `Failure details`
String get failureDetails {
return Intl.message(
'Failure details',
name: 'failureDetails',
desc: '',
args: [],
);
}
/// `All devices`
String get allDevices {
return Intl.message(
'All devices',
name: 'allDevices',
desc: '',
args: [],
);
}
/// `Active`
String get active {
return Intl.message(
'Active',
name: 'active',
desc: '',
args: [],
);
}
/// `Inactive`
String get inactive {
return Intl.message(
'Inactive',
name: 'inactive',
desc: '',
args: [],
);
}
/// `System Administrator`
String get systemAdministrator {
return Intl.message(
'System Administrator',
name: 'systemAdministrator',
desc: '',
args: [],
);
}
/// `Tenant Administrator`
String get tenantAdministrator {
return Intl.message(
'Tenant Administrator',
name: 'tenantAdministrator',
desc: '',
args: [],
);
}
/// `Customer`
String get customer {
return Intl.message(
'Customer',
name: 'customer',
desc: '',
args: [],
);
}
/// `Change Password`
String get changePassword {
return Intl.message(
'Change Password',
name: 'changePassword',
desc: '',
args: [],
);
}
/// `currentPassword`
String get currentPassword {
return Intl.message(
'currentPassword',
name: 'currentPassword',
desc: '',
args: [],
);
}
/// `Current password is required.`
String get currentPasswordRequireText {
return Intl.message(
'Current password is required.',
name: 'currentPasswordRequireText',
desc: '',
args: [],
);
}
/// `Current password *`
String get currentPasswordStar {
return Intl.message(
'Current password *',
name: 'currentPasswordStar',
desc: '',
args: [],
);
}
/// `newPassword`
String get newPassword {
return Intl.message(
'newPassword',
name: 'newPassword',
desc: '',
args: [],
);
}
/// `New password is required.`
String get newPasswordRequireText {
return Intl.message(
'New password is required.',
name: 'newPasswordRequireText',
desc: '',
args: [],
);
}
/// `New password *`
String get newPasswordStar {
return Intl.message(
'New password *',
name: 'newPasswordStar',
desc: '',
args: [],
);
}
/// `newPassword2`
String get newPassword2 {
return Intl.message(
'newPassword2',
name: 'newPassword2',
desc: '',
args: [],
);
}
/// `New password again is required.`
String get newPassword2RequireText {
return Intl.message(
'New password again is required.',
name: 'newPassword2RequireText',
desc: '',
args: [],
);
}
/// `New password again *`
String get newPassword2Star {
return Intl.message(
'New password again *',
name: 'newPassword2Star',
desc: '',
args: [],
);
}
/// `Entered passwords must be same!`
String get passwordErrorNotification {
return Intl.message(
'Entered passwords must be same!',
name: 'passwordErrorNotification',
desc: '',
args: [],
);
}
/// `Email *`
String get emailStar {
return Intl.message(
'Email *',
name: 'emailStar',
desc: '',
args: [],
);
}
/// `firstName`
String get firstName {
return Intl.message(
'firstName',
name: 'firstName',
desc: '',
args: [],
);
}
/// `First Name`
String get firstNameUpper {
return Intl.message(
'First Name',
name: 'firstNameUpper',
desc: '',
args: [],
);
}
/// `lastName`
String get lastName {
return Intl.message(
'lastName',
name: 'lastName',
desc: '',
args: [],
);
}
/// `Last Name`
String get lastNameUpper {
return Intl.message(
'Last Name',
name: 'lastNameUpper',
desc: '',
args: [],
);
}
/// `Profile successfully updated`
String get profileSuccessNotification {
return Intl.message(
'Profile successfully updated',
name: 'profileSuccessNotification',
desc: '',
args: [],
);
}
/// `Password successfully changed`
String get passwordSuccessNotification {
return Intl.message(
'Password successfully changed',
name: 'passwordSuccessNotification',
desc: '',
args: [],
);
}
/// `Not implemented!`
String get notImplemented {
return Intl.message(
'Not implemented!',
name: 'notImplemented',
desc: '',
args: [],
);
}
/// `The list is currently empty.`
String get listIsEmptyText {
return Intl.message(
'The list is currently empty.',
name: 'listIsEmptyText',
desc: '',
args: [],
);
}
/// `Try Again`
String get tryAgain {
return Intl.message(
'Try Again',
name: 'tryAgain',
desc: '',
args: [],
);
}
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
const AppLocalizationDelegate();
List<Locale> get supportedLocales {
return const <Locale>[
Locale.fromSubtags(languageCode: 'en'),
Locale.fromSubtags(languageCode: 'zh'),
];
}
@override
bool isSupported(Locale locale) => _isSupported(locale);
@override
Future<S> load(Locale locale) => S.load(locale);
@override
bool shouldReload(AppLocalizationDelegate old) => false;
bool _isSupported(Locale locale) {
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return true;
}
}
return false;
}
}