Clean up date handling.
Remove home-grown date formatting, and replace it by usage of the DateUtils class which is present since API level 3.
This commit is contained in:
parent
3074f25df3
commit
0fac8e999d
39 changed files with 56 additions and 502 deletions
|
@ -109,7 +109,7 @@ Si us plau, envia’ns els errors, contribueix a millorar-lo a
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Propera comprovació @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Propera comprovació <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Comprovació acabada</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -814,13 +814,6 @@ Si us plau, envia’ns els errors, contribueix a millorar-lo a
|
|||
<string name="background_ops_auto_sync">Quan s’està comprovant \'Dades en segon pla\' i \'Auto sincronització\'</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Format de la data</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Selecciona-ho tot</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Carpetes màximes a comprovar</string>
|
||||
|
|
|
@ -115,7 +115,7 @@ Posílejte prosím chybová hlášení, přispívejte novými funkcemi a ptejte
|
|||
<string name="status_processing_account">Zpracování <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Příští dotaz @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Příští dotaz <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<!-- NEW: <string name="status_syncing_off">Syncing disabled</string>-->
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -819,13 +819,6 @@ Posílejte prosím chybová hlášení, přispívejte novými funkcemi a ptejte
|
|||
<string name="background_ops_auto_sync">Jsou-li \'Data na pozadí\' a \'Aut. synchronizace\' zaškrtnuty</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Formát data</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd. MMMM yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Vybrat vše</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max. počet složek řízených PUSH</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ Vær venlig at sende fejlrapporter, anmodning om nye funktioner, og spørgsmål
|
|||
<string name="status_processing_account">Behandler <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Næste synkronisering @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Næste synkronisering <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">synkronisering deaktiveret</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -813,13 +813,6 @@ Vær venlig at sende fejlrapporter, anmodning om nye funktioner, og spørgsmål
|
|||
<string name="background_ops_auto_sync">Når \"Baggrundsdata\" & \"Auto-sync\" er aktiveret</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Datoformat</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Vælg alle</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max antal mapper som skal kontrolleres ved push</string>
|
||||
|
|
|
@ -109,7 +109,7 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
|
|||
<string name="status_processing_account">Verarbeite <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Nächster Abruf @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Nächster Abruf <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Synchronisation abgeschaltet</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -844,13 +844,6 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
|
|||
<string name="background_ops_auto_sync">Wenn \'Hintergrunddaten\' & \'Automatische Synchronisation\' aktiviert sind</string>
|
||||
<string name="background_ops_auto_sync_only">Wenn \'Automatische Synchronisation\' aktiviert ist</string>
|
||||
|
||||
<string name="date_format_label">Datumsformat</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd.MMM yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Alle auswählen</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Maximale Push-Ordner-Anzahl</string>
|
||||
|
|
|
@ -810,13 +810,6 @@
|
|||
<string name="background_ops_auto_sync">Όταν ελέγχονται \'Δεδομένα παρασκηνίου\' & \'Αυτόματο συγχρονισμός\'</string>
|
||||
<string name="background_ops_auto_sync_only">Όταν έχει επιλεγεί \'Auto-sync\'</string>
|
||||
|
||||
<string name="date_format_label">Γραφή ημερομηνίας</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Επιλογή όλων</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Μέγιστο φακέλων για σπρώξιμο</string>
|
||||
|
@ -1096,4 +1089,4 @@
|
|||
|
||||
<string name="global_settings_threaded_view_label">Προβολή συζήτησης</string>
|
||||
<string name="global_settings_threaded_view_summary">Σύντμηση μηνυμάτων που ανήκουν στον ίδιο νήμα</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -110,7 +110,7 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Próxima sincronización a las <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Próxima sincronización <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Sincronización deshabilitada</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -811,13 +811,6 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
|
|||
<string name="background_ops_auto_sync">Cuando \'Sincronización en segundo plano\' y \'Sincronización automática\' esten activos</string>
|
||||
<!-- <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string> -->
|
||||
|
||||
<string name="date_format_label">Formato de fecha</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Seleccionar todos</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max. carpetas Push</string>
|
||||
|
@ -1086,4 +1079,4 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
|
|||
|
||||
<string name="global_settings_threaded_view_label">Vista agrupada por conversación</string>
|
||||
<string name="global_settings_threaded_view_summary">Contraer mensajes de la misma conversación</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -118,7 +118,7 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
|
|||
<string name="status_processing_account">Käsitellään <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Seuraava tarkistus @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Seuraava tarkistus <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Synkronointi pois päältä</string>
|
||||
|
||||
<string name="actionbar_selected"><xliff:g id="selection_count">%d</xliff:g> valittu</string>
|
||||
|
@ -842,13 +842,6 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
|
|||
<string name="background_ops_auto_sync">Kun \'Taustadata\' ja \'Automaattinen synkronointi\' on valittu</string>
|
||||
<string name="background_ops_auto_sync_only">Kun Automaattinen synkronointi on valittu</string>
|
||||
|
||||
<string name="date_format_label">Päivämäärän muoto</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Valitse kaikki</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Push-tilassa tarkistettavien kansioiden enimmäismäärä</string>
|
||||
|
|
|
@ -142,7 +142,7 @@ Si vous avez des suggestions, découvert des bugs ou simplement une idée de fon
|
|||
<string name="status_processing_account">Prép <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Prochaine récup. à <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Prochaine récup. <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">synchronisation désactivée</string>
|
||||
|
||||
<string name="actionbar_selected"><xliff:g id="selection_count">%d</xliff:g> sélectionné(s)</string>
|
||||
|
@ -866,13 +866,6 @@ de plus</string>
|
|||
<string name="background_ops_auto_sync">Lorsque «\u00A0Données en arrière-plan\u00A0» et «\u00A0Synchronisation auto\u00A0» sont activés</string>
|
||||
<string name="background_ops_auto_sync_only">Lorsque «\u00A0Synchronisation auto\u00A0» est activée</string>
|
||||
|
||||
<string name="date_format_label">Format de date</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Sélectionner tout</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Maximum de dossiers Push à vérifier</string>
|
||||
|
|
|
@ -109,7 +109,7 @@ Por favor, envía os erros detectados, contribúe con novas funcionalidas e preg
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Próxima comprobación @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Próxima comprobación <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Comprobación rematada</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -810,13 +810,6 @@ Por favor, envía os erros detectados, contribúe con novas funcionalidas e preg
|
|||
<string name="background_ops_auto_sync">Cando \'Sincronización en segundo plano\' e \'Sincronización automática\' estén activos</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Formato de data</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Seleccionar todos</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max. subscripcións</string>
|
||||
|
|
|
@ -111,7 +111,7 @@ Hibajelentéseivel hozzájárul az újabb verziók tökéletesítéséhez, kérd
|
|||
<string name="status_processing_account">Feldolgozás <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Frissítés @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Frissítés <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Nincs frissítve</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -810,13 +810,6 @@ Hibajelentéseivel hozzájárul az újabb verziók tökéletesítéséhez, kérd
|
|||
<string name="background_ops_auto_sync">"Ha a 'Háttéradatok' és 'Auto-szink' bekapcsolva"</string>
|
||||
<string name="background_ops_auto_sync_only">AMikor az \'Automatikus szinkronizáció\' be van kapcsolva</string>
|
||||
|
||||
<string name="date_format_label">Dátum formátuma</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Mindent kijelöl</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Ellenőrízhető mappák száma</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
|
|||
<string name="status_processing_account">Elab <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Prossima verifica alle <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Prossima verifica <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Sincronizzazione disabilitata</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -814,13 +814,6 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
|
|||
<string name="background_ops_auto_sync">Quando \'Dati in background\' e \'Sincronizzazione automatica\' sono selezionati</string>
|
||||
<string name="background_ops_auto_sync_only">Quando \'Sincronizzazione automatica\' è selezionato</string>
|
||||
|
||||
<string name="date_format_label">Formato data</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Seleziona tutti</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max cartelle Push</string>
|
||||
|
@ -1100,4 +1093,4 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
|
|||
|
||||
<!-- NEW: <string name="global_settings_threaded_view_label">Threaded view</string>-->
|
||||
<!-- NEW: <string name="global_settings_threaded_view_summary">Collapse messages belonging to the same thread</string>-->
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<!-- NEW: <string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>-->
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<!-- NEW: <string name="status_next_poll">Next poll @ <xliff:g id="nexttime">%s</xliff:g></string>-->
|
||||
<!-- NEW: <string name="status_next_poll">Next poll <xliff:g id="nexttime">%s</xliff:g></string>-->
|
||||
<string name="status_syncing_off">הסנכרון מושבת</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -810,13 +810,6 @@
|
|||
<string name="background_ops_auto_sync">"מתי ש\'נתונים ברקע\' ו\'סינכרון אוטומטי\' מסומנים "</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">פורמט תאריך</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">בחר הכל</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">מקסימום תיקיות כדי לבדוק עם דחיפה</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ
|
|||
<string name="status_processing_account">処理 <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">次回受信 @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">次回受信 <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">同期停止</string>
|
||||
|
||||
<string name="actionbar_selected"><xliff:g id="selection_count">%d</xliff:g>件選択しました</string>
|
||||
|
@ -809,13 +809,6 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ
|
|||
<string name="background_ops_auto_sync">バックグランドデータと自動同期がチェックされた時</string>
|
||||
<string name="background_ops_auto_sync_only">自動同期がチェックされた時</string>
|
||||
|
||||
<string name="date_format_label">日付書式</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">全選択</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">プッシュ受信の最大フォルダ数</string>
|
||||
|
|
|
@ -109,7 +109,7 @@ K-9 메일은 다른 메일 클라이언트와 마찬가지로 대부분의 무
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">다음 수신 @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">다음 수신 <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">동기화 실패</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -810,13 +810,6 @@ K-9 메일은 다른 메일 클라이언트와 마찬가지로 대부분의 무
|
|||
<string name="background_ops_auto_sync">\'백그라운드 데이타\'와 \'Auto-sync\'가 선택된 경우</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">날짜 형식</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">모두 선택</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Push 체크할 최대 폴더 수</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ Graag foutrapporten, bijdrage nieuwe functies en vragen stellen op
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Volgende poll @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Volgende poll <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Synchroniseren uitgeschakeld</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -810,13 +810,6 @@ Graag foutrapporten, bijdrage nieuwe functies en vragen stellen op
|
|||
<string name="background_ops_auto_sync">Wanneer \'Achtergrond data\' & \'Auto-sync\' zijn aangevinkt</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Datum formaat</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Selecteer alle</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max mappen om te controleren met push</string>
|
||||
|
|
|
@ -124,7 +124,7 @@ Wszelkie zgłoszenia usterek, zapytania oraz nowe pomysły prosimy przesyłać z
|
|||
<string name="status_processing_account">Przetwarzam: <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Sprawdzę o <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Sprawdzę <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Synchronizacja wyłączona</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -822,13 +822,6 @@ Wszelkie zgłoszenia usterek, zapytania oraz nowe pomysły prosimy przesyłać z
|
|||
<string name="background_ops_auto_sync">Gdy systemowe opcje \'Dane w tle\' oraz \'Autosynchronizacja\' są włączone</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Format daty</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Zaznacz wszystko</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Sprawdzanie przez Push</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ Por favor, nos envie relatórios de bugs, contribua para novas melhorias e faça
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Nova verif. às @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Nova verif. <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Sincronização desabilitada</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -809,13 +809,6 @@ Por favor, nos envie relatórios de bugs, contribua para novas melhorias e faça
|
|||
<string name="background_ops_auto_sync">Quando \'Dados de segundo plano\' e \'Auto-sinc\' estiverem checados</string>
|
||||
<string name="background_ops_auto_sync_only">Quando a \'Auto-sinc\' estiver ligada</string>
|
||||
|
||||
<string name="date_format_label">Formato de data</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Selecione todos</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Máximo de pastas para checar com push</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ K-9 Mail это программа электронной почты для Andr
|
|||
<string name="status_processing_account">Обработка <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Следующий запрос @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Следующий запрос <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Синхронизация запрещена</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -806,13 +806,6 @@ K-9 Mail это программа электронной почты для Andr
|
|||
<string name="background_ops_auto_sync">Когда \'Фоновые данные\' и \'Автосинхронизация\' включены</string>
|
||||
<string name="background_ops_auto_sync_only">Когда выбрана \'Автосинхронизация\'</string>
|
||||
|
||||
<string name="date_format_label">Формат даты</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Выбрать все</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Максимальное число папок для проверки с \"Push\"</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ Vänligen skicka felrapporter, hjälp till med nya funktioner och ställ frågor
|
|||
<string name="status_processing_account">Behandlar <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Nästa kontroll @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Nästa kontroll <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Synk avaktiverat</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -813,13 +813,6 @@ Vänligen skicka felrapporter, hjälp till med nya funktioner och ställ frågor
|
|||
<string name="background_ops_auto_sync">När \'Bakgrundsdata\' & \'Auto-sync\' är aktiverade</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Datumformat</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd MMM yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Markera alla</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max antal mappar att kontrollera med push</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ Lütfen hata raporlarınızı, istediğiniz yeni özellikleri ve sorularınızı
|
|||
<string name="status_processing_account">İşlem <xliff:g id="account">%s</xliff:g><xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Sonraki alım @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Sonraki alım <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Senk. kapalı</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -813,12 +813,6 @@ Lütfen hata raporlarınızı, istediğiniz yeni özellikleri ve sorularınızı
|
|||
<string name="background_ops_auto_sync">\'Arkaplan verisi\' & \'Oto. Senk.\' işaretli olduğu zaman</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Tarih Biçimi</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
|
||||
<string name="batch_select_all">Hepsini Seç</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Push ile en fazla kontrol edilecek klasör sayısı</string>
|
||||
|
|
|
@ -110,7 +110,7 @@ K-9 Mail це поштовий клієнт з відкритим вихідни
|
|||
<string name="status_processing_account">Опрацювання <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Наступний запит @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Наступний запит <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Синхронізація заборонена</string>
|
||||
|
||||
<!-- Actions will be used as buttons and in menu items -->
|
||||
|
@ -812,13 +812,6 @@ K-9 Mail це поштовий клієнт з відкритим вихідни
|
|||
<string name="background_ops_auto_sync">Коли \'Фонові дані\' та \'Автосинхронізація\' включено</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">Формат дати</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Вибрати усе</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Найбільша кількість папок для перевірки з push</string>
|
||||
|
|
|
@ -803,13 +803,6 @@ K-9改进的功能包括:
|
|||
<string name="background_ops_auto_sync">当“后台数据”&“自动同步”被选中</string>
|
||||
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
|
||||
|
||||
<string name="date_format_label">日期格式</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">选择全部</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">推送时最多检查文件夹数量</string>
|
||||
|
|
|
@ -109,7 +109,7 @@ K-9改良的功能包括:
|
|||
<string name="status_processing_account">正在處理<xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">下次接收時間 @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">下次接收時間 <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">同步已停用</string>
|
||||
|
||||
<string name="actionbar_selected"><xliff:g id="selection_count">%d</xliff:g> 已選擇</string>
|
||||
|
@ -804,13 +804,6 @@ K-9改良的功能包括:
|
|||
<string name="background_ops_auto_sync">當「背景資料」&「自動同步」被勾選</string>
|
||||
<string name="background_ops_auto_sync_only">"當「自動同步」被勾選"</string>
|
||||
|
||||
<string name="date_format_label">日期格式</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">選擇全部</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">推送時檢查信件匣上限數量</string>
|
||||
|
|
|
@ -529,13 +529,6 @@
|
|||
<item>NEVER</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="date_formats">
|
||||
<item>SHORT</item> <!-- Hardcoded in DateFormatter -->
|
||||
<item>MEDIUM</item> <!-- Hardcoded in DateFormatter -->
|
||||
<item>@string/date_format_common</item>
|
||||
<item>yyyy-MM-dd</item> <!-- ISO8601 date format -->
|
||||
</string-array>
|
||||
|
||||
<string-array name="font_entries">
|
||||
<item>@string/font_size_default</item>
|
||||
<item>@string/font_size_tiniest</item>
|
||||
|
|
|
@ -118,7 +118,7 @@ Please submit bug reports, contribute new features and ask questions at
|
|||
<string name="status_processing_account">Proc <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g></string>
|
||||
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
|
||||
|
||||
<string name="status_next_poll">Next poll @ <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_next_poll">Next poll <xliff:g id="nexttime">%s</xliff:g></string>
|
||||
<string name="status_syncing_off">Syncing disabled</string>
|
||||
|
||||
<string name="actionbar_selected"><xliff:g id="selection_count">%d</xliff:g> selected</string>
|
||||
|
@ -851,13 +851,6 @@ Please submit bug reports, contribute new features and ask questions at
|
|||
<string name="background_ops_auto_sync">When \'Background data\' & \'Auto-sync\' are checked</string>
|
||||
<string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>
|
||||
|
||||
<string name="date_format_label">Date format</string>
|
||||
<!--
|
||||
The values of the date_format_* strings MUST be valid date format strings.
|
||||
See Android SDK documentation for the class SimpleDateFormat.
|
||||
-->
|
||||
<string name="date_format_common">dd-MMM-yyyy</string>
|
||||
|
||||
<string name="batch_select_all">Select all</string>
|
||||
|
||||
<string name="account_setup_push_limit_label">Max folders to check with push</string>
|
||||
|
|
|
@ -80,14 +80,6 @@
|
|||
android:title="@string/font_size_settings_title"
|
||||
android:summary="@string/font_size_settings_description" />
|
||||
|
||||
<ListPreference
|
||||
android:persistent="false"
|
||||
android:key="dateFormat"
|
||||
android:title="@string/date_format_label"
|
||||
android:entries="@array/date_formats"
|
||||
android:entryValues="@array/date_formats"
|
||||
android:dialogTitle="@string/date_format_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:persistent="false"
|
||||
android:key="animations"
|
||||
|
|
|
@ -154,7 +154,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||
mActionBarUnread.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String operation = mListener.getOperation(Accounts.this, getTimeFormat());
|
||||
String operation = mListener.getOperation(Accounts.this);
|
||||
operation.trim();
|
||||
if (operation.length() < 1) {
|
||||
mActionBarSubTitle.setVisibility(View.GONE);
|
||||
|
@ -550,6 +550,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||
mHandler.progress(Window.PROGRESS_START);
|
||||
}
|
||||
pendingWork.clear();
|
||||
mHandler.refreshTitle();
|
||||
|
||||
MessagingController controller = MessagingController.getInstance(getApplication());
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package com.fsck.k9.activity;
|
||||
|
||||
import java.text.DateFormat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.format.DateUtils;
|
||||
|
||||
import com.fsck.k9.Account;
|
||||
import com.fsck.k9.AccountStats;
|
||||
|
@ -22,14 +21,7 @@ public class ActivityListener extends MessagingListener {
|
|||
private String mProcessingCommandTitle = null;
|
||||
|
||||
|
||||
public String formatHeader(Context context, String activityPrefix, int unreadMessageCount, DateFormat timeFormat) {
|
||||
String operation = getOperation(context, timeFormat);
|
||||
return context.getString(R.string.activity_header_format, activityPrefix,
|
||||
(unreadMessageCount > 0 ? context.getString(R.string.activity_unread_count, unreadMessageCount) : ""),
|
||||
operation);
|
||||
}
|
||||
|
||||
public String getOperation(Context context, DateFormat timeFormat){
|
||||
public String getOperation(Context context) {
|
||||
String operation;
|
||||
String progress = null;
|
||||
if (mLoadingAccountDescription != null
|
||||
|
@ -67,7 +59,9 @@ public class ActivityListener extends MessagingListener {
|
|||
} else {
|
||||
long nextPollTime = MailService.getNextPollTime();
|
||||
if (nextPollTime != -1) {
|
||||
operation = context.getString(R.string.status_next_poll, timeFormat.format(nextPollTime));
|
||||
operation = context.getString(R.string.status_next_poll,
|
||||
DateUtils.getRelativeTimeSpanString(nextPollTime, System.currentTimeMillis(),
|
||||
DateUtils.MINUTE_IN_MILLIS, 0));
|
||||
} else if (MailService.isSyncDisabled()) {
|
||||
operation = context.getString(R.string.status_syncing_off);
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.fsck.k9.activity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -13,6 +12,7 @@ import android.os.Bundle;
|
|||
import android.os.Handler;
|
||||
import android.os.PowerManager;
|
||||
import android.text.TextUtils.TruncateAt;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
|
@ -117,7 +117,7 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||
mActionBarUnread.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String operation = mAdapter.mListener.getOperation(FolderList.this, getTimeFormat()).trim();
|
||||
String operation = mAdapter.mListener.getOperation(FolderList.this);
|
||||
if (operation.length() < 1) {
|
||||
mActionBarSubTitle.setText(mAccount.getEmail());
|
||||
} else {
|
||||
|
@ -366,7 +366,6 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||
onOpenFolder(mAccount.getAutoExpandFolderName());
|
||||
finish();
|
||||
} else {
|
||||
|
||||
initializeActivityView();
|
||||
}
|
||||
}
|
||||
|
@ -377,9 +376,6 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||
|
||||
setListAdapter(mAdapter);
|
||||
getListView().setTextFilterEnabled(mAdapter.getFilter() != null); // should never be false but better safe then sorry
|
||||
|
||||
mHandler.refreshTitle();
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -419,6 +415,8 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||
if (mAdapter == null)
|
||||
initializeActivityView();
|
||||
|
||||
mHandler.refreshTitle();
|
||||
|
||||
MessagingController.getInstance(getApplication()).addListener(mAdapter.mListener);
|
||||
//mAccount.refresh(Preferences.getPreferences(this));
|
||||
MessagingController.getInstance(getApplication()).getAccountStats(this, mAccount, mAdapter.mListener);
|
||||
|
@ -1045,17 +1043,22 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||
}
|
||||
|
||||
holder.folderName.setText(folder.displayName);
|
||||
String statusText = "";
|
||||
CharSequence statusText = "";
|
||||
|
||||
if (folder.loading) {
|
||||
statusText = getString(R.string.status_loading);
|
||||
} else if (folder.status != null) {
|
||||
statusText = folder.status;
|
||||
} else if (folder.lastChecked != 0) {
|
||||
Date lastCheckedDate = new Date(folder.lastChecked);
|
||||
long now = System.currentTimeMillis();
|
||||
int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR;
|
||||
|
||||
statusText = getTimeFormat().format(lastCheckedDate) + " " +
|
||||
getDateFormat().format(lastCheckedDate);
|
||||
if (Math.abs(now - folder.lastChecked) > DateUtils.WEEK_IN_MILLIS) {
|
||||
statusText = DateUtils.formatDateTime(context, folder.lastChecked, flags);
|
||||
} else {
|
||||
statusText = DateUtils.getRelativeTimeSpanString(folder.lastChecked,
|
||||
now, DateUtils.SECOND_IN_MILLIS, flags);
|
||||
}
|
||||
}
|
||||
|
||||
if (folder.pushActive) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.fsck.k9.activity;
|
||||
|
||||
import java.text.DateFormat;
|
||||
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -12,21 +10,16 @@ import com.actionbarsherlock.app.SherlockListActivity;
|
|||
import com.fsck.k9.K9;
|
||||
import com.fsck.k9.activity.K9ActivityCommon.K9ActivityMagic;
|
||||
import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
|
||||
|
||||
public class K9ListActivity extends SherlockListActivity implements K9ActivityMagic {
|
||||
|
||||
private K9ActivityCommon mBase;
|
||||
private DateFormat mDateFormat;
|
||||
private DateFormat mTimeFormat;
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
mBase = K9ActivityCommon.newInstance(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
setupFormats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,20 +31,6 @@ public class K9ListActivity extends SherlockListActivity implements K9ActivityMa
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
setupFormats();
|
||||
}
|
||||
|
||||
public DateFormat getDateFormat() {
|
||||
return mDateFormat;
|
||||
}
|
||||
|
||||
public DateFormat getTimeFormat() {
|
||||
return mTimeFormat;
|
||||
}
|
||||
|
||||
private void setupFormats() {
|
||||
mTimeFormat = android.text.format.DateFormat.getTimeFormat(this);
|
||||
mDateFormat = DateFormatter.getDateFormat(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.fsck.k9.activity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fsck.k9.helper.MessageHelper;
|
||||
import com.fsck.k9.mail.Message;
|
||||
|
||||
public class MessageInfoHolder {
|
||||
|
@ -43,11 +42,4 @@ public class MessageInfoHolder {
|
|||
public int hashCode() {
|
||||
return uid.hashCode();
|
||||
}
|
||||
|
||||
public String getDate(MessageHelper messageHelper) {
|
||||
if (date == null) {
|
||||
date = messageHelper.formatDate(message.getSentDate());
|
||||
}
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.fsck.k9.R;
|
|||
import com.fsck.k9.activity.ColorPickerDialog;
|
||||
import com.fsck.k9.activity.K9PreferenceActivity;
|
||||
import com.fsck.k9.controller.MessagingController;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
import com.fsck.k9.helper.FileBrowserHelper;
|
||||
import com.fsck.k9.helper.FileBrowserHelper.FileBrowserFailOverCallback;
|
||||
import com.fsck.k9.preferences.CheckBoxListPreference;
|
||||
|
@ -57,7 +56,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||
private static final String PREFERENCE_FIXED_MESSAGE_THEME = "fixedMessageViewTheme";
|
||||
private static final String PREFERENCE_COMPOSER_THEME = "messageComposeTheme";
|
||||
private static final String PREFERENCE_FONT_SIZE = "font_size";
|
||||
private static final String PREFERENCE_DATE_FORMAT = "dateFormat";
|
||||
private static final String PREFERENCE_ANIMATIONS = "animations";
|
||||
private static final String PREFERENCE_GESTURES = "gestures";
|
||||
private static final String PREFERENCE_VOLUME_NAVIGATION = "volumeNavigation";
|
||||
|
@ -109,7 +107,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||
private CheckBoxPreference mFixedMessageTheme;
|
||||
private ListPreference mMessageTheme;
|
||||
private ListPreference mComposerTheme;
|
||||
private ListPreference mDateFormat;
|
||||
private CheckBoxPreference mAnimations;
|
||||
private CheckBoxPreference mGestures;
|
||||
private CheckBoxListPreference mVolumeNavigation;
|
||||
|
@ -195,17 +192,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||
}
|
||||
});
|
||||
|
||||
mDateFormat = (ListPreference) findPreference(PREFERENCE_DATE_FORMAT);
|
||||
String[] formats = DateFormatter.getFormats(this);
|
||||
CharSequence[] entries = new CharSequence[formats.length];
|
||||
CharSequence[] values = new CharSequence[formats.length];
|
||||
for (int i = 0 ; i < formats.length; i++) {
|
||||
String format = formats[i];
|
||||
entries[i] = DateFormatter.getSampleDate(this, format);
|
||||
values[i] = format;
|
||||
}
|
||||
initListPreference(mDateFormat, DateFormatter.getFormat(this), entries, values);
|
||||
|
||||
mAnimations = (CheckBoxPreference)findPreference(PREFERENCE_ANIMATIONS);
|
||||
mAnimations.setChecked(K9.showAnimations());
|
||||
|
||||
|
@ -541,7 +527,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||
|
||||
Editor editor = preferences.edit();
|
||||
K9.save(editor);
|
||||
DateFormatter.setDateFormat(editor, mDateFormat.getValue());
|
||||
editor.commit();
|
||||
|
||||
if (needsRefresh) {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package com.fsck.k9.fragment;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -37,6 +35,7 @@ import android.support.v4.content.Loader;
|
|||
import android.support.v4.widget.CursorAdapter;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.style.AbsoluteSizeSpan;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
|
@ -408,9 +407,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
|
||||
private MessageListFragmentListener mFragmentListener;
|
||||
|
||||
|
||||
private DateFormat mTimeFormat;
|
||||
|
||||
private boolean mThreadedList;
|
||||
|
||||
private boolean mIsThreadDisplay;
|
||||
|
@ -625,7 +621,7 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
|
||||
mFragmentListener.setMessageListTitle(displayName);
|
||||
|
||||
String operation = mListener.getOperation(activity, getTimeFormat()).trim();
|
||||
String operation = mListener.getOperation(activity);
|
||||
if (operation.length() < 1) {
|
||||
mFragmentListener.setMessageListSubTitle(mAccount.getEmail());
|
||||
} else {
|
||||
|
@ -658,18 +654,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
}
|
||||
}
|
||||
|
||||
private void setupFormats() {
|
||||
mTimeFormat = android.text.format.DateFormat.getTimeFormat(mContext);
|
||||
}
|
||||
|
||||
private DateFormat getTimeFormat() {
|
||||
if (mTimeFormat == null) {
|
||||
setupFormats();
|
||||
}
|
||||
|
||||
return mTimeFormat;
|
||||
}
|
||||
|
||||
private void progress(final boolean progress) {
|
||||
mFragmentListener.enableActionBarProgress(progress);
|
||||
if (mPullToRefreshView != null && !progress) {
|
||||
|
@ -988,8 +972,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
setupFormats();
|
||||
|
||||
Context appContext = getActivity().getApplicationContext();
|
||||
|
||||
mSenderAboveSubject = K9.messageListSenderAboveSubject();
|
||||
|
@ -1791,6 +1773,7 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
boolean ccMe = mMessageHelper.toMe(account, ccAddrs);
|
||||
|
||||
CharSequence displayName = mMessageHelper.getDisplayName(account, fromAddrs, toAddrs);
|
||||
CharSequence displayDate = DateUtils.getRelativeTimeSpanString(context, cursor.getLong(DATE_COLUMN));
|
||||
|
||||
String counterpartyAddress = null;
|
||||
if (fromMe) {
|
||||
|
@ -1803,9 +1786,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
counterpartyAddress = fromAddrs[0].getAddress();
|
||||
}
|
||||
|
||||
Date sentDate = new Date(cursor.getLong(DATE_COLUMN));
|
||||
String displayDate = mMessageHelper.formatDate(sentDate);
|
||||
|
||||
int threadCount = (mThreadedList) ? cursor.getInt(THREAD_COUNT_COLUMN) : 0;
|
||||
|
||||
String subject = cursor.getString(SUBJECT_COLUMN);
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
package com.fsck.k9.helper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
import android.util.Log;
|
||||
import com.fsck.k9.K9;
|
||||
import com.fsck.k9.Preferences;
|
||||
import com.fsck.k9.R;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class DateFormatter {
|
||||
private DateFormatter() {
|
||||
}
|
||||
private final static Calendar SAMPLE_DATE = Calendar.getInstance();
|
||||
static {
|
||||
SAMPLE_DATE.set(SAMPLE_DATE.get(Calendar.YEAR), SAMPLE_DATE.getActualMaximum(Calendar.MONTH), SAMPLE_DATE.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
}
|
||||
|
||||
public static final String SHORT_FORMAT = "SHORT";
|
||||
public static final String MEDIUM_FORMAT = "MEDIUM";
|
||||
public static final String DEFAULT_FORMAT = SHORT_FORMAT;
|
||||
|
||||
public static final String PREF_KEY = "dateFormat";
|
||||
|
||||
private static volatile String sChosenFormat = null;
|
||||
|
||||
public static String getSampleDate(Context context, String formatString) {
|
||||
java.text.DateFormat formatter = getDateFormat(context, formatString);
|
||||
return formatter.format(SAMPLE_DATE.getTime());
|
||||
}
|
||||
|
||||
public static String[] getFormats(Context context) {
|
||||
return context.getResources().getStringArray(R.array.date_formats);
|
||||
}
|
||||
|
||||
private static ThreadLocal<Map<String, DateFormat>> storedFormats = new ThreadLocal<Map<String, DateFormat>>() {
|
||||
@Override
|
||||
public synchronized Map<String, DateFormat> initialValue() {
|
||||
return new HashMap<String, DateFormat>();
|
||||
}
|
||||
};
|
||||
|
||||
public static void clearChosenFormat() {
|
||||
sChosenFormat = null;
|
||||
}
|
||||
|
||||
public static DateFormat getDateFormat(Context context, String formatString) {
|
||||
java.text.DateFormat dateFormat;
|
||||
|
||||
if (SHORT_FORMAT.equals(formatString)) {
|
||||
dateFormat = android.text.format.DateFormat.getDateFormat(context);
|
||||
} else if (MEDIUM_FORMAT.equals(formatString)) {
|
||||
dateFormat = android.text.format.DateFormat.getMediumDateFormat(context);
|
||||
} else {
|
||||
Map<String, DateFormat> formatMap = storedFormats.get();
|
||||
dateFormat = formatMap.get(formatString);
|
||||
|
||||
if (dateFormat == null) {
|
||||
dateFormat = new SimpleDateFormat(formatString);
|
||||
formatMap.put(formatString, dateFormat);
|
||||
}
|
||||
}
|
||||
return dateFormat;
|
||||
}
|
||||
|
||||
public static void setDateFormat(Editor editor, String formatString) {
|
||||
sChosenFormat = formatString;
|
||||
editor.putString(PREF_KEY, formatString);
|
||||
}
|
||||
|
||||
public static String getFormat(Context context) {
|
||||
if (sChosenFormat == null) {
|
||||
try {
|
||||
Preferences prefs = Preferences.getPreferences(context);
|
||||
sChosenFormat = prefs.getPreferences().getString(PREF_KEY, DEFAULT_FORMAT);
|
||||
} catch (Exception e) {
|
||||
Log.e(K9.LOG_TAG, "Couldn't load date format from preferences; using default.", e);
|
||||
sChosenFormat = DEFAULT_FORMAT;
|
||||
}
|
||||
}
|
||||
return sChosenFormat;
|
||||
}
|
||||
|
||||
public static DateFormat getDateFormat(Context context) {
|
||||
String formatString = getFormat(context);
|
||||
return getDateFormat(context, formatString);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,5 @@
|
|||
package com.fsck.k9.helper;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.util.Log;
|
||||
|
@ -17,7 +14,6 @@ import com.fsck.k9.mail.Flag;
|
|||
import com.fsck.k9.mail.Message;
|
||||
import com.fsck.k9.mail.MessagingException;
|
||||
import com.fsck.k9.mail.Message.RecipientType;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
|
||||
public class MessageHelper {
|
||||
|
||||
|
@ -32,14 +28,8 @@ public class MessageHelper {
|
|||
|
||||
private Context mContext;
|
||||
|
||||
private DateFormat mTodayDateFormat;
|
||||
|
||||
private DateFormat mDateFormat;
|
||||
|
||||
private MessageHelper(final Context context) {
|
||||
mContext = context;
|
||||
mDateFormat = DateFormatter.getDateFormat(mContext);
|
||||
mTodayDateFormat = android.text.format.DateFormat.getTimeFormat(mContext);
|
||||
}
|
||||
|
||||
public void populate(final MessageInfoHolder target, final Message message,
|
||||
|
@ -90,21 +80,6 @@ public class MessageHelper {
|
|||
Log.w(K9.LOG_TAG, "Unable to load message info", me);
|
||||
}
|
||||
}
|
||||
public String formatDate(Date date) {
|
||||
if (date == null) {
|
||||
return "";
|
||||
}
|
||||
if (Utility.isDateToday(date)) {
|
||||
return mTodayDateFormat.format(date);
|
||||
} else {
|
||||
return mDateFormat.format(date);
|
||||
}
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
mDateFormat = DateFormatter.getDateFormat(mContext);
|
||||
mTodayDateFormat = android.text.format.DateFormat.getTimeFormat(mContext);
|
||||
}
|
||||
|
||||
public CharSequence getDisplayName(Account account, Address[] fromAddrs, Address[] toAddrs) {
|
||||
final Contacts contactHelper = K9.showContactName() ? Contacts.getInstance(mContext) : null;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.fsck.k9.preferences;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -22,7 +21,6 @@ import com.fsck.k9.K9.SplitViewMode;
|
|||
import com.fsck.k9.K9.Theme;
|
||||
import com.fsck.k9.R;
|
||||
import com.fsck.k9.Account.SortType;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
import com.fsck.k9.preferences.Settings.*;
|
||||
|
||||
public class GlobalSettings {
|
||||
|
@ -63,9 +61,6 @@ public class GlobalSettings {
|
|||
s.put("countSearchMessages", Settings.versions(
|
||||
new V(1, new BooleanSetting(false))
|
||||
));
|
||||
s.put("dateFormat", Settings.versions(
|
||||
new V(1, new DateFormatSetting(DateFormatter.DEFAULT_FORMAT))
|
||||
));
|
||||
s.put("enableDebugLogging", Settings.versions(
|
||||
new V(1, new BooleanSetting(false))
|
||||
));
|
||||
|
@ -483,32 +478,6 @@ public class GlobalSettings {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A date format setting.
|
||||
*/
|
||||
public static class DateFormatSetting extends SettingsDescription {
|
||||
public DateFormatSetting(String defaultValue) {
|
||||
super(defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object fromString(String value) throws InvalidSettingValueException {
|
||||
try {
|
||||
// The placeholders "SHORT" and "MEDIUM" are fine.
|
||||
if (DateFormatter.SHORT_FORMAT.equals(value) ||
|
||||
DateFormatter.MEDIUM_FORMAT.equals(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
// If the SimpleDateFormat constructor doesn't throw an exception, we're good.
|
||||
new SimpleDateFormat(value);
|
||||
return value;
|
||||
} catch (Exception e) {
|
||||
throw new InvalidSettingValueException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A time setting.
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,6 @@ import com.fsck.k9.Account;
|
|||
import com.fsck.k9.Identity;
|
||||
import com.fsck.k9.K9;
|
||||
import com.fsck.k9.Preferences;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
import com.fsck.k9.helper.Utility;
|
||||
import com.fsck.k9.mail.ConnectionSecurity;
|
||||
import com.fsck.k9.mail.ServerSettings;
|
||||
|
@ -293,7 +292,6 @@ public class SettingsImporter {
|
|||
}
|
||||
|
||||
preferences.loadAccounts();
|
||||
DateFormatter.clearChosenFormat();
|
||||
K9.loadPrefs(preferences);
|
||||
K9.setServicesEnabled(context);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.os.Parcelable;
|
|||
import android.text.SpannableString;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.util.Log;
|
||||
import android.util.AttributeSet;
|
||||
|
@ -25,7 +26,6 @@ import com.fsck.k9.R;
|
|||
import com.fsck.k9.activity.misc.ContactPictureLoader;
|
||||
import com.fsck.k9.helper.Contacts;
|
||||
import com.fsck.k9.Account;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
import com.fsck.k9.helper.MessageHelper;
|
||||
import com.fsck.k9.helper.StringUtils;
|
||||
import com.fsck.k9.mail.Address;
|
||||
|
@ -38,7 +38,6 @@ import java.util.LinkedHashSet;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.text.DateFormat;
|
||||
|
||||
public class MessageHeader extends ScrollView implements OnClickListener {
|
||||
private Context mContext;
|
||||
|
@ -49,8 +48,6 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
|||
private TextView mCcView;
|
||||
private TextView mCcLabel;
|
||||
private TextView mSubjectView;
|
||||
private DateFormat mDateFormat;
|
||||
private DateFormat mTimeFormat;
|
||||
|
||||
private View mChip;
|
||||
private CheckBox mFlagged;
|
||||
|
@ -87,8 +84,6 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
|||
public MessageHeader(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mContext = context;
|
||||
mDateFormat = DateFormatter.getDateFormat(mContext);
|
||||
mTimeFormat = android.text.format.DateFormat.getTimeFormat(mContext); // 12/24 date format
|
||||
mContacts = Contacts.getInstance(mContext);
|
||||
}
|
||||
|
||||
|
@ -104,7 +99,6 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
|||
|
||||
mContactBadge = (QuickContactBadge) findViewById(R.id.contact_badge);
|
||||
|
||||
|
||||
mSubjectView = (TextView) findViewById(R.id.subject);
|
||||
mAdditionalHeadersView = (TextView) findViewById(R.id.additional_headers_view);
|
||||
mChip = findViewById(R.id.chip);
|
||||
|
@ -224,8 +218,6 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
|||
public void populate(final Message message, final Account account) throws MessagingException {
|
||||
final Contacts contacts = K9.showContactName() ? mContacts : null;
|
||||
final CharSequence from = Address.toFriendly(message.getFrom(), contacts);
|
||||
final String date = mDateFormat.format(message.getSentDate());
|
||||
final String time = mTimeFormat.format(message.getSentDate());
|
||||
final CharSequence to = Address.toFriendly(message.getRecipients(Message.RecipientType.TO), contacts);
|
||||
final CharSequence cc = Address.toFriendly(message.getRecipients(Message.RecipientType.CC), contacts);
|
||||
|
||||
|
@ -274,11 +266,13 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
|||
}
|
||||
mSubjectView.setTextColor(0xff000000 | defaultSubjectColor);
|
||||
|
||||
if (date != null) {
|
||||
mDateView.setText(time + " - " + date);
|
||||
} else {
|
||||
mDateView.setText(time);
|
||||
}
|
||||
String dateTime = DateUtils.formatDateTime(mContext,
|
||||
message.getSentDate().getTime(),
|
||||
DateUtils.FORMAT_SHOW_DATE
|
||||
| DateUtils.FORMAT_ABBREV_ALL
|
||||
| DateUtils.FORMAT_SHOW_TIME
|
||||
| DateUtils.FORMAT_SHOW_YEAR);
|
||||
mDateView.setText(dateTime);
|
||||
|
||||
if (K9.showContactPicture()) {
|
||||
mContactBadge.assignContactFromEmail(counterpartyAddress, true);
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
package com.fsck.k9;
|
||||
|
||||
import com.fsck.k9.activity.K9ActivityCommon;
|
||||
import com.fsck.k9.helper.DateFormatter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
public class TranslationTest extends AndroidTestCase {
|
||||
public void testDateFormats() {
|
||||
forAllLanguages(new LanguageSpecific() {
|
||||
@Override
|
||||
public void runWithLanguage(Context context, String language) {
|
||||
Resources res = context.getResources();
|
||||
String dateFormatCommon = res.getString(R.string.date_format_common);
|
||||
try {
|
||||
DateFormatter.getDateFormat(mContext, dateFormatCommon);
|
||||
} catch (Exception e) {
|
||||
fail("Invalid date format string \"" + dateFormatCommon +
|
||||
"\" for language \"" + language + "\"");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void forAllLanguages(LanguageSpecific action) {
|
||||
Resources res = mContext.getResources();
|
||||
String[] languages = res.getStringArray(R.array.supported_languages);
|
||||
|
||||
for (String lang : languages) {
|
||||
K9ActivityCommon.setLanguage(mContext, lang);
|
||||
|
||||
action.runWithLanguage(mContext, lang);
|
||||
}
|
||||
}
|
||||
|
||||
interface LanguageSpecific {
|
||||
void runWithLanguage(Context context, String language);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue