From ef069a24a53bebe8f5b54f49e4c480dc540d62c9 Mon Sep 17 00:00:00 2001 From: Bruce Liu Date: Sun, 24 Sep 2023 19:39:17 -0700 Subject: [PATCH] add tr locale --- .gitignore | 1 + .vscode/settings.json | 3 -- ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Podfile.lock | 10 ++--- ios/Runner.xcodeproj/project.pbxproj | 12 +++-- .../xcshareddata/xcschemes/Runner.xcscheme | 8 +--- ios/Runner/tr.lproj/LaunchScreen.strings | 1 + lib/pages/settings/general_page.dart | 1 + lib/pages/settings_page.dart | 45 +++++++++++++------ lib/pages/setup_page.dart | 27 +++++++---- pubspec.lock | 16 +++++-- pubspec.yaml | 2 +- 12 files changed, 83 insertions(+), 45 deletions(-) delete mode 100644 .vscode/settings.json create mode 100644 ios/Runner/tr.lproj/LaunchScreen.strings diff --git a/.gitignore b/.gitignore index 6b3aa20..167e500 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ .buildlog/ .history .svn/ +.vscode/settings.json # IntelliJ related *.iml diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index c5f3f6b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.configuration.updateBuildConfiguration": "interactive" -} \ No newline at end of file diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 3158eba..cae6543 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 10.0 + 12.0 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c5f3eaf..940b196 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,7 +3,7 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - package_info (0.0.1): + - package_info_plus (0.4.5): - Flutter - path_provider_foundation (0.0.1): - Flutter @@ -25,7 +25,7 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - - package_info (from `.symlinks/plugins/package_info/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) - share (from `.symlinks/plugins/share/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) @@ -41,8 +41,8 @@ SPEC REPOS: EXTERNAL SOURCES: Flutter: :path: Flutter - package_info: - :path: ".symlinks/plugins/package_info/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/ios" share: @@ -61,7 +61,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 + package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 share: 0b2c3e82132f5888bccca3351c504d0003b3b410 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c7b9e88..7fbcb68 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -54,6 +54,7 @@ E30184032867BA70005DCAE6 /* hr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hr; path = hr.lproj/LaunchScreen.strings; sourceTree = ""; }; E30184042867BA7D005DCAE6 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/LaunchScreen.strings"; sourceTree = ""; }; E30184052867BAB1005DCAE6 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/LaunchScreen.strings; sourceTree = ""; }; + E39270B02AC0B06300E26E7C /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/LaunchScreen.strings; sourceTree = ""; }; FA1C5CF9893C1976B07DEA5C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -187,6 +188,7 @@ hr, "pt-BR", uk, + tr, ); mainGroup = 97C146E51CF9000F007C117D; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; @@ -316,6 +318,7 @@ E30184032867BA70005DCAE6 /* hr */, E30184042867BA7D005DCAE6 /* pt-BR */, E30184052867BAB1005DCAE6 /* uk */, + E39270B02AC0B06300E26E7C /* tr */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -365,7 +368,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -391,6 +394,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -457,7 +461,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -507,7 +511,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -535,6 +539,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -571,6 +576,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6..c87d15a 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - { const Tuple2("Français", Locale("fr")), const Tuple2("hrvatski", Locale("hr")), const Tuple2("Português do Brasil", Locale("pt")), + const Tuple2("Türkçe", Locale("tr")), const Tuple2("Українська", Locale("uk")), const Tuple2("中文(简体)", Locale("zh")), ], diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index bb8bc1f..dd71ad7 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -4,7 +4,7 @@ import 'package:fluent_reader_lite/generated/l10n.dart'; import 'package:fluent_reader_lite/utils/colors.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:package_info/package_info.dart'; +import 'package:package_info_plus/package_info_plus.dart'; class SettingsPage extends StatefulWidget { @override @@ -23,41 +23,58 @@ class _SettingsPageState extends State { ListTileGroup([ MyListTile( title: Text(S.of(context).subscriptions), - leading: Icon(Icons.rss_feed, color: CupertinoColors.systemOrange, size: 24), - onTap: () { Navigator.of(context).pushNamed("/settings/sources"); }, + leading: Icon(Icons.rss_feed, + color: CupertinoColors.systemOrange, size: 24), + onTap: () { + Navigator.of(context).pushNamed("/settings/sources"); + }, ), MyListTile( title: Text(S.of(context).feed), - leading: Icon(Icons.timeline, color: CupertinoColors.systemBlue, size: 24), - onTap: () { Navigator.of(context).pushNamed("/settings/feed"); }, + leading: Icon(Icons.timeline, + color: CupertinoColors.systemBlue, size: 24), + onTap: () { + Navigator.of(context).pushNamed("/settings/feed"); + }, ), MyListTile( title: Text(S.of(context).reading), - leading: Icon(Icons.article_outlined, color: CupertinoColors.systemBlue, size: 24), - onTap: () { Navigator.of(context).pushNamed("/settings/reading"); }, + leading: Icon(Icons.article_outlined, + color: CupertinoColors.systemBlue, size: 24), + onTap: () { + Navigator.of(context).pushNamed("/settings/reading"); + }, withDivider: false, ), ], title: S.of(context).preferences), ListTileGroup([ MyListTile( title: Text(S.of(context).service), - leading: Icon(Icons.account_circle, color: CupertinoColors.systemOrange, size: 24), - onTap: () { Navigator.of(context).pushNamed("/settings/service"); }, + leading: Icon(Icons.account_circle, + color: CupertinoColors.systemOrange, size: 24), + onTap: () { + Navigator.of(context).pushNamed("/settings/service"); + }, withDivider: false, ), ], title: S.of(context).account), ListTileGroup([ MyListTile( title: Text(S.of(context).general), - leading: Icon(Icons.toggle_on, color: CupertinoColors.systemGreen, size: 24), - onTap: () { Navigator.of(context).pushNamed("/settings/general"); }, + leading: Icon(Icons.toggle_on, + color: CupertinoColors.systemGreen, size: 24), + onTap: () { + Navigator.of(context).pushNamed("/settings/general"); + }, ), MyListTile( title: Text(S.of(context).about), - leading: Icon(Icons.info, color: CupertinoColors.systemBlue, size: 24), + leading: + Icon(Icons.info, color: CupertinoColors.systemBlue, size: 24), onTap: () async { var infos = await PackageInfo.fromPlatform(); - Navigator.of(context).pushNamed("/settings/about", arguments: infos.version); + Navigator.of(context) + .pushNamed("/settings/about", arguments: infos.version); }, withDivider: false, ), @@ -65,4 +82,4 @@ class _SettingsPageState extends State { ]), ); } -} \ No newline at end of file +} diff --git a/lib/pages/setup_page.dart b/lib/pages/setup_page.dart index c95bc2f..19f3da4 100644 --- a/lib/pages/setup_page.dart +++ b/lib/pages/setup_page.dart @@ -5,7 +5,7 @@ import 'package:fluent_reader_lite/utils/colors.dart'; import 'package:fluent_reader_lite/utils/global.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; -import 'package:package_info/package_info.dart'; +import 'package:package_info_plus/package_info_plus.dart'; class SetupPage extends StatelessWidget { void _configure(BuildContext context, String route) { @@ -32,32 +32,43 @@ class SetupPage extends StatelessWidget { final services = ListTileGroup([ MyListTile( title: Text("Fever API"), - onTap: () { _configure(context, "/settings/service/fever"); }, + onTap: () { + _configure(context, "/settings/service/fever"); + }, ), MyListTile( title: Text("Google Reader API"), - onTap: () { _configure(context, "/settings/service/greader"); }, + onTap: () { + _configure(context, "/settings/service/greader"); + }, ), MyListTile( title: Text("Inoreader"), - onTap: () { _configure(context, "/settings/service/inoreader"); }, + onTap: () { + _configure(context, "/settings/service/inoreader"); + }, ), MyListTile( title: Text("Feedbin"), - onTap: () { _configure(context, "/settings/service/feedbin"); }, + onTap: () { + _configure(context, "/settings/service/feedbin"); + }, withDivider: false, ), ], title: S.of(context).service); final settings = ListTileGroup([ MyListTile( title: Text(S.of(context).general), - onTap: () { _configure(context, "/settings/general"); }, + onTap: () { + _configure(context, "/settings/general"); + }, ), MyListTile( title: Text(S.of(context).about), onTap: () async { var infos = await PackageInfo.fromPlatform(); - Navigator.of(context).pushNamed("/settings/about", arguments: infos.version); + Navigator.of(context) + .pushNamed("/settings/about", arguments: infos.version); }, withDivider: false, ), @@ -76,4 +87,4 @@ class SetupPage extends StatelessWidget { child: page, ); } -} \ No newline at end of file +} diff --git a/pubspec.lock b/pubspec.lock index ca8b9bf..7422ce0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -309,14 +309,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.2" - package_info: + package_info_plus: dependency: "direct main" description: - name: package_info - sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" + name: package_info_plus + sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "4.1.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" path: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 3c3aa14..05ac0f8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,7 +38,7 @@ dependencies: sqflite: ^2.0.0+3 path: ^1.8.0 share: ^2.0.4 - package_info: ^2.0.2 + package_info_plus: ^4.1.0 crypto: ^3.0.1 responsive_builder: ^0.4.1 cached_network_image: ^3.2.1 -- 2.38.5