diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index cc3d9a7..cab5be5 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -19,21 +19,71 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'en'; + static m0(num) => "${num} arrive"; + + static m1(num) => "${num} leave"; + final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { + "AboutSoftWare" : MessageLookupByLibrary.simpleMessage("About weifang Bus"), + "Age" : MessageLookupByLibrary.simpleMessage("Age"), + "AgeDesc" : MessageLookupByLibrary.simpleMessage("25"), + "AppDesc" : MessageLookupByLibrary.simpleMessage("This App was made by the technique of Flutter after personal work. The purpose is to run a bit more modern, I hope you like it😜。"), "AppName" : MessageLookupByLibrary.simpleMessage("WeiFang Bus"), + "AppearanceManagement" : MessageLookupByLibrary.simpleMessage("Appearance Management"), + "ArriveAtStation" : m0, + "Author" : MessageLookupByLibrary.simpleMessage("Come to the author"), + "Auto" : MessageLookupByLibrary.simpleMessage("Follow the system"), + "AwayFromTheStation" : m1, + "BackToTop" : MessageLookupByLibrary.simpleMessage("Back to top"), + "Chinese" : MessageLookupByLibrary.simpleMessage("Chinese"), + "City" : MessageLookupByLibrary.simpleMessage("City"), + "CityDesc" : MessageLookupByLibrary.simpleMessage("ShanDong WeiFang"), + "Close" : MessageLookupByLibrary.simpleMessage("Close"), + "Company" : MessageLookupByLibrary.simpleMessage("Weifang Public Transportation Corporation"), + "CompanyDesc" : MessageLookupByLibrary.simpleMessage("About Weifang Public Transportation Corporation"), + "Dark" : MessageLookupByLibrary.simpleMessage("Dark"), + "EMail" : MessageLookupByLibrary.simpleMessage("e-mail"), + "English" : MessageLookupByLibrary.simpleMessage("English"), "ExitApp" : MessageLookupByLibrary.simpleMessage("click again to exit the application"), "Explore" : MessageLookupByLibrary.simpleMessage("Explore"), "Guide" : MessageLookupByLibrary.simpleMessage("Guide"), "Home" : MessageLookupByLibrary.simpleMessage("Home"), "HomeNews" : MessageLookupByLibrary.simpleMessage("News"), + "Japanese" : MessageLookupByLibrary.simpleMessage("Japanese"), "LanguageSettings" : MessageLookupByLibrary.simpleMessage("Language Settings"), + "Light" : MessageLookupByLibrary.simpleMessage("Light"), + "Loading" : MessageLookupByLibrary.simpleMessage("Loading..."), "More" : MessageLookupByLibrary.simpleMessage("More"), + "Name" : MessageLookupByLibrary.simpleMessage("Name"), + "NameDesc" : MessageLookupByLibrary.simpleMessage("韩塞"), "News" : MessageLookupByLibrary.simpleMessage("News"), + "NewsDate" : MessageLookupByLibrary.simpleMessage("yyyy-MM-dd"), + "NewsDetail" : MessageLookupByLibrary.simpleMessage("News Detail"), + "NewsDetailDate" : MessageLookupByLibrary.simpleMessage("yyyy-MM-dd HH:mm:ss"), "NoNews" : MessageLookupByLibrary.simpleMessage("No News"), "NoPictures" : MessageLookupByLibrary.simpleMessage("No Pictures"), + "NotConnectedToAnyNetwork" : MessageLookupByLibrary.simpleMessage("The device is not connected to any network. Please try again after connecting to the network!"), + "NotInstalledQQ" : MessageLookupByLibrary.simpleMessage("Sorry, I have detected that you have not installed the QQ client"), + "Ok" : MessageLookupByLibrary.simpleMessage("Ok"), + "Phone" : MessageLookupByLibrary.simpleMessage("Phone"), + "QQGroup" : MessageLookupByLibrary.simpleMessage("QQ Group"), + "QQGroupDesc" : MessageLookupByLibrary.simpleMessage("Join QQ group to exchange feedback"), + "RefreshSuccess" : MessageLookupByLibrary.simpleMessage("Refresh the success!"), + "ReleaseTime" : MessageLookupByLibrary.simpleMessage("Release Time: "), + "Repo" : MessageLookupByLibrary.simpleMessage("code repository"), + "RequestDataFailure" : MessageLookupByLibrary.simpleMessage("Request data failed. Try switching network and retry!"), + "Reversing" : MessageLookupByLibrary.simpleMessage("Reversing"), + "ReversingComplete" : MessageLookupByLibrary.simpleMessage("Reversing Complete"), "RouteQuery" : MessageLookupByLibrary.simpleMessage("Route Query"), + "SearchHistory" : MessageLookupByLibrary.simpleMessage("This is a search record that is about to be perfected"), "SearchLine" : MessageLookupByLibrary.simpleMessage("Search Line"), - "Settings" : MessageLookupByLibrary.simpleMessage("Settings") + "SeeSource" : MessageLookupByLibrary.simpleMessage("To view the source code for this application, visit: "), + "Selected" : MessageLookupByLibrary.simpleMessage("Selected"), + "Settings" : MessageLookupByLibrary.simpleMessage("Settings"), + "SettingsDesc" : MessageLookupByLibrary.simpleMessage("Perfect regulation is under your control"), + "SoftWare" : MessageLookupByLibrary.simpleMessage("Weifang Bus"), + "SpecialInstructions" : MessageLookupByLibrary.simpleMessage("Special note: The interface is provided by [Weifang Zhangshangbus]. If there is any infringement, please contact me。"), + "ViewLicenses" : MessageLookupByLibrary.simpleMessage("View Licenses") }; } diff --git a/lib/generated/intl/messages_ja.dart b/lib/generated/intl/messages_ja.dart index 1805698..487a676 100644 --- a/lib/generated/intl/messages_ja.dart +++ b/lib/generated/intl/messages_ja.dart @@ -19,21 +19,71 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'ja'; + static m0(num) => "${num}到着"; + + static m1(num) => "${num}离れる"; + final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { + "AboutSoftWare" : MessageLookupByLibrary.simpleMessage("イ坊バスについて"), + "Age" : MessageLookupByLibrary.simpleMessage("年齢"), + "AgeDesc" : MessageLookupByLibrary.simpleMessage("25"), + "AppDesc" : MessageLookupByLibrary.simpleMessage("このアプリは個人の仕事の合間にFlutter技術で作成した。目的は現代に向かって一時に行くことです😜。"), "AppName" : MessageLookupByLibrary.simpleMessage("潍坊 バス"), + "AppearanceManagement" : MessageLookupByLibrary.simpleMessage("外観管理"), + "ArriveAtStation" : m0, + "Author" : MessageLookupByLibrary.simpleMessage("作者に近づく"), + "Auto" : MessageLookupByLibrary.simpleMessage("システムに追随する"), + "AwayFromTheStation" : m1, + "BackToTop" : MessageLookupByLibrary.simpleMessage("上部に戻る"), + "Chinese" : MessageLookupByLibrary.simpleMessage("中文"), + "City" : MessageLookupByLibrary.simpleMessage("ある都市"), + "CityDesc" : MessageLookupByLibrary.simpleMessage("山东潍坊"), + "Close" : MessageLookupByLibrary.simpleMessage("閉鎖"), + "Company" : MessageLookupByLibrary.simpleMessage("イ坊市公共交通総公司"), + "CompanyDesc" : MessageLookupByLibrary.simpleMessage("イ坊市公共交通総公司"), + "Dark" : MessageLookupByLibrary.simpleMessage("暗黒モード"), + "EMail" : MessageLookupByLibrary.simpleMessage("メール"), + "English" : MessageLookupByLibrary.simpleMessage("英語"), "ExitApp" : MessageLookupByLibrary.simpleMessage("もう一度クリックしてアプリを終了します"), "Explore" : MessageLookupByLibrary.simpleMessage("見る"), "Guide" : MessageLookupByLibrary.simpleMessage("ガイド"), "Home" : MessageLookupByLibrary.simpleMessage("ホーム"), "HomeNews" : MessageLookupByLibrary.simpleMessage("ニュース"), + "Japanese" : MessageLookupByLibrary.simpleMessage("日本語"), "LanguageSettings" : MessageLookupByLibrary.simpleMessage("言語設定"), + "Light" : MessageLookupByLibrary.simpleMessage("ライトモード"), + "Loading" : MessageLookupByLibrary.simpleMessage("ローディング中..."), "More" : MessageLookupByLibrary.simpleMessage("もっと"), + "Name" : MessageLookupByLibrary.simpleMessage("名前"), + "NameDesc" : MessageLookupByLibrary.simpleMessage("韩塞"), "News" : MessageLookupByLibrary.simpleMessage("ニュース"), + "NewsDate" : MessageLookupByLibrary.simpleMessage("yyyy年MM月dd日"), + "NewsDetail" : MessageLookupByLibrary.simpleMessage("情報詳細"), + "NewsDetailDate" : MessageLookupByLibrary.simpleMessage("yyyy年MM月dd日 HH点mm分ss秒"), "NoNews" : MessageLookupByLibrary.simpleMessage("情報はまだありません"), "NoPictures" : MessageLookupByLibrary.simpleMessage("写真はしばらくありません"), + "NotConnectedToAnyNetwork" : MessageLookupByLibrary.simpleMessage("設備はどのネットワークにも接続されていません。ネットワークに接続して再試行してください!"), + "NotInstalledQQ" : MessageLookupByLibrary.simpleMessage("QQクライアントがインストールされていないことが検出されました"), + "Ok" : MessageLookupByLibrary.simpleMessage("確定"), + "Phone" : MessageLookupByLibrary.simpleMessage("携帯電話番号"), + "QQGroup" : MessageLookupByLibrary.simpleMessage("QQ群"), + "QQGroupDesc" : MessageLookupByLibrary.simpleMessage("QQ群コミュニケーションフィードバックに参加する"), + "RefreshSuccess" : MessageLookupByLibrary.simpleMessage("刷新に成功する!"), + "ReleaseTime" : MessageLookupByLibrary.simpleMessage("リリース時点: "), + "Repo" : MessageLookupByLibrary.simpleMessage("コードライブラリ"), + "RequestDataFailure" : MessageLookupByLibrary.simpleMessage("データを要求すること失敗した。ネットワークを切り替えて再試行してください!"), + "Reversing" : MessageLookupByLibrary.simpleMessage("ブラシ"), + "ReversingComplete" : MessageLookupByLibrary.simpleMessage("交換完了"), "RouteQuery" : MessageLookupByLibrary.simpleMessage("ルートクエリ"), + "SearchHistory" : MessageLookupByLibrary.simpleMessage("これは完全な検索記録です"), "SearchLine" : MessageLookupByLibrary.simpleMessage("経路を探索する"), - "Settings" : MessageLookupByLibrary.simpleMessage("セットアップ") + "SeeSource" : MessageLookupByLibrary.simpleMessage("このアプリケーションのソースコードを見るには、アクセスしてください: "), + "Selected" : MessageLookupByLibrary.simpleMessage("選択済み"), + "Settings" : MessageLookupByLibrary.simpleMessage("セットアップ"), + "SettingsDesc" : MessageLookupByLibrary.simpleMessage("完璧にコントロールして、あなたの掌握に尽くします"), + "SoftWare" : MessageLookupByLibrary.simpleMessage("イ坊バス"), + "SpecialInstructions" : MessageLookupByLibrary.simpleMessage("特に説明:インターフェースは「濰坊掌中バス」より提供されており、もし著作権侵害があるならば、連絡してください。"), + "ViewLicenses" : MessageLookupByLibrary.simpleMessage("観免許") }; } diff --git a/lib/generated/intl/messages_zh.dart b/lib/generated/intl/messages_zh.dart index 6cc1239..3993915 100644 --- a/lib/generated/intl/messages_zh.dart +++ b/lib/generated/intl/messages_zh.dart @@ -19,21 +19,71 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'zh'; + static m0(num) => "${num}辆到站"; + + static m1(num) => "${num}辆离站"; + final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { + "AboutSoftWare" : MessageLookupByLibrary.simpleMessage("关于潍坊公交"), + "Age" : MessageLookupByLibrary.simpleMessage("年龄"), + "AgeDesc" : MessageLookupByLibrary.simpleMessage("25岁"), + "AppDesc" : MessageLookupByLibrary.simpleMessage("此 App 是个人工作之余通过 Flutter 技术制作。目的是奔着现代一点去的,希望大家喜欢😜。"), "AppName" : MessageLookupByLibrary.simpleMessage("潍坊公交"), + "AppearanceManagement" : MessageLookupByLibrary.simpleMessage("外观管理"), + "ArriveAtStation" : m0, + "Author" : MessageLookupByLibrary.simpleMessage("走近作者"), + "Auto" : MessageLookupByLibrary.simpleMessage("跟随系统"), + "AwayFromTheStation" : m1, + "BackToTop" : MessageLookupByLibrary.simpleMessage("返回顶部"), + "Chinese" : MessageLookupByLibrary.simpleMessage("中文"), + "City" : MessageLookupByLibrary.simpleMessage("所在城市"), + "CityDesc" : MessageLookupByLibrary.simpleMessage("山东潍坊"), + "Close" : MessageLookupByLibrary.simpleMessage("关闭"), + "Company" : MessageLookupByLibrary.simpleMessage("潍坊市公共交通总公司"), + "CompanyDesc" : MessageLookupByLibrary.simpleMessage("关于潍坊市公共交通总公司"), + "Dark" : MessageLookupByLibrary.simpleMessage("暗黑模式"), + "EMail" : MessageLookupByLibrary.simpleMessage("邮件"), + "English" : MessageLookupByLibrary.simpleMessage("英语"), "ExitApp" : MessageLookupByLibrary.simpleMessage("再次点击退出应用"), "Explore" : MessageLookupByLibrary.simpleMessage("探索"), "Guide" : MessageLookupByLibrary.simpleMessage("导 乘"), "Home" : MessageLookupByLibrary.simpleMessage("首页"), "HomeNews" : MessageLookupByLibrary.simpleMessage("资\n讯"), + "Japanese" : MessageLookupByLibrary.simpleMessage("日语"), "LanguageSettings" : MessageLookupByLibrary.simpleMessage("语言设置"), + "Light" : MessageLookupByLibrary.simpleMessage("浅色模式"), + "Loading" : MessageLookupByLibrary.simpleMessage("加载中..."), "More" : MessageLookupByLibrary.simpleMessage("更多"), + "Name" : MessageLookupByLibrary.simpleMessage("姓名"), + "NameDesc" : MessageLookupByLibrary.simpleMessage("韩塞"), "News" : MessageLookupByLibrary.simpleMessage("资 讯"), + "NewsDate" : MessageLookupByLibrary.simpleMessage("yyyy年MM月dd日"), + "NewsDetail" : MessageLookupByLibrary.simpleMessage("资讯详情"), + "NewsDetailDate" : MessageLookupByLibrary.simpleMessage("yyyy年MM月dd日 HH点mm分ss秒"), "NoNews" : MessageLookupByLibrary.simpleMessage("暂无资讯信息"), "NoPictures" : MessageLookupByLibrary.simpleMessage("暂无图片展示"), + "NotConnectedToAnyNetwork" : MessageLookupByLibrary.simpleMessage("设备未连接到任何网络,请连接网络后重试!"), + "NotInstalledQQ" : MessageLookupByLibrary.simpleMessage("抱歉,检测到您还未安装QQ客户端"), + "Ok" : MessageLookupByLibrary.simpleMessage("确定"), + "Phone" : MessageLookupByLibrary.simpleMessage("手机号"), + "QQGroup" : MessageLookupByLibrary.simpleMessage("QQ群"), + "QQGroupDesc" : MessageLookupByLibrary.simpleMessage("加入QQ群交流反馈"), + "RefreshSuccess" : MessageLookupByLibrary.simpleMessage("刷新成功!"), + "ReleaseTime" : MessageLookupByLibrary.simpleMessage("发布时间: "), + "Repo" : MessageLookupByLibrary.simpleMessage("代码库"), + "RequestDataFailure" : MessageLookupByLibrary.simpleMessage("请求数据失败,请尝试切换网络后重试!"), + "Reversing" : MessageLookupByLibrary.simpleMessage("换向"), + "ReversingComplete" : MessageLookupByLibrary.simpleMessage("换向完成"), "RouteQuery" : MessageLookupByLibrary.simpleMessage("线路查询"), + "SearchHistory" : MessageLookupByLibrary.simpleMessage("这是一个即将完善的搜索记录"), "SearchLine" : MessageLookupByLibrary.simpleMessage("搜索线路"), - "Settings" : MessageLookupByLibrary.simpleMessage("设置") + "SeeSource" : MessageLookupByLibrary.simpleMessage("要查看此应用的源代码,请访问: "), + "Selected" : MessageLookupByLibrary.simpleMessage("已选择"), + "Settings" : MessageLookupByLibrary.simpleMessage("设置"), + "SettingsDesc" : MessageLookupByLibrary.simpleMessage("完美调控,尽在您的掌握"), + "SoftWare" : MessageLookupByLibrary.simpleMessage("潍坊公交"), + "SpecialInstructions" : MessageLookupByLibrary.simpleMessage("特别说明: 接口由【潍坊掌上公交】提供,如有侵权,请联系我。"), + "ViewLicenses" : MessageLookupByLibrary.simpleMessage("查看许可") }; } diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 406cca2..ea2f67a 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -155,6 +155,146 @@ class S { ); } + /// `This is a search record that is about to be perfected` + String get SearchHistory { + return Intl.message( + 'This is a search record that is about to be perfected', + name: 'SearchHistory', + desc: '', + args: [], + ); + } + + /// `Refresh the success!` + String get RefreshSuccess { + return Intl.message( + 'Refresh the success!', + name: 'RefreshSuccess', + desc: '', + args: [], + ); + } + + /// `Request data failed. Try switching network and retry!` + String get RequestDataFailure { + return Intl.message( + 'Request data failed. Try switching network and retry!', + name: 'RequestDataFailure', + desc: '', + args: [], + ); + } + + /// `The device is not connected to any network. Please try again after connecting to the network!` + String get NotConnectedToAnyNetwork { + return Intl.message( + 'The device is not connected to any network. Please try again after connecting to the network!', + name: 'NotConnectedToAnyNetwork', + desc: '', + args: [], + ); + } + + /// `yyyy-MM-dd` + String get NewsDate { + return Intl.message( + 'yyyy-MM-dd', + name: 'NewsDate', + desc: '', + args: [], + ); + } + + /// `News Detail` + String get NewsDetail { + return Intl.message( + 'News Detail', + name: 'NewsDetail', + desc: '', + args: [], + ); + } + + /// `Release Time: ` + String get ReleaseTime { + return Intl.message( + 'Release Time: ', + name: 'ReleaseTime', + desc: '', + args: [], + ); + } + + /// `yyyy-MM-dd HH:mm:ss` + String get NewsDetailDate { + return Intl.message( + 'yyyy-MM-dd HH:mm:ss', + name: 'NewsDetailDate', + desc: '', + args: [], + ); + } + + /// `Back to top` + String get BackToTop { + return Intl.message( + 'Back to top', + name: 'BackToTop', + desc: '', + args: [], + ); + } + + /// `Reversing` + String get Reversing { + return Intl.message( + 'Reversing', + name: 'Reversing', + desc: '', + args: [], + ); + } + + /// `Reversing Complete` + String get ReversingComplete { + return Intl.message( + 'Reversing Complete', + name: 'ReversingComplete', + desc: '', + args: [], + ); + } + + /// `{num} arrive` + String ArriveAtStation(Object num) { + return Intl.message( + '$num arrive', + name: 'ArriveAtStation', + desc: '', + args: [num], + ); + } + + /// `{num} leave` + String AwayFromTheStation(Object num) { + return Intl.message( + '$num leave', + name: 'AwayFromTheStation', + desc: '', + args: [num], + ); + } + + /// `Loading...` + String get Loading { + return Intl.message( + 'Loading...', + name: 'Loading', + desc: '', + args: [], + ); + } + /// `Settings` String get Settings { return Intl.message( @@ -165,6 +305,106 @@ class S { ); } + /// `Perfect regulation is under your control` + String get SettingsDesc { + return Intl.message( + 'Perfect regulation is under your control', + name: 'SettingsDesc', + desc: '', + args: [], + ); + } + + /// `QQ Group` + String get QQGroup { + return Intl.message( + 'QQ Group', + name: 'QQGroup', + desc: '', + args: [], + ); + } + + /// `Join QQ group to exchange feedback` + String get QQGroupDesc { + return Intl.message( + 'Join QQ group to exchange feedback', + name: 'QQGroupDesc', + desc: '', + args: [], + ); + } + + /// `Weifang Public Transportation Corporation` + String get Company { + return Intl.message( + 'Weifang Public Transportation Corporation', + name: 'Company', + desc: '', + args: [], + ); + } + + /// `About Weifang Public Transportation Corporation` + String get CompanyDesc { + return Intl.message( + 'About Weifang Public Transportation Corporation', + name: 'CompanyDesc', + desc: '', + args: [], + ); + } + + /// `About weifang Bus` + String get AboutSoftWare { + return Intl.message( + 'About weifang Bus', + name: 'AboutSoftWare', + desc: '', + args: [], + ); + } + + /// `Weifang Bus` + String get SoftWare { + return Intl.message( + 'Weifang Bus', + name: 'SoftWare', + desc: '', + args: [], + ); + } + + /// `Come to the author` + String get Author { + return Intl.message( + 'Come to the author', + name: 'Author', + desc: '', + args: [], + ); + } + + /// `Sorry, I have detected that you have not installed the QQ client` + String get NotInstalledQQ { + return Intl.message( + 'Sorry, I have detected that you have not installed the QQ client', + name: 'NotInstalledQQ', + desc: '', + args: [], + ); + } + + /// `Ok` + String get Ok { + return Intl.message( + 'Ok', + name: 'Ok', + desc: '', + args: [], + ); + } + /// `Language Settings` String get LanguageSettings { return Intl.message( @@ -174,6 +414,226 @@ class S { args: [], ); } + + /// `Appearance Management` + String get AppearanceManagement { + return Intl.message( + 'Appearance Management', + name: 'AppearanceManagement', + desc: '', + args: [], + ); + } + + /// `Follow the system` + String get Auto { + return Intl.message( + 'Follow the system', + name: 'Auto', + desc: '', + args: [], + ); + } + + /// `English` + String get English { + return Intl.message( + 'English', + name: 'English', + desc: '', + args: [], + ); + } + + /// `Chinese` + String get Chinese { + return Intl.message( + 'Chinese', + name: 'Chinese', + desc: '', + args: [], + ); + } + + /// `Japanese` + String get Japanese { + return Intl.message( + 'Japanese', + name: 'Japanese', + desc: '', + args: [], + ); + } + + /// `Selected` + String get Selected { + return Intl.message( + 'Selected', + name: 'Selected', + desc: '', + args: [], + ); + } + + /// `Light` + String get Light { + return Intl.message( + 'Light', + name: 'Light', + desc: '', + args: [], + ); + } + + /// `Dark` + String get Dark { + return Intl.message( + 'Dark', + name: 'Dark', + desc: '', + args: [], + ); + } + + /// `This App was made by the technique of Flutter after personal work. The purpose is to run a bit more modern, I hope you like it😜。` + String get AppDesc { + return Intl.message( + 'This App was made by the technique of Flutter after personal work. The purpose is to run a bit more modern, I hope you like it😜。', + name: 'AppDesc', + desc: '', + args: [], + ); + } + + /// `Special note: The interface is provided by [Weifang Zhangshangbus]. If there is any infringement, please contact me。` + String get SpecialInstructions { + return Intl.message( + 'Special note: The interface is provided by [Weifang Zhangshangbus]. If there is any infringement, please contact me。', + name: 'SpecialInstructions', + desc: '', + args: [], + ); + } + + /// `View Licenses` + String get ViewLicenses { + return Intl.message( + 'View Licenses', + name: 'ViewLicenses', + desc: '', + args: [], + ); + } + + /// `Close` + String get Close { + return Intl.message( + 'Close', + name: 'Close', + desc: '', + args: [], + ); + } + + /// `To view the source code for this application, visit: ` + String get SeeSource { + return Intl.message( + 'To view the source code for this application, visit: ', + name: 'SeeSource', + desc: '', + args: [], + ); + } + + /// `code repository` + String get Repo { + return Intl.message( + 'code repository', + name: 'Repo', + desc: '', + args: [], + ); + } + + /// `Name` + String get Name { + return Intl.message( + 'Name', + name: 'Name', + desc: '', + args: [], + ); + } + + /// `韩塞` + String get NameDesc { + return Intl.message( + '韩塞', + name: 'NameDesc', + desc: '', + args: [], + ); + } + + /// `Age` + String get Age { + return Intl.message( + 'Age', + name: 'Age', + desc: '', + args: [], + ); + } + + /// `25` + String get AgeDesc { + return Intl.message( + '25', + name: 'AgeDesc', + desc: '', + args: [], + ); + } + + /// `City` + String get City { + return Intl.message( + 'City', + name: 'City', + desc: '', + args: [], + ); + } + + /// `ShanDong WeiFang` + String get CityDesc { + return Intl.message( + 'ShanDong WeiFang', + name: 'CityDesc', + desc: '', + args: [], + ); + } + + /// `Phone` + String get Phone { + return Intl.message( + 'Phone', + name: 'Phone', + desc: '', + args: [], + ); + } + + /// `e-mail` + String get EMail { + return Intl.message( + 'e-mail', + name: 'EMail', + desc: '', + args: [], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 36ad272..cf8cb5a 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -11,6 +11,52 @@ "NoNews": "No News", "NoPictures": "No Pictures", "SearchLine": "Search Line", + "SearchHistory": "This is a search record that is about to be perfected", + "RefreshSuccess": "Refresh the success!", + "RequestDataFailure": "Request data failed. Try switching network and retry!", + "NotConnectedToAnyNetwork": "The device is not connected to any network. Please try again after connecting to the network!", + "NewsDate": "yyyy-MM-dd", + "NewsDetail": "News Detail", + "ReleaseTime": "Release Time: ", + "NewsDetailDate": "yyyy-MM-dd HH:mm:ss", + "BackToTop": "Back to top", + "Reversing": "Reversing", + "ReversingComplete": "Reversing Complete", + "ArriveAtStation": "{num} arrive", + "AwayFromTheStation": "{num} leave", + "Loading": "Loading...", "Settings": "Settings", - "LanguageSettings": "Language Settings" + "SettingsDesc": "Perfect regulation is under your control", + "QQGroup": "QQ Group", + "QQGroupDesc": "Join QQ group to exchange feedback", + "Company": "Weifang Public Transportation Corporation", + "CompanyDesc": "About Weifang Public Transportation Corporation", + "AboutSoftWare": "About weifang Bus", + "SoftWare": "Weifang Bus", + "Author": "Come to the author", + "NotInstalledQQ": "Sorry, I have detected that you have not installed the QQ client", + "Ok": "Ok", + "LanguageSettings": "Language Settings", + "AppearanceManagement": "Appearance Management", + "Auto": "Follow the system", + "English": "English", + "Chinese": "Chinese", + "Japanese": "Japanese", + "Selected": "Selected", + "Light": "Light", + "Dark": "Dark", + "AppDesc": "This App was made by the technique of Flutter after personal work. The purpose is to run a bit more modern, I hope you like it\uD83D\uDE1C。", + "SpecialInstructions": "Special note: The interface is provided by [Weifang Zhangshangbus]. If there is any infringement, please contact me。", + "ViewLicenses": "View Licenses", + "Close": "Close", + "SeeSource": "To view the source code for this application, visit: ", + "Repo": "code repository", + "Name": "Name", + "NameDesc": "韩塞", + "Age": "Age", + "AgeDesc": "25", + "City": "City", + "CityDesc": "ShanDong WeiFang", + "Phone": "Phone", + "EMail": "e-mail" } diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index 1df0e02..762f9a7 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -11,6 +11,52 @@ "NoNews": "情報はまだありません", "NoPictures": "写真はしばらくありません", "SearchLine": "経路を探索する", + "SearchHistory": "これは完全な検索記録です", + "RefreshSuccess": "刷新に成功する!", + "RequestDataFailure": "データを要求すること失敗した。ネットワークを切り替えて再試行してください!", + "NotConnectedToAnyNetwork": "設備はどのネットワークにも接続されていません。ネットワークに接続して再試行してください!", + "NewsDate": "yyyy年MM月dd日", + "NewsDetail": "情報詳細", + "ReleaseTime": "リリース時点: ", + "NewsDetailDate": "yyyy年MM月dd日 HH点mm分ss秒", + "BackToTop": "上部に戻る", + "Reversing": "ブラシ", + "ReversingComplete": "交換完了", + "ArriveAtStation": "{num}到着", + "AwayFromTheStation": "{num}离れる", + "Loading": "ローディング中...", "Settings": "セットアップ", - "LanguageSettings": "言語設定" + "SettingsDesc": "完璧にコントロールして、あなたの掌握に尽くします", + "QQGroup": "QQ群", + "QQGroupDesc": "QQ群コミュニケーションフィードバックに参加する", + "Company": "イ坊市公共交通総公司", + "CompanyDesc": "イ坊市公共交通総公司", + "AboutSoftWare": "イ坊バスについて", + "SoftWare": "イ坊バス", + "Author": "作者に近づく", + "NotInstalledQQ": "QQクライアントがインストールされていないことが検出されました", + "Ok": "確定", + "LanguageSettings": "言語設定", + "AppearanceManagement": "外観管理", + "Auto": "システムに追随する", + "English": "英語", + "Chinese": "中文", + "Japanese": "日本語", + "Selected": "選択済み", + "Light": "ライトモード", + "Dark": "暗黒モード", + "AppDesc": "このアプリは個人の仕事の合間にFlutter技術で作成した。目的は現代に向かって一時に行くことです\uD83D\uDE1C。", + "SpecialInstructions": "特に説明:インターフェースは「濰坊掌中バス」より提供されており、もし著作権侵害があるならば、連絡してください。", + "ViewLicenses": "観免許", + "Close": "閉鎖", + "SeeSource": "このアプリケーションのソースコードを見るには、アクセスしてください: ", + "Repo": "コードライブラリ", + "Name": "名前", + "NameDesc": "韩塞", + "Age": "年齢", + "AgeDesc": "25", + "City": "ある都市", + "CityDesc": "山东潍坊", + "Phone": "携帯電話番号", + "EMail": "メール" } diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index 9910f1c..9815c1a 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -11,6 +11,52 @@ "NoNews": "暂无资讯信息", "NoPictures": "暂无图片展示", "SearchLine": "搜索线路", + "SearchHistory": "这是一个即将完善的搜索记录", + "RefreshSuccess": "刷新成功!", + "RequestDataFailure": "请求数据失败,请尝试切换网络后重试!", + "NotConnectedToAnyNetwork": "设备未连接到任何网络,请连接网络后重试!", + "NewsDate": "yyyy年MM月dd日", + "NewsDetail": "资讯详情", + "ReleaseTime": "发布时间: ", + "NewsDetailDate": "yyyy年MM月dd日 HH点mm分ss秒", + "BackToTop": "返回顶部", + "Reversing": "换向", + "ReversingComplete": "换向完成", + "ArriveAtStation": "{num}辆到站", + "AwayFromTheStation": "{num}辆离站", + "Loading": "加载中...", "Settings": "设置", - "LanguageSettings": "语言设置" + "SettingsDesc": "完美调控,尽在您的掌握", + "QQGroup": "QQ群", + "QQGroupDesc": "加入QQ群交流反馈", + "Company": "潍坊市公共交通总公司", + "CompanyDesc": "关于潍坊市公共交通总公司", + "AboutSoftWare": "关于潍坊公交", + "SoftWare": "潍坊公交", + "Author": "走近作者", + "NotInstalledQQ": "抱歉,检测到您还未安装QQ客户端", + "Ok": "确定", + "LanguageSettings": "语言设置", + "AppearanceManagement": "外观管理", + "Auto": "跟随系统", + "English": "英语", + "Chinese": "中文", + "Japanese": "日语", + "Selected": "已选择", + "Light": "浅色模式", + "Dark": "暗黑模式", + "AppDesc": "此 App 是个人工作之余通过 Flutter 技术制作。目的是奔着现代一点去的,希望大家喜欢\uD83D\uDE1C。", + "SpecialInstructions": "特别说明: 接口由【潍坊掌上公交】提供,如有侵权,请联系我。", + "ViewLicenses": "查看许可", + "Close": "关闭", + "SeeSource": "要查看此应用的源代码,请访问: ", + "Repo": "代码库", + "Name": "姓名", + "NameDesc": "韩塞", + "Age": "年龄", + "AgeDesc": "25岁", + "City": "所在城市", + "CityDesc": "山东潍坊", + "Phone": "手机号", + "EMail": "邮件" } diff --git a/lib/util/language_util.dart b/lib/util/language_util.dart index adff762..ab389bf 100644 --- a/lib/util/language_util.dart +++ b/lib/util/language_util.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/sp_util.dart'; import 'package:weifangbus/view/store/locale_provider.dart'; @@ -25,20 +26,21 @@ class LanguageUtil { } /// 展示语言值 - static languageString(LanguagePreference languagePreference) { + static languageString( + BuildContext context, LanguagePreference languagePreference) { var str; switch (languagePreference) { case LanguagePreference.auto: - str = '跟随系统'; + str = S.of(context).Auto; break; case LanguagePreference.en: - str = 'English'; + str = S.of(context).English; break; case LanguagePreference.zh: - str = '中文'; + str = S.of(context).Chinese; break; case LanguagePreference.ja: - str = '日本語'; + str = S.of(context).Japanese; break; } return str; @@ -47,7 +49,7 @@ class LanguageUtil { /// 设置语言 static setLanguage( BuildContext context, LanguagePreference languagePreference) { - var str = languageString(languagePreference); + var str = languageString(context, languagePreference); print('语言切换至: $str'); switch (languagePreference) { case LanguagePreference.auto: diff --git a/lib/util/theme_util.dart b/lib/util/theme_util.dart index 6996501..a70c8d0 100644 --- a/lib/util/theme_util.dart +++ b/lib/util/theme_util.dart @@ -1,3 +1,5 @@ +import 'package:flutter/material.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/appearance.dart'; import 'package:weifangbus/util/sp_util.dart'; @@ -22,17 +24,17 @@ class AppearanceUtil { } /// 展示外观 - static String appearanceStr(Appearance appearance) { + static String appearanceStr(BuildContext context, Appearance appearance) { var str; switch (appearance) { case Appearance.light: - str = '浅色模式'; + str = S.of(context).Light; break; case Appearance.dark: - str = '暗黑模式'; + str = S.of(context).Dark; break; case Appearance.auto: - str = '跟随系统'; + str = S.of(context).Auto; } return str; } diff --git a/lib/view/explore/explore_page.dart b/lib/view/explore/explore_page.dart index b3f20f6..41b50b5 100644 --- a/lib/view/explore/explore_page.dart +++ b/lib/view/explore/explore_page.dart @@ -1,22 +1,24 @@ import 'package:flutter/material.dart'; +import 'package:weifangbus/generated/l10n.dart'; class ExplorePage extends StatefulWidget { @override _ExplorePageState createState() => _ExplorePageState(); } -class _ExplorePageState extends State with AutomaticKeepAliveClientMixin { +class _ExplorePageState extends State + with AutomaticKeepAliveClientMixin { @override Widget build(BuildContext context) { super.build(context); return Scaffold( key: PageStorageKey(_ExplorePageState), appBar: AppBar( - title: Text("发现"), + title: Text(S.of(context).Explore), centerTitle: true, ), body: Center( - child: Text("探索"), + child: Text(S.of(context).Explore), ), ); } diff --git a/lib/view/home/guide/guide.dart b/lib/view/home/guide/guide.dart index ad11859..ff0ffbd 100644 --- a/lib/view/home/guide/guide.dart +++ b/lib/view/home/guide/guide.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:weifangbus/generated/l10n.dart'; class Guide extends StatefulWidget { @override @@ -10,11 +11,11 @@ class _GuideState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("导乘"), + title: Text(S.of(context).Guide), ), body: Container( child: Center( - child: Text("导乘"), + child: Text(S.of(context).Guide), ), ), ); diff --git a/lib/view/home/home_page.dart b/lib/view/home/home_page.dart index eae63a0..a9842c9 100644 --- a/lib/view/home/home_page.dart +++ b/lib/view/home/home_page.dart @@ -223,7 +223,10 @@ class _HomePageState extends State highlightColor: Colors.blue[700], colorBrightness: Brightness.dark, splashColor: Colors.grey, - child: Text("请检查网络连接后重试"), + child: AutoSizeText( + S.of(context).RequestDataFailure, + maxLines: 2, + ), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20.0), ), @@ -262,7 +265,7 @@ class _HomePageState extends State /// 资讯信息 Widget infoShowWidget() { var currentLocale = Intl.getCurrentLocale(); - print('current locale: $currentLocale'); + // print('current locale: $currentLocale'); return Container( child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/view/home/line/route_detail.dart b/lib/view/home/line/route_detail.dart index 92d7167..e4ffc72 100644 --- a/lib/view/home/line/route_detail.dart +++ b/lib/view/home/line/route_detail.dart @@ -13,6 +13,7 @@ import 'package:weifangbus/entity/line/station_real_time_info_entity.dart'; import 'package:weifangbus/entity/route_stat_data_entity.dart'; import 'package:weifangbus/entity_factory.dart'; import 'package:weifangbus/generated/json/base/json_convert_content.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/dio_util.dart'; import 'package:weifangbus/util/request_params_util.dart'; import 'package:weifangbus/widget/route_header.dart'; @@ -225,7 +226,9 @@ class _RouteDetailState extends State color: Colors.green, ), AutoSizeText( - '${element.stopBusStaNum}辆到站', + S + .of(context) + .ArriveAtStation('${element.stopBusStaNum}'), style: TextStyle( fontSize: 30.ssp, ), @@ -245,7 +248,8 @@ class _RouteDetailState extends State color: Colors.red, ), AutoSizeText( - '${element.expArriveBusStaNum}辆离站', + S.of(context).AwayFromTheStation( + '${element.expArriveBusStaNum}'), style: TextStyle( fontSize: 30.ssp, ), @@ -382,10 +386,10 @@ class _RouteDetailState extends State Icons.info_outlined, ), title: AutoSizeText( - '加载中...', + S.of(context).Loading, ), subtitle: AutoSizeText( - '加载中...', + S.of(context).Loading, ), ); }, @@ -454,7 +458,7 @@ class _RouteDetailState extends State highlightColor: Colors.blue[700], colorBrightness: Brightness.dark, splashColor: Colors.grey, - child: Text("请检查网络连接后点击重试"), + child: Text(S.of(context).RequestDataFailure), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20.0), ), @@ -501,7 +505,7 @@ class _RouteDetailState extends State SnackBar( duration: Duration(seconds: 5), content: Text( - '换向完毕', + S.of(context).ReversingComplete, textAlign: TextAlign.center, ), ), diff --git a/lib/view/home/news/news_detail.dart b/lib/view/home/news/news_detail.dart index 74b4401..f580d70 100644 --- a/lib/view/home/news/news_detail.dart +++ b/lib/view/home/news/news_detail.dart @@ -4,6 +4,7 @@ import 'package:flutter_html/style.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:intl/intl.dart'; import 'package:weifangbus/entity/headline_entity.dart'; +import 'package:weifangbus/generated/l10n.dart'; class InformationDetail extends StatefulWidget { final Headline headLine; @@ -18,7 +19,9 @@ class InformationDetail extends StatefulWidget { class _InformationDetail extends State { ScrollController _controller = ScrollController(); - bool showToTopBtn = false; // 是否显示“返回到顶部”按钮 + + // 是否显示“返回到顶部”按钮 + bool showToTopBtn = false; @override void initState() { @@ -50,7 +53,7 @@ class _InformationDetail extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("资讯详情"), + title: Text(S.of(context).NewsDetail), ), body: Container( child: Column( @@ -81,8 +84,8 @@ class _InformationDetail extends State { top: 31.h, ), child: Text( - '发布时间: ' + - DateFormat("yyyy年MM月dd日 HH点mm分ss秒") + S.of(context).ReleaseTime + + DateFormat(S.of(context).NewsDetailDate) .format(DateTime.parse( widget.headLine.realeasedatetime)) .toString(), @@ -116,7 +119,7 @@ class _InformationDetail extends State { ? null : FloatingActionButton( child: Icon(Icons.arrow_upward), - tooltip: "返回顶部", + tooltip: S.of(context).BackToTop, onPressed: () { // 返回到顶部时执行动画 _controller.animateTo(.0, diff --git a/lib/view/home/news/news_list.dart b/lib/view/home/news/news_list.dart index c477bd0..ac165c1 100644 --- a/lib/view/home/news/news_list.dart +++ b/lib/view/home/news/news_list.dart @@ -7,6 +7,7 @@ import 'package:flutter_easyrefresh/phoenix_header.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/view/home/news/news_detail.dart'; import 'package:weifangbus/view/store/news_model.dart'; @@ -47,7 +48,7 @@ class _NewsListPageState extends State { .map((e) => ListTile( trailing: Icon(Icons.keyboard_arrow_right), title: Text( - DateFormat("yyyy年MM月dd日") + DateFormat(S.of(context).NewsDate) .format(DateTime.parse(e.realeasetime)) .toString(), style: TextStyle( @@ -81,7 +82,7 @@ class _NewsListPageState extends State { return Scaffold( key: _newsListKey, appBar: AppBar( - title: Text("资讯列表"), + title: Text(S.of(context).News), ), body: EasyRefresh.custom( header: PhoenixHeader(), @@ -91,13 +92,13 @@ class _NewsListPageState extends State { if (connectivityResult != ConnectivityResult.none) { try { context.read().refreshNewsList(); - showSnackBar('刷新成功!'); + showSnackBar(S.of(context).RefreshSuccess); } catch (e) { print('刷新资讯信息出错::: $e'); - showSnackBar('请求数据失败,请尝试切换网络后重试!'); + showSnackBar(S.of(context).RequestDataFailure); } } else { - showSnackBar('设备未连接到任何网络,请连接网络后重试!'); + showSnackBar(S.of(context).NotConnectedToAnyNetwork); } }, emptyWidget: noData diff --git a/lib/view/home/searchbar/search_input.dart b/lib/view/home/searchbar/search_input.dart index 7718d6a..9b1b74d 100644 --- a/lib/view/home/searchbar/search_input.dart +++ b/lib/view/home/searchbar/search_input.dart @@ -274,8 +274,8 @@ class _History extends State { @override Widget build(BuildContext context) { return Center( - child: Text( - "这是一个即将完善的搜索记录", + child: AutoSizeText( + S.of(context).SearchHistory, ), ); } diff --git a/lib/view/more/about_company.dart b/lib/view/more/about_company.dart index bbaab6e..a073e94 100644 --- a/lib/view/more/about_company.dart +++ b/lib/view/more/about_company.dart @@ -7,6 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:weifangbus/entity/install_basic_info_entity.dart'; import 'package:weifangbus/entity_factory.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/dio_util.dart'; import 'package:weifangbus/util/request_params_util.dart'; @@ -22,7 +23,7 @@ class _AboutCompanyState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("潍坊市公共交通总公司"), + title: Text(S.of(context).Company), ), body: FutureBuilder( future: _installBasicInfoFuture, diff --git a/lib/view/more/about_me.dart b/lib/view/more/about_me.dart index 1a89604..495e530 100644 --- a/lib/view/more/about_me.dart +++ b/lib/view/more/about_me.dart @@ -3,6 +3,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/font_util.dart'; /// 关于我 @@ -59,13 +60,13 @@ class _AboutMeState extends State { color: Colors.white, ), title: Text( - '姓名', + S.of(context).Name, style: TextStyle( color: Colors.white, ), ), subtitle: Text( - '韩塞', + S.of(context).NameDesc, style: TextStyle( color: Colors.white, ), @@ -77,13 +78,13 @@ class _AboutMeState extends State { color: Colors.green, ), title: Text( - '年龄', + S.of(context).Age, style: TextStyle( color: Colors.white, ), ), subtitle: Text( - '25岁', + S.of(context).AgeDesc, style: TextStyle( color: Colors.white, ), @@ -95,13 +96,13 @@ class _AboutMeState extends State { color: Colors.green, ), title: Text( - '所在城市', + S.of(context).City, style: TextStyle( color: Colors.white, ), ), subtitle: Text( - '山东潍坊', + S.of(context).CityDesc, style: TextStyle( color: Colors.white, ), @@ -123,7 +124,7 @@ class _AboutMeState extends State { color: Colors.white, ), title: Text( - '添加QQ', + 'QQ', style: TextStyle( color: Colors.white, ), @@ -174,7 +175,7 @@ class _AboutMeState extends State { color: Colors.white, ), title: Text( - '手机号', + S.of(context).Phone, style: TextStyle( color: Colors.white, ), @@ -195,7 +196,7 @@ class _AboutMeState extends State { color: Colors.white, ), title: Text( - '邮件', + S.of(context).EMail, style: TextStyle( color: Colors.white, ), diff --git a/lib/view/more/about_software.dart b/lib/view/more/about_software.dart index 0992089..30f542f 100644 --- a/lib/view/more/about_software.dart +++ b/lib/view/more/about_software.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:package_info/package_info.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'package:weifangbus/generated/l10n.dart'; /// 关于软件 void showAboutSoftWareDialog(BuildContext context) { @@ -27,10 +28,10 @@ class _AboutDialog extends StatelessWidget { final textTheme = Theme.of(context).textTheme; final bodyTextStyle = textTheme.bodyText1; - final name = '潍坊公交'; + final name = S.of(context).SoftWare; final legalese = '© 2019 hanandjun'; - final seeSourceFirst = '要查看此应用的源代码,请访问'; - final repoText = 'weifangbus GitHub 代码库'; + final seeSourceFirst = S.of(context).SeeSource; + final repoText = 'weifangbus GitHub ' + S.of(context).Repo; final seeSourceSecond = '。'; return AlertDialog( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), @@ -49,12 +50,12 @@ class _AboutDialog extends StatelessWidget { ), const SizedBox(height: 24), Text( - '此 App 是个人工作之余通过 Flutter 技术制作。目的是奔着现代一点去的,希望大家喜欢😜。', + S.of(context).AppDesc, style: bodyTextStyle, ), const SizedBox(height: 10), Text( - '特别说明: 接口由【潍坊掌上公交】提供,如有侵权,请联系我。', + S.of(context).SpecialInstructions, style: bodyTextStyle, ), const SizedBox(height: 10), @@ -100,7 +101,7 @@ class _AboutDialog extends StatelessWidget { FlatButton( textColor: colorScheme.primary, child: Text( - '查看许可', + S.of(context).ViewLicenses, ), onPressed: () { Navigator.of(context).push(MaterialPageRoute( @@ -113,7 +114,7 @@ class _AboutDialog extends StatelessWidget { ), FlatButton( textColor: colorScheme.primary, - child: Text('关闭'), + child: Text(S.of(context).Close), onPressed: () { Navigator.pop(context); }, diff --git a/lib/view/more/more_page.dart b/lib/view/more/more_page.dart index b65de87..3036321 100644 --- a/lib/view/more/more_page.dart +++ b/lib/view/more/more_page.dart @@ -5,6 +5,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/font_util.dart'; import 'package:weifangbus/view/more/about_company.dart'; import 'package:weifangbus/view/more/about_me.dart'; @@ -35,8 +36,8 @@ class _MorePageState extends State Icons.settings, color: Colors.blueGrey, ), - title: Text('设置'), - subtitle: Text('完美调控,尽在您的掌握'), + title: Text(S.of(context).Settings), + subtitle: Text(S.of(context).SettingsDesc), onTap: () { Navigator.of(context).push( MaterialPageRoute( @@ -53,8 +54,8 @@ class _MorePageState extends State MyIcons.qq, color: Colors.indigoAccent, ), - title: Text('QQ群'), - subtitle: Text('加入QQ群交流反馈'), + title: Text(S.of(context).QQGroup), + subtitle: Text(S.of(context).QQGroupDesc), onTap: () { _joinQQGroup(context); }, @@ -65,8 +66,8 @@ class _MorePageState extends State Icons.business, color: Colors.brown, ), - title: Text('潍坊市公共交通总公司'), - subtitle: Text('关于潍坊市公共交通总公司'), + title: Text(S.of(context).Company), + subtitle: Text(S.of(context).CompanyDesc), onTap: () { Navigator.of(context).push( MaterialPageRoute( @@ -83,7 +84,7 @@ class _MorePageState extends State MyIcons.software, color: Colors.black87, ), - title: Text('关于潍坊公交'), + title: Text(S.of(context).AboutSoftWare), onTap: () { showAboutSoftWareDialog(context); }, @@ -94,7 +95,7 @@ class _MorePageState extends State Icons.info, color: Colors.lightBlue, ), - title: Text('走近作者'), + title: Text(S.of(context).Author), // describe: "走近作者", onTap: () { Navigator.of(context).push( @@ -110,7 +111,7 @@ class _MorePageState extends State super.build(context); return Scaffold( appBar: AppBar( - title: Text('更多'), + title: Text(S.of(context).More), centerTitle: true, ), body: Container( @@ -139,14 +140,14 @@ class _MorePageState extends State content: Container( width: 1.sw, child: AutoSizeText( - "抱歉,检测到您还未安装QQ客户端!", + S.of(context).NotInstalledQQ, maxLines: 2, overflow: TextOverflow.ellipsis, ), ), actions: [ FlatButton( - child: Text('确定'), + child: Text(S.of(context).Ok), onPressed: () { Navigator.of(context).pop(); }, diff --git a/lib/view/more/settings/language_settings.dart b/lib/view/more/settings/language_settings.dart index 51151c9..15c9518 100644 --- a/lib/view/more/settings/language_settings.dart +++ b/lib/view/more/settings/language_settings.dart @@ -33,12 +33,14 @@ class _LanguageSettingsState extends State { var tiles = LanguagePreference.values .map((e) => ListTile( title: Text( - LanguageUtil.languageString(e), + LanguageUtil.languageString(context, e), ), onTap: () { _showAndSetLanguage(context, e); }, - trailing: _languagePreference == e ? Text('已选择') : SizedBox(), + trailing: _languagePreference == e + ? Text(S.of(context).Selected) + : SizedBox(), )) .toList(); diff --git a/lib/view/more/settings/settings.dart b/lib/view/more/settings/settings.dart index 6fe976e..5c71def 100644 --- a/lib/view/more/settings/settings.dart +++ b/lib/view/more/settings/settings.dart @@ -41,7 +41,7 @@ class _SettingsState extends State { } return Scaffold( appBar: AppBar( - title: Text("设置"), + title: Text(S.of(context).Settings), ), body: ListView( children: ListTile.divideTiles( @@ -52,7 +52,7 @@ class _SettingsState extends State { Icons.nights_stay, color: Colors.blue, ), - title: Text('外观管理'), + title: Text(S.of(context).AppearanceManagement), onTap: () { Navigator.push( context, @@ -63,7 +63,8 @@ class _SettingsState extends State { ), ); }, - trailing: Text(AppearanceUtil.appearanceStr(_appearance)), + trailing: + Text(AppearanceUtil.appearanceStr(context, _appearance)), ), ListTile( leading: Icon( @@ -81,7 +82,8 @@ class _SettingsState extends State { ), ); }, - trailing: Text(LanguageUtil.languageString(_languagePreference)), + trailing: Text( + LanguageUtil.languageString(context, _languagePreference)), ), ], ).toList(), diff --git a/lib/view/more/settings/theme_manager.dart b/lib/view/more/settings/theme_manager.dart index f9f45ee..7a2a6e9 100644 --- a/lib/view/more/settings/theme_manager.dart +++ b/lib/view/more/settings/theme_manager.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:weifangbus/generated/l10n.dart'; import 'package:weifangbus/util/appearance.dart'; import 'package:weifangbus/util/theme_util.dart'; import 'package:weifangbus/view/store/appearance_provider.dart'; @@ -29,7 +30,7 @@ class _AppearanceManagerState extends State { /// 展示和设置外观 _showAndSetAppearance(BuildContext context, Appearance appearance) { - print('外观切换至: ${AppearanceUtil.appearanceStr(appearance)}'); + print('外观切换至: ${AppearanceUtil.appearanceStr(context, appearance)}'); AppearanceUtil.saveAppearance(appearance); setState(() { _appearance = appearance; @@ -42,12 +43,13 @@ class _AppearanceManagerState extends State { var tiles = Appearance.values .map((e) => ListTile( title: Text( - AppearanceUtil.appearanceStr(e), + AppearanceUtil.appearanceStr(context, e), ), onTap: () { _showAndSetAppearance(context, e); }, - trailing: _appearance == e ? Text('已选择') : SizedBox(), + trailing: + _appearance == e ? Text(S.of(context).Selected) : SizedBox(), )) .toList(); return Scaffold( diff --git a/lib/widget/route_header.dart b/lib/widget/route_header.dart index 7797992..e3f1094 100644 --- a/lib/widget/route_header.dart +++ b/lib/widget/route_header.dart @@ -1,6 +1,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:weifangbus/generated/l10n.dart'; /// 线路详情头部信息 class RouteHeader extends StatefulWidget { @@ -106,8 +107,9 @@ class _RouteHeaderState extends State { Icon( Icons.swap_vert_sharp, ), - Text( - '换向', + AutoSizeText( + S.of(context).Reversing, + maxLines: 1, ), ], ),