From 0a1da29c3eac6aa1785f7722f8da376281bb9865 Mon Sep 17 00:00:00 2001 From: Shreyas Thirumalai Date: Tue, 5 Jan 2021 14:55:19 +0530 Subject: [PATCH] feat: localization (#137) closes #119 Co-authored-by: Rongjian Zhang --- ios/Podfile.lock | 2 +- ios/Runner.xcodeproj/project.pbxproj | 21 +- ios/Runner/Info.plist | 5 + l10n.yaml | 3 + lib/app.dart | 30 + lib/generated/intl/messages_all.dart | 66 ++ lib/generated/intl/messages_en.dart | 127 ++++ lib/generated/intl/messages_hi.dart | 130 ++++ lib/generated/l10n.dart | 947 +++++++++++++++++++++++++++ lib/home.dart | 45 +- lib/l10n/intl_en.arb | 354 ++++++++++ lib/l10n/intl_hi.arb | 91 +++ lib/screens/bb_commits.dart | 3 +- lib/screens/bb_explore.dart | 3 +- lib/screens/bb_issues.dart | 3 +- lib/screens/bb_pulls.dart | 3 +- lib/screens/bb_repo.dart | 3 +- lib/screens/bb_teams.dart | 3 +- lib/screens/code_theme.dart | 15 +- lib/screens/ge_blob.dart | 3 +- lib/screens/ge_commits.dart | 3 +- lib/screens/ge_repo.dart | 3 +- lib/screens/ge_search.dart | 3 +- lib/screens/ge_tree.dart | 3 +- lib/screens/gh_commits.dart | 3 +- lib/screens/gh_compare.dart | 5 +- lib/screens/gh_contributors.dart | 3 +- lib/screens/gh_events.dart | 3 +- lib/screens/gh_files.dart | 3 +- lib/screens/gh_gists.dart | 3 +- lib/screens/gh_gists_files.dart | 3 +- lib/screens/gh_issues.dart | 3 +- lib/screens/gh_news.dart | 3 +- lib/screens/gh_notification.dart | 9 +- lib/screens/gh_org_repos.dart | 3 +- lib/screens/gh_orgs.dart | 3 +- lib/screens/gh_pulls.dart | 3 +- lib/screens/gh_repo.dart | 25 +- lib/screens/gh_search.dart | 5 +- lib/screens/gh_trending.dart | 5 +- lib/screens/gh_user.dart | 27 +- lib/screens/gl_commit.dart | 3 +- lib/screens/gl_commits.dart | 3 +- lib/screens/gl_explore.dart | 3 +- lib/screens/gl_group.dart | 3 +- lib/screens/gl_groups.dart | 3 +- lib/screens/gl_issue.dart | 3 +- lib/screens/gl_issues.dart | 3 +- lib/screens/gl_members.dart | 3 +- lib/screens/gl_merge_requests.dart | 3 +- lib/screens/gl_project.dart | 20 +- lib/screens/gl_project_activity.dart | 3 +- lib/screens/gl_search.dart | 5 +- lib/screens/gl_starrers.dart | 3 +- lib/screens/gl_tree.dart | 3 +- lib/screens/gl_user.dart | 3 +- lib/screens/gt_commits.dart | 3 +- lib/screens/gt_issues.dart | 4 +- lib/screens/gt_object.dart | 3 +- lib/screens/gt_orgs.dart | 3 +- lib/screens/gt_repo.dart | 3 +- lib/screens/gt_status.dart | 3 +- lib/screens/login.dart | 25 +- lib/screens/not_found.dart | 5 +- lib/screens/settings.dart | 60 +- pubspec.yaml | 5 + 66 files changed, 1988 insertions(+), 168 deletions(-) create mode 100644 l10n.yaml create mode 100644 lib/generated/intl/messages_all.dart create mode 100644 lib/generated/intl/messages_en.dart create mode 100644 lib/generated/intl/messages_hi.dart create mode 100644 lib/generated/l10n.dart create mode 100644 lib/l10n/intl_en.arb create mode 100644 lib/l10n/intl_hi.arb diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1ff1b28..4a0d42a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -61,4 +61,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3ba2e4c..9e33dd8 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -217,25 +217,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../Flutter/Flutter.framework", - "${BUILT_PRODUCTS_DIR}/launch_review/launch_review.framework", - "${BUILT_PRODUCTS_DIR}/package_info/package_info.framework", - "${BUILT_PRODUCTS_DIR}/share/share.framework", - "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework", - "${BUILT_PRODUCTS_DIR}/uni_links/uni_links.framework", - "${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/launch_review.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/uni_links.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 024d06c..47141b8 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -4,6 +4,11 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleLocalizations + + en + hi + CFBundleDisplayName GitTouch CFBundleExecutable diff --git a/l10n.yaml b/l10n.yaml new file mode 100644 index 0000000..87bd5db --- /dev/null +++ b/l10n.yaml @@ -0,0 +1,3 @@ +arb-dir: lib/l10n +template-arb-file: intl_en.arb +output-localization-file: S.dart \ No newline at end of file diff --git a/lib/app.dart b/lib/app.dart index c643d88..0c2756f 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -4,6 +4,8 @@ import 'package:git_touch/home.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/models/theme.dart'; import 'package:provider/provider.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'generated/l10n.dart'; class MyApp extends StatelessWidget { Widget _buildChild(BuildContext context) { @@ -13,6 +15,20 @@ class MyApp extends StatelessWidget { return CupertinoApp( theme: CupertinoThemeData(brightness: theme.brightness), home: Home(), + localeResolutionCallback: + (Locale locale, Iterable supportedLocales) { + return locale; + }, + localizationsDelegates: [ + S.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: [ + const Locale('en', ''), + const Locale('hi', ''), + ], ); default: return MaterialApp( @@ -29,6 +45,20 @@ class MyApp extends StatelessWidget { ), ), home: Home(), + localeResolutionCallback: + (Locale locale, Iterable supportedLocales) { + return locale; + }, + localizationsDelegates: [ + S.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: [ + const Locale('en', ''), + const Locale('hi', ''), + ], ); } } diff --git a/lib/generated/intl/messages_all.dart b/lib/generated/intl/messages_all.dart new file mode 100644 index 0000000..5f0d473 --- /dev/null +++ b/lib/generated/intl/messages_all.dart @@ -0,0 +1,66 @@ +// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart +// This is a library that looks up messages for specific locales by +// delegating to the appropriate library. + +// Ignore issues from commonly used lints in this file. +// ignore_for_file:implementation_imports, file_names, unnecessary_new +// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering +// ignore_for_file:argument_type_not_assignable, invalid_assignment +// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases +// ignore_for_file:comment_references + +import 'dart:async'; + +import 'package:intl/intl.dart'; +import 'package:intl/message_lookup_by_library.dart'; +import 'package:intl/src/intl_helpers.dart'; + +import 'messages_en.dart' as messages_en; +import 'messages_hi.dart' as messages_hi; + +typedef Future LibraryLoader(); +Map _deferredLibraries = { + 'en': () => new Future.value(null), + 'hi': () => new Future.value(null), +}; + +MessageLookupByLibrary _findExact(String localeName) { + switch (localeName) { + case 'en': + return messages_en.messages; + case 'hi': + return messages_hi.messages; + default: + return null; + } +} + +/// User programs should call this before using [localeName] for messages. +Future initializeMessages(String localeName) async { + var availableLocale = Intl.verifiedLocale( + localeName, (locale) => _deferredLibraries[locale] != null, + onFailure: (_) => null); + if (availableLocale == null) { + return new Future.value(false); + } + var lib = _deferredLibraries[availableLocale]; + await (lib == null ? new Future.value(false) : lib()); + initializeInternalMessageLookup(() => new CompositeMessageLookup()); + messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); + return new Future.value(true); +} + +bool _messagesExistFor(String locale) { + try { + return _findExact(locale) != null; + } catch (e) { + return false; + } +} + +MessageLookupByLibrary _findGeneratedMessagesFor(String locale) { + var actualLocale = + Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); + if (actualLocale == null) return null; + return _findExact(actualLocale); +} diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart new file mode 100644 index 0000000..2ecf75b --- /dev/null +++ b/lib/generated/intl/messages_en.dart @@ -0,0 +1,127 @@ +// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart +// This is a library that provides messages for a en locale. All the +// messages from the main program should be duplicated here with the same +// function name. + +// Ignore issues from commonly used lints in this file. +// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new +// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering +// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases +// ignore_for_file:unused_import, file_names + +import 'package:intl/intl.dart'; +import 'package:intl/message_lookup_by_library.dart'; + +final messages = new MessageLookup(); + +typedef String MessageIfAbsent(String messageStr, List args); + +class MessageLookup extends MessageLookupByLibrary { + String get localeName => 'en'; + + final messages = _notInlinedMessages(_notInlinedMessages); + static _notInlinedMessages(_) => { + "about": MessageLookupByLibrary.simpleMessage("about"), + "actions": MessageLookupByLibrary.simpleMessage("Actions"), + "activity": MessageLookupByLibrary.simpleMessage("Activity"), + "all": MessageLookupByLibrary.simpleMessage("All"), + "bitbucketAccount": + MessageLookupByLibrary.simpleMessage("Bitbucket Account"), + "branches": MessageLookupByLibrary.simpleMessage("Branches"), + "brightness": MessageLookupByLibrary.simpleMessage("Brightness"), + "code": MessageLookupByLibrary.simpleMessage("Code"), + "codeTheme": MessageLookupByLibrary.simpleMessage("Code Theme"), + "commits": MessageLookupByLibrary.simpleMessage("Commits"), + "contributors": MessageLookupByLibrary.simpleMessage("Contributors"), + "cupertino": MessageLookupByLibrary.simpleMessage("Cupertino"), + "dark": MessageLookupByLibrary.simpleMessage("Dark"), + "developers": MessageLookupByLibrary.simpleMessage("Developers"), + "email": MessageLookupByLibrary.simpleMessage("Email"), + "events": MessageLookupByLibrary.simpleMessage("Events"), + "explore": MessageLookupByLibrary.simpleMessage("Explore"), + "feedback": MessageLookupByLibrary.simpleMessage("feedback"), + "file": MessageLookupByLibrary.simpleMessage("File"), + "files": MessageLookupByLibrary.simpleMessage("Files"), + "flutter": MessageLookupByLibrary.simpleMessage("Flutter"), + "follow": MessageLookupByLibrary.simpleMessage("Follow"), + "followSystem": MessageLookupByLibrary.simpleMessage("Follow System"), + "followers": MessageLookupByLibrary.simpleMessage("Followers"), + "following": MessageLookupByLibrary.simpleMessage("Following"), + "fontFamily": MessageLookupByLibrary.simpleMessage("Font Family"), + "fontSize": MessageLookupByLibrary.simpleMessage("Font Size"), + "fontStyle": MessageLookupByLibrary.simpleMessage("FONT STYLE"), + "forks": MessageLookupByLibrary.simpleMessage("Forks"), + "gists": MessageLookupByLibrary.simpleMessage("Gists"), + "giteaAccount": MessageLookupByLibrary.simpleMessage("Gitee Account"), + "giteaStatus": MessageLookupByLibrary.simpleMessage("Gitea status"), + "giteeAccount": MessageLookupByLibrary.simpleMessage("Gitee Account"), + "githubAccount": MessageLookupByLibrary.simpleMessage("GitHub Account"), + "githubStatus": MessageLookupByLibrary.simpleMessage("GitHub status"), + "gitlabAccount": MessageLookupByLibrary.simpleMessage("GitLab Account"), + "gitlabStatus": MessageLookupByLibrary.simpleMessage("GitLab status"), + "group": MessageLookupByLibrary.simpleMessage("Group"), + "groups": MessageLookupByLibrary.simpleMessage("Groups"), + "helloWorld": MessageLookupByLibrary.simpleMessage("Hello World!"), + "issue": MessageLookupByLibrary.simpleMessage("Issue"), + "issues": MessageLookupByLibrary.simpleMessage("Issues"), + "light": MessageLookupByLibrary.simpleMessage("Light"), + "longPressToRemoveAccount": MessageLookupByLibrary.simpleMessage( + "Long Press to remove account"), + "markdownRenderEngine": + MessageLookupByLibrary.simpleMessage("Markdown Render Engine"), + "material": MessageLookupByLibrary.simpleMessage("Material"), + "me": MessageLookupByLibrary.simpleMessage("Me"), + "members": MessageLookupByLibrary.simpleMessage("Members"), + "mergeRequests": MessageLookupByLibrary.simpleMessage("Merge Requests"), + "news": MessageLookupByLibrary.simpleMessage("News"), + "notFoundMessage": MessageLookupByLibrary.simpleMessage("Not Found"), + "notFoundTextDisplay": MessageLookupByLibrary.simpleMessage( + "Woops, This page is not implemented yet"), + "notification": MessageLookupByLibrary.simpleMessage("Notification"), + "organizations": MessageLookupByLibrary.simpleMessage("Organizations"), + "participating": MessageLookupByLibrary.simpleMessage("Participating"), + "permissionRequiredMessage": MessageLookupByLibrary.simpleMessage( + "GitTouch needs these permissions"), + "pinnedRepositories": + MessageLookupByLibrary.simpleMessage("pinned repositories"), + "popularRepositories": + MessageLookupByLibrary.simpleMessage("popular repositories"), + "project": MessageLookupByLibrary.simpleMessage("Project"), + "projectActions": + MessageLookupByLibrary.simpleMessage("Project Actions"), + "projects": MessageLookupByLibrary.simpleMessage("Projects"), + "pullRequests": MessageLookupByLibrary.simpleMessage("Pull requests"), + "rateThisApp": MessageLookupByLibrary.simpleMessage("Rate This App"), + "releases": MessageLookupByLibrary.simpleMessage("Releases"), + "removeAccount": MessageLookupByLibrary.simpleMessage("Remove account"), + "repositories": MessageLookupByLibrary.simpleMessage("Repositories"), + "repository": MessageLookupByLibrary.simpleMessage("Repository"), + "repositoryActions": + MessageLookupByLibrary.simpleMessage("Repository Actions"), + "reviewPermissions": + MessageLookupByLibrary.simpleMessage("Review Permissions"), + "scaffoldTheme": MessageLookupByLibrary.simpleMessage("Scaffold Theme"), + "search": MessageLookupByLibrary.simpleMessage("Search"), + "selectAccount": MessageLookupByLibrary.simpleMessage("Select account"), + "settings": MessageLookupByLibrary.simpleMessage("Settings"), + "somethingBadHappens": + MessageLookupByLibrary.simpleMessage("Something bad happens:"), + "sourceCode": MessageLookupByLibrary.simpleMessage("Source Code"), + "stars": MessageLookupByLibrary.simpleMessage("Stars"), + "submitAnIssue": + MessageLookupByLibrary.simpleMessage("Submit an issue"), + "switchAccounts": + MessageLookupByLibrary.simpleMessage("Switch accounts"), + "syntaxHighlighting": + MessageLookupByLibrary.simpleMessage("SYNTAX HIGHLIGHTING"), + "system": MessageLookupByLibrary.simpleMessage("system"), + "teams": MessageLookupByLibrary.simpleMessage("Teams"), + "trending": MessageLookupByLibrary.simpleMessage("Trending"), + "unfollow": MessageLookupByLibrary.simpleMessage("Unfollow"), + "unread": MessageLookupByLibrary.simpleMessage("Unread"), + "user": MessageLookupByLibrary.simpleMessage("User"), + "version": MessageLookupByLibrary.simpleMessage("Version"), + "watchers": MessageLookupByLibrary.simpleMessage("Watchers"), + "webview": MessageLookupByLibrary.simpleMessage("WebView") + }; +} diff --git a/lib/generated/intl/messages_hi.dart b/lib/generated/intl/messages_hi.dart new file mode 100644 index 0000000..d45da89 --- /dev/null +++ b/lib/generated/intl/messages_hi.dart @@ -0,0 +1,130 @@ +// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart +// This is a library that provides messages for a hi locale. All the +// messages from the main program should be duplicated here with the same +// function name. + +// Ignore issues from commonly used lints in this file. +// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new +// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering +// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases +// ignore_for_file:unused_import, file_names + +import 'package:intl/intl.dart'; +import 'package:intl/message_lookup_by_library.dart'; + +final messages = new MessageLookup(); + +typedef String MessageIfAbsent(String messageStr, List args); + +class MessageLookup extends MessageLookupByLibrary { + String get localeName => 'hi'; + + final messages = _notInlinedMessages(_notInlinedMessages); + static _notInlinedMessages(_) => { + "about": MessageLookupByLibrary.simpleMessage("एप्लिकेशन के बारे में"), + "actions": MessageLookupByLibrary.simpleMessage("कार्रवाई"), + "activity": MessageLookupByLibrary.simpleMessage("गतिविधि"), + "all": MessageLookupByLibrary.simpleMessage("सब"), + "bitbucketAccount": + MessageLookupByLibrary.simpleMessage("बीटबुकेत खाता"), + "branches": MessageLookupByLibrary.simpleMessage("ब्रांच"), + "brightness": MessageLookupByLibrary.simpleMessage("द्य्रुति"), + "code": MessageLookupByLibrary.simpleMessage("कोड"), + "codeTheme": MessageLookupByLibrary.simpleMessage("कोड थीम"), + "commits": MessageLookupByLibrary.simpleMessage("कमिटस"), + "contributors": MessageLookupByLibrary.simpleMessage("योगदानकर्ताओं"), + "cupertino": MessageLookupByLibrary.simpleMessage("क्यूपर्टिनो थीम"), + "dark": MessageLookupByLibrary.simpleMessage("अंधेरा मोड"), + "developers": MessageLookupByLibrary.simpleMessage("डेवेलपर्स"), + "email": MessageLookupByLibrary.simpleMessage("ईमेल"), + "events": MessageLookupByLibrary.simpleMessage("इवेंट्स"), + "explore": MessageLookupByLibrary.simpleMessage("अन्वेषण"), + "feedback": MessageLookupByLibrary.simpleMessage("फीडबैक"), + "file": MessageLookupByLibrary.simpleMessage("फ़ाइल"), + "files": MessageLookupByLibrary.simpleMessage("फ़ाइलें"), + "flutter": MessageLookupByLibrary.simpleMessage("फ्लटर"), + "follow": MessageLookupByLibrary.simpleMessage("फ़ोल्लोव"), + "followSystem": + MessageLookupByLibrary.simpleMessage("सिस्टम का पालन करें"), + "followers": MessageLookupByLibrary.simpleMessage("अनुयायियों"), + "following": MessageLookupByLibrary.simpleMessage("फोल्लोविंग"), + "fontFamily": MessageLookupByLibrary.simpleMessage("फॉण्ट परिवार"), + "fontSize": MessageLookupByLibrary.simpleMessage("फॉण्ट आकार"), + "fontStyle": MessageLookupByLibrary.simpleMessage("फॉण्ट प्रकार"), + "forks": MessageLookupByLibrary.simpleMessage("फोर्क्स"), + "gists": MessageLookupByLibrary.simpleMessage("गिस्ट्स"), + "giteaAccount": MessageLookupByLibrary.simpleMessage("गीते खाता"), + "giteaStatus": MessageLookupByLibrary.simpleMessage("गीते स्टेटस"), + "giteeAccount": MessageLookupByLibrary.simpleMessage("जीती खाता"), + "githubAccount": MessageLookupByLibrary.simpleMessage("गिटहब खाता"), + "githubStatus": MessageLookupByLibrary.simpleMessage("गिटहब स्टेटस"), + "gitlabAccount": MessageLookupByLibrary.simpleMessage("गितलब खाता"), + "gitlabStatus": MessageLookupByLibrary.simpleMessage("गितलब स्टेटस"), + "group": MessageLookupByLibrary.simpleMessage("समूह"), + "groups": MessageLookupByLibrary.simpleMessage("समूहों"), + "helloWorld": MessageLookupByLibrary.simpleMessage("नमस्ते दुनिया"), + "issue": MessageLookupByLibrary.simpleMessage("मुद्दा"), + "issues": MessageLookupByLibrary.simpleMessage("मुद्दे"), + "light": MessageLookupByLibrary.simpleMessage("प्रकाश मोड"), + "longPressToRemoveAccount": MessageLookupByLibrary.simpleMessage( + "खाता हटाने के लिए लंबी प्रेस"), + "markdownRenderEngine": + MessageLookupByLibrary.simpleMessage("मार्कडौं रेंडर इंजन"), + "material": MessageLookupByLibrary.simpleMessage("मटेरियल थीम"), + "me": MessageLookupByLibrary.simpleMessage("मैं"), + "members": MessageLookupByLibrary.simpleMessage("संगठन"), + "mergeRequests": MessageLookupByLibrary.simpleMessage("मर्ज निवेदन"), + "news": MessageLookupByLibrary.simpleMessage("समाचार"), + "notFoundMessage": MessageLookupByLibrary.simpleMessage("नहीं मिला"), + "notFoundTextDisplay": MessageLookupByLibrary.simpleMessage( + "यह पृष्ठ कार्यान्वित नहीं है"), + "notification": MessageLookupByLibrary.simpleMessage("अधिसूचना"), + "organizations": MessageLookupByLibrary.simpleMessage("संगठन"), + "participating": MessageLookupByLibrary.simpleMessage("भाग लेने वाले"), + "permissionRequiredMessage": MessageLookupByLibrary.simpleMessage( + "गिट्टूच के लीये इन अनुमतियों की आवश्यकता है"), + "pinnedRepositories": + MessageLookupByLibrary.simpleMessage("पिन्नेद रेपोसिटोरिएस"), + "popularRepositories": + MessageLookupByLibrary.simpleMessage("प्रसिद्ध रेपोसिटोरिएस"), + "project": MessageLookupByLibrary.simpleMessage("परियोजना"), + "projectActions": + MessageLookupByLibrary.simpleMessage("परियोजना की कार्रवाई"), + "projects": MessageLookupByLibrary.simpleMessage("परियोजनाओं"), + "pullRequests": + MessageLookupByLibrary.simpleMessage("पुल्ल रिक्वेस्ट्स"), + "rateThisApp": + MessageLookupByLibrary.simpleMessage("इस ऐप्लिकेशन को रेट करे"), + "releases": MessageLookupByLibrary.simpleMessage("रेलसेस"), + "removeAccount": MessageLookupByLibrary.simpleMessage("खाता हटाएं"), + "repositories": MessageLookupByLibrary.simpleMessage("रेपोसिटोरिएस"), + "repository": MessageLookupByLibrary.simpleMessage("रिपॉजिटरी"), + "repositoryActions": + MessageLookupByLibrary.simpleMessage("रिपॉजिटरी कार्रवाई"), + "reviewPermissions": + MessageLookupByLibrary.simpleMessage("अनुमति की समीक्षा करें"), + "scaffoldTheme": MessageLookupByLibrary.simpleMessage("स्कैफफोल्ड थीम"), + "search": MessageLookupByLibrary.simpleMessage("खोज"), + "selectAccount": MessageLookupByLibrary.simpleMessage("खाता चुनें"), + "settings": MessageLookupByLibrary.simpleMessage("सेटिंग्स"), + "somethingBadHappens": + MessageLookupByLibrary.simpleMessage("त्रुटि हुई है: "), + "sourceCode": + MessageLookupByLibrary.simpleMessage("एप्लिकेशन स्रोत कोड"), + "stars": MessageLookupByLibrary.simpleMessage("स्टार्स"), + "submitAnIssue": + MessageLookupByLibrary.simpleMessage("एक मुद्दा प्रस्तुत करें"), + "switchAccounts": MessageLookupByLibrary.simpleMessage("खाते बदलें"), + "syntaxHighlighting": + MessageLookupByLibrary.simpleMessage("सिंटेक्स हाइलाइटिंग"), + "system": MessageLookupByLibrary.simpleMessage("सिस्टम"), + "teams": MessageLookupByLibrary.simpleMessage("टीमों"), + "trending": MessageLookupByLibrary.simpleMessage("ट्रेंडिंग"), + "unfollow": MessageLookupByLibrary.simpleMessage("अनफ़ॉलो"), + "unread": MessageLookupByLibrary.simpleMessage("अपठित"), + "user": MessageLookupByLibrary.simpleMessage("उपयोगकर्ता"), + "version": MessageLookupByLibrary.simpleMessage("एप्लिकेशन वेरीज़न"), + "watchers": MessageLookupByLibrary.simpleMessage("नजर रखने वालों"), + "webview": MessageLookupByLibrary.simpleMessage("वेब्वयेव") + }; +} diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart new file mode 100644 index 0000000..ef2e2e7 --- /dev/null +++ b/lib/generated/l10n.dart @@ -0,0 +1,947 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'intl/messages_all.dart'; + +// ************************************************************************** +// Generator: Flutter Intl IDE plugin +// Made by Localizely +// ************************************************************************** + +// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars +// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each +// ignore_for_file: avoid_redundant_argument_values + +class S { + S(); + + static S current; + + static const AppLocalizationDelegate delegate = AppLocalizationDelegate(); + + static Future load(Locale locale) { + final name = (locale.countryCode?.isEmpty ?? false) + ? locale.languageCode + : locale.toString(); + final localeName = Intl.canonicalizedLocale(name); + return initializeMessages(localeName).then((_) { + Intl.defaultLocale = localeName; + S.current = S(); + + return S.current; + }); + } + + static S of(BuildContext context) { + return Localizations.of(context, S); + } + + /// `Hello World!` + String get helloWorld { + return Intl.message( + 'Hello World!', + name: 'helloWorld', + desc: 'The conventional newborn programmer greeting', + args: [], + ); + } + + /// `News` + String get news { + return Intl.message( + 'News', + name: 'news', + desc: 'The News tab', + args: [], + ); + } + + /// `Notification` + String get notification { + return Intl.message( + 'Notification', + name: 'notification', + desc: 'The Notification tab', + args: [], + ); + } + + /// `Trending` + String get trending { + return Intl.message( + 'Trending', + name: 'trending', + desc: 'Trending', + args: [], + ); + } + + /// `Search` + String get search { + return Intl.message( + 'Search', + name: 'search', + desc: 'The Search tab', + args: [], + ); + } + + /// `Me` + String get me { + return Intl.message( + 'Me', + name: 'me', + desc: 'The Me tab', + args: [], + ); + } + + /// `Participating` + String get participating { + return Intl.message( + 'Participating', + name: 'participating', + desc: 'The participating Tab', + args: [], + ); + } + + /// `Repositories` + String get repositories { + return Intl.message( + 'Repositories', + name: 'repositories', + desc: 'repository text', + args: [], + ); + } + + /// `Unfollow` + String get unfollow { + return Intl.message( + 'Unfollow', + name: 'unfollow', + desc: 'unfollow someone', + args: [], + ); + } + + /// `Follow` + String get follow { + return Intl.message( + 'Follow', + name: 'follow', + desc: 'follow someone', + args: [], + ); + } + + /// `Stars` + String get stars { + return Intl.message( + 'Stars', + name: 'stars', + desc: 'stars on a repo', + args: [], + ); + } + + /// `Followers` + String get followers { + return Intl.message( + 'Followers', + name: 'followers', + desc: 'followers for a person', + args: [], + ); + } + + /// `Following` + String get following { + return Intl.message( + 'Following', + name: 'following', + desc: 'people followed by a person', + args: [], + ); + } + + /// `Events` + String get events { + return Intl.message( + 'Events', + name: 'events', + desc: 'events for a user', + args: [], + ); + } + + /// `Gists` + String get gists { + return Intl.message( + 'Gists', + name: 'gists', + desc: 'gists for a user', + args: [], + ); + } + + /// `Organizations` + String get organizations { + return Intl.message( + 'Organizations', + name: 'organizations', + desc: 'organizations for a user', + args: [], + ); + } + + /// `Members` + String get members { + return Intl.message( + 'Members', + name: 'members', + desc: 'members of an organization', + args: [], + ); + } + + /// `popular repositories` + String get popularRepositories { + return Intl.message( + 'popular repositories', + name: 'popularRepositories', + desc: 'popular repositories', + args: [], + ); + } + + /// `pinned repositories` + String get pinnedRepositories { + return Intl.message( + 'pinned repositories', + name: 'pinnedRepositories', + desc: 'pinned repositories', + args: [], + ); + } + + /// `Settings` + String get settings { + return Intl.message( + 'Settings', + name: 'settings', + desc: 'settings', + args: [], + ); + } + + /// `system` + String get system { + return Intl.message( + 'system', + name: 'system', + desc: 'system', + args: [], + ); + } + + /// `GitHub status` + String get githubStatus { + return Intl.message( + 'GitHub status', + name: 'githubStatus', + desc: 'github status', + args: [], + ); + } + + /// `Review Permissions` + String get reviewPermissions { + return Intl.message( + 'Review Permissions', + name: 'reviewPermissions', + desc: 'review Permissions', + args: [], + ); + } + + /// `GitLab status` + String get gitlabStatus { + return Intl.message( + 'GitLab status', + name: 'gitlabStatus', + desc: 'GitLab status', + args: [], + ); + } + + /// `Gitea status` + String get giteaStatus { + return Intl.message( + 'Gitea status', + name: 'giteaStatus', + desc: 'Gitea status', + args: [], + ); + } + + /// `Switch accounts` + String get switchAccounts { + return Intl.message( + 'Switch accounts', + name: 'switchAccounts', + desc: 'Switch accounts', + args: [], + ); + } + + /// `Brightness` + String get brightness { + return Intl.message( + 'Brightness', + name: 'brightness', + desc: 'brightness', + args: [], + ); + } + + /// `Follow System` + String get followSystem { + return Intl.message( + 'Follow System', + name: 'followSystem', + desc: 'follow systems setting', + args: [], + ); + } + + /// `Light` + String get light { + return Intl.message( + 'Light', + name: 'light', + desc: 'light mode', + args: [], + ); + } + + /// `Dark` + String get dark { + return Intl.message( + 'Dark', + name: 'dark', + desc: 'dark mode', + args: [], + ); + } + + /// `Scaffold Theme` + String get scaffoldTheme { + return Intl.message( + 'Scaffold Theme', + name: 'scaffoldTheme', + desc: 'Kind of theme - cupertino or material', + args: [], + ); + } + + /// `Cupertino` + String get cupertino { + return Intl.message( + 'Cupertino', + name: 'cupertino', + desc: 'Cupertino scaffold theme', + args: [], + ); + } + + /// `Material` + String get material { + return Intl.message( + 'Material', + name: 'material', + desc: 'Material scaffold theme', + args: [], + ); + } + + /// `Code Theme` + String get codeTheme { + return Intl.message( + 'Code Theme', + name: 'codeTheme', + desc: 'code theme', + args: [], + ); + } + + /// `Markdown Render Engine` + String get markdownRenderEngine { + return Intl.message( + 'Markdown Render Engine', + name: 'markdownRenderEngine', + desc: 'flutter or webview rendering for markdown', + args: [], + ); + } + + /// `Flutter` + String get flutter { + return Intl.message( + 'Flutter', + name: 'flutter', + desc: 'render flutter for markdown', + args: [], + ); + } + + /// `WebView` + String get webview { + return Intl.message( + 'WebView', + name: 'webview', + desc: 'render webview for markdown', + args: [], + ); + } + + /// `feedback` + String get feedback { + return Intl.message( + 'feedback', + name: 'feedback', + desc: 'provide feedback', + args: [], + ); + } + + /// `Submit an issue` + String get submitAnIssue { + return Intl.message( + 'Submit an issue', + name: 'submitAnIssue', + desc: 'submit issue for app', + args: [], + ); + } + + /// `Rate This App` + String get rateThisApp { + return Intl.message( + 'Rate This App', + name: 'rateThisApp', + desc: 'rate the app', + args: [], + ); + } + + /// `Email` + String get email { + return Intl.message( + 'Email', + name: 'email', + desc: 'Email to report issues', + args: [], + ); + } + + /// `about` + String get about { + return Intl.message( + 'about', + name: 'about', + desc: 'about section', + args: [], + ); + } + + /// `Version` + String get version { + return Intl.message( + 'Version', + name: 'version', + desc: 'app version', + args: [], + ); + } + + /// `Source Code` + String get sourceCode { + return Intl.message( + 'Source Code', + name: 'sourceCode', + desc: 'source code for app', + args: [], + ); + } + + /// `Repository` + String get repository { + return Intl.message( + 'Repository', + name: 'repository', + desc: 'Repository screen title', + args: [], + ); + } + + /// `Repository Actions` + String get repositoryActions { + return Intl.message( + 'Repository Actions', + name: 'repositoryActions', + desc: 'Repository Actions', + args: [], + ); + } + + /// `Projects` + String get projects { + return Intl.message( + 'Projects', + name: 'projects', + desc: 'projects', + args: [], + ); + } + + /// `Releases` + String get releases { + return Intl.message( + 'Releases', + name: 'releases', + desc: 'releases', + args: [], + ); + } + + /// `Watchers` + String get watchers { + return Intl.message( + 'Watchers', + name: 'watchers', + desc: 'watchers', + args: [], + ); + } + + /// `Forks` + String get forks { + return Intl.message( + 'Forks', + name: 'forks', + desc: 'forks', + args: [], + ); + } + + /// `Issues` + String get issues { + return Intl.message( + 'Issues', + name: 'issues', + desc: 'issues', + args: [], + ); + } + + /// `Pull requests` + String get pullRequests { + return Intl.message( + 'Pull requests', + name: 'pullRequests', + desc: 'Pull Requests', + args: [], + ); + } + + /// `Commits` + String get commits { + return Intl.message( + 'Commits', + name: 'commits', + desc: 'Commits', + args: [], + ); + } + + /// `Branches` + String get branches { + return Intl.message( + 'Branches', + name: 'branches', + desc: 'branches', + args: [], + ); + } + + /// `Contributors` + String get contributors { + return Intl.message( + 'Contributors', + name: 'contributors', + desc: 'contributors', + args: [], + ); + } + + /// `Unread` + String get unread { + return Intl.message( + 'Unread', + name: 'unread', + desc: 'unread', + args: [], + ); + } + + /// `All` + String get all { + return Intl.message( + 'All', + name: 'all', + desc: 'all', + args: [], + ); + } + + /// `Developers` + String get developers { + return Intl.message( + 'Developers', + name: 'developers', + desc: 'developers', + args: [], + ); + } + + /// `Explore` + String get explore { + return Intl.message( + 'Explore', + name: 'explore', + desc: 'explore', + args: [], + ); + } + + /// `Teams` + String get teams { + return Intl.message( + 'Teams', + name: 'teams', + desc: 'teams', + args: [], + ); + } + + /// `File` + String get file { + return Intl.message( + 'File', + name: 'file', + desc: 'file', + args: [], + ); + } + + /// `Files` + String get files { + return Intl.message( + 'Files', + name: 'files', + desc: 'file plural', + args: [], + ); + } + + /// `Actions` + String get actions { + return Intl.message( + 'Actions', + name: 'actions', + desc: 'actions', + args: [], + ); + } + + /// `Groups` + String get groups { + return Intl.message( + 'Groups', + name: 'groups', + desc: 'groups', + args: [], + ); + } + + /// `Merge Requests` + String get mergeRequests { + return Intl.message( + 'Merge Requests', + name: 'mergeRequests', + desc: 'Merge request', + args: [], + ); + } + + /// `Activity` + String get activity { + return Intl.message( + 'Activity', + name: 'activity', + desc: 'activity', + args: [], + ); + } + + /// `Project` + String get project { + return Intl.message( + 'Project', + name: 'project', + desc: 'project', + args: [], + ); + } + + /// `Select account` + String get selectAccount { + return Intl.message( + 'Select account', + name: 'selectAccount', + desc: 'select account message', + args: [], + ); + } + + /// `Remove account` + String get removeAccount { + return Intl.message( + 'Remove account', + name: 'removeAccount', + desc: 'remove account', + args: [], + ); + } + + /// `Something bad happens:` + String get somethingBadHappens { + return Intl.message( + 'Something bad happens:', + name: 'somethingBadHappens', + desc: 'error message', + args: [], + ); + } + + /// `GitHub Account` + String get githubAccount { + return Intl.message( + 'GitHub Account', + name: 'githubAccount', + desc: 'Gitea Account', + args: [], + ); + } + + /// `GitTouch needs these permissions` + String get permissionRequiredMessage { + return Intl.message( + 'GitTouch needs these permissions', + name: 'permissionRequiredMessage', + desc: 'Permission Required Message', + args: [], + ); + } + + /// `Not Found` + String get notFoundMessage { + return Intl.message( + 'Not Found', + name: 'notFoundMessage', + desc: 'Not found page header', + args: [], + ); + } + + /// `Woops, This page is not implemented yet` + String get notFoundTextDisplay { + return Intl.message( + 'Woops, This page is not implemented yet', + name: 'notFoundTextDisplay', + desc: 'Not found error message', + args: [], + ); + } + + /// `GitLab Account` + String get gitlabAccount { + return Intl.message( + 'GitLab Account', + name: 'gitlabAccount', + desc: 'Gitlab Account', + args: [], + ); + } + + /// `Bitbucket Account` + String get bitbucketAccount { + return Intl.message( + 'Bitbucket Account', + name: 'bitbucketAccount', + desc: 'Bitbucket Account', + args: [], + ); + } + + /// `Long Press to remove account` + String get longPressToRemoveAccount { + return Intl.message( + 'Long Press to remove account', + name: 'longPressToRemoveAccount', + desc: 'Long Press to remove account', + args: [], + ); + } + + /// `Gitee Account` + String get giteaAccount { + return Intl.message( + 'Gitee Account', + name: 'giteaAccount', + desc: 'Gitea Account', + args: [], + ); + } + + /// `Gitee Account` + String get giteeAccount { + return Intl.message( + 'Gitee Account', + name: 'giteeAccount', + desc: 'Gitee Account', + args: [], + ); + } + + /// `User` + String get user { + return Intl.message( + 'User', + name: 'user', + desc: 'user', + args: [], + ); + } + + /// `Group` + String get group { + return Intl.message( + 'Group', + name: 'group', + desc: 'group', + args: [], + ); + } + + /// `Issue` + String get issue { + return Intl.message( + 'Issue', + name: 'issue', + desc: 'issue', + args: [], + ); + } + + /// `Code` + String get code { + return Intl.message( + 'Code', + name: 'code', + desc: 'Code', + args: [], + ); + } + + /// `Project Actions` + String get projectActions { + return Intl.message( + 'Project Actions', + name: 'projectActions', + desc: 'Project Actions', + args: [], + ); + } + + /// `SYNTAX HIGHLIGHTING` + String get syntaxHighlighting { + return Intl.message( + 'SYNTAX HIGHLIGHTING', + name: 'syntaxHighlighting', + desc: 'Syntax Highlighting', + args: [], + ); + } + + /// `Font Family` + String get fontFamily { + return Intl.message( + 'Font Family', + name: 'fontFamily', + desc: 'Font Family', + args: [], + ); + } + + /// `Font Size` + String get fontSize { + return Intl.message( + 'Font Size', + name: 'fontSize', + desc: 'font size', + args: [], + ); + } + + /// `FONT STYLE` + String get fontStyle { + return Intl.message( + 'FONT STYLE', + name: 'fontStyle', + desc: 'font style', + args: [], + ); + } +} + +class AppLocalizationDelegate extends LocalizationsDelegate { + const AppLocalizationDelegate(); + + List get supportedLocales { + return const [ + Locale.fromSubtags(languageCode: 'en'), + Locale.fromSubtags(languageCode: 'hi'), + ]; + } + + @override + bool isSupported(Locale locale) => _isSupported(locale); + @override + Future load(Locale locale) => S.load(locale); + @override + bool shouldReload(AppLocalizationDelegate old) => false; + + bool _isSupported(Locale locale) { + if (locale != null) { + for (var supportedLocale in supportedLocales) { + if (supportedLocale.languageCode == locale.languageCode) { + return true; + } + } + } + return false; + } +} diff --git a/lib/home.dart b/lib/home.dart index 1a0bcb4..dcbde55 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -22,6 +22,7 @@ import 'package:git_touch/screens/gh_news.dart'; import 'package:git_touch/screens/gh_search.dart'; import 'package:git_touch/screens/gh_trending.dart'; import 'package:git_touch/screens/ge_search.dart'; +import 'generated/l10n.dart'; class Home extends StatefulWidget { @override @@ -151,46 +152,58 @@ class _HomeState extends State { switch (auth.activeAccount.platform) { case PlatformType.github: navigationItems = [ - BottomNavigationBarItem(icon: Icon(Icons.rss_feed), label: 'News'), + BottomNavigationBarItem( + icon: Icon(Icons.rss_feed), label: S.of(context).news), BottomNavigationBarItem( icon: _buildNotificationIcon(context, false), activeIcon: _buildNotificationIcon(context, true), - label: 'Notification'), + label: S.of(context).notification), BottomNavigationBarItem( - icon: Icon(Icons.whatshot), label: 'Trending'), - BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'), + icon: Icon(Icons.whatshot), label: S.of(context).trending), + BottomNavigationBarItem( + icon: Icon(Icons.search), label: S.of(context).search), BottomNavigationBarItem( icon: Icon(Icons.person), activeIcon: Icon(Icons.person), - label: 'Me'), + label: S.of(context).me), ]; break; case PlatformType.gitlab: navigationItems = [ - BottomNavigationBarItem(icon: Icon(Icons.explore), label: 'Explore'), - BottomNavigationBarItem(icon: Icon(Icons.group), label: 'Groups'), - BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'), - BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Me'), + BottomNavigationBarItem( + icon: Icon(Icons.explore), label: S.of(context).explore), + BottomNavigationBarItem( + icon: Icon(Icons.group), label: S.of(context).groups), + BottomNavigationBarItem( + icon: Icon(Icons.search), label: S.of(context).search), + BottomNavigationBarItem( + icon: Icon(Icons.person), label: S.of(context).me), ]; break; case PlatformType.bitbucket: navigationItems = [ - BottomNavigationBarItem(icon: Icon(Icons.explore), label: 'Explore'), - BottomNavigationBarItem(icon: Icon(Icons.group), label: 'Teams'), - BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Me'), + BottomNavigationBarItem( + icon: Icon(Icons.explore), label: S.of(context).explore), + BottomNavigationBarItem( + icon: Icon(Icons.group), label: S.of(context).teams), + BottomNavigationBarItem( + icon: Icon(Icons.person), label: S.of(context).me), ]; break; case PlatformType.gitea: navigationItems = [ BottomNavigationBarItem( - icon: Icon(Icons.group), label: 'Organizations'), - BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Me'), + icon: Icon(Icons.group), label: S.of(context).organizations), + BottomNavigationBarItem( + icon: Icon(Icons.person), label: S.of(context).me), ]; break; case PlatformType.gitee: navigationItems = [ - BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'), - BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Me'), + BottomNavigationBarItem( + icon: Icon(Icons.search), label: S.of(context).search), + BottomNavigationBarItem( + icon: Icon(Icons.person), label: S.of(context).me), ]; break; } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb new file mode 100644 index 0000000..d1b184a --- /dev/null +++ b/lib/l10n/intl_en.arb @@ -0,0 +1,354 @@ +{ + "helloWorld": "Hello World!", + "@helloWorld": { + "description": "The conventional newborn programmer greeting" + }, + "news": "News", + "@news": { + "description": "The News tab" + }, + "notification": "Notification", + "@notification": { + "description": "The Notification tab" + }, + "trending": "Trending", + "@trending": { + "description": "Trending" + }, + "search": "Search", + "@search": { + "description": "The Search tab" + }, + "me": "Me", + "@me": { + "description": "The Me tab" + }, + "participating": "Participating", + "@participating": { + "description": "The participating Tab" + }, + "repositories": "Repositories", + "@repositories": { + "description": "repository text" + }, + "unfollow": "Unfollow", + "@unfollow": { + "description": "unfollow someone" + }, + "follow": "Follow", + "@follow": { + "description": "follow someone" + }, + "stars": "Stars", + "@stars": { + "description": "stars on a repo" + }, + "followers": "Followers", + "@followers": { + "description": "followers for a person" + }, + "following": "Following", + "@following": { + "description": "people followed by a person" + }, + "events": "Events", + "@events": { + "description": "events for a user" + }, + "gists": "Gists", + "@gists": { + "description": "gists for a user" + }, + "organizations": "Organizations", + "@organizations": { + "description": "organizations for a user" + }, + "members": "Members", + "@members": { + "description": "members of an organization" + }, + "popularRepositories": "popular repositories", + "@popularRepositories": { + "description": "popular repositories" + }, + "pinnedRepositories": "pinned repositories", + "@pinnedRepositories": { + "description": "pinned repositories" + }, + "settings": "Settings", + "@settings": { + "description": "settings" + }, + "system": "system", + "@system": { + "description": "system" + }, + "githubStatus": "GitHub status", + "@githubStatus": { + "description": "github status" + }, + "reviewPermissions": "Review Permissions", + "@reviewPermissions": { + "description": "review Permissions" + }, + "gitlabStatus": "GitLab status", + "@gitlabStatus": { + "description": "GitLab status" + }, + "giteaStatus": "Gitea status", + "@giteaStatus": { + "description": "Gitea status" + }, + "switchAccounts": "Switch accounts", + "@switchAccounts": { + "description": "Switch accounts" + }, + "brightness": "Brightness", + "@brightness": { + "description": "brightness" + }, + "followSystem": "Follow System", + "@followSystem": { + "description": "follow systems setting" + }, + "light": "Light", + "@light": { + "description": "light mode" + }, + "dark": "Dark", + "@dark": { + "description": "dark mode" + }, + "scaffoldTheme": "Scaffold Theme", + "@scaffoldTheme": { + "description": "Kind of theme - cupertino or material" + }, + "cupertino": "Cupertino", + "@cupertino": { + "description": "Cupertino scaffold theme" + }, + "material": "Material", + "@material": { + "description": "Material scaffold theme" + }, + "codeTheme": "Code Theme", + "@codeTheme": { + "description": "code theme" + }, + "markdownRenderEngine": "Markdown Render Engine", + "@markdownRenderEngine": { + "description": "flutter or webview rendering for markdown" + }, + "flutter": "Flutter", + "@flutter": { + "description": "render flutter for markdown" + }, + "webview": "WebView", + "@webview": { + "description": "render webview for markdown" + }, + "feedback": "feedback", + "@feedback": { + "description": "provide feedback" + }, + "submitAnIssue": "Submit an issue", + "@submitAnIssue": { + "description": "submit issue for app" + }, + "rateThisApp": "Rate This App", + "@rateThisApp": { + "description": "rate the app" + }, + "email": "Email", + "@email": { + "description": "Email to report issues" + }, + "about": "about", + "@about": { + "description": "about section" + }, + "version": "Version", + "@version": { + "description": "app version" + }, + "sourceCode": "Source Code", + "@sourceCode": { + "description": "source code for app" + }, + "repository": "Repository", + "@repository": { + "description": "Repository screen title" + }, + "repositoryActions": "Repository Actions", + "@repositoryActions": { + "description": "Repository Actions" + }, + "projects": "Projects", + "@projects": { + "description": "projects" + }, + "releases": "Releases", + "@releases": { + "description": "releases" + }, + "watchers": "Watchers", + "@watchers": { + "description": "watchers" + }, + "forks": "Forks", + "@forks": { + "description": "forks" + }, + "issues": "Issues", + "@issues": { + "description": "issues" + }, + "pullRequests": "Pull requests", + "@pullRequests": { + "description": "Pull Requests" + }, + "commits": "Commits", + "@commits": { + "description": "Commits" + }, + "branches": "Branches", + "@branches": { + "description": "branches" + }, + "contributors": "Contributors", + "@contributors": { + "description": "contributors" + }, + "unread": "Unread", + "@unread": { + "description": "unread" + }, + "all": "All", + "@all": { + "description": "all" + }, + "developers": "Developers", + "@developers": { + "description": "developers" + }, + "explore": "Explore", + "@explore": { + "description": "explore" + }, + "teams": "Teams", + "@teams": { + "description": "teams" + }, + "file": "File", + "@file": { + "description": "file" + }, + "files": "Files", + "@files": { + "description": "file plural" + }, + "actions": "Actions", + "@actions": { + "description": "actions" + }, + "groups": "Groups", + "@groups": { + "description": "groups" + }, + "mergeRequests": "Merge Requests", + "@mergeRequests": { + "description": "Merge request" + }, + "activity": "Activity", + "@activity": { + "description": "activity" + }, + "project": "Project", + "@project": { + "description": "project" + }, + "selectAccount": "Select account", + "@selectAccount": { + "description": "select account message" + }, + "removeAccount": "Remove account", + "@removeAccount": { + "description": "remove account" + }, + "somethingBadHappens": "Something bad happens:", + "@somethingBadHappens": { + "description": "error message" + }, + "githubAccount": "GitHub Account", + "@githubAccount": { + "description": "Gitea Account" + }, + "permissionRequiredMessage": "GitTouch needs these permissions", + "@permissionRequiredMessage": { + "description": "Permission Required Message" + }, + "notFoundMessage": "Not Found", + "@notFoundMessage": { + "description": "Not found page header" + }, + "notFoundTextDisplay": "Woops, This page is not implemented yet", + "@notFoundTextDisplay": { + "description": "Not found error message" + }, + "gitlabAccount": "GitLab Account", + "@gitlabAccount": { + "description": "Gitlab Account" + }, + "bitbucketAccount": "Bitbucket Account", + "@bitbucketAccount": { + "description": "Bitbucket Account" + }, + "longPressToRemoveAccount": "Long Press to remove account", + "@longPressToRemoveAccount": { + "description": "Long Press to remove account" + }, + "giteaAccount": "Gitee Account", + "@giteaAccount": { + "description": "Gitea Account" + }, + "giteeAccount": "Gitee Account", + "@giteeAccount": { + "description": "Gitee Account" + }, + "user": "User", + "@user": { + "description": "user" + }, + "group": "Group", + "@group": { + "description": "group" + }, + "issue": "Issue", + "@issue": { + "description": "issue" + }, + "code": "Code", + "@code": { + "description": "Code" + }, + "projectActions": "Project Actions", + "@projectActions": { + "description": "Project Actions" + }, + "syntaxHighlighting": "SYNTAX HIGHLIGHTING", + "@syntaxHighlighting": { + "description": "Syntax Highlighting" + }, + "fontFamily": "Font Family", + "@fontFamily": { + "description": "Font Family" + }, + "fontSize": "Font Size", + "@fontSize": { + "description": "font size" + }, + "fontStyle": "FONT STYLE", + "@fontStyle": { + "description": "font style" + } +} \ No newline at end of file diff --git a/lib/l10n/intl_hi.arb b/lib/l10n/intl_hi.arb new file mode 100644 index 0000000..75408fc --- /dev/null +++ b/lib/l10n/intl_hi.arb @@ -0,0 +1,91 @@ +{ + "helloWorld": "नमस्ते दुनिया", + "news": "समाचार", + "notification": "अधिसूचना", + "trending": "ट्रेंडिंग", + "search": "खोज", + "me": "मैं", + "participating": "भाग लेने वाले", + "repositories": "रेपोसिटोरिएस", + "unfollow": "अनफ़ॉलो", + "follow": "फ़ोल्लोव", + "stars": "स्टार्स", + "followers": "अनुयायियों", + "following": "फोल्लोविंग", + "events": "इवेंट्स", + "gists": "गिस्ट्स", + "organizations": "संगठन", + "members": "संगठन", + "popularRepositories": "प्रसिद्ध रेपोसिटोरिएस", + "pinnedRepositories": "पिन्नेद रेपोसिटोरिएस", + "settings": "सेटिंग्स", + "system": "सिस्टम", + "githubStatus": "गिटहब स्टेटस", + "reviewPermissions": "अनुमति की समीक्षा करें", + "gitlabStatus": "गितलब स्टेटस", + "giteaStatus": "गीते स्टेटस", + "switchAccounts": "खाते बदलें", + "brightness": "द्य्रुति", + "followSystem": "सिस्टम का पालन करें", + "light": "प्रकाश मोड", + "dark": "अंधेरा मोड", + "scaffoldTheme": "स्कैफफोल्ड थीम", + "cupertino": "क्यूपर्टिनो थीम", + "material": "मटेरियल थीम", + "codeTheme": "कोड थीम", + "markdownRenderEngine": "मार्कडौं रेंडर इंजन", + "flutter": "फ्लटर", + "webview": "वेब्वयेव", + "feedback": "फीडबैक", + "submitAnIssue": "एक मुद्दा प्रस्तुत करें", + "rateThisApp": "इस ऐप्लिकेशन को रेट करे", + "email": "ईमेल", + "about": "एप्लिकेशन के बारे में", + "version": "एप्लिकेशन वेरीज़न", + "sourceCode": "एप्लिकेशन स्रोत कोड", + "ignoringWatchState": "अनदेखी", + "repository": "रिपॉजिटरी", + "repositoryActions": "रिपॉजिटरी कार्रवाई", + "projects": "परियोजनाओं", + "releases": "रेलसेस", + "watchers": "नजर रखने वालों", + "forks": "फोर्क्स", + "issues": "मुद्दे", + "pullRequests": "पुल्ल रिक्वेस्ट्स", + "commits": "कमिटस", + "branches": "ब्रांच", + "contributors": "योगदानकर्ताओं", + "unread": "अपठित", + "all": "सब", + "developers": "डेवेलपर्स", + "explore": "अन्वेषण", + "teams": "टीमों", + "file": "फ़ाइल", + "files": "फ़ाइलें", + "actions": "कार्रवाई", + "groups": "समूहों", + "mergeRequests": "मर्ज निवेदन", + "activity": "गतिविधि", + "project": "परियोजना", + "selectAccount": "खाता चुनें", + "removeAccount": "खाता हटाएं", + "somethingBadHappens": "त्रुटि हुई है: ", + "githubAccount": "गिटहब खाता", + "permissionRequiredMessage": "गिट्टूच के लीये इन अनुमतियों की आवश्यकता है", + "notFoundMessage": "नहीं मिला", + "notFoundTextDisplay": "यह पृष्ठ कार्यान्वित नहीं है", + "gitlabAccount": "गितलब खाता", + "bitbucketAccount": "बीटबुकेत खाता", + "giteaAccount": "गीते खाता", + "longPressToRemoveAccount": "खाता हटाने के लिए लंबी प्रेस", + "giteeAccount": "जीती खाता", + "user": "उपयोगकर्ता", + "group": "समूह", + "issue": "मुद्दा", + "code": "कोड", + "projectActions": "परियोजना की कार्रवाई", + "syntaxHighlighting": "सिंटेक्स हाइलाइटिंग", + "fontFamily": "फॉण्ट परिवार", + "fontSize": "फॉण्ट आकार", + "fontStyle": "फॉण्ट प्रकार" +} \ No newline at end of file diff --git a/lib/screens/bb_commits.dart b/lib/screens/bb_commits.dart index 1702e13..b29eed5 100644 --- a/lib/screens/bb_commits.dart +++ b/lib/screens/bb_commits.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/commit_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class BbCommitsScreen extends StatelessWidget { final String owner; @@ -16,7 +17,7 @@ class BbCommitsScreen extends StatelessWidget { Widget build(BuildContext context) { final auth = Provider.of(context); return ListStatefulScaffold( - title: AppBarTitle('Commits'), + title: AppBarTitle(S.of(context).commits), fetch: (nextUrl) async { final res = await context.read().fetchBbWithPage( nextUrl ?? '/repositories/$owner/$name/commits/$ref'); diff --git a/lib/screens/bb_explore.dart b/lib/screens/bb_explore.dart index bc6bdf4..ef41d1f 100644 --- a/lib/screens/bb_explore.dart +++ b/lib/screens/bb_explore.dart @@ -5,12 +5,13 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/repository_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class BbExploreScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Explore'), + title: AppBarTitle(S.of(context).explore), fetch: (nextUrl) async { final res = await context.read().fetchBbWithPage( nextUrl ?? '/repositories?role=member&sort=-updated_on'); diff --git a/lib/screens/bb_issues.dart b/lib/screens/bb_issues.dart index 54a3098..e605b11 100644 --- a/lib/screens/bb_issues.dart +++ b/lib/screens/bb_issues.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/issue_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class BbIssuesScreen extends StatelessWidget { final String owner; @@ -16,7 +17,7 @@ class BbIssuesScreen extends StatelessWidget { Widget build(BuildContext context) { final auth = Provider.of(context); return ListStatefulScaffold( - title: AppBarTitle('Issues'), + title: AppBarTitle(S.of(context).issues), fetch: (nextUrl) async { final res = await context .read() diff --git a/lib/screens/bb_pulls.dart b/lib/screens/bb_pulls.dart index 330ff80..550b035 100644 --- a/lib/screens/bb_pulls.dart +++ b/lib/screens/bb_pulls.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/issue_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class BbPullsScreen extends StatelessWidget { final String owner; @@ -16,7 +17,7 @@ class BbPullsScreen extends StatelessWidget { Widget build(BuildContext context) { final auth = Provider.of(context); return ListStatefulScaffold( - title: AppBarTitle('Pull requests'), + title: AppBarTitle(S.of(context).pullRequests), fetch: (nextUrl) async { final res = await context.read().fetchBbWithPage( nextUrl ?? '/repositories/$owner/$name/pullrequests'); diff --git a/lib/screens/bb_repo.dart b/lib/screens/bb_repo.dart index 48c2ae0..065f41c 100644 --- a/lib/screens/bb_repo.dart +++ b/lib/screens/bb_repo.dart @@ -13,6 +13,7 @@ import 'package:git_touch/widgets/repo_header.dart'; import 'package:git_touch/widgets/table_view.dart'; import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; +import '../generated/l10n.dart'; class BbRepoScreen extends StatelessWidget { final String owner; @@ -22,7 +23,7 @@ class BbRepoScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold>( - title: AppBarTitle('Repository'), + title: AppBarTitle(S.of(context).repository), fetch: () async { final auth = context.read(); final r = await auth.fetchBbJson('/repositories/$owner/$name'); diff --git a/lib/screens/bb_teams.dart b/lib/screens/bb_teams.dart index 673609f..63d734c 100644 --- a/lib/screens/bb_teams.dart +++ b/lib/screens/bb_teams.dart @@ -6,12 +6,13 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/user_item.dart'; import 'package:provider/provider.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; class BbTeamsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Teams'), + title: AppBarTitle(S.of(context).teams), fetch: (nextUrl) async { final res = await context .read() diff --git a/lib/screens/code_theme.dart b/lib/screens/code_theme.dart index d566aa7..c0ccb26 100644 --- a/lib/screens/code_theme.dart +++ b/lib/screens/code_theme.dart @@ -9,6 +9,7 @@ import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/table_view.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class CodeThemeScreen extends StatelessWidget { String _getCode(bool isDark) => '''// ${isDark ? 'Dark' : 'Light'} Mode @@ -38,16 +39,16 @@ class MyApp extends StatelessWidget { var theme = Provider.of(context); return SingleScaffold( - title: AppBarTitle('Code theme'), + title: AppBarTitle(S.of(context).codeTheme), body: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ CommonStyle.verticalGap, TableView( - headerText: 'FONT STYLE', + headerText: S.of(context).fontStyle, items: [ TableViewItem( - text: Text('Font Size'), + text: Text(S.of(context).fontSize), rightWidget: Text(codeProvider.fontSize.toString()), onTap: () { theme.showPicker( @@ -66,7 +67,7 @@ class MyApp extends StatelessWidget { }, ), TableViewItem( - text: Text('Font Family'), + text: Text(S.of(context).fontFamily), rightWidget: Text(codeProvider.fontFamily), onTap: () { theme.showPicker( @@ -87,10 +88,10 @@ class MyApp extends StatelessWidget { ), CommonStyle.verticalGap, TableView( - headerText: 'SYNTAX HIGHLIGHTING', + headerText: S.of(context).syntaxHighlighting, items: [ TableViewItem( - text: Text('Light Mode'), + text: Text(S.of(context).light), rightWidget: Text(codeProvider.theme), onTap: () { theme.showPicker( @@ -108,7 +109,7 @@ class MyApp extends StatelessWidget { }, ), TableViewItem( - text: Text('Dark Mode'), + text: Text(S.of(context).dark), rightWidget: Text(codeProvider.themeDark), onTap: () { theme.showPicker( diff --git a/lib/screens/ge_blob.dart b/lib/screens/ge_blob.dart index 1f90178..53c89ee 100644 --- a/lib/screens/ge_blob.dart +++ b/lib/screens/ge_blob.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/action_entry.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/blob_view.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GeBlobScreen extends StatelessWidget { final String owner; @@ -17,7 +18,7 @@ class GeBlobScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold( - title: AppBarTitle('File'), + title: AppBarTitle(S.of(context).file), fetch: () async { final auth = context.read(); final res = await auth.fetchGitee('/repos/$owner/$name/git/blobs/$sha'); diff --git a/lib/screens/ge_commits.dart b/lib/screens/ge_commits.dart index 4678ecc..109dbee 100644 --- a/lib/screens/ge_commits.dart +++ b/lib/screens/ge_commits.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/commit_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GeCommitsScreen extends StatelessWidget { final String owner; @@ -15,7 +16,7 @@ class GeCommitsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Commits'), + title: AppBarTitle(S.of(context).commits), fetch: (page) async { final res = await context .read() diff --git a/lib/screens/ge_repo.dart b/lib/screens/ge_repo.dart index dac43ef..11285a0 100644 --- a/lib/screens/ge_repo.dart +++ b/lib/screens/ge_repo.dart @@ -13,6 +13,7 @@ import 'package:git_touch/widgets/table_view.dart'; import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; import 'package:http/http.dart' as http; +import '../generated/l10n.dart'; class GeRepoScreen extends StatelessWidget { final String owner; @@ -22,7 +23,7 @@ class GeRepoScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold>( - title: AppBarTitle('Repository'), + title: AppBarTitle(S.of(context).repository), fetch: () async { final auth = context.read(); final repo = await auth.fetchGitee('/repos/$owner/$name').then((v) { diff --git a/lib/screens/ge_search.dart b/lib/screens/ge_search.dart index a56e1a7..31fde8f 100644 --- a/lib/screens/ge_search.dart +++ b/lib/screens/ge_search.dart @@ -1,12 +1,13 @@ import 'package:flutter/material.dart'; import 'package:git_touch/scaffolds/refresh_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; +import '../generated/l10n.dart'; class GeSearchScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold( - title: AppBarTitle('Search'), + title: AppBarTitle(S.of(context).search), fetch: () async { return ''; }, diff --git a/lib/screens/ge_tree.dart b/lib/screens/ge_tree.dart index 84d32f7..c7d8670 100644 --- a/lib/screens/ge_tree.dart +++ b/lib/screens/ge_tree.dart @@ -7,6 +7,7 @@ import 'package:git_touch/widgets/object_tree.dart'; import 'package:flutter/material.dart'; import 'package:git_touch/models/auth.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GeTreeScreen extends StatelessWidget { final String owner; @@ -17,7 +18,7 @@ class GeTreeScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold>( - title: AppBarTitle('Files'), + title: AppBarTitle(S.of(context).files), fetch: () async { final res = await context .read() diff --git a/lib/screens/gh_commits.dart b/lib/screens/gh_commits.dart index 807c41e..779013a 100644 --- a/lib/screens/gh_commits.dart +++ b/lib/screens/gh_commits.dart @@ -6,6 +6,7 @@ import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/commit_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GhCommitsScreen extends StatelessWidget { final String owner; @@ -28,7 +29,7 @@ class GhCommitsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Commits'), + title: AppBarTitle(S.of(context).commits), fetch: (cursor) async { final res = await context.read().gqlClient.execute( GhCommitsQuery( diff --git a/lib/screens/gh_compare.dart b/lib/screens/gh_compare.dart index 56a67b2..65c0ca6 100644 --- a/lib/screens/gh_compare.dart +++ b/lib/screens/gh_compare.dart @@ -7,6 +7,7 @@ import 'package:provider/provider.dart'; import 'package:git_touch/widgets/files_item.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/widgets/action_button.dart'; +import '../generated/l10n.dart'; class GhComparisonScreen extends StatelessWidget { final String owner; @@ -17,7 +18,7 @@ class GhComparisonScreen extends StatelessWidget { Widget build(BuildContext context) { return RefreshStatefulScaffold( - title: AppBarTitle('Files'), + title: AppBarTitle(S.of(context).files), fetch: () async { final res = await context.read().ghClient.getJSON( '/repos/$owner/$name/compare/$before...$head', @@ -26,7 +27,7 @@ class GhComparisonScreen extends StatelessWidget { }, actionBuilder: (v, _) { return ActionButton( - title: 'Actions', + title: S.of(context).actions, items: [ ...ActionItem.getUrlActions( 'https://github.com/$owner/$name/compare/$before...$head'), diff --git a/lib/screens/gh_contributors.dart b/lib/screens/gh_contributors.dart index 9961191..8e615ea 100644 --- a/lib/screens/gh_contributors.dart +++ b/lib/screens/gh_contributors.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/contributor_item.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhContributorsScreen extends StatelessWidget { final String owner; @@ -14,7 +15,7 @@ class GhContributorsScreen extends StatelessWidget { Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Contributors'), + title: AppBarTitle(S.of(context).contributors), fetch: (page) async { page = page ?? 1; final res = await context diff --git a/lib/screens/gh_events.dart b/lib/screens/gh_events.dart index a18c3d2..3ac3e6c 100644 --- a/lib/screens/gh_events.dart +++ b/lib/screens/gh_events.dart @@ -7,6 +7,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/widgets/event_item.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhEventsScreen extends StatelessWidget { final String login; @@ -15,7 +16,7 @@ class GhEventsScreen extends StatelessWidget { @override Widget build(context) { return ListStatefulScaffold( - title: AppBarTitle('Events'), + title: AppBarTitle(S.of(context).events), itemBuilder: (payload) => EventItem(payload), fetch: (page) async { page = page ?? 1; diff --git a/lib/screens/gh_files.dart b/lib/screens/gh_files.dart index 39c2926..2bb15eb 100644 --- a/lib/screens/gh_files.dart +++ b/lib/screens/gh_files.dart @@ -7,6 +7,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/widgets/files_item.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhFilesScreen extends StatelessWidget { final String owner; @@ -16,7 +17,7 @@ class GhFilesScreen extends StatelessWidget { Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Files'), + title: AppBarTitle(S.of(context).files), actionBuilder: () { return ActionButton( title: 'Actions', diff --git a/lib/screens/gh_gists.dart b/lib/screens/gh_gists.dart index edf19f9..0dcc1b3 100644 --- a/lib/screens/gh_gists.dart +++ b/lib/screens/gh_gists.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/gists_item.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhGistsScreen extends StatelessWidget { final String login; @@ -14,7 +15,7 @@ class GhGistsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Gists'), + title: AppBarTitle(S.of(context).gists), fetch: (page) async { page = page ?? 1; final res = await context diff --git a/lib/screens/gh_gists_files.dart b/lib/screens/gh_gists_files.dart index a7f2867..a60e3c8 100644 --- a/lib/screens/gh_gists_files.dart +++ b/lib/screens/gh_gists_files.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/object_tree.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhGistsFilesScreen extends StatelessWidget { final String id; @@ -15,7 +16,7 @@ class GhGistsFilesScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold( - title: AppBarTitle('Files'), + title: AppBarTitle(S.of(context).files), fetch: () async { final data = await context.read().ghClient.getJSON( '/gists/$id', diff --git a/lib/screens/gh_issues.dart b/lib/screens/gh_issues.dart index d446281..01d5e41 100644 --- a/lib/screens/gh_issues.dart +++ b/lib/screens/gh_issues.dart @@ -8,6 +8,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/issue_item.dart'; import 'package:git_touch/widgets/label.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GhIssuesScreen extends StatelessWidget { final String owner; @@ -17,7 +18,7 @@ class GhIssuesScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Issues'), + title: AppBarTitle(S.of(context).issues), actionBuilder: () => ActionEntry( iconData: Octicons.plus, url: '/github/$owner/$name/issues/new', diff --git a/lib/screens/gh_news.dart b/lib/screens/gh_news.dart index b6a6b9a..f13732d 100644 --- a/lib/screens/gh_news.dart +++ b/lib/screens/gh_news.dart @@ -8,6 +8,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/widgets/event_item.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhNewsScreen extends StatefulWidget { @override @@ -35,7 +36,7 @@ class GhNewsScreenState extends State { @override Widget build(context) { return ListStatefulScaffold( - title: AppBarTitle('News'), + title: AppBarTitle(S.of(context).news), itemBuilder: (payload) => EventItem(payload), fetch: (page) async { page = page ?? 1; diff --git a/lib/screens/gh_notification.dart b/lib/screens/gh_notification.dart index 5aaf288..25d6291 100644 --- a/lib/screens/gh_notification.dart +++ b/lib/screens/gh_notification.dart @@ -13,6 +13,7 @@ import '../widgets/notification_item.dart'; import '../widgets/list_group.dart'; import '../widgets/empty.dart'; import '../utils/utils.dart'; +import '../generated/l10n.dart'; class GhNotificationScreen extends StatefulWidget { @override @@ -156,8 +157,12 @@ ${item.key}: pullRequest(number: ${item.subject.number}) { @override Widget build(context) { return TabStatefulScaffold( - title: AppBarTitle('Notifications'), - tabs: ['Unread', 'Participating', 'All'], + title: AppBarTitle(S.of(context).notification), + tabs: [ + S.of(context).unread, + S.of(context).participating, + S.of(context).all + ], fetchData: fetchNotifications, bodyBuilder: (groupMap, activeTab) { if (groupMap.isEmpty) return EmptyWidget(); diff --git a/lib/screens/gh_org_repos.dart b/lib/screens/gh_org_repos.dart index 8cb8d81..3255fae 100644 --- a/lib/screens/gh_org_repos.dart +++ b/lib/screens/gh_org_repos.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/repository_item.dart'; import 'package:provider/provider.dart'; import 'package:github/github.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; /// There are some restrictions of organization repos with OAuth /// @@ -19,7 +20,7 @@ class GhOrgReposScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Repositories'), + title: AppBarTitle(S.of(context).repositories), fetch: (page) async { page = page ?? 1; final rs = await context diff --git a/lib/screens/gh_orgs.dart b/lib/screens/gh_orgs.dart index be5b931..6640be8 100644 --- a/lib/screens/gh_orgs.dart +++ b/lib/screens/gh_orgs.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/user_item.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/models/auth.dart'; +import '../generated/l10n.dart'; class GhUserOrganizationScreen extends StatelessWidget { final String login; @@ -13,7 +14,7 @@ class GhUserOrganizationScreen extends StatelessWidget { Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Organizations'), + title: AppBarTitle(S.of(context).organizations), fetch: (page) async { page = page ?? 1; final res = await context diff --git a/lib/screens/gh_pulls.dart b/lib/screens/gh_pulls.dart index 9041bb0..c3055d9 100644 --- a/lib/screens/gh_pulls.dart +++ b/lib/screens/gh_pulls.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/issue_item.dart'; import 'package:git_touch/widgets/label.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GhPullsScreen extends StatelessWidget { final String owner; @@ -15,7 +16,7 @@ class GhPullsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Pull requests'), + title: AppBarTitle(S.of(context).pullRequests), fetch: (cursor) async { final res = await context.read().gqlClient.execute(GhPullsQuery( diff --git a/lib/screens/gh_repo.dart b/lib/screens/gh_repo.dart index f93faa5..20ec19a 100644 --- a/lib/screens/gh_repo.dart +++ b/lib/screens/gh_repo.dart @@ -19,6 +19,7 @@ import 'package:git_touch/models/theme.dart'; import 'package:tuple/tuple.dart'; import 'package:git_touch/widgets/action_button.dart'; import 'package:universal_io/prefer_universal/io.dart'; +import '../generated/l10n.dart'; class GhRepoScreen extends StatelessWidget { final String owner; @@ -54,7 +55,7 @@ class GhRepoScreen extends StatelessWidget { final theme = Provider.of(context); return RefreshStatefulScaffold< Tuple3, MarkdownViewData>>( - title: AppBarTitle('Repository'), + title: AppBarTitle(S.of(context).repository), fetch: () async { final ghClient = context.read().ghClient; @@ -89,14 +90,14 @@ class GhRepoScreen extends StatelessWidget { actionBuilder: (data, setState) { final repo = data.item1; return ActionButton( - title: 'Repository Actions', + title: S.of(context).repositoryActions, items: [ ActionItem( - text: 'Projects(${repo.projects.totalCount})', + text: S.of(context).projects + '(${repo.projects.totalCount})', url: repo.projectsUrl, ), ActionItem( - text: 'Releases(${repo.releases.totalCount})', + text: S.of(context).releases + '(${repo.releases.totalCount})', url: 'https://github.com/$owner/$name/releases', ), ...ActionItem.getUrlActions(repo.url), @@ -235,17 +236,17 @@ class GhRepoScreen extends StatelessWidget { children: [ EntryItem( count: repo.watchers.totalCount, - text: 'Watchers', + text: S.of(context).watchers, url: '/github/$owner/$name/watchers', ), EntryItem( count: repo.stargazers.totalCount, - text: 'Stars', + text: S.of(context).stars, url: '/github/$owner/$name/stargazers', ), EntryItem( count: repo.forks.totalCount, - text: 'Forks', + text: S.of(context).forks, url: 'https://github.com/$owner/$name/network/members', ), ], @@ -277,14 +278,14 @@ class GhRepoScreen extends StatelessWidget { if (repo.hasIssuesEnabled) TableViewItem( leftIconData: Octicons.issue_opened, - text: Text('Issues'), + text: Text(S.of(context).issues), rightWidget: Text(numberFormat.format(repo.issues.totalCount)), url: '/github/$owner/$name/issues', ), TableViewItem( leftIconData: Octicons.git_pull_request, - text: Text('Pull requests'), + text: Text(S.of(context).pullRequests), rightWidget: Text(numberFormat.format(repo.pullRequests.totalCount)), url: '/github/$owner/$name/pulls', @@ -292,7 +293,7 @@ class GhRepoScreen extends StatelessWidget { if (ref != null) ...[ TableViewItem( leftIconData: Octicons.history, - text: Text('Commits'), + text: Text(S.of(context).commits), rightWidget: Text( ((ref.target as GhRepoCommit).history?.totalCount ?? 0) .toString()), @@ -301,7 +302,7 @@ class GhRepoScreen extends StatelessWidget { if (repo.refs != null) TableViewItem( leftIconData: Octicons.git_branch, - text: Text('Branches'), + text: Text(S.of(context).branches), rightWidget: Text(ref.name + ' • ' + numberFormat.format(repo.refs.totalCount)), @@ -329,7 +330,7 @@ class GhRepoScreen extends StatelessWidget { ), TableViewItem( leftIconData: Octicons.organization, - text: Text('Contributors'), + text: Text(S.of(context).contributors), rightWidget: FutureBuilder( future: contributionFuture, builder: (context, snapshot) { diff --git a/lib/screens/gh_search.dart b/lib/screens/gh_search.dart index d825400..bce2d38 100644 --- a/lib/screens/gh_search.dart +++ b/lib/screens/gh_search.dart @@ -11,6 +11,7 @@ import 'package:provider/provider.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/widgets/repository_item.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; class GhSearchScreen extends StatefulWidget { @override @@ -125,7 +126,7 @@ class _GhSearchScreenState extends State { Icon(Octicons.search, size: 20, color: PrimerColors.gray400), ], ), - placeholder: 'Search', + placeholder: S.of(context).search, clearButtonMode: OverlayVisibilityMode.editing, textInputAction: TextInputAction.go, onSubmitted: (_) => _query(), @@ -134,7 +135,7 @@ class _GhSearchScreenState extends State { ); default: return TextField( - decoration: InputDecoration.collapsed(hintText: 'Search'), + decoration: InputDecoration.collapsed(hintText: S.of(context).search), textInputAction: TextInputAction.go, onSubmitted: (_) => _query(), controller: _controller, diff --git a/lib/screens/gh_trending.dart b/lib/screens/gh_trending.dart index 00e5970..4716dba 100644 --- a/lib/screens/gh_trending.dart +++ b/lib/screens/gh_trending.dart @@ -8,14 +8,15 @@ import 'package:git_touch/widgets/user_item.dart'; import 'package:github_trending/github_trending.dart'; import 'package:git_touch/widgets/repository_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GhTrendingScreen extends StatelessWidget { static final trending = GithubTrending(prefix: 'https://gtrend.yapie.me'); Widget build(BuildContext context) { return TabStatefulScaffold( - title: AppBarTitle('Trending'), - tabs: ['Repositories', 'Developers'], + title: AppBarTitle(S.of(context).trending), + tabs: [S.of(context).repositories, S.of(context).developers], fetchData: (tabIndex) async { if (tabIndex == 0) { return trending.getTrendingRepositories(); diff --git a/lib/screens/gh_user.dart b/lib/screens/gh_user.dart index 3062d03..8af3a75 100644 --- a/lib/screens/gh_user.dart +++ b/lib/screens/gh_user.dart @@ -16,6 +16,7 @@ import 'package:git_touch/models/auth.dart'; import 'package:git_touch/widgets/user_header.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/widgets/action_button.dart'; +import '../generated/l10n.dart'; class GhUserScreen extends StatelessWidget { final String login; @@ -77,7 +78,9 @@ class GhUserScreen extends StatelessWidget { if (p.viewerCanFollow) MutationButton( active: p.viewerIsFollowing, - text: p.viewerIsFollowing ? 'Unfollow' : 'Follow', + text: p.viewerIsFollowing + ? S.of(context).unfollow + : S.of(context).follow, onTap: () async { if (p.viewerIsFollowing) { await auth.ghClient.users.unfollowUser(p.login); @@ -95,22 +98,22 @@ class GhUserScreen extends StatelessWidget { Row(children: [ EntryItem( count: p.repositories.totalCount, - text: 'Repositories', + text: S.of(context).repositories, url: '/github/$login?tab=repositories', ), EntryItem( count: p.starredRepositories.totalCount, - text: 'Stars', + text: S.of(context).stars, url: '/github/$login?tab=stars', ), EntryItem( count: p.followers.totalCount, - text: 'Followers', + text: S.of(context).followers, url: '/github/$login?tab=followers', ), EntryItem( count: p.following.totalCount, - text: 'Following', + text: S.of(context).following, url: '/github/$login?tab=following', ), ]), @@ -132,17 +135,17 @@ class GhUserScreen extends StatelessWidget { items: [ TableViewItem( leftIconData: Icons.rss_feed, - text: Text('Events'), + text: Text(S.of(context).events), url: '/github/$login?tab=events', ), TableViewItem( leftIconData: Octicons.book, - text: Text('Gists'), + text: Text(S.of(context).gists), url: '/github/$login?tab=gists', ), TableViewItem( leftIconData: Octicons.home, - text: Text('Organizations'), + text: Text(S.of(context).organizations), url: '/github/$login?tab=organizations', ), if (isNotNullOrEmpty(p.company)) @@ -229,12 +232,12 @@ class GhUserScreen extends StatelessWidget { Row(children: [ EntryItem( count: p.pinnableItems.totalCount, - text: 'Repositories', + text: S.of(context).repositories, url: '/github/${p.login}?tab=orgrepo', ), EntryItem( count: p.membersWithRole.totalCount, - text: 'Members', + text: S.of(context).members, url: '/github/${p.login}?tab=people', ), ]), @@ -243,7 +246,7 @@ class GhUserScreen extends StatelessWidget { items: [ TableViewItem( leftIconData: Icons.rss_feed, - text: Text('Events'), + text: Text(S.of(context).events), url: '/github/$login?tab=events', ), if (isNotNullOrEmpty(p.location)) @@ -301,7 +304,7 @@ class GhUserScreen extends StatelessWidget { GhUserArguments(login: login ?? '', isViewer: isViewer))); return isViewer ? data.data.viewer : data.data.repositoryOwner; }, - title: AppBarTitle(isViewer ? 'Me' : login), + title: AppBarTitle(isViewer ? S.of(context).me : login), action: isViewer ? ActionEntry( iconData: Icons.settings, diff --git a/lib/screens/gl_commit.dart b/lib/screens/gl_commit.dart index 7e0d5c8..30af2ce 100644 --- a/lib/screens/gl_commit.dart +++ b/lib/screens/gl_commit.dart @@ -9,6 +9,7 @@ import 'package:git_touch/scaffolds/refresh_stateful.dart'; import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; // TODO: class GlCommitScreen extends StatelessWidget { @@ -29,7 +30,7 @@ class GlCommitScreen extends StatelessWidget { final theme = Provider.of(context); return RefreshStatefulScaffold>( - title: AppBarTitle('Commits'), + title: AppBarTitle(S.of(context).commits), fetch: () => _query(context), bodyBuilder: (items, _) { return Column( diff --git a/lib/screens/gl_commits.dart b/lib/screens/gl_commits.dart index 63be95a..2e96a9d 100644 --- a/lib/screens/gl_commits.dart +++ b/lib/screens/gl_commits.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/commit_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GlCommitsScreen extends StatelessWidget { final String id; @@ -15,7 +16,7 @@ class GlCommitsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Commits'), + title: AppBarTitle(S.of(context).commits), fetch: (page) async { page = page ?? 1; final auth = context.read(); diff --git a/lib/screens/gl_explore.dart b/lib/screens/gl_explore.dart index 7c00d70..7687f1c 100644 --- a/lib/screens/gl_explore.dart +++ b/lib/screens/gl_explore.dart @@ -6,12 +6,13 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/repository_item.dart'; import 'package:provider/provider.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; class GlExploreScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Explore'), + title: AppBarTitle(S.of(context).explore), fetch: (page) async { page = page ?? 1; final auth = context.read(); diff --git a/lib/screens/gl_group.dart b/lib/screens/gl_group.dart index 996ebcb..985052b 100644 --- a/lib/screens/gl_group.dart +++ b/lib/screens/gl_group.dart @@ -10,6 +10,7 @@ import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; import 'package:git_touch/utils/utils.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; class GlGroupScreen extends StatelessWidget { final int id; @@ -18,7 +19,7 @@ class GlGroupScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold>( - title: Text('Group'), + title: Text(S.of(context).group), fetch: () async { final auth = context.read(); final res = await Future.wait([ diff --git a/lib/screens/gl_groups.dart b/lib/screens/gl_groups.dart index 91ddc2f..d0095c7 100644 --- a/lib/screens/gl_groups.dart +++ b/lib/screens/gl_groups.dart @@ -5,12 +5,13 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/user_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GlGroupsScreenn extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Groups'), + title: AppBarTitle(S.of(context).groups), fetch: (page) async { page = page ?? 1; final auth = context.read(); diff --git a/lib/screens/gl_issue.dart b/lib/screens/gl_issue.dart index 37cfbf7..18b5dac 100644 --- a/lib/screens/gl_issue.dart +++ b/lib/screens/gl_issue.dart @@ -7,6 +7,7 @@ import 'package:git_touch/widgets/comment_item.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/models/auth.dart'; import 'package:tuple/tuple.dart'; +import '../generated/l10n.dart'; class GlIssueScreen extends StatelessWidget { final int projectId; @@ -19,7 +20,7 @@ class GlIssueScreen extends StatelessWidget { Widget build(BuildContext context) { return RefreshStatefulScaffold< Tuple3, List>>( - title: Text('Issue #$iid'), + title: Text(S.of(context).issue + '#$iid'), fetch: () async { final type = isMr ? 'merge_requests' : 'issues'; final auth = context.read(); diff --git a/lib/screens/gl_issues.dart b/lib/screens/gl_issues.dart index 1a7069e..00edad6 100644 --- a/lib/screens/gl_issues.dart +++ b/lib/screens/gl_issues.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/issue_item.dart'; import 'package:git_touch/widgets/label.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GlIssuesScreen extends StatelessWidget { final String id; @@ -15,7 +16,7 @@ class GlIssuesScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Issues'), + title: AppBarTitle(S.of(context).issues), // TODO: create issue fetch: (page) async { page = page ?? 1; diff --git a/lib/screens/gl_members.dart b/lib/screens/gl_members.dart index 2539edb..91b0798 100644 --- a/lib/screens/gl_members.dart +++ b/lib/screens/gl_members.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/user_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GlMembersScreen extends StatelessWidget { final int id; @@ -23,7 +24,7 @@ class GlMembersScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Members'), + title: AppBarTitle(S.of(context).members), fetch: (page) async { page = page ?? 1; final auth = context.read(); diff --git a/lib/screens/gl_merge_requests.dart b/lib/screens/gl_merge_requests.dart index 217f021..7cd1a8d 100644 --- a/lib/screens/gl_merge_requests.dart +++ b/lib/screens/gl_merge_requests.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/issue_item.dart'; import 'package:git_touch/widgets/label.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GlMergeRequestsScreen extends StatelessWidget { final String id; @@ -15,7 +16,7 @@ class GlMergeRequestsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Merge Requests'), + title: AppBarTitle(S.of(context).mergeRequests), fetch: (page) async { page = page ?? 1; final res = await context.read().fetchGitlabWithPage( diff --git a/lib/screens/gl_project.dart b/lib/screens/gl_project.dart index 5848eaf..a60a41e 100644 --- a/lib/screens/gl_project.dart +++ b/lib/screens/gl_project.dart @@ -15,6 +15,7 @@ import 'package:provider/provider.dart'; import 'package:git_touch/models/theme.dart'; import 'package:git_touch/widgets/action_button.dart'; import 'package:tuple/tuple.dart'; +import '../generated/l10n.dart'; class GlProjectScreen extends StatelessWidget { final int id; @@ -25,7 +26,7 @@ class GlProjectScreen extends StatelessWidget { return RefreshStatefulScaffold< Tuple4>, Future, MarkdownViewData>>( - title: AppBarTitle('Project'), + title: AppBarTitle(S.of(context).project), fetch: () async { final auth = context.read(); final p = @@ -67,7 +68,7 @@ class GlProjectScreen extends StatelessWidget { }, actionBuilder: (t, setState) { return ActionButton( - title: 'Project Actions', + title: S.of(context).projectActions, items: [ ...ActionItem.getUrlActions(t.item1.webUrl), ], @@ -111,19 +112,19 @@ class GlProjectScreen extends StatelessWidget { builder: (context, snapshot) { return EntryItem( count: snapshot.data, - text: 'Members', + text: S.of(context).members, url: '/gitlab/projects/$id/members', ); }, ), EntryItem( count: p.starCount, - text: 'Stars', + text: S.of(context).stars, url: '/gitlab/projects/$id/starrers', ), EntryItem( count: p.forksCount, - text: 'Forks', // TODO: + text: S.of(context).forks, // TODO: ), ], ), @@ -156,7 +157,8 @@ class GlProjectScreen extends StatelessWidget { return Text(''); } else { final langs = snapshot.data.keys; - return Text(langs.isEmpty ? 'Code' : langs.first); + return Text( + langs.isEmpty ? S.of(context).code : langs.first); } }, ), @@ -168,19 +170,19 @@ class GlProjectScreen extends StatelessWidget { if (p.issuesEnabled) TableViewItem( leftIconData: Octicons.issue_opened, - text: Text('Issues'), + text: Text(S.of(context).issues), rightWidget: Text(numberFormat.format(p.openIssuesCount)), url: '/gitlab/projects/$id/issues?prefix=$prefix', ), if (p.mergeRequestsEnabled) TableViewItem( leftIconData: Octicons.git_pull_request, - text: Text('Merge requests'), + text: Text(S.of(context).mergeRequests), url: '/gitlab/projects/$id/merge_requests?prefix=$prefix', ), TableViewItem( leftIconData: Octicons.history, - text: Text('Commits'), + text: Text(S.of(context).commits), rightWidget: p.statistics == null ? null : Text(p.statistics.commitCount.toString()), diff --git a/lib/screens/gl_project_activity.dart b/lib/screens/gl_project_activity.dart index 11df033..751b76b 100644 --- a/lib/screens/gl_project_activity.dart +++ b/lib/screens/gl_project_activity.dart @@ -8,6 +8,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/avatar.dart'; import 'package:git_touch/widgets/link.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GlProjectActivityScreen extends StatelessWidget { final int id; @@ -17,7 +18,7 @@ class GlProjectActivityScreen extends StatelessWidget { Widget build(BuildContext context) { final theme = Provider.of(context); return ListStatefulScaffold( - title: AppBarTitle('Activity'), + title: AppBarTitle(S.of(context).activity), fetch: (page) async { page = page ?? 1; final auth = context.read(); diff --git a/lib/screens/gl_search.dart b/lib/screens/gl_search.dart index c788ca0..e55fc33 100644 --- a/lib/screens/gl_search.dart +++ b/lib/screens/gl_search.dart @@ -11,6 +11,7 @@ import 'package:git_touch/models/auth.dart'; import 'package:git_touch/widgets/repository_item.dart'; import 'package:timeago/timeago.dart' as timeago; import 'package:git_touch/models/gitlab.dart'; +import '../generated/l10n.dart'; class GlSearchScreen extends StatefulWidget { @override @@ -74,7 +75,7 @@ class _GlSearchScreenState extends State { Icon(Octicons.search, size: 20, color: PrimerColors.gray400), ], ), - placeholder: 'Search', + placeholder: S.of(context).search, clearButtonMode: OverlayVisibilityMode.editing, textInputAction: TextInputAction.go, onSubmitted: (_) => _query(), @@ -83,7 +84,7 @@ class _GlSearchScreenState extends State { ); default: return TextField( - decoration: InputDecoration.collapsed(hintText: 'Search'), + decoration: InputDecoration.collapsed(hintText: S.of(context).search), textInputAction: TextInputAction.go, onSubmitted: (_) => _query(), controller: _controller, diff --git a/lib/screens/gl_starrers.dart b/lib/screens/gl_starrers.dart index 2865f05..46448d8 100644 --- a/lib/screens/gl_starrers.dart +++ b/lib/screens/gl_starrers.dart @@ -6,6 +6,7 @@ import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/user_item.dart'; import 'package:provider/provider.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; class GlStarrersScreen extends StatelessWidget { final int id; @@ -14,7 +15,7 @@ class GlStarrersScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Members'), + title: AppBarTitle(S.of(context).members), fetch: (page) async { page = page ?? 1; final res = await context diff --git a/lib/screens/gl_tree.dart b/lib/screens/gl_tree.dart index 5e12603..16d26b0 100644 --- a/lib/screens/gl_tree.dart +++ b/lib/screens/gl_tree.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; import 'package:git_touch/models/auth.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/utils/utils.dart'; +import '../generated/l10n.dart'; class GlTreeScreen extends StatelessWidget { final int id; @@ -18,7 +19,7 @@ class GlTreeScreen extends StatelessWidget { Widget build(BuildContext context) { final auth = Provider.of(context); return RefreshStatefulScaffold>( - title: AppBarTitle(path ?? 'Files'), + title: AppBarTitle(path ?? S.of(context).files), fetch: () async { final uri = Uri( path: '/projects/$id/repository/tree', diff --git a/lib/screens/gl_user.dart b/lib/screens/gl_user.dart index 81dd53c..c883833 100644 --- a/lib/screens/gl_user.dart +++ b/lib/screens/gl_user.dart @@ -10,6 +10,7 @@ import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; import 'package:git_touch/utils/utils.dart'; import 'package:timeago/timeago.dart' as timeago; +import '../generated/l10n.dart'; class GlUserScreen extends StatelessWidget { final int id; @@ -19,7 +20,7 @@ class GlUserScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold>>( - title: Text(isViewer ? 'Me' : 'User'), + title: Text(isViewer ? S.of(context).me : S.of(context).user), fetch: () async { final auth = context.read(); final _id = id ?? auth.activeAccount.gitlabId; diff --git a/lib/screens/gt_commits.dart b/lib/screens/gt_commits.dart index 549ceae..16329a3 100644 --- a/lib/screens/gt_commits.dart +++ b/lib/screens/gt_commits.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/commit_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GtCommitsScreen extends StatelessWidget { final String owner; @@ -15,7 +16,7 @@ class GtCommitsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Commits'), + title: AppBarTitle(S.of(context).commits), fetch: (page) async { final res = await context .read() diff --git a/lib/screens/gt_issues.dart b/lib/screens/gt_issues.dart index 730acf9..62fed11 100644 --- a/lib/screens/gt_issues.dart +++ b/lib/screens/gt_issues.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:git_touch/generated/l10n.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/models/gitea.dart'; import 'package:git_touch/scaffolds/list_stateful.dart'; @@ -15,7 +16,8 @@ class GtIssuesScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle(isPr ? 'Pull Requests' : 'Issues'), + title: + AppBarTitle(isPr ? S.of(context).pullRequests : S.of(context).issues), // TODO: create issue fetch: (page) async { final type = isPr ? 'pulls' : 'issues'; diff --git a/lib/screens/gt_object.dart b/lib/screens/gt_object.dart index e3267f3..0bd12ae 100644 --- a/lib/screens/gt_object.dart +++ b/lib/screens/gt_object.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:git_touch/generated/l10n.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/models/gitea.dart'; import 'package:git_touch/scaffolds/refresh_stateful.dart'; @@ -18,7 +19,7 @@ class GtObjectScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold( - title: AppBarTitle(path ?? 'Files'), + title: AppBarTitle(path ?? S.of(context).files), fetch: () async { final suffix = path == null ? '' : '/$path'; final res = await context diff --git a/lib/screens/gt_orgs.dart b/lib/screens/gt_orgs.dart index c444608..7e8d61d 100644 --- a/lib/screens/gt_orgs.dart +++ b/lib/screens/gt_orgs.dart @@ -5,6 +5,7 @@ import 'package:git_touch/scaffolds/list_stateful.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/user_item.dart'; import 'package:provider/provider.dart'; +import '../generated/l10n.dart'; class GtOrgsScreen extends StatelessWidget { final String api; @@ -14,7 +15,7 @@ class GtOrgsScreen extends StatelessWidget { @override Widget build(BuildContext context) { return ListStatefulScaffold( - title: AppBarTitle('Organizations'), + title: AppBarTitle(S.of(context).organizations), fetch: (page) async { final res = await context.read().fetchGiteaWithPage(api, page: page); diff --git a/lib/screens/gt_repo.dart b/lib/screens/gt_repo.dart index c6d854e..4f39cc2 100644 --- a/lib/screens/gt_repo.dart +++ b/lib/screens/gt_repo.dart @@ -15,6 +15,7 @@ import 'package:git_touch/widgets/table_view.dart'; import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; import 'package:http/http.dart' as http; +import '../generated/l10n.dart'; class GtRepoScreen extends StatelessWidget { final String owner; @@ -24,7 +25,7 @@ class GtRepoScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold>( - title: AppBarTitle('Repository'), + title: AppBarTitle(S.of(context).repository), fetch: () async { final auth = context.read(); final repo = await auth.fetchGitea('/repos/$owner/$name').then((v) { diff --git a/lib/screens/gt_status.dart b/lib/screens/gt_status.dart index d3d8bf0..2c83938 100644 --- a/lib/screens/gt_status.dart +++ b/lib/screens/gt_status.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; +import 'package:git_touch/generated/l10n.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/scaffolds/refresh_stateful.dart'; import 'package:git_touch/widgets/blob_view.dart'; @@ -10,7 +11,7 @@ class GtStatusScreen extends StatelessWidget { @override Widget build(BuildContext context) { return RefreshStatefulScaffold( - title: Text('Gitea status'), + title: Text(S.of(context).giteaStatus), fetch: () async { final auth = context.read(); final res = await Future.wait([ diff --git a/lib/screens/login.dart b/lib/screens/login.dart index 2014df0..ee41669 100644 --- a/lib/screens/login.dart +++ b/lib/screens/login.dart @@ -12,6 +12,7 @@ import 'package:provider/provider.dart'; import '../widgets/link.dart'; import '../widgets/loading.dart'; import '../widgets/avatar.dart'; +import '../generated/l10n.dart'; class LoginScreen extends StatefulWidget { @override @@ -45,7 +46,7 @@ class _LoginScreenState extends State { onLongPress: () { theme.showActions(context, [ ActionItem( - text: 'Remove account', + text: S.of(context).removeAccount, isDestructiveAction: true, onTap: (_) { auth.removeAccount(index); @@ -130,7 +131,7 @@ class _LoginScreenState extends State { void showError(err) { context .read() - .showConfirm(context, Text('Something bad happens: $err')); + .showConfirm(context, Text(S.of(context).somethingBadHappens + '$err')); } @override @@ -138,7 +139,7 @@ class _LoginScreenState extends State { final auth = Provider.of(context); final theme = Provider.of(context); return SingleScaffold( - title: AppBarTitle('Select account'), + title: AppBarTitle(S.of(context).selectAccount), body: auth.loading ? Center(child: Loading()) : Container( @@ -146,7 +147,7 @@ class _LoginScreenState extends State { children: [ ...List.generate(auth.accounts.length, _buildAccountItem), _buildAddItem( - text: 'GitHub Account', + text: S.of(context).githubAccount, brand: FontAwesome5Brands.github, onTap: () async { theme.showActions(context, [ @@ -163,7 +164,7 @@ class _LoginScreenState extends State { context, _buildPopup(context, notes: [ Text( - 'GitTouch needs these permissions', + S.of(context).permissionRequiredMessage, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w400), @@ -192,7 +193,7 @@ class _LoginScreenState extends State { }, ), _buildAddItem( - text: 'GitLab Account', + text: S.of(context).gitlabAccount, brand: FontAwesome5Brands.gitlab, onTap: () async { _domainController.text = 'https://gitlab.com'; @@ -203,7 +204,7 @@ class _LoginScreenState extends State { showDomain: true, notes: [ Text( - 'GitTouch needs these permissions', + S.of(context).permissionRequiredMessage, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w400), ), @@ -228,7 +229,7 @@ class _LoginScreenState extends State { }, ), _buildAddItem( - text: 'Bitbucket Account', + text: S.of(context).bitbucketAccount, brand: FontAwesome5Brands.bitbucket, onTap: () async { _domainController.text = 'https://bitbucket.org'; @@ -269,7 +270,7 @@ class _LoginScreenState extends State { ), SizedBox(height: 8), Text( - 'GitTouch needs these permissions', + S.of(context).permissionRequiredMessage, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w400), ), @@ -295,7 +296,7 @@ class _LoginScreenState extends State { }, ), _buildAddItem( - text: 'Gitea Account', + text: S.of(context).giteaAccount, brand: Octicons.git_branch, // TODO: brand icon onTap: () async { _domainController.text = 'https://gitea.com'; @@ -315,7 +316,7 @@ class _LoginScreenState extends State { }, ), _buildAddItem( - text: 'Gitee Account(码云)', + text: S.of(context).giteeAccount + '(码云)', brand: Octicons.git_branch, // TODO: brand icon onTap: () async { final result = await theme.showConfirm( @@ -335,7 +336,7 @@ class _LoginScreenState extends State { Container( padding: CommonStyle.padding, child: Text( - 'Note: Long press to remove account', + S.of(context).longPressToRemoveAccount, style: TextStyle( fontSize: 16, color: theme.palette.secondaryText, diff --git a/lib/screens/not_found.dart b/lib/screens/not_found.dart index f5d4878..470a0bc 100644 --- a/lib/screens/not_found.dart +++ b/lib/screens/not_found.dart @@ -1,13 +1,14 @@ import 'package:flutter/material.dart'; import 'package:git_touch/scaffolds/single.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; +import '../generated/l10n.dart'; class NotFoundScreen extends StatelessWidget { @override Widget build(BuildContext context) { return SingleScaffold( - title: AppBarTitle('Not Found'), - body: Text('Woops, This page is not implemented yet'), + title: AppBarTitle(S.of(context).notFoundMessage), + body: Text(S.of(context).notFoundTextDisplay), ); } } diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index f96a9e7..b43f3f7 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -12,6 +12,7 @@ import 'package:launch_review/launch_review.dart'; import 'package:package_info/package_info.dart'; import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; +import '../generated/l10n.dart'; class SettingsScreen extends StatelessWidget { Widget _buildRightWidget(BuildContext context, bool checked) { @@ -26,18 +27,18 @@ class SettingsScreen extends StatelessWidget { final auth = Provider.of(context); final code = Provider.of(context); return SingleScaffold( - title: AppBarTitle('Settings'), + title: AppBarTitle(S.of(context).settings), body: Column( children: [ CommonStyle.verticalGap, - TableView(headerText: 'system', items: [ + TableView(headerText: S.of(context).system, items: [ if (auth.activeAccount.platform == PlatformType.github) ...[ TableViewItem( - text: Text('GitHub status'), + text: Text(S.of(context).githubStatus), url: 'https://www.githubstatus.com/', ), TableViewItem( - text: Text('Review Permissions'), + text: Text(S.of(context).reviewPermissions), url: 'https://github.com/settings/connections/applications/$clientId', rightWidget: Text(auth.activeAccount.login), @@ -45,7 +46,7 @@ class SettingsScreen extends StatelessWidget { ], if (auth.activeAccount.platform == PlatformType.gitlab) TableViewItem( - text: Text('GitLab status'), + text: Text(S.of(context).gitlabStatus), url: '${auth.activeAccount.domain}/help', rightWidget: FutureBuilder( future: @@ -58,7 +59,7 @@ class SettingsScreen extends StatelessWidget { if (auth.activeAccount.platform == PlatformType.gitea) TableViewItem( leftIconData: Octicons.info, - text: Text('Gitea status'), + text: Text(S.of(context).giteaStatus), url: '/gitea/status', rightWidget: FutureBuilder( future: auth.fetchGitea('/version').then((v) => v['version']), @@ -68,7 +69,7 @@ class SettingsScreen extends StatelessWidget { ), ), TableViewItem( - text: Text('Switch accounts'), + text: Text(S.of(context).switchAccounts), url: '/login', rightWidget: Text(auth.activeAccount.login), ), @@ -76,7 +77,7 @@ class SettingsScreen extends StatelessWidget { CommonStyle.verticalGap, TableView(headerText: 'theme', items: [ TableViewItem( - text: Text('Brightness'), + text: Text(S.of(context).brightness), rightWidget: Text(theme.brighnessValue == AppBrightnessType.light ? 'Light' : theme.brighnessValue == AppBrightnessType.dark @@ -85,9 +86,10 @@ class SettingsScreen extends StatelessWidget { onTap: () { theme.showActions(context, [ for (var t in [ - Tuple2('Follow System', AppBrightnessType.followSystem), - Tuple2('Light', AppBrightnessType.light), - Tuple2('Dark', AppBrightnessType.dark), + Tuple2(S.of(context).followSystem, + AppBrightnessType.followSystem), + Tuple2(S.of(context).light, AppBrightnessType.light), + Tuple2(S.of(context).dark, AppBrightnessType.dark), ]) ActionItem( text: t.item1, @@ -100,15 +102,15 @@ class SettingsScreen extends StatelessWidget { }, ), TableViewItem( - text: Text('Scaffold Theme'), + text: Text(S.of(context).scaffoldTheme), rightWidget: Text(theme.theme == AppThemeType.cupertino - ? 'Cupertino' - : 'Material'), + ? S.of(context).cupertino + : S.of(context).material), onTap: () { theme.showActions(context, [ for (var t in [ - Tuple2('Material', AppThemeType.material), - Tuple2('Cupertino', AppThemeType.cupertino), + Tuple2(S.of(context).material, AppThemeType.material), + Tuple2(S.of(context).cupertino, AppThemeType.cupertino), ]) ActionItem( text: t.item1, @@ -122,20 +124,20 @@ class SettingsScreen extends StatelessWidget { }, ), TableViewItem( - text: Text('Code Theme'), + text: Text(S.of(context).codeTheme), url: '/choose-code-theme', rightWidget: Text('${code.fontFamily}, ${code.fontSize}pt'), ), TableViewItem( - text: Text('Markdown Render Engine'), + text: Text(S.of(context).markdownRenderEngine), rightWidget: Text(theme.markdown == AppMarkdownType.flutter - ? 'Flutter' - : 'WebView'), + ? S.of(context).flutter + : S.of(context).webview), onTap: () { theme.showActions(context, [ for (var t in [ - Tuple2('Flutter', AppMarkdownType.flutter), - Tuple2('WebView', AppMarkdownType.webview), + Tuple2(S.of(context).flutter, AppMarkdownType.flutter), + Tuple2(S.of(context).webview, AppMarkdownType.webview), ]) ActionItem( text: t.item1, @@ -150,9 +152,9 @@ class SettingsScreen extends StatelessWidget { ), ]), CommonStyle.verticalGap, - TableView(headerText: 'feedback', items: [ + TableView(headerText: S.of(context).feedback, items: [ TableViewItem( - text: Text('Submit an issue'), + text: Text(S.of(context).submitAnIssue), rightWidget: Text('pd4d10/git-touch'), url: (auth.activeAccount.platform == PlatformType.github ? '' @@ -160,7 +162,7 @@ class SettingsScreen extends StatelessWidget { '/github/pd4d10/git-touch/issues/new', ), TableViewItem( - text: Text('Rate This App'), + text: Text(S.of(context).rateThisApp), onTap: () { LaunchReview.launch( androidAppId: 'io.github.pd4d10.gittouch', @@ -169,16 +171,16 @@ class SettingsScreen extends StatelessWidget { }, ), TableViewItem( - text: Text('Email'), + text: Text(S.of(context).email), rightWidget: Text('pd4d10@gmail.com'), hideRightChevron: true, url: 'mailto:pd4d10@gmail.com', ), ]), CommonStyle.verticalGap, - TableView(headerText: 'about', items: [ + TableView(headerText: S.of(context).about, items: [ TableViewItem( - text: Text('Version'), + text: Text(S.of(context).version), rightWidget: FutureBuilder( future: PackageInfo.fromPlatform().then((info) => info.version), @@ -187,7 +189,7 @@ class SettingsScreen extends StatelessWidget { }, )), TableViewItem( - text: Text('Source Code'), + text: Text(S.of(context).sourceCode), rightWidget: Text('pd4d10/git-touch'), url: (auth.activeAccount.platform == PlatformType.github ? '/github' diff --git a/pubspec.yaml b/pubspec.yaml index 88981bf..214b273 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -46,6 +46,8 @@ dependencies: uri: ^0.11.3 url_launcher: ^5.4.1 webview_flutter: ^1.0.5 + flutter_localizations: + sdk: flutter dev_dependencies: flutter_test: @@ -60,6 +62,7 @@ dev_dependencies: # following page: https://www.dartlang.org/tools/pub/pubspec # The following section is specific to Flutter. flutter: + generate: true uses-material-design: true assets: - images/ @@ -110,3 +113,5 @@ flutter: - asset: fonts/JetBrainsMono-Bold-Italic.ttf style: italic weight: 700 +flutter_intl: + enabled: true