mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 07:54:44 +08:00
feat: NavUI l10n
This commit is contained in:
@ -9,6 +9,7 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:hive_ce/hive.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:starcitizen_doctor/api/analytics.dart';
|
||||
import 'package:starcitizen_doctor/generated/no_l10n_strings.dart';
|
||||
import 'package:starcitizen_doctor/ui/guide/guide_ui.dart';
|
||||
import 'package:starcitizen_doctor/ui/tools/tools_ui_model.dart';
|
||||
import 'package:starcitizen_doctor/widgets/widgets.dart';
|
||||
@ -151,7 +152,7 @@ class HomeUI extends HookConsumerWidget {
|
||||
onChanged: model.onChangeInstallPath,
|
||||
),
|
||||
),
|
||||
if (S.current.app_language_code == "zh_CN") ...[
|
||||
if (S.current.app_language_code == NoL10n.langCodeZhCn) ...[
|
||||
const SizedBox(width: 12),
|
||||
Button(
|
||||
onPressed: homeState.webLocalizationVersionsData == null ? null : () => model.launchRSI(context),
|
||||
|
@ -94,7 +94,7 @@ class IndexUI extends HookConsumerWidget {
|
||||
S.current.app_index_menu_tools,
|
||||
const ToolsUI(),
|
||||
),
|
||||
FluentIcons.power_apps: ("导航", const NavUI()),
|
||||
FluentIcons.power_apps: ((S.current.nav_title), const NavUI()),
|
||||
FluentIcons.settings: (S.current.app_index_menu_settings, const SettingsUI()),
|
||||
FluentIcons.info: (
|
||||
S.current.app_index_menu_about,
|
||||
@ -167,4 +167,4 @@ class IndexUI extends HookConsumerWidget {
|
||||
_goDownloader(BuildContext context) {
|
||||
context.push('/index/downloader');
|
||||
}
|
||||
}
|
||||
}
|
@ -28,8 +28,8 @@ class NavUI extends HookConsumerWidget {
|
||||
children: [
|
||||
Text.rich(
|
||||
TextSpan(children: [
|
||||
TextSpan(text: "*对应链接指向的服务由第三方提供,我们不对其做任何担保,请用户自行判断使用风险 | "),
|
||||
TextSpan(text: "网站导航数据由"),
|
||||
TextSpan(text: S.current.nav_third_party_service_disclaimer),
|
||||
TextSpan(text: S.current.nav_website_navigation_data_provided_by),
|
||||
TextSpan(
|
||||
text: " 42kit ",
|
||||
style: TextStyle(
|
||||
@ -41,7 +41,7 @@ class NavUI extends HookConsumerWidget {
|
||||
launchUrlString("https://42kit.citizenwiki.cn/nav");
|
||||
},
|
||||
),
|
||||
TextSpan(text: "提供"),
|
||||
TextSpan(text: S.current.nav_provided_by),
|
||||
]),
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
@ -67,13 +67,13 @@ class NavUI extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
if (data.items == null) {
|
||||
return const Center(
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ProgressRing(),
|
||||
SizedBox(height: 12),
|
||||
Text("正在获取数据..."),
|
||||
Text(S.current.nav_fetching_data),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
|
||||
static const supportLocalizationMap = {
|
||||
"en": NoL10n.langEn,
|
||||
"zh_CN": NoL10n.langZHS,
|
||||
NoL10n.langCodeZhCn: NoL10n.langZHS,
|
||||
"zh_TW": NoL10n.langZHT,
|
||||
"fr": NoL10n.langFR,
|
||||
};
|
||||
|
Reference in New Issue
Block a user