Skip to content

Commit 470975d

Browse files
committed
多语言切换
1 parent 03769eb commit 470975d

File tree

7 files changed

+133
-251
lines changed

7 files changed

+133
-251
lines changed

lib/common/localization/DefaultLocalizations.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ class GSYLocalizations {
1616
};
1717

1818
GSYStringBase get currentLocalized {
19-
print("++++++++++++++++++++++++++++++++++");
20-
print(locale.languageCode);
21-
print("++++++++++++++++++++++++++++++++++");
2219
return _localizedValues[locale.languageCode];
2320
}
2421

lib/common/style/GSYStringBase.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,8 @@ abstract class GSYStringBase {
213213
String user_profile_org;
214214
String user_profile_location;
215215
String user_profile_info;
216+
217+
String search_type;
218+
String search_sort;
219+
String search_language;
216220
}

lib/common/style/GSYStringEn.dart

Lines changed: 117 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -12,101 +12,101 @@ class GSYStringEn extends GSYStringBase {
1212
String app_name = "GSYGithubAppFlutter";
1313

1414
@override
15-
String app_ok = "确定";
15+
String app_ok = "ok";
1616
@override
17-
String app_cancel = "取消";
17+
String app_cancel = "cancel";
1818
@override
19-
String app_empty = "目前什么也没有哟";
19+
String app_empty = "Empty(o゚▽゚)o";
2020
@override
21-
String app_licenses = "协议";
21+
String app_licenses = "licenses";
2222
@override
23-
String app_close = "关闭";
23+
String app_close = "close";
2424
@override
25-
String app_version = "版本";
25+
String app_version = "version";
2626
@override
27-
String app_back_tip = "确定要退出应用?";
27+
String app_back_tip = "Exit?";
2828

2929
@override
30-
String app_not_new_version = "当前没有新版本";
30+
String app_not_new_version = "No new version.";
3131
@override
32-
String app_version_title = "版本更新";
32+
String app_version_title = "Update Version";
3333

3434
@override
35-
String nothing_now = "目前什么都没有。";
35+
String nothing_now = "Nothing";
3636
@override
37-
String loading_text = "努力加载中···";
37+
String loading_text = "Loading···";
3838

3939
@override
40-
String option_web = "浏览器打开";
40+
String option_web = "open browser";
4141
@override
42-
String option_copy = "复制链接";
42+
String option_copy = "copy";
4343
@override
44-
String option_share = "分享";
44+
String option_share = "share";
4545
@override
46-
String option_web_launcher_error = "url异常";
46+
String option_web_launcher_error = "url error";
4747
@override
48-
String option_share_title = "分享自GSYGitHubFlutter: ";
48+
String option_share_title = "share form GSYGitHubFlutter: ";
4949
@override
50-
String option_share_copy_success = "已经复制到粘贴板";
50+
String option_share_copy_success = "Copy Success";
5151

5252
@override
53-
String login_text = "登录";
53+
String login_text = "Login";
5454

5555
@override
56-
String Login_out = "退出登录";
56+
String Login_out = "Logout";
5757

5858
@override
59-
String home_reply = "问题反馈";
59+
String home_reply = "Feedback";
6060
@override
6161
String home_about = "About";
6262
@override
63-
String home_check_update = "检测更新";
63+
String home_check_update = "CheckUpdate";
6464
@override
65-
String home_history = "阅读历史";
65+
String home_history = "History";
6666
@override
67-
String home_user_info = "个人信息";
67+
String home_user_info = "Profile";
6868
@override
69-
String home_change_theme = "切换主题";
69+
String home_change_theme = "Theme";
7070

7171
@override
72-
String home_theme_default = "默认主题";
72+
String home_theme_default = "Default";
7373
@override
74-
String home_theme_1 = "主题1";
74+
String home_theme_1 = "Theme1";
7575
@override
76-
String home_theme_2 = "主题2";
76+
String home_theme_2 = "Theme2";
7777
@override
78-
String home_theme_3 = "主题3";
78+
String home_theme_3 = "Theme3";
7979
@override
80-
String home_theme_4 = "主题4";
80+
String home_theme_4 = "Theme4";
8181
@override
82-
String home_theme_5 = "主题5";
82+
String home_theme_5 = "Theme5";
8383
@override
84-
String home_theme_6 = "主题6";
84+
String home_theme_6 = "Theme6";
8585

8686
@override
87-
String login_username_hint_text = "请输入github用户名";
87+
String login_username_hint_text = "username";
8888
@override
89-
String login_password_hint_text = "请输入密码";
89+
String login_password_hint_text = "password";
9090
@override
91-
String login_success = "登录成功";
91+
String login_success = "Login Success";
9292

9393
@override
94-
String network_error_401 = "[401错误可能: 未授权 \\ 授权登录失败 \\ 登录过期]";
94+
String network_error_401 = "Http 401";
9595
@override
96-
String network_error_403 = "403权限错误";
96+
String network_error_403 = "Http 403";
9797
@override
98-
String network_error_404 = "404错误";
98+
String network_error_404 = "Http 404";
9999
@override
100-
String network_error_timeout = "请求超时";
100+
String network_error_timeout = "Http timeout";
101101
@override
102-
String network_error_unknown = "其他异常";
102+
String network_error_unknown = "Http unknown error";
103103
@override
104-
String network_error = "网络错误";
104+
String network_error = "network error";
105105

106106
@override
107-
String load_more_not = "没有更多数据";
107+
String load_more_not = "nothing";
108108
@override
109-
String load_more_text = "正在加载更多";
109+
String load_more_text = "loading";
110110

111111
@override
112112
String home_dynamic = "Dynamic";
@@ -116,149 +116,156 @@ class GSYStringEn extends GSYStringBase {
116116
String home_my = "My";
117117

118118
@override
119-
String trend_day = '今日';
119+
String trend_day = 'today';
120120
@override
121-
String trend_week = '本周';
121+
String trend_week = 'week';
122122
@override
123-
String trend_month = '本月';
123+
String trend_month = 'month';
124124
@override
125-
String trend_all = '全部';
125+
String trend_all = 'all';
126126

127127
@override
128128
String user_tab_repos = "repos";
129129
@override
130-
String user_tab_fans = "粉丝";
130+
String user_tab_fans = "fan";
131131
@override
132-
String user_tab_focus = "关注";
132+
String user_tab_focus = "focus";
133133
@override
134-
String user_tab_star = "星标";
134+
String user_tab_star = "star";
135135
@override
136-
String user_tab_honor = "荣耀";
136+
String user_tab_honor = "honor";
137137
@override
138-
String user_dynamic_group = "组织成员";
138+
String user_dynamic_group = "Members;";
139139
@override
140-
String user_dynamic_title = "个人动态";
140+
String user_dynamic_title = "Dynamic";
141141
@override
142-
String user_focus = "已关注";
142+
String user_focus = "Focused";
143143
@override
144-
String user_un_focus = "关注";
144+
String user_un_focus = "Focus";
145145
@override
146-
String user_focus_no_support = "不支持关注组织。";
146+
String user_focus_no_support = "Not Support。";
147147
@override
148-
String user_create_at = "创建于:";
148+
String user_create_at = "Create at:";
149149
@override
150-
String user_orgs_title = "所在组织";
150+
String user_orgs_title = "organization";
151151

152152
@override
153-
String repos_tab_readme = "详情";
153+
String repos_tab_readme = "readme";
154154
@override
155-
String repos_tab_info = "动态";
155+
String repos_tab_info = "info";
156156
@override
157-
String repos_tab_file = "文件";
157+
String repos_tab_file = "file";
158158
@override
159-
String repos_tab_issue = "ISSUE";
159+
String repos_tab_issue = "issue";
160160
@override
161-
String repos_tab_activity = "动态";
161+
String repos_tab_activity = "activity";
162162
@override
163-
String repos_tab_commits = "提交";
163+
String repos_tab_commits = "commits";
164164
@override
165-
String repos_tab_issue_all = "所有";
165+
String repos_tab_issue_all = "all";
166166
@override
167-
String repos_tab_issue_open = "打开";
167+
String repos_tab_issue_open = "open";
168168
@override
169-
String repos_tab_issue_closed = "关闭";
169+
String repos_tab_issue_closed = "close";
170170
@override
171-
String repos_option_release = "版本";
171+
String repos_option_release = "release";
172172
@override
173-
String repos_fork_at = "Fork于 ";
173+
String repos_fork_at = "Fork at ";
174174
@override
175-
String repos_create_at = "创建于 ";
175+
String repos_create_at = "create at ";
176176
@override
177-
String repos_last_commit = "最后提交于 ";
177+
String repos_last_commit = "last commit at ";
178178
@override
179-
String repos_all_issue_count = "所有Issue数:";
179+
String repos_all_issue_count = "all Issue:";
180180
@override
181-
String repos_open_issue_count = "开启Issue数:";
181+
String repos_open_issue_count = "open Issue:";
182182
@override
183-
String repos_close_issue_count = "关闭Issue数:";
183+
String repos_close_issue_count = "close Issue:";
184184

185185
@override
186-
String repos_issue_search = "搜索";
186+
String repos_issue_search = "Search";
187187

188188
@override
189-
String issue_reply = "回复";
189+
String issue_reply = "reply";
190190
@override
191-
String issue_edit = "编辑";
191+
String issue_edit = "edit";
192192
@override
193-
String issue_open = "打开";
193+
String issue_open = "open";
194194
@override
195-
String issue_close = "关闭";
195+
String issue_close = "close";
196196
@override
197-
String issue_lock = "锁定";
197+
String issue_lock = "lock";
198198
@override
199-
String issue_unlock = "解锁";
199+
String issue_unlock = "unlock";
200200
@override
201-
String issue_reply_issue = "回复Issue";
201+
String issue_reply_issue = "reply Issue";
202202
@override
203-
String issue_commit_issue = "提交Issue";
203+
String issue_commit_issue = "commit Issue";
204204
@override
205-
String issue_edit_issue = "编译Issue";
205+
String issue_edit_issue = "edit issue";
206206
@override
207-
String issue_edit_issue_commit = "编译回复";
207+
String issue_edit_issue_commit = "edit reply";
208208
@override
209-
String issue_edit_issue_edit_commit = "编辑";
209+
String issue_edit_issue_edit_commit = "Edit";
210210
@override
211-
String issue_edit_issue_delete_commit = "删除";
211+
String issue_edit_issue_delete_commit = "Delete";
212212
@override
213-
String issue_edit_issue_copy_commit = "复制";
213+
String issue_edit_issue_copy_commit = "Copy";
214214
@override
215-
String issue_edit_issue_content_not_be_null = "内容不能为空";
215+
String issue_edit_issue_content_not_be_null = "Could't not be empty";
216216
@override
217-
String issue_edit_issue_title_not_be_null = "标题不能为空";
217+
String issue_edit_issue_title_not_be_null = "Could't not be empty";
218218
@override
219-
String issue_edit_issue_title_tip = "请输入标题";
219+
String issue_edit_issue_title_tip = "please input title";
220220
@override
221-
String issue_edit_issue_content_tip = "请输入内容";
221+
String issue_edit_issue_content_tip = "please input content";
222222

223223
@override
224-
String notify_title = "通知";
224+
String notify_title = "Notify";
225225
@override
226-
String notify_tab_all = "所有";
226+
String notify_tab_all = "all";
227227
@override
228-
String notify_tab_part = "参与";
228+
String notify_tab_part = "part";
229229
@override
230-
String notify_tab_unread = "未读";
230+
String notify_tab_unread = "unread";
231231
@override
232-
String notify_unread = "未读";
232+
String notify_unread = "unread";
233233
@override
234-
String notify_readed = "已读";
234+
String notify_readed = "read";
235235
@override
236-
String notify_status = "状态";
236+
String notify_status = "status";
237237
@override
238-
String notify_type = "类型";
238+
String notify_type = "type";
239239

240240
@override
241-
String search_title = "搜索";
241+
String search_title = "Search";
242242
@override
243-
String search_tab_repos = "仓库";
243+
String search_tab_repos = "Repos";
244244
@override
245-
String search_tab_user = "用户";
245+
String search_tab_user = "User";
246246

247247
@override
248-
String release_tab_release = "版本";
248+
String release_tab_release = "Release";
249249
@override
250-
String release_tab_tag = "标记";
250+
String release_tab_tag = "Tag";
251251

252252
@override
253-
String user_profile_name = "名字";
253+
String user_profile_name = "name";
254254
@override
255-
String user_profile_email = "邮箱";
255+
String user_profile_email = "email";
256256
@override
257-
String user_profile_link = "链接";
257+
String user_profile_link = "link";
258258
@override
259-
String user_profile_org = "公司";
259+
String user_profile_org = "company";
260260
@override
261-
String user_profile_location = "位置";
261+
String user_profile_location = "location";
262262
@override
263-
String user_profile_info = "简介";
263+
String user_profile_info = "info";
264+
265+
@override
266+
String search_type = "type";
267+
@override
268+
String search_sort = "sort";
269+
@override
270+
String search_language = "language";
264271
}

0 commit comments

Comments
 (0)