From 7ed111b1bf152613d17254808a4fcf89f5774297 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 10 Aug 2014 10:35:17 +0200 Subject: Add translations for update system --- app/Controllers/updateController.php | 7 +++++-- app/i18n/en.php | 9 +++++++++ app/i18n/fr.php | 11 ++++++++++- app/views/update/index.phtml | 4 +++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index a15cb9fd5..a94af4417 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -11,6 +11,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { } Minz_View::prependTitle(_t('update_system') . ' · '); + $this->view->last_update_time = 'unknown'; // TODO } public function indexAction() { @@ -61,7 +62,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { $this->view->message = array( 'status' => 'bad', 'title' => _t('damn'), - 'body' => _t('update_problem') + 'body' => _t('update_problem', 'Cannot save the update script') ); } } else { @@ -88,6 +89,8 @@ class FreshRSS_update_Controller extends Minz_ActionController { if ($res === true) { @unlink(UPDATE_FILENAME); + // TODO: record last update + Minz_Session::_param('notification', array( 'type' => 'good', 'content' => Minz_Translate::t('update_finished') @@ -97,7 +100,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { } else { Minz_Session::_param('notification', array( 'type' => 'bad', - 'content' => Minz_Translate::t('update_failed', $res) + 'content' => Minz_Translate::t('update_problem', $res) )); Minz_Request::forward(array('c' => 'update'), true); diff --git a/app/i18n/en.php b/app/i18n/en.php index 6110ccb11..6a0b4a139 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -192,6 +192,7 @@ return array ( 'informations' => 'Information', 'damn' => 'Damn!', + 'ok' => 'Ok!', 'feed_in_error' => 'This feed has encountered a problem. Please verify that it is always reachable then actualize it.', 'feed_empty' => 'This feed is empty. Please verify that it is still maintained.', 'feed_description' => 'Description', @@ -409,5 +410,13 @@ return array ( 'stats_top_feed' => 'Top ten feeds', 'stats_entry_count' => 'Entry count', + 'update' => 'Update', + 'update_system' => 'Update system', + 'update_check' => 'Check for new updates', + 'update_last' => 'Last update: %s', 'update_can_apply' => 'There is an available update. Apply', + 'update_server_not_found' => 'Update server cannot be found. [%s]', + 'no_update' => 'No update to apply', + 'update_problem' => 'Update has encountered an error: %s', + 'update_finished' => 'Update is now finished!', ); diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 5f88aa069..d0637b9f7 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -192,6 +192,7 @@ return array ( 'informations' => 'Informations', 'damn' => 'Arf !', + 'ok' => 'Ok !', 'feed_in_error' => 'Ce flux a rencontré un problème. Veuillez vérifier qu’il est toujours accessible puis actualisez-le.', 'feed_empty' => 'Ce flux est vide. Veuillez vérifier qu’il est toujours maintenu.', 'feed_description' => 'Description', @@ -409,5 +410,13 @@ return array ( 'stats_top_feed' => 'Les dix plus gros flux', 'stats_entry_count' => 'Nombre d’articles', - 'update_can_apply' => 'Il y’a une mise à jour à appliquer. Appliquer', + 'update' => 'Mise à jour', + 'update_system' => 'Système de mise à jour', + 'update_check' => 'Vérifier les mises à jour', + 'update_last' => 'Dernière mise à jour : %s', + 'update_can_apply' => 'Il y’a une mise à jour à appliquer. Appliquer la mise à jour', + 'update_server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]', + 'no_update' => 'Aucune mise à jour à appliquer', + 'update_problem' => 'La mise à jour a rencontré un problème : %s', + 'update_finished' => 'La mise à jour est terminée !', ); diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml index a1a872845..8f6ee6269 100644 --- a/app/views/update/index.phtml +++ b/app/views/update/index.phtml @@ -12,8 +12,10 @@ message) || $this->message['status'] !== 'good') { ?>

- last_update_time); ?>

+

+ +

-- cgit v1.2.3