1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-24 08:38:51 -05:00

Improve last folder update time formatting.

This commit is contained in:
Danny Baumann 2013-02-12 14:13:42 +01:00
parent 099da1913b
commit 49d1bdbcb0
25 changed files with 28 additions and 74 deletions

View File

@ -286,8 +286,6 @@ Si us plau, envians els errors, contribueix a millorar-lo a
<string name="message_no_additional_headers_available">Shan descarregat totes les capçaleres, no hi ha capçaleres addicionals per mostrar.</string>
<string name="message_additional_headers_retrieval_failed">La recuperació de capçaleres addicionals de la base de dades o del servidor de correu ha fallat.</string>
<string name="folder_push_active_symbol">(Subscripció)</string>
<string name="from_same_sender">Més daquest remitent</string>
<string name="message_discarded_toast">Sha descartat el missatge</string>

View File

@ -291,8 +291,6 @@ Posílejte prosím chybová hlášení, přispívejte novými funkcemi a ptejte
<string name="message_no_additional_headers_available">Všechna záhlaví byla stažena, ale nejsou dostupná žádná další k zobrazení.</string>
<string name="message_additional_headers_retrieval_failed">Načtení dalších záhlaví z databáze nebo poštovního serveru selhalo.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Více od tohoto odesílatele</string>
<string name="message_discarded_toast">Zpráva byla zrušena</string>

View File

@ -286,8 +286,6 @@ Vær venlig at sende fejlrapporter, anmodning om nye funktioner, og spørgsmål
<string name="message_no_additional_headers_available">Alle mail headers er blevet hentet, og der kan ikke vises yderligere headers.</string>
<string name="message_additional_headers_retrieval_failed">Hentning af yderligere headers fra database eller mail server mislykkedes.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Flere fra denne afsender</string>
<string name="message_discarded_toast">Mail kasseret</string>

View File

@ -298,8 +298,6 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
<string name="message_no_additional_headers_available">Alle Kopfzeilen wurden heruntergeladen, es sind allerdings keine neuen Kopfzeilen vorhanden.</string>
<string name="message_additional_headers_retrieval_failed">Die weiteren Kopfzeilen konnten nicht aus der Datenbank oder vom Mailserver geladen werden.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Mehr von diesem Absender</string>
<string name="message_discarded_toast">Nachricht wurde verworfen</string>
@ -1133,4 +1131,8 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
<string name="global_settings_show_contact_picture_label">Kontaktbilder anzeigen</string>
<string name="global_settings_show_contact_picture_summary">Kontaktbilder in der Nachrichtenliste anzeigen</string>
<string name="last_refresh_time_format">Zuletzt <xliff:g id="formatted_time">%s</xliff:g> aktualisiert</string>
<string name="last_refresh_time_format_with_push">Zuletzt <xliff:g id="time_with_preposition">%s</xliff:g> aktualisiert (Push aktiv)</string>
<string name="preposition_for_date">am <xliff:g id="date">%s</xliff:g></string>
</resources>

View File

@ -282,8 +282,6 @@
<string name="message_no_additional_headers_available">Όλες οι επικεφαλίδες έχουν κατεβεί, αλλά δεν υπάρχουν πρόσθετες επικεφαλίδες για να προβληθούν.</string>
<string name="message_additional_headers_retrieval_failed">Η ανάσυρση πρόσθετων επικεφαλίδων από τη βάση δεδομένων ή τον εξυπηρέτη ταχυδρομείου απέτυχε.</string>
<string name="folder_push_active_symbol">(Σπρώξιμο)</string>
<string name="from_same_sender">Από τον ίδιο αποστολέα</string>
<string name="message_discarded_toast">Το μήνυμα αγνοήθηκε</string>

View File

@ -285,8 +285,6 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
<string name="message_no_additional_headers_available">Se han descargado todas las cabeceras, y no hay cabeceras adicionales que mostrar</string>
<string name="message_additional_headers_retrieval_failed">Se ha producido un error al descargar las cabeceras desde la base de datos o el servidor</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Más de este remitente</string>
<string name="message_discarded_toast">Mensaje descartado</string>

View File

@ -303,8 +303,6 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
<string name="message_no_additional_headers_available">Kaikki otsikkotiedot on ladattu, mutta näytettäviä ei ole enempää.</string>
<string name="message_additional_headers_retrieval_failed">Lisäotsikkotietojen haku tietokannasta tai postipalvelimelta epäonnistui.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Lisää samalta lähettäjältä</string>
<string name="message_discarded_toast">Viesti peruutettu</string>

View File

@ -327,8 +327,6 @@ de plus</string>
<string name="message_no_additional_headers_available">Toutes les entêtes ont été téléchargées, mais il n\'y en a pas d\'autres à montrer.</string>
<string name="message_additional_headers_retrieval_failed">La récupération d\'entêtes supplémentaires de la base de données ou du serveur a échouée.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Plus de cet expéditeur</string>
<string name="message_discarded_toast">Message abandonné</string>

View File

@ -284,8 +284,6 @@ Por favor, envía os erros detectados, contribúe con novas funcionalidas e preg
<string name="message_no_additional_headers_available">Todas as cabeceiras foron descargadas, pero non hai encabezados adicionáis que amosar</string>
<string name="message_additional_headers_retrieval_failed">Prodúxose un erro ao descargar os encabezados adicionáis dende a base de datos ou o servidor</string>
<string name="folder_push_active_symbol">(Subscripción)</string>
<string name="from_same_sender">Máis deste remitente</string>
<string name="message_discarded_toast">Mensaxes descartadas</string>

View File

@ -286,8 +286,6 @@ Hibajelentéseivel hozzájárul az újabb verziók tökéletesítéséhez, kérd
<string name="message_no_additional_headers_available">Minden fejléc letöltve, de nincs mind megjelenítve.</string>
<string name="message_additional_headers_retrieval_failed">Nem sikerült betölteni az összes fejlécet adatbázishiba, vagy email szerver hiba miatt.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Összes ettől a feladótol</string>
<string name="message_discarded_toast">Levél eldobva</string>

View File

@ -286,8 +286,6 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
<string name="message_no_additional_headers_available">Tutte le intestazioni sono state scaricate, non ci sono intestazioni aggiuntive da mostrare.</string>
<string name="message_additional_headers_retrieval_failed">Recupero di intestazioni aggiuntive dal database o dal server di posta non riuscito.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Altri da questo mittente</string>
<string name="message_discarded_toast">Messaggio scartato</string>

View File

@ -287,8 +287,6 @@
<string name="message_no_additional_headers_available">כל הכותרות הורדו, אבל אין כותרות נוספות להצגה.</string>
<string name="message_additional_headers_retrieval_failed">שליפה של כותרות נוספות מהשרת של מסד הנתונים או מהדואר נכשל.</string>
<string name="folder_push_active_symbol">(דחיפה)</string>
<string name="from_same_sender">עוד מהשולח הזה</string>
<string name="message_discarded_toast">ההודעה נמחקה</string>

View File

@ -286,8 +286,6 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ
<string name="message_no_additional_headers_available">すべてのヘッダをダウンロードしましたが、表示すべき追加ヘッダはありませんでした。</string>
<string name="message_additional_headers_retrieval_failed">追加ヘッダをデータベースまたはメールサーバから取得できませんでした。</string>
<string name="folder_push_active_symbol">(プッシュ)</string>
<string name="from_same_sender">この送信者からのメールを検索</string>
<string name="message_discarded_toast">メールを破棄しました</string>

View File

@ -284,8 +284,6 @@ K-9 메일은 다른 메일 클라이언트와 마찬가지로 대부분의 무
<string name="message_no_additional_headers_available">모든 헤더의 다운로드 완료되었습니다. 더이상 보여줄 추가적인 헤더정보가 없습니다.</string>
<string name="message_additional_headers_retrieval_failed">이 데이터베이스 혹은 메일서버에서 추가적인 헤더 정보를 가져오는데 실패.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">이 발신자에 대한 추가작업</string>
<string name="message_discarded_toast">삭제됨</string>

View File

@ -285,8 +285,6 @@ Graag foutrapporten, bijdrage nieuwe functies en vragen stellen op
<string name="message_no_additional_headers_available">Alle headers zijn gedownload, maar er zijn geen extra headers aan te tonen.</string>
<string name="message_additional_headers_retrieval_failed">Het ophalen van extra headers uit de database of e-mailserver is mislukt.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Meer van deze afzender</string>
<string name="message_discarded_toast">Bericht verwijderd</string>

View File

@ -294,8 +294,6 @@ Wszelkie zgłoszenia usterek, zapytania oraz nowe pomysły prosimy przesyłać z
<string name="message_no_additional_headers_available">Wszystkie nagłówki pobrano, niemniej nie znaleziono żadnych dodatkowych do wyświetlenia.</string>
<string name="message_additional_headers_retrieval_failed">Pobieranie nagłówkow nie powiodło się.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Więcej od tego nadawcy</string>
<string name="message_discarded_toast">Wiadomość usunięta</string>

View File

@ -282,8 +282,6 @@ Por favor, nos envie relatórios de bugs, contribua para novas melhorias e faça
<string name="message_no_additional_headers_available">Todos os cabeçalhos foram baixados, mas não há descrições adicionais a serem mostradas.</string>
<string name="message_additional_headers_retrieval_failed">A recuperação de cabeçalhos adicionais do banco de dados ou servidor de e-mail falharam.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Mais deste remetente</string>
<string name="message_discarded_toast">Mensagem descartada</string>

View File

@ -280,8 +280,6 @@ K-9 Mail это программа электронной почты для Andr
<string name="message_no_additional_headers_available">Все заголовки загружены, дополнительных заголовков для отображения нет.</string>
<string name="message_additional_headers_retrieval_failed">Не удалось загрузить дополнительные заголовки из базы данных или почтового сервера.</string>
<string name="folder_push_active_symbol">(Поддержка Push Mail)</string>
<string name="from_same_sender">Ещё от этого отправителя</string>
<string name="message_discarded_toast">Сообщение отброшено</string>

View File

@ -286,8 +286,6 @@ Vänligen skicka felrapporter, hjälp till med nya funktioner och ställ frågor
<string name="message_no_additional_headers_available">Alla huvuden har hämtats, men det det finns inga ytterligare huvuden att visa.</string>
<string name="message_additional_headers_retrieval_failed">Hämtningen av ytterligare huvuden från databasen eller e-postservern misslyckades.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Mer från denna avsändare</string>
<string name="message_discarded_toast">Brevet kasserat</string>

View File

@ -286,8 +286,6 @@ Lütfen hata raporlarınızı, istediğiniz yeni özellikleri ve sorularınızı
<string name="message_no_additional_headers_available">Bütün başlıklar indirildi, fakat gösterilecek ek başlık yok.</string>
<string name="message_additional_headers_retrieval_failed">Veritabanından veya posta suncucundan ek başlıkların alımı başarısız.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Bu Göndericiden daha fazla mesaj</string>
<string name="message_discarded_toast">Mesaj silindi</string>

View File

@ -286,8 +286,6 @@ K-9 Mail це поштовий клієнт з відкритим вихідни
<string name="message_no_additional_headers_available">Всі заголовки завантажено, нема додаткових заголовків для відображення.</string>
<string name="message_additional_headers_retrieval_failed">Не вдалося завантажити додаткові заголовки з бази даних або поштового сервера.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">Більше від цього відправника</string>
<string name="message_discarded_toast">Повідомлення скасовано</string>

View File

@ -279,8 +279,6 @@ K-9改进的功能包括
<string name="message_no_additional_headers_available">全部邮件的信息都已经下载,但是当前没有额外的邮件信息可以显示。</string>
<string name="message_additional_headers_retrieval_failed">从数据库或邮件服务器获取额外的邮件信息失败。</string>
<string name="folder_push_active_symbol">(推送)</string>
<string name="from_same_sender">来自这个发件人的更多邮件</string>
<string name="message_discarded_toast">邮件已忽略</string>

View File

@ -280,8 +280,6 @@ K-9改良的功能包括
<string name="message_no_additional_headers_available">全部郵件的訊息都已經下載,沒有其他的郵件訊息可以顯示。</string>
<string name="message_additional_headers_retrieval_failed">從資料庫或郵件伺服器存取其他的郵件訊息失敗。</string>
<string name="folder_push_active_symbol">(推送)</string>
<string name="from_same_sender">來自這個寄件人的更多郵件</string>
<string name="message_discarded_toast">郵件已忽略</string>

View File

@ -307,8 +307,6 @@ Please submit bug reports, contribute new features and ask questions at
<string name="message_no_additional_headers_available">All headers have been downloaded, but there are no additional headers to show.</string>
<string name="message_additional_headers_retrieval_failed">The retrieval of additional headers from the database or mail server failed.</string>
<string name="folder_push_active_symbol">(Push)</string>
<string name="from_same_sender">More from this sender</string>
<string name="message_discarded_toast">Message discarded</string>
@ -1153,4 +1151,8 @@ Please submit bug reports, contribute new features and ask questions at
<string name="global_settings_show_contact_picture_label">Show contact pictures</string>
<string name="global_settings_show_contact_picture_summary">Show contact pictures in the message list</string>
<string name="last_refresh_time_format">Last refreshed <xliff:g id="formatted_time">%s</xliff:g></string>
<string name="last_refresh_time_format_with_push">Last refreshed <xliff:g id="time_with_preposition">%s</xliff:g> (Push active)</string>
<string name="preposition_for_date">on <xliff:g id="date">%s</xliff:g></string>
</resources>

View File

@ -1046,54 +1046,50 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
}
holder.folderName.setText(folder.displayName);
CharSequence statusText = "";
if (folder.loading) {
statusText = getString(R.string.status_loading);
holder.folderStatus.setText(R.string.status_loading);
} else if (folder.status != null) {
statusText = folder.status;
holder.folderStatus.setText(folder.status);
} else if (folder.lastChecked != 0) {
long now = System.currentTimeMillis();
int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR;
CharSequence formattedDate;
if (Math.abs(now - folder.lastChecked) > DateUtils.WEEK_IN_MILLIS) {
statusText = DateUtils.formatDateTime(context, folder.lastChecked, flags);
formattedDate = getString(R.string.preposition_for_date,
DateUtils.formatDateTime(context, folder.lastChecked, flags));
} else {
statusText = DateUtils.getRelativeTimeSpanString(folder.lastChecked,
now, DateUtils.SECOND_IN_MILLIS, flags);
formattedDate = DateUtils.getRelativeTimeSpanString(folder.lastChecked,
now, DateUtils.MINUTE_IN_MILLIS, flags);
}
}
if (folder.pushActive) {
statusText = getString(R.string.folder_push_active_symbol) + " " + statusText;
}
if (statusText != null) {
holder.folderStatus.setText(statusText);
holder.folderStatus.setVisibility(View.VISIBLE);
holder.folderStatus.setText(getString(folder.pushActive
? R.string.last_refresh_time_format_with_push
: R.string.last_refresh_time_format,
formattedDate));
} else {
holder.folderStatus.setText(null);
holder.folderStatus.setVisibility(View.GONE);
}
if (folder.unreadMessageCount != 0) {
holder.newMessageCount.setText(Integer
.toString(folder.unreadMessageCount));
holder.newMessageCount.setText(Integer.toString(folder.unreadMessageCount));
holder.newMessageCountWrapper.setOnClickListener(
createUnreadSearch(mAccount, folder));
holder.newMessageCountWrapper.setVisibility(View.VISIBLE);
holder.newMessageCountIcon.setBackgroundDrawable( mAccount.generateColorChip(false, false, false, false, false).drawable() );
holder.newMessageCountIcon.setBackgroundDrawable(
mAccount.generateColorChip(false, false, false, false, false).drawable());
} else {
holder.newMessageCountWrapper.setVisibility(View.GONE);
}
if (folder.flaggedMessageCount > 0) {
holder.flaggedMessageCount.setText(Integer
.toString(folder.flaggedMessageCount));
holder.flaggedMessageCount.setText(Integer.toString(folder.flaggedMessageCount));
holder.flaggedMessageCountWrapper.setOnClickListener(
createFlaggedSearch(mAccount, folder));
holder.flaggedMessageCountWrapper.setVisibility(View.VISIBLE);
holder.flaggedMessageCountIcon.setBackgroundDrawable( mAccount.generateColorChip(false, false, false, false,true).drawable() );
holder.flaggedMessageCountIcon.setBackgroundDrawable(
mAccount.generateColorChip(false, false, false, false,true).drawable());
} else {
holder.flaggedMessageCountWrapper.setVisibility(View.GONE);
}
@ -1103,11 +1099,10 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
Toast toast = Toast.makeText(getApplication(), getString(R.string.tap_hint), Toast.LENGTH_SHORT);
toast.show();
}
}
);
holder.chip.setBackgroundDrawable(mAccount.generateColorChip((folder.unreadMessageCount == 0 ? true : false ), false, false, false,false).drawable());
});
holder.chip.setBackgroundDrawable(mAccount.generateColorChip(
folder.unreadMessageCount == 0, false, false, false,false).drawable());
mFontSizes.setViewTextSize(holder.folderName, mFontSizes.getFolderName());
@ -1121,7 +1116,6 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
}
mFontSizes.setViewTextSize(holder.folderStatus, mFontSizes.getFolderStatus());
return view;
}