Skip to content

Commit

Permalink
improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan676 committed Feb 13, 2015
1 parent 6de9d52 commit dff0f4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@
<string name="upload_finished">Finished</string>
<string name="upload_cancelled">Cancelled</string>
<string name="upload_failed">Failed</string>
<string name="days_ago">&#160;days ago</string>
<string name="hours_ago">&#160;hours ago</string>
<string name="minutes_ago">&#160;minutes ago</string>
<string name="seconds_ago">&#160;seconds ago</string>
<string name="days_ago">%d days ago</string>
<string name="hours_ago">%d hours ago</string>
<string name="minutes_ago">%d minutes ago</string>
<string name="seconds_ago">%d seconds ago</string>
<string name="just_now">Just now</string>
<string name="error_when_load_starred">Error when loading starred files</string>
<string name="open_as">Open as</string>
Expand Down Expand Up @@ -222,7 +222,7 @@
<string name="lockpattern_pattern_entered_header">Pattern saved</string>
<string name="lockpattern_need_to_draw">Please draw Gesture Lock pattern</string>
<string name="lockpattern_need_to_confirm">Please confirm your pattern</string>
<string name="lockpattern_need_to_unlock_wrong">Pattern didn't match. Try again.</string>
<string name="lockpattern_need_to_unlock_wrong">Pattern didn\'t match. Try again.</string>
<string name="lockpattern_pattern_confirmed_header">Tap OK to save your pattern</string>
<string name="lockpattern_recording_inprogress">Release finger when finished drawing</string>
<string name="lockpattern_pattern_toast_saved">Gesture Lock Pattern successfully saved</string>
Expand Down
8 changes: 4 additions & 4 deletions src/com/seafile/seadroid2/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,15 @@ public static String translateCommitTime(long timestampInMillis) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
return fmt.format(d);
} else if (days > 0) {
return days + SeadroidApplication.getAppContext().getString(R.string.days_ago);
return SeadroidApplication.getAppContext().getString(R.string.days_ago, days);
} else if (seconds >= 60 * 60) {
long hours = seconds / 3600;
return hours + SeadroidApplication.getAppContext().getString(R.string.hours_ago);
return SeadroidApplication.getAppContext().getString(R.string.hours_ago, hours);
} else if (seconds >= 60) {
long minutes = seconds / 60;
return minutes + SeadroidApplication.getAppContext().getString(R.string.minutes_ago);
return SeadroidApplication.getAppContext().getString(R.string.minutes_ago, minutes);
} else if (seconds > 0) {
return seconds + SeadroidApplication.getAppContext().getString(R.string.seconds_ago);
return SeadroidApplication.getAppContext().getString(R.string.seconds_ago, seconds);
} else {
return SeadroidApplication.getAppContext().getString(R.string.just_now);
}
Expand Down

0 comments on commit dff0f4b

Please sign in to comment.