mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-05-10 03:51:23 +08:00
feat: NavUI l10n
This commit is contained in:
parent
b2ec1e93a8
commit
14b16f3a78
@ -95,7 +95,7 @@ class FileCacheUtils {
|
||||
await cacheDir.create();
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('清除缓存失败: $e');
|
||||
debugPrint('clear All Cache Error: $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1058,6 +1058,18 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"log_analyzer_window_title": MessageLookupByLibrary.simpleMessage(
|
||||
"SCToolbox: Log Analyzer",
|
||||
),
|
||||
"nav_fetching_data": MessageLookupByLibrary.simpleMessage(
|
||||
"Fetching data...",
|
||||
),
|
||||
"nav_provided_by": MessageLookupByLibrary.simpleMessage(""),
|
||||
"nav_third_party_service_disclaimer": MessageLookupByLibrary.simpleMessage(
|
||||
"*The services linked correspond to third-party providers. We do not make any guarantees and users should assess the risks of using them. | ",
|
||||
),
|
||||
"nav_title": MessageLookupByLibrary.simpleMessage("Navigation"),
|
||||
"nav_website_navigation_data_provided_by":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Website navigation data provided by",
|
||||
),
|
||||
"performance_action_apply": MessageLookupByLibrary.simpleMessage("Apply"),
|
||||
"performance_action_apply_and_clear_shaders":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
|
@ -916,6 +916,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"log_analyzer_window_title": MessageLookupByLibrary.simpleMessage(
|
||||
"SC汉化盒子: log 分析器",
|
||||
),
|
||||
"nav_fetching_data": MessageLookupByLibrary.simpleMessage("正在获取数据..."),
|
||||
"nav_provided_by": MessageLookupByLibrary.simpleMessage("提供"),
|
||||
"nav_third_party_service_disclaimer": MessageLookupByLibrary.simpleMessage(
|
||||
"*对应链接指向的服务由第三方提供,我们不对其做任何担保,请用户自行判断使用风险 | ",
|
||||
),
|
||||
"nav_title": MessageLookupByLibrary.simpleMessage("导航"),
|
||||
"nav_website_navigation_data_provided_by":
|
||||
MessageLookupByLibrary.simpleMessage("网站导航数据由"),
|
||||
"performance_action_apply": MessageLookupByLibrary.simpleMessage("应用"),
|
||||
"performance_action_apply_and_clear_shaders":
|
||||
MessageLookupByLibrary.simpleMessage("应用并清理着色器(推荐)"),
|
||||
|
@ -922,6 +922,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"log_analyzer_window_title": MessageLookupByLibrary.simpleMessage(
|
||||
"SC工具箱: log 分析器",
|
||||
),
|
||||
"nav_fetching_data": MessageLookupByLibrary.simpleMessage("正在獲取數據..."),
|
||||
"nav_provided_by": MessageLookupByLibrary.simpleMessage("提供"),
|
||||
"nav_third_party_service_disclaimer": MessageLookupByLibrary.simpleMessage(
|
||||
"*對應鏈接指向的服務由第三方提供,我們不對其做任何擔保,請用戶自行判斷使用風險 | ",
|
||||
),
|
||||
"nav_title": MessageLookupByLibrary.simpleMessage("導航"),
|
||||
"nav_website_navigation_data_provided_by":
|
||||
MessageLookupByLibrary.simpleMessage("網站導航數據由"),
|
||||
"performance_action_apply": MessageLookupByLibrary.simpleMessage("套用設定"),
|
||||
"performance_action_apply_and_clear_shaders":
|
||||
MessageLookupByLibrary.simpleMessage("套用設定並清除著色器快取(建議)"),
|
||||
|
@ -5852,6 +5852,46 @@ class S {
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Navigation`
|
||||
String get nav_title {
|
||||
return Intl.message('Navigation', name: 'nav_title', desc: '', args: []);
|
||||
}
|
||||
|
||||
/// `*The services linked correspond to third-party providers. We do not make any guarantees and users should assess the risks of using them. | `
|
||||
String get nav_third_party_service_disclaimer {
|
||||
return Intl.message(
|
||||
'*The services linked correspond to third-party providers. We do not make any guarantees and users should assess the risks of using them. | ',
|
||||
name: 'nav_third_party_service_disclaimer',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Website navigation data provided by`
|
||||
String get nav_website_navigation_data_provided_by {
|
||||
return Intl.message(
|
||||
'Website navigation data provided by',
|
||||
name: 'nav_website_navigation_data_provided_by',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// ``
|
||||
String get nav_provided_by {
|
||||
return Intl.message('', name: 'nav_provided_by', desc: '', args: []);
|
||||
}
|
||||
|
||||
/// `Fetching data...`
|
||||
String get nav_fetching_data {
|
||||
return Intl.message(
|
||||
'Fetching data...',
|
||||
name: 'nav_fetching_data',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
@ -5,4 +5,5 @@ class NoL10n {
|
||||
static const String langJa = '日本語';
|
||||
static const String langFR = 'Français';
|
||||
static const String langRU = 'Русский';
|
||||
static const String langCodeZhCn = 'zh_CN';
|
||||
}
|
||||
|
@ -893,5 +893,10 @@
|
||||
"log_analyzer_search_placeholder": "Enter keywords to search content",
|
||||
"log_analyzer_title": "Log Analyzer",
|
||||
"log_analyzer_description": "Analyze your gameplay records (login, death, kills, and other information)",
|
||||
"log_analyzer_window_title": "SCToolbox: Log Analyzer"
|
||||
"log_analyzer_window_title": "SCToolbox: Log Analyzer",
|
||||
"nav_title": "Navigation",
|
||||
"nav_third_party_service_disclaimer": "*The services linked correspond to third-party providers. We do not make any guarantees and users should assess the risks of using them. | ",
|
||||
"nav_website_navigation_data_provided_by": "Website navigation data provided by",
|
||||
"nav_provided_by": "",
|
||||
"nav_fetching_data": "Fetching data..."
|
||||
}
|
||||
|
@ -893,5 +893,10 @@
|
||||
"log_analyzer_search_placeholder": "输入关键字搜索内容",
|
||||
"log_analyzer_title": "log 分析器",
|
||||
"log_analyzer_description": "分析您的游玩记录 (登录、死亡、击杀 等信息)",
|
||||
"log_analyzer_window_title": "SC汉化盒子: log 分析器"
|
||||
"log_analyzer_window_title": "SC汉化盒子: log 分析器",
|
||||
"nav_title": "导航",
|
||||
"nav_third_party_service_disclaimer": "*对应链接指向的服务由第三方提供,我们不对其做任何担保,请用户自行判断使用风险 | ",
|
||||
"nav_website_navigation_data_provided_by": "网站导航数据由",
|
||||
"nav_provided_by": "提供",
|
||||
"nav_fetching_data": "正在获取数据..."
|
||||
}
|
@ -895,5 +895,10 @@
|
||||
"log_analyzer_search_placeholder": "輸入關鍵字搜索內容",
|
||||
"log_analyzer_title": "log 分析器",
|
||||
"log_analyzer_description": "分析您的遊玩記錄 (登入、死亡、擊殺 等資訊)",
|
||||
"log_analyzer_window_title": "SC工具箱: log 分析器"
|
||||
"log_analyzer_window_title": "SC工具箱: log 分析器",
|
||||
"nav_title": "導航",
|
||||
"nav_third_party_service_disclaimer": "*對應鏈接指向的服務由第三方提供,我們不對其做任何擔保,請用戶自行判斷使用風險 | ",
|
||||
"nav_website_navigation_data_provided_by": "網站導航數據由",
|
||||
"nav_provided_by": "提供",
|
||||
"nav_fetching_data": "正在獲取數據..."
|
||||
}
|
@ -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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user