From 64c6aee08a7eb702d04aa60cec7131eda0e35820 Mon Sep 17 00:00:00 2001 From: Bruce Liu Date: Thu, 15 Jul 2021 22:32:41 -0700 Subject: [PATCH] add german language support --- ios/.gitignore | 1 + ios/Runner.xcodeproj/project.pbxproj | 9 ++++++--- .../project.xcworkspace/contents.xcworkspacedata | 2 +- ios/Runner/de.lproj/LaunchScreen.strings | 1 + lib/main.dart | 1 + lib/pages/settings/general_page.dart | 1 + 6 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 ios/Runner/de.lproj/LaunchScreen.strings diff --git a/ios/.gitignore b/ios/.gitignore index e96ef60..36129af 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -24,6 +24,7 @@ Flutter/flutter_assets/ Flutter/flutter_export_environment.sh ServiceDefinitions.json Runner/GeneratedPluginRegistrant.* +build # Exceptions to above rules. !default.mode1v3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 5026cfa..05aeafe 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ 324ACECE25C909AD00CD3591 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LaunchScreen.strings; sourceTree = ""; }; 32561D9E25BE823400DBD252 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 3271990C25BBF9C8008EA00E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 32AC73DE263AED42001F500B /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LaunchScreen.strings; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 40360520B75D3E668845C254 /* 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 = ""; }; 6462689146C9FF38DFEA397D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; @@ -177,6 +178,7 @@ Base, "zh-Hans", es, + de, ); mainGroup = 97C146E51CF9000F007C117D; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; @@ -299,6 +301,7 @@ 97C147001CF9000F007C117D /* Base */, 3271990C25BBF9C8008EA00E /* zh-Hans */, 324ACECE25C909AD00CD3591 /* es */, + 32AC73DE263AED42001F500B /* de */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -364,7 +367,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = EM8VE646TZ; @@ -508,7 +511,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = EM8VE646TZ; @@ -544,7 +547,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = EM8VE646TZ; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ios/Runner/de.lproj/LaunchScreen.strings b/ios/Runner/de.lproj/LaunchScreen.strings new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ios/Runner/de.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/lib/main.dart b/lib/main.dart index 6ca8c02..bbfa6ef 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -110,6 +110,7 @@ class MyApp extends StatelessWidget { ], locale: globalModel.locale, supportedLocales: [ + const Locale("de"), const Locale("en"), const Locale("es"), const Locale("zh"), diff --git a/lib/pages/settings/general_page.dart b/lib/pages/settings/general_page.dart index f5a5c91..084a109 100644 --- a/lib/pages/settings/general_page.dart +++ b/lib/pages/settings/general_page.dart @@ -131,6 +131,7 @@ class _GeneralPageState extends State { final localeItems = ListTileGroup.fromOptions( [ Tuple2(S.of(context).followSystem, null), + const Tuple2("Deutsch", Locale("de")), const Tuple2("English", Locale("en")), const Tuple2("Español", Locale("es")), const Tuple2("中文(简体)", Locale("zh")), -- 2.38.5