Skip to content

Commit

Permalink
优化国际化
Browse files Browse the repository at this point in the history
  • Loading branch information
junixapp committed May 11, 2021
1 parent 802666b commit 59c9833
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ public void onTimeSelectChanged() {
}

setTime();
if(showLabel) wheelTime.setLabels("年", "月", "日", "时", "分", "秒");
if(showLabel) wheelTime.setLabels(getResources().getString(R.string._xpopup_ext_year),
getResources().getString(R.string._xpopup_ext_month),
getResources().getString(R.string._xpopup_ext_day),
getResources().getString(R.string._xpopup_ext_hours),
getResources().getString(R.string._xpopup_ext_minutes),
getResources().getString(R.string._xpopup_ext_seconds));
wheelTime.setItemsVisible(itemsVisibleCount);
wheelTime.setAlphaGradient(true);
wheelTime.setCyclic(true);
Expand All @@ -158,7 +163,7 @@ public void onTimeSelectChanged() {
* @return
*/
public TimePickerPopup setShowLabel(boolean showLabel){
this.showLabel = showLabel
this.showLabel = showLabel;
return this;
}

Expand Down
9 changes: 0 additions & 9 deletions ext/src/main/res/values-en/strings.xml

This file was deleted.

9 changes: 9 additions & 0 deletions ext/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>

<string name="_xpopup_ext_year">年</string>
<string name="_xpopup_ext_month">月</string>
<string name="_xpopup_ext_day">日</string>
<string name="_xpopup_ext_hours">时</string>
<string name="_xpopup_ext_minutes">分</string>
<string name="_xpopup_ext_seconds">秒</string>
</resources>
12 changes: 6 additions & 6 deletions ext/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<resources>

<string name="_xpopup_ext_year"></string>
<string name="_xpopup_ext_month"></string>
<string name="_xpopup_ext_day"></string>
<string name="_xpopup_ext_hours"></string>
<string name="_xpopup_ext_minutes"></string>
<string name="_xpopup_ext_seconds"></string>
<string name="_xpopup_ext_year"> </string>
<string name="_xpopup_ext_month"> </string>
<string name="_xpopup_ext_day"> </string>
<string name="_xpopup_ext_hours"> </string>
<string name="_xpopup_ext_minutes"> </string>
<string name="_xpopup_ext_seconds"> </string>
</resources>

0 comments on commit 59c9833

Please sign in to comment.