Skip to content

Commit

Permalink
update l10n
Browse files Browse the repository at this point in the history
laiiihz committed Nov 28, 2023
1 parent 9a32e4a commit b235efd
Showing 15 changed files with 85 additions and 54 deletions.
16 changes: 1 addition & 15 deletions assets/icons/Guid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/icons/dart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/icons/js.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@ PODS:
- Flutter
- network_info_plus (0.0.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -34,6 +36,7 @@ DEPENDENCIES:
- gal (from `.symlinks/plugins/gal/darwin`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -59,6 +62,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker_ios/ios"
network_info_plus:
:path: ".symlinks/plugins/network_info_plus/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
quick_actions_ios:
@@ -75,6 +80,7 @@ SPEC CHECKSUMS:
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
quick_actions_ios: 9e80dcfadfbc5d47d9cf8f47bcf428b11cf383d4
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
@@ -103,6 +103,7 @@
"jwtPayload": "Payload",
"kernelVersion": "KernelVersion",
"language": "language",
"legalese": "Copyright © {year} laihz.dev",
"licenses": "LICENSES",
"links": "Links",
"localHostName": "Local Host Name",
1 change: 1 addition & 0 deletions lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
@@ -102,6 +102,7 @@
"jwtPayload": "ペイロード",
"kernelVersion": "カーネルバージョン",
"language": "言語",
"legalese": "Copyright © {year} laihz.dev",
"licenses": "オープンソースのライセンス",
"links": "リンク",
"localHostName": "ローカルホスト名",
3 changes: 3 additions & 0 deletions lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@
"generatorUUID": "UUID 生成器",
"generators": "生成类型工具",
"github": "github",
"gridLayout": "使用网格布局",
"hashAlgorithm": "哈希算法",
"hashHMAC": "HMAC",
"hashHMACDes": "基于密钥的消息身份认证哈希",
@@ -102,6 +103,7 @@
"jwtPayload": "载荷",
"kernelVersion": "内核版本",
"language": "语言",
"legalese": "Copyright © {year} laihz.dev",
"licenses": "开源许可",
"links": "链接",
"localHostName": "本地主机名",
@@ -160,6 +162,7 @@
"previousMonth": "上个月",
"previousSecond": "前一秒",
"previousYear": "上一年",
"pureBlack": "使用纯黑背景",
"pythonDictFormatter": "Python 字典格式化",
"qrAutoVersion": "自动",
"qrCodeTool": "二维码工具",
5 changes: 0 additions & 5 deletions lib/l10n/untranslated/desired.json
Original file line number Diff line number Diff line change
@@ -2,10 +2,5 @@
"ja": [
"gridLayout",
"pureBlack"
],

"zh": [
"gridLayout",
"pureBlack"
]
}
41 changes: 21 additions & 20 deletions lib/ui/alga_view/all_apps/alga_app_item.dart
Original file line number Diff line number Diff line change
@@ -158,31 +158,32 @@ class AlgaAppItem extends StatelessWidget {

_showMenuModal(BuildContext context, bool like) async {
final colorScheme = Theme.of(context).colorScheme;

showModalBottomSheet(
context: context,
showDragHandle: true,
useSafeArea: false,
builder: (context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
title: like
? Text(
context.tr.removeFavorite,
style: TextStyle(color: colorScheme.error),
)
: Text(context.tr.addFavorite),
trailing: like
? Icon(Icons.delete_rounded, color: colorScheme.error)
: Icon(Icons.favorite_rounded, color: colorScheme.tertiary),
onTap: () {
FavoriteBox.update(item);
Navigator.of(context).pop();
},
),
],
return SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
title: like
? Text(
context.tr.removeFavorite,
style: TextStyle(color: colorScheme.error),
)
: Text(context.tr.addFavorite),
trailing: like
? Icon(Icons.delete_rounded, color: colorScheme.error)
: Icon(Icons.favorite_rounded, color: colorScheme.tertiary),
onTap: () {
FavoriteBox.update(item);
Navigator.of(context).pop();
},
),
],
),
);
},
);
7 changes: 7 additions & 0 deletions lib/ui/global.provider.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:io';

import 'package:package_info_plus/package_info_plus.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'global.provider.g.dart';
@@ -8,3 +9,9 @@ part 'global.provider.g.dart';
bool isDesktop(IsDesktopRef ref) {
return Platform.isWindows || Platform.isLinux || Platform.isMacOS;
}

@Riverpod(keepAlive: true)
FutureOr<String> appVersion(AppVersionRef ref) async {
final info = await PackageInfo.fromPlatform();
return '${info.version}+${info.buildNumber}';
}
28 changes: 17 additions & 11 deletions lib/ui/views/settings_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:alga/ui/global.provider.dart';
import 'package:alga/ui/widgets/alga_logo.dart';
import 'package:alga/ui/widgets/app_show_menu.dart';
import 'package:alga/ui/widgets/setting_title.dart';
@@ -20,9 +21,6 @@ class SettingsView extends StatefulWidget {
}

class _SettingsViewState extends State<SettingsView> {
static const String _buildName = String.fromEnvironment('FLUTTER_BUILD_NAME');
static const String _buildNumber =
String.fromEnvironment('FLUTTER_BUILD_NUMBER');
@override
Widget build(BuildContext context) {
Widget result = CustomScrollView(
@@ -139,14 +137,22 @@ class _SettingsViewState extends State<SettingsView> {
);
},
),
AboutListTile(
icon: const AlgaLogo(radius: 24),
applicationName: context.tr.appName,
applicationIcon: const AlgaLogo(radius: 24),
applicationLegalese: 'MIT',
applicationVersion:
'${context.tr.version}$_buildName+$_buildNumber',
aboutBoxChildren: [],
Consumer(
builder: (context, ref, _) {
return ref.watch(appVersionProvider).when(
data: (d) {
return AboutListTile(
icon: const AlgaLogo(radius: 24),
applicationName: context.tr.appName,
applicationLegalese:
context.tr.legalese(DateTime.now().year),
applicationVersion: d,
);
},
error: (e, s) => const SizedBox.shrink(),
loading: () => const CircularProgressIndicator.adaptive(),
);
},
),
])),
],
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import file_selector_macos
import flutter_js
import gal
import network_info_plus
import package_info_plus
import path_provider_foundation
import screen_retriever
import url_launcher_macos
@@ -25,6 +26,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterJsPlugin.register(with: registry.registrar(forPlugin: "FlutterJsPlugin"))
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
NetworkInfoPlusPlugin.register(with: registry.registrar(forPlugin: "NetworkInfoPlusPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
6 changes: 6 additions & 0 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@ PODS:
- FlutterMacOS
- network_info_plus (0.0.1):
- FlutterMacOS
- package_info_plus (0.0.1):
- FlutterMacOS
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -36,6 +38,7 @@ DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- gal (from `Flutter/ephemeral/.symlinks/plugins/gal/darwin`)
- network_info_plus (from `Flutter/ephemeral/.symlinks/plugins/network_info_plus/macos`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
@@ -62,6 +65,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/gal/darwin
network_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/network_info_plus/macos
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
screen_retriever:
@@ -80,6 +85,7 @@ SPEC CHECKSUMS:
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
network_info_plus: f4fbc7877ab7b3294500d9441dfa53cd54972d05
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
18 changes: 17 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
@@ -972,6 +972,22 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.0.1"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
path:
dependency: "direct main"
description:
@@ -1626,5 +1642,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.2.0-194.0.dev <4.0.0"
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.13.0"
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ dependencies:
flex_color_picker: ^3.3.0
toml: ^0.14.0
xml: ^6.3.0
package_info_plus: ^5.0.1

dev_dependencies:
flutter_test:

0 comments on commit b235efd

Please sign in to comment.