Skip to content

Commit f48f6ec

Browse files
committed
Merge pull request chentao0707#32 from iluhcm/dev
Add support to english.
2 parents b384ef0 + 691722c commit f48f6ec

13 files changed

Lines changed: 220 additions & 68 deletions

File tree

app/src/main/java/com/github/obsessive/simplifyreader/interactor/impl/ImagesContainerInteractorImpl.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ public class ImagesContainerInteractorImpl implements CommonContainerInteractor
3535
@Override
3636
public List<BaseEntity> getCommonCategoryList(Context context) {
3737
List<BaseEntity> resultData = new ArrayList<>();
38-
String[] imagesCategoryArray = context.getResources().getStringArray(R.array.images_category_list);
39-
resultData.add(new BaseEntity(imagesCategoryArray[0], imagesCategoryArray[0]));
40-
resultData.add(new BaseEntity(imagesCategoryArray[1], imagesCategoryArray[1]));
41-
resultData.add(new BaseEntity(imagesCategoryArray[2], imagesCategoryArray[2]));
42-
resultData.add(new BaseEntity(imagesCategoryArray[3], imagesCategoryArray[3]));
43-
resultData.add(new BaseEntity(imagesCategoryArray[4], imagesCategoryArray[4]));
44-
resultData.add(new BaseEntity(imagesCategoryArray[5], imagesCategoryArray[5]));
38+
String[] imagesCategoryArrayId = context.getResources().getStringArray(R.array.images_category_list_id);
39+
String[] imagesCategoryArrayName = context.getResources().getStringArray(R.array.images_category_list_name);
40+
resultData.add(new BaseEntity(imagesCategoryArrayId[0], imagesCategoryArrayName[0]));
41+
resultData.add(new BaseEntity(imagesCategoryArrayId[1], imagesCategoryArrayName[1]));
42+
resultData.add(new BaseEntity(imagesCategoryArrayId[2], imagesCategoryArrayName[2]));
43+
resultData.add(new BaseEntity(imagesCategoryArrayId[3], imagesCategoryArrayName[3]));
44+
resultData.add(new BaseEntity(imagesCategoryArrayId[4], imagesCategoryArrayName[4]));
45+
resultData.add(new BaseEntity(imagesCategoryArrayId[5], imagesCategoryArrayName[5]));
4546
return resultData;
4647
}
4748
}

app/src/main/java/com/github/obsessive/simplifyreader/ui/fragment/ImagesListFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class ImagesListFragment extends BaseFragment implements ImagesListView,
8080
@Override
8181
public void onCreate(Bundle savedInstanceState) {
8282
super.onCreate(savedInstanceState);
83-
mCurrentImagesCategory = getResources().getStringArray(R.array.images_category_list)[0];
83+
mCurrentImagesCategory = getResources().getStringArray(R.array.images_category_list_id)[0];
8484
}
8585

8686
@Override

app/src/main/res/layout/activity_splash.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
android:layout_width="wrap_content"
3434
android:layout_height="wrap_content"
3535
android:text="@string/app_name"
36-
android:textSize="60sp"
36+
android:textSize="50sp"
3737
android:textStyle="bold"
3838
android:textColor="@android:color/white"
3939
android:layout_centerHorizontal="true"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License”);
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
17+
<resources>
18+
19+
<array name="navigation_list">
20+
<item>图片浏览</item>
21+
<item>视频爽看</item>
22+
<item>音乐轻听</item>
23+
</array>
24+
25+
<array name="news_category_list">
26+
<item>头条</item>
27+
<item>汽车</item>
28+
<item>房产</item>
29+
<item>科技</item>
30+
<item>星座</item>
31+
<item>旅游</item>
32+
<item>时尚</item>
33+
<item>娱乐</item>
34+
</array>
35+
36+
<array name="images_category_list_id">
37+
<item>美女</item>
38+
<item>动漫</item>
39+
<item>明星</item>
40+
<item>汽车</item>
41+
<item>摄影</item>
42+
<item>美食</item>
43+
</array>
44+
45+
<array name="images_category_list_name">
46+
<item>美女</item>
47+
<item>动漫</item>
48+
<item>明星</item>
49+
<item>汽车</item>
50+
<item>摄影</item>
51+
<item>美食</item>
52+
</array>
53+
54+
<array name="videos_category_list">
55+
<item>热门</item>
56+
<item>搞笑</item>
57+
<item>动漫</item>
58+
<item>综艺</item>
59+
</array>
60+
61+
<array name="about_list">
62+
<item>当前版本</item>
63+
<item>关于作者</item>
64+
<item>项目主页</item>
65+
<item>项目介绍</item>
66+
<item>开源项目说明</item>
67+
</array>
68+
</resources>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name">简阅</string>
4+
<string name="drawer_open">DrawerOpen</string>
5+
<string name="drawer_close">DrawerClose</string>
6+
<string name="menu_capture">扫一扫</string>
7+
<string name="menu_about_us">关于我们</string>
8+
<string name="menu_feedback">意见反馈</string>
9+
<string name="splash_copyright">Copyright &#169; 2015 SimplifyReader All Rights Reserved\nPowered by Obsessive and Chris</string>
10+
<string name="splash_slogan">看尽生活中的点滴</string>
11+
<string name="splash_version">V %1$s</string>
12+
<string name="double_click_exit">再按一次退出</string>
13+
<string name="common_load_more_end">没有更多了</string>
14+
<string name="feedback_welcome_info">感谢您提出反馈意见,我会尽快回复</string>
15+
16+
<!-- Video Play-->
17+
<string name="player_title">视频播放</string>
18+
<string name="player_view_count">观看次数\t</string>
19+
<string name="player_favor_count">收藏次数\t</string>
20+
<string name="player_comment_count">评论次数\t</string>
21+
<string name="player_publish">发布于\t</string>
22+
<string name="player_tags">标签</string>
23+
24+
<string name="btn_history">历史</string>
25+
<string name="btn_picture">图片</string>
26+
<string name="btn_light">灯光</string>
27+
<string name="btn_ok">确定</string>
28+
<string name="qrcode">二维码</string>
29+
<string name="barcode">条形码</string>
30+
<string name="tips_open_camera_error">打开相机失败,请确保允许应用使用相机权限后重试!</string>
31+
<string name="tips_decode_null">未解析到任何数据</string>
32+
33+
<string name="title_image_picker">本地相册</string>
34+
<string name="UMUpdateCheck">2.6.0.1.20150312</string>
35+
<string name="error_image_load_fail">图片下载失败</string>
36+
<string name="error_news_detail_url_null">获取新闻URL失败</string>
37+
<string name="tb_munion_tip_download_prefix">正在下载:</string>
38+
<string name="umeng_common_icon">图标</string>
39+
</resources>

app/src/main/res/values/arrays.xml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
1+
<?xml version="1.0" encoding="utf-8"?><!--
32
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
43
~
54
~ Licensed under the Apache License, Version 2.0 (the "License”);
@@ -18,23 +17,23 @@
1817
<resources>
1918

2019
<array name="navigation_list">
21-
<item>图片浏览</item>
22-
<item>视频爽看</item>
23-
<item>音乐轻听</item>
20+
<item>Photo</item>
21+
<item>Video</item>
22+
<item>Music</item>
2423
</array>
2524

2625
<array name="news_category_list">
27-
<item>头条</item>
28-
<item>汽车</item>
29-
<item>房产</item>
30-
<item>科技</item>
31-
<item>星座</item>
32-
<item>旅游</item>
33-
<item>时尚</item>
34-
<item>娱乐</item>
26+
<item>Top News</item>
27+
<item>Cars</item>
28+
<item>House</item>
29+
<item>Technology</item>
30+
<item>Signs</item>
31+
<item>Travel</item>
32+
<item>Fashion</item>
33+
<item>Entertainment</item>
3534
</array>
3635

37-
<array name="images_category_list">
36+
<array name="images_category_list_id">
3837
<item>美女</item>
3938
<item>动漫</item>
4039
<item>明星</item>
@@ -43,18 +42,27 @@
4342
<item>美食</item>
4443
</array>
4544

45+
<array name="images_category_list_name">
46+
<item>Beauty</item>
47+
<item>Cartoon</item>
48+
<item>Star</item>
49+
<item>Car</item>
50+
<item>Photography</item>
51+
<item>Food</item>
52+
</array>
53+
4654
<array name="videos_category_list">
47-
<item>热门</item>
48-
<item>搞笑</item>
49-
<item>动漫</item>
50-
<item>综艺</item>
55+
<item>Pop</item>
56+
<item>Fun</item>
57+
<item>Cartoon</item>
58+
<item>Variety</item>
5159
</array>
5260

5361
<array name="about_list">
54-
<item>当前版本</item>
55-
<item>关于作者</item>
56-
<item>项目主页</item>
57-
<item>项目介绍</item>
58-
<item>开源项目说明</item>
62+
<item>Current Version</item>
63+
<item>About Author</item>
64+
<item>Project Site</item>
65+
<item>Project Introduction</item>
66+
<item>Open Source License</item>
5967
</array>
6068
</resources>

app/src/main/res/values/errors.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
-->
1717

1818
<resources>
19-
<string name="error_news_detail_url_null">获取新闻URL失败</string>
20-
<string name="error_image_load_fail">图片下载失败</string>
19+
<string name="error_news_detail_url_null">Failed to fetch news url</string>
20+
<string name="error_image_load_fail">Failed to download the picture</string>
2121
</resources>

app/src/main/res/values/strings.xml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,37 @@
1717

1818
<resources>
1919

20-
<string name="app_name">简阅</string>
20+
<string name="app_name">SimplifyReader</string>
2121
<string name="drawer_open">DrawerOpen</string>
2222
<string name="drawer_close">DrawerClose</string>
23-
<string name="menu_capture">扫一扫</string>
24-
<string name="menu_about_us">关于我们</string>
25-
<string name="menu_feedback">意见反馈</string>
26-
<string name="splash_copyright">Copyright &#169; 2015 SimplifyReader All Rights Reserved\nPower by Obsessive and Chris</string>
27-
<string name="splash_slogan">看尽生活中的点滴</string>
23+
<string name="menu_capture">Scan QR Code</string>
24+
<string name="menu_about_us">About us</string>
25+
<string name="menu_feedback">Feedback</string>
26+
<string name="splash_copyright">Copyright &#169; 2015 SimplifyReader All Rights Reserved\nPowered by Obsessive and Chris</string>
27+
<string name="splash_slogan">Go through the every bit of life</string>
2828
<string name="splash_version">V %1$s</string>
29-
<string name="double_click_exit">再按一次退出</string>
30-
<string name="common_load_more_end">没有更多了</string>
31-
<string name="feedback_welcome_info">感谢您提出反馈意见,我会尽快回复</string>
29+
<string name="double_click_exit">Press again to exit</string>
30+
<string name="common_load_more_end">No more content</string>
31+
<string name="feedback_welcome_info">Thanks for your feedback, I will reply as soon as possible</string>
3232

3333
<!-- Video Play-->
34-
<string name="player_title">视频播放</string>
35-
<string name="player_view_count">观看次数\t</string>
36-
<string name="player_favor_count">收藏次数\t</string>
37-
<string name="player_comment_count">评论次数\t</string>
38-
<string name="player_publish">发布于\t</string>
39-
<string name="player_tags">标签</string>
34+
<string name="player_title">Media Player</string>
35+
<string name="player_view_count">Times watched\t</string>
36+
<string name="player_favor_count">Favorites\t</string>
37+
<string name="player_comment_count">Comments\t</string>
38+
<string name="player_publish">Posted on\t</string>
39+
<string name="player_tags">Tags</string>
4040

41-
<string name="btn_history">历史</string>
42-
<string name="btn_picture">图片</string>
43-
<string name="btn_light">灯光</string>
44-
<string name="btn_ok">确定</string>
45-
<string name="qrcode">二维码</string>
46-
<string name="barcode">条形码</string>
47-
<string name="tips_open_camera_error">打开相机失败,请确保允许应用使用相机权限后重试!</string>
48-
<string name="tips_decode_null">未解析到任何数据</string>
41+
<string name="btn_history">History</string>
42+
<string name="btn_picture">Picture</string>
43+
<string name="btn_light">Light</string>
44+
<string name="btn_ok">Ok</string>
45+
<string name="qrcode">QR Code</string>
46+
<string name="barcode">Barcode</string>
47+
<string name="tips_open_camera_error">Failed to open camera, please ensure the permission is allowed and try again</string>
48+
<string name="tips_decode_null">No data resolved</string>
4949

50-
<string name="title_image_picker">本地相册</string>
50+
<string name="title_image_picker">Local photo album</string>
51+
<string name="tb_munion_tip_download_prefix">Downloading:</string>
5152

5253
</resources>

app/src/main/res/values/tb_munion_strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
<resources>
1919

2020
<color name="tb_munion_item_force">#e3e3e3</color>
21-
<string name="tb_munion_tip_download_prefix">正在下载:</string>
2221

2322
</resources>

library/src/main/java/com/github/obsessive/library/base/BaseAppManager.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@ private BaseAppManager() {
6363

6464
}
6565

66-
public synchronized static BaseAppManager getInstance() {
67-
if (instance == null) {
68-
instance = new BaseAppManager();
66+
public static BaseAppManager getInstance() {
67+
if (null == instance) {
68+
synchronized (BaseAppManager.class) {
69+
if (null == instance) {
70+
instance = new BaseAppManager();
71+
}
72+
}
6973
}
7074
return instance;
7175
}

0 commit comments

Comments
 (0)