Make string translatable
This commit is contained in:
parent
cc9bff436a
commit
561f85fd32
@ -404,32 +404,32 @@ private fun CalendarEvent.getSummary(context: Context): String {
|
|||||||
val isToday = DateUtils.isToday(endTime)
|
val isToday = DateUtils.isToday(endTime)
|
||||||
if (isToday) {
|
if (isToday) {
|
||||||
if (allDay) {
|
if (allDay) {
|
||||||
return "Due today"
|
return context.getString(R.string.task_due_today)
|
||||||
}
|
}
|
||||||
return "Due ${
|
return context.getString(
|
||||||
DateUtils.formatDateTime(
|
R.string.task_due_date, DateUtils.formatDateTime(
|
||||||
context,
|
context,
|
||||||
endTime,
|
endTime,
|
||||||
DateUtils.FORMAT_SHOW_TIME
|
DateUtils.FORMAT_SHOW_TIME
|
||||||
)
|
)
|
||||||
}"
|
)
|
||||||
}
|
}
|
||||||
if (allDay) {
|
if (allDay) {
|
||||||
return "Due ${
|
return context.getString(
|
||||||
DateUtils.formatDateTime(
|
R.string.task_due_date, DateUtils.formatDateTime(
|
||||||
context,
|
context,
|
||||||
endTime,
|
endTime,
|
||||||
DateUtils.FORMAT_SHOW_DATE
|
DateUtils.FORMAT_SHOW_DATE
|
||||||
)
|
)
|
||||||
}"
|
)
|
||||||
}
|
}
|
||||||
return "Due ${
|
return context.getString(
|
||||||
DateUtils.formatDateTime(
|
R.string.task_due_time, DateUtils.formatDateTime(
|
||||||
context,
|
context,
|
||||||
endTime,
|
endTime,
|
||||||
DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_SHOW_TIME
|
DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_SHOW_TIME
|
||||||
)
|
)
|
||||||
}"
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val isToday =
|
val isToday =
|
||||||
|
|||||||
@ -324,6 +324,9 @@
|
|||||||
</plurals>
|
</plurals>
|
||||||
<!-- Calendar events that last the entire day -->
|
<!-- Calendar events that last the entire day -->
|
||||||
<string name="calendar_event_allday">all-day</string>
|
<string name="calendar_event_allday">all-day</string>
|
||||||
|
<string name="task_due_time">Due at %1$s</string>
|
||||||
|
<string name="task_due_date">Due on %1$s</string>
|
||||||
|
<string name="task_due_today">Due today</string>
|
||||||
<!-- Default title that is shown in the music widget if the app that is playing media did not publish a title -->
|
<!-- Default title that is shown in the music widget if the app that is playing media did not publish a title -->
|
||||||
<string name="music_widget_default_title">%1$s is playing media</string>
|
<string name="music_widget_default_title">%1$s is playing media</string>
|
||||||
<string name="music_widget_no_data">No media has been played yet</string>
|
<string name="music_widget_no_data">No media has been played yet</string>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user