diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 9a5b0347..7ab9d40b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -802,7 +802,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { if(useAbsoluteTime) { pollDurationInfo = context.getString(R.string.poll_info_time_absolute, getAbsoluteTime(poll.getExpiresAt())); } else { - String pollDuration = DateUtils.formatDuration(pollDescription.getContext(), poll.getExpiresAt().getTime(), timestamp); + String pollDuration = DateUtils.formatPollDuration(pollDescription.getContext(), poll.getExpiresAt().getTime(), timestamp); pollDurationInfo = context.getString(R.string.poll_info_time_relative, pollDuration); } } diff --git a/app/src/main/java/com/keylesspalace/tusky/util/DateUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/DateUtils.java index eed333e4..26ef552f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/DateUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/DateUtils.java @@ -78,7 +78,7 @@ public class DateUtils { return context.getString(format, span); } - public static String formatDuration(Context context, long then, long now) { + public static String formatPollDuration(Context context, long then, long now) { long span = then - now; if (span < 0) { span = 0; @@ -86,20 +86,20 @@ public class DateUtils { int format; if (span < MINUTE_IN_MILLIS) { span /= SECOND_IN_MILLIS; - format = R.string.timespan_seconds; + format = R.plurals.poll_timespan_seconds; } else if (span < HOUR_IN_MILLIS) { span /= MINUTE_IN_MILLIS; - format = R.string.timespan_minutes; + format = R.plurals.poll_timespan_minutes; } else if (span < DAY_IN_MILLIS) { span /= HOUR_IN_MILLIS; - format = R.string.timespan_hours; + format = R.plurals.poll_timespan_hours; } else { span /= DAY_IN_MILLIS; - format = R.string.timespan_days; + format = R.plurals.poll_timespan_days; } - return context.getString(format, span); + return context.getResources().getQuantityString(format, (int) span, (int) span); } } diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 9c38249f..4d574ffe 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -355,11 +355,6 @@ هل تريد حذف وإعادة صياغة هذا التبويق؟ - %d أيام - %d ساعات - %d دقائق - %d ثوان - تم تفضيله تعديل الوسم وسم بدون # diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 8c59a941..6f64192f 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -395,11 +395,6 @@ Smazat a přepsat Smazat a přepsat tento toot\? - %d dní - %d hodin - %d minut - %d sekund - %1$s • %2$s %s hlas diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 6373960d..b758fdd7 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -394,11 +394,6 @@ Effacer et ré-écrire Effacer et ré-écrire ce pouet \? - %d jours - %d heures - %d minutes - %d secondes - %s vote %s votes diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 9c4cb1b4..eb52ea16 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -326,10 +326,6 @@ %dp %dm - %d nap - %d óra - %d perc - %d másodperc Válasz @%s részére Nyilvános idővonalak diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index dfcc4070..3c2601d1 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -392,11 +392,6 @@ Cancella e riscrivi Cancellare e riscrivere questo toot\? - %d giorni - %d ore - %d minuti - %d secondi - %s voto %s voti diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 033dfd7c..e4148502 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -383,10 +383,6 @@ Verwijderen en herschrijven Deze toot verwijderen en herschrijven\? - %d dagen - %d uur - %d minuten - %d seconden Leegmaken Filter diff --git a/app/src/main/res/values-no-rNB/strings.xml b/app/src/main/res/values-no-rNB/strings.xml index e6d6ae0f..01242e4b 100644 --- a/app/src/main/res/values-no-rNB/strings.xml +++ b/app/src/main/res/values-no-rNB/strings.xml @@ -411,10 +411,6 @@ Slett og skriv på nytt Vil du slette dette tottet og skrive det på nytt\? - %d dager - %d timer - %d minutter - %d sekunder %1$s • %2$s diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index 1dc7c7f2..095a57ad 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -393,11 +393,6 @@ Totjorn mostrar los mèdias marcat coma sensibles Totjorn amagar los mèdias - %d jorns - %d oras - %d minutas - %d segondas - Netejar Filtrar Aplicar diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index f2f73450..ccc0b9a3 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -414,10 +414,6 @@ Izbriši in preoblikuj Izbriši in preoblikuj tut\? - %d dni - %d ur - %d minut - %d sekund %1$s • %2$s diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 240bc193..712924ce 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -394,11 +394,6 @@ Radera och skriv nytt Radera och skriva ny toot\? - %d dagar - %d timmar - %d minuter - %d sekunder - %1$s • %2$s %s röst diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index f1eecd7c..29193485 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -309,11 +309,6 @@ %d 分钟前 %d 秒前 - - %d 天 - %d 小时 - %d 分钟 - %d 秒 关注了你 总是显示所有敏感媒体内容 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 2ad0aaeb..632ad2ea 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -309,11 +309,6 @@ %d 分鐘前 %d 秒前 - - %d 天 - %d 小時 - %d 分鐘 - %d 秒 關注了你 總是顯示所有敏感媒體內容 diff --git a/app/src/main/res/values-zh-rMO/strings.xml b/app/src/main/res/values-zh-rMO/strings.xml index 2ad0aaeb..632ad2ea 100644 --- a/app/src/main/res/values-zh-rMO/strings.xml +++ b/app/src/main/res/values-zh-rMO/strings.xml @@ -309,11 +309,6 @@ %d 分鐘前 %d 秒前 - - %d 天 - %d 小時 - %d 分鐘 - %d 秒 關注了你 總是顯示所有敏感媒體內容 diff --git a/app/src/main/res/values-zh-rSG/strings.xml b/app/src/main/res/values-zh-rSG/strings.xml index f1eecd7c..29193485 100644 --- a/app/src/main/res/values-zh-rSG/strings.xml +++ b/app/src/main/res/values-zh-rSG/strings.xml @@ -309,11 +309,6 @@ %d 分钟前 %d 秒前 - - %d 天 - %d 小时 - %d 分钟 - %d 秒 关注了你 总是显示所有敏感媒体内容 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 2ad0aaeb..632ad2ea 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -309,11 +309,6 @@ %d 分鐘前 %d 秒前 - - %d 天 - %d 小時 - %d 分鐘 - %d 秒 關注了你 總是顯示所有敏感媒體內容 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 243053f5..51e4cef6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -312,12 +312,6 @@ %dm %ds - - %d days - %d hours - %d minutes - %d seconds - Follows you Always show sensitive content Media @@ -492,5 +486,22 @@ A poll you have voted in has ended A poll you created has ended + + + %d day + %d days + + + %d hour + %d hours + + + %d minute + %d minutes + + + %d second + %d seconds +