From 01f9855678098d2f7b9d8aaebcec14c1c2458bf8 Mon Sep 17 00:00:00 2001 From: Sun Date: Sat, 9 Oct 2021 12:54:46 +0800 Subject: [PATCH] add translate for domain register --- lib/l10n/localizations.dart | 2 ++ lib/l10n/localizations_en.dart | 4 ++++ lib/l10n/localizations_zh.dart | 4 ++++ lib/pages/account_domain.dart | 6 +++--- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/l10n/localizations.dart b/lib/l10n/localizations.dart index 1e65183..883f6a9 100644 --- a/lib/l10n/localizations.dart +++ b/lib/l10n/localizations.dart @@ -96,6 +96,7 @@ abstract class AppLocalizations { String get waiting; String get notExist; String get skip; + String get register; // theme String get themeDark; @@ -224,6 +225,7 @@ abstract class AppLocalizations { String get domainSetActived; String get domainDelete; String get domainNotDelete; + String get domainCreateTip; String get cloud; String get cloudIntro; diff --git a/lib/l10n/localizations_en.dart b/lib/l10n/localizations_en.dart index e52c390..79cf243 100644 --- a/lib/l10n/localizations_en.dart +++ b/lib/l10n/localizations_en.dart @@ -116,6 +116,8 @@ class AppLocalizationsEn extends AppLocalizations { String get notExist => 'User not exist.'; @override String get skip => 'Skip'; + @override + String get register => 'Register'; // theme @override @@ -353,6 +355,8 @@ class AppLocalizationsEn extends AppLocalizations { String get domainDelete => 'Delete from provider ?'; @override String get domainNotDelete => 'Had ID, cannot delete'; + @override + String get domainCreateTip => 'Tips: It will be sent to our built-in provider. Others can find your information (avatar, nickname, ESSEID, network address) by search the username, which can be managed and deleted in the personal ID later.'; @override String get cloud => 'Cloud Peer'; diff --git a/lib/l10n/localizations_zh.dart b/lib/l10n/localizations_zh.dart index 032f106..56762c5 100644 --- a/lib/l10n/localizations_zh.dart +++ b/lib/l10n/localizations_zh.dart @@ -116,6 +116,8 @@ class AppLocalizationsZh extends AppLocalizations { String get notExist => '用户不存在。'; @override String get skip => '跳过'; + @override + String get register => '注册'; // theme @override @@ -353,6 +355,8 @@ class AppLocalizationsZh extends AppLocalizations { String get domainDelete => '从站点中删除?'; @override String get domainNotDelete => '有注册ID,无法删除'; + @override + String get domainCreateTip => '提示: 将会发送至应用内置的站点,其他人可以通过检索用户名搜索到你的信息(头像,昵称,ESSEID,网络地址)。后续可以在个人ID中进行管理和删除。'; @override String get cloud => '云节点'; diff --git a/lib/pages/account_domain.dart b/lib/pages/account_domain.dart index 5d39356..223a222 100644 --- a/lib/pages/account_domain.dart +++ b/lib/pages/account_domain.dart @@ -86,13 +86,13 @@ class AccountDomainScreenState extends State { children: [ RichText( text: TextSpan( - text: 'Register ', + text: lang.register + ' ', style: TextStyle( color: color.onSurface, fontSize: 20.0, fontWeight: FontWeight.bold ), children: [ TextSpan(text: widget.name, style: TextStyle(color: Color(0xFF6174FF))), - TextSpan(text: ' to '), + TextSpan(text: ' -> '), TextSpan(text: provider.name, style: TextStyle(color: Color(0xFF6174FF), fontStyle: FontStyle.italic) ), @@ -103,7 +103,7 @@ class AccountDomainScreenState extends State { const SizedBox(height: 10.0), Container( width: 600.0, - child: Text('Tips: It will be sent to our built-in provider. Others can find your information (avatar, nickname, ESSEID, network address) by search the username, which can be managed and deleted in the personal ID later.'), + child: Text(lang.domainCreateTip), ), SizedBox( height: 40.0,