diff options
| author | 2014-12-11 19:32:59 +0100 | |
|---|---|---|
| committer | 2014-12-11 19:32:59 +0100 | |
| commit | 59fc73baa9cbd87fdc2d63e83533a36533c740bf (patch) | |
| tree | 2fbf504084547f057d2e72cfcefc64bf60549195 | |
| parent | fee1ae997af678cb834d9db25a636032f43a5674 (diff) | |
Fix i18n for update and user controllers
| -rw-r--r-- | app/Controllers/updateController.php | 30 | ||||
| -rw-r--r-- | app/Controllers/userController.php | 12 | ||||
| -rw-r--r-- | app/i18n/en/admin.php | 5 | ||||
| -rw-r--r-- | app/i18n/en/conf.php | 3 | ||||
| -rw-r--r-- | app/i18n/en/feedback.php | 21 | ||||
| -rw-r--r-- | app/i18n/en/gen.php | 15 | ||||
| -rw-r--r-- | app/i18n/fr/admin.php | 7 | ||||
| -rw-r--r-- | app/i18n/fr/conf.php | 3 | ||||
| -rw-r--r-- | app/i18n/fr/feedback.php | 21 | ||||
| -rw-r--r-- | app/i18n/fr/gen.php | 14 |
10 files changed, 78 insertions, 53 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 0896b13ac..1b44a739c 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -20,21 +20,21 @@ class FreshRSS_update_Controller extends Minz_ActionController { } public function indexAction() { - Minz_View::prependTitle(_t('update_system') . ' · '); + Minz_View::prependTitle(_t('admin.update.title') . ' · '); if (file_exists(UPDATE_FILENAME) && !is_writable(FRESHRSS_PATH)) { $this->view->message = array( 'status' => 'bad', - 'title' => _t('damn'), - 'body' => _t('file_is_nok', FRESHRSS_PATH) + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.file_is_nok', FRESHRSS_PATH) ); } elseif (file_exists(UPDATE_FILENAME)) { // There is an update file to apply! $this->view->update_to_apply = true; $this->view->message = array( 'status' => 'good', - 'title' => _t('ok'), - 'body' => _t('update_can_apply') + 'title' => _t('gen.short.ok'), + 'body' => _t('feedback.update.can_apply') ); } } @@ -67,8 +67,8 @@ class FreshRSS_update_Controller extends Minz_ActionController { $this->view->message = array( 'status' => 'bad', - 'title' => _t('damn'), - 'body' => _t('update_server_not_found', FRESHRSS_UPDATE_WEBSITE) + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.server_not_found', FRESHRSS_UPDATE_WEBSITE) ); return; } @@ -78,8 +78,8 @@ class FreshRSS_update_Controller extends Minz_ActionController { if (strpos($status, 'UPDATE') !== 0) { $this->view->message = array( 'status' => 'bad', - 'title' => _t('damn'), - 'body' => _t('no_update') + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.none') ); @file_put_contents(DATA_PATH . '/last_update.txt', time()); @@ -93,8 +93,8 @@ class FreshRSS_update_Controller extends Minz_ActionController { } else { $this->view->message = array( 'status' => 'bad', - 'title' => _t('damn'), - 'body' => _t('update_problem', 'Cannot save the update script') + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.error', 'Cannot save the update script') ); } } @@ -112,9 +112,9 @@ class FreshRSS_update_Controller extends Minz_ActionController { if ($res === true) { @unlink(UPDATE_FILENAME); @file_put_contents(DATA_PATH . '/last_update.txt', time()); - Minz_Request::good(_t('update_finished')); + Minz_Request::good(_t('feedback.update.finished')); } else { - Minz_Request::bad(_t('update_problem', $res), + Minz_Request::bad(_t('feedback.update.error', $res), array('c' => 'update', 'a' => 'index')); } } @@ -133,7 +133,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { 'params' => array('post_conf' => true) ), true); } else { - Minz_Request::bad(_t('update_problem', $res), + Minz_Request::bad(_t('feedback.update.error', $res), array('c' => 'update', 'a' => 'index')); } } @@ -143,7 +143,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { * This action displays information about installation. */ public function checkInstallAction() { - Minz_View::prependTitle(_t('gen.title.check_install') . ' · '); + Minz_View::prependTitle(_t('admin.check_install.title') . ' · '); $this->view->status_php = check_install_php(); $this->view->status_files = check_install_files(); diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 5050571a9..3b40e42dc 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -23,7 +23,7 @@ class FreshRSS_user_Controller extends Minz_ActionController { * This action displays the user profile page. */ public function profileAction() { - Minz_View::prependTitle(_t('gen.title.user_profile') . ' · '); + Minz_View::prependTitle(_t('conf.profile.title') . ' · '); if (Minz_Request::isPost()) { $ok = true; @@ -71,10 +71,10 @@ class FreshRSS_user_Controller extends Minz_ActionController { } if ($ok) { - Minz_Request::good(_t('feedback.user_profile.updated'), + Minz_Request::good(_t('feedback.profile.updated'), array('c' => 'user', 'a' => 'profile')); } else { - Minz_Request::bad(_t('error_occurred'), + Minz_Request::bad(_t('feedback.profile.error'), array('c' => 'user', 'a' => 'profile')); } } @@ -88,7 +88,7 @@ class FreshRSS_user_Controller extends Minz_ActionController { Minz_Error::error(403); } - Minz_View::prependTitle(_t('gen.title.user_management') . ' · '); + Minz_View::prependTitle(_t('admin.user.title') . ' · '); // Get the correct current user. $username = Minz_Request::param('u', Minz_Session::param('currentUser')); @@ -168,7 +168,7 @@ class FreshRSS_user_Controller extends Minz_ActionController { $notif = array( 'type' => $ok ? 'good' : 'bad', - 'content' => _t($ok ? 'user_created' : 'error_occurred', $new_user_name) + 'content' => _t('feedback.user.created' . (!$ok ? '.error' : ''), $new_user_name) ); Minz_Session::_param('notification', $notif); } @@ -201,7 +201,7 @@ class FreshRSS_user_Controller extends Minz_ActionController { $notif = array( 'type' => $ok ? 'good' : 'bad', - 'content' => _t($ok ? 'user_deleted' : 'error_occurred', $username) + 'content' => _t('feedback.user.deleted' . (!$ok ? '.error' : ''), $username) ); Minz_Session::_param('notification', $notif); } diff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.php index 05077cf66..7778c56a7 100644 --- a/app/i18n/en/admin.php +++ b/app/i18n/en/admin.php @@ -81,6 +81,7 @@ return array( 'nok' => 'There is one or more lacking tables in the database.', 'ok' => 'Tables are existing in the database.', ), + 'title' => 'Installation checking', 'tokens' => array( 'nok' => 'Check permissions on <em>./data/tokens</em> directory. HTTP server must have rights to write into', 'ok' => 'Permissions on tokens directory are good.', @@ -122,7 +123,11 @@ return array( 'title' => 'Statistics', 'top_feed' => 'Top ten feeds', ), + 'update' => array( + 'title' => 'Update system', + ), 'users' => array( 'articles_and_size' => '%s articles (%s)', + 'title' => 'Manage users', ), ); diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index 0a1aa9f8e..09f9fa9ce 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -11,6 +11,9 @@ return array( 'number' => 'Query n°%d', 'title' => 'User queries', ), + 'profile' => array( + 'title' => 'Profile', + ), 'reading' => array( 'title' => 'Reading', ), diff --git a/app/i18n/en/feedback.php b/app/i18n/en/feedback.php index 0dcbbe44d..192a33fcf 100644 --- a/app/i18n/en/feedback.php +++ b/app/i18n/en/feedback.php @@ -70,7 +70,26 @@ return array( ), 'purge_completed' => 'Purge completed (%d articles deleted)', ), - 'user_profile' => array( + 'update' => array( + 'can_apply' => 'An update is available.', + 'error' => 'The update process has encountered an error: %s', + 'file_is_nok' => 'Check permissions on <em>%s</em> directory. HTTP server must have rights to write into', + 'finished' => 'Update completed!', + 'none' => 'No update to apply', + 'server_not_found' => 'Update server cannot be found. [%s]', + ), + 'user' => array( + 'created' => array( + '_' => 'User %s has been created', + 'error' => 'User %s cannot be created', + ), + 'deleted' => array( + '_' => 'User %s has been deleted', + 'error' => 'User %s cannot be deleted', + ), + ), + 'profile' => array( + 'error' => 'Your profile cannot be modified', 'updated' => 'Your profile has been modified', ), ); diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index 2a858d6a6..761d566bf 100644 --- a/app/i18n/en/gen.php +++ b/app/i18n/en/gen.php @@ -123,12 +123,6 @@ return array( 'or' => 'or', 'yes' => 'Yes', ), - 'title' => array( - 'authentication' => 'Authentication', - 'check_install' => 'Installation checking', - 'user_management' => 'Manage users', - 'user_profile' => 'Profile', - ), 'freshrss' => 'FreshRSS', 'activate_sharing' => 'Activate sharing', 'after_onread' => 'After “mark all as read”,', @@ -203,7 +197,6 @@ return array( 'favicons_is_ok' => 'Permissions on favicons directory are good', 'feed' => 'Feed', 'feeds' => 'Feeds', - 'file_is_nok' => 'Check permissions on <em>%s</em> directory. HTTP server must have rights to write into', 'finish_installation' => 'Complete installation', 'first_article' => 'Skip to the first article', 'fix_errors_before' => 'Fix errors before skip to the next step.', @@ -250,7 +243,6 @@ return array( 'no_query_filter' => 'No filter', 'no_rss_feed' => 'No RSS feed', 'no_selected_feed' => 'No feed selected.', - 'no_update' => 'No update to apply', 'not_read' => '%d unread', 'not_reads' => '%d unread', 'not_yet_implemented' => 'Not yet implemented', @@ -323,20 +315,13 @@ return array( 'top_line' => 'Top line', 'unsafe_autologin' => 'Allow unsafe automatic login using the format: ', 'update_apply' => 'Apply', - 'update_can_apply' => 'An update is available.', 'update_check' => 'Check for new updates', 'update_end' => 'Update process is completed, now you can go to the final step.', - 'update_finished' => 'Update completed!', 'update_last' => 'Last verification: %s', 'update_long' => 'This can take a long time, depending on the size of your database. You may have to wait for this page to time out (~5 minutes) and then refresh this page.', - 'update_problem' => 'The update process has encountered an error: %s', - 'update_server_not_found' => 'Update server cannot be found. [%s]', 'update_start' => 'Start update process', - 'update_system' => 'Update system', 'updated' => 'Modifications have been updated', 'upon_reception' => 'upon reception of the article', - 'user_created' => 'User %s has been created', - 'user_deleted' => 'User %s has been deleted', 'user_filter' => 'Access user filters', 'user_filter_help' => 'If there is only one user filter, it is used. Else filters are accessible by their number.', 'username' => 'Username', diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.php index 25c62c6ea..ffb390876 100644 --- a/app/i18n/fr/admin.php +++ b/app/i18n/fr/admin.php @@ -81,6 +81,7 @@ return array( 'nok' => 'Il manque une ou plusieurs tables en base de données.', 'ok' => 'Les tables sont bien présentes en base de données.', ), + 'title' => 'Vérification de l’installation', 'tokens' => array( 'nok' => 'Veuillez vérifier les droits sur le répertoire <em>./data/tokens</em>. Le serveur HTTP doit être capable d’écrire dedans', 'ok' => 'Les droits sur le répertoire des tokens sont bons.', @@ -122,7 +123,11 @@ return array( 'title' => 'Statistiques', 'top_feed' => 'Les dix plus gros flux', ), - 'users' => array( + 'update' => array( + 'title' => 'Système de mise à jour', + ), + 'user' => array( 'articles_and_size' => '%s articles (%s)', + 'title' => 'Gestion des utilisateurs', ), ); diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index deba4509e..9f78fde87 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -11,6 +11,9 @@ return array( 'number' => 'Filtre n°%d', 'title' => 'Filtres utilisateurs', ), + 'profile' => array( + 'title' => 'Profil', + ), 'reading' => array( 'title' => 'Lecture', ), diff --git a/app/i18n/fr/feedback.php b/app/i18n/fr/feedback.php index 539fce55d..992300c7d 100644 --- a/app/i18n/fr/feedback.php +++ b/app/i18n/fr/feedback.php @@ -70,7 +70,26 @@ return array( ), 'purge_completed' => 'Purge effectuée (%d articles supprimés).', ), - 'user_profile' => array( + 'update' => array( + 'can_apply' => 'Une mise à jour est disponible.', + 'error' => 'La mise à jour a rencontré un problème : %s', + 'file_is_nok' => 'Veuillez vérifier les droits sur le répertoire <em>%s</em>. Le serveur HTTP doit être capable d’écrire dedans', + 'finished' => 'La mise à jour est terminée !', + 'none' => 'Aucune mise à jour à appliquer', + 'server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]', + ), + 'user' => array( + 'created' => array( + '_' => 'L’utilisateur %s a été créé.', + 'error' => 'L’utilisateur %s ne peut pas être créé.', + ), + 'deleted' => array( + '_' => 'L’utilisateur %s a été supprimé.', + 'error' => 'L’utilisateur %s ne peut pas être supprimé.', + ), + ), + 'profile' => array( + 'error' => 'Votre profil n’a pas pu être mis à jour', 'updated' => 'Votre profil a été mis à jour', ), ); diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index f67ee3d52..1866f8e22 100644 --- a/app/i18n/fr/gen.php +++ b/app/i18n/fr/gen.php @@ -123,11 +123,6 @@ return array( 'or' => 'ou', 'yes' => 'Oui', ), - 'title' => array( - 'check_install' => 'Vérification de l’installation', - 'user_management' => 'Gestion des utilisateurs', - 'user_profile' => 'Profil', - ), 'freshrss' => 'FreshRSS', 'activate_sharing' => 'Activer le partage', 'after_onread' => 'Après “marquer tout comme lu”,', @@ -202,7 +197,6 @@ return array( 'favicons_is_ok' => 'Les droits sur le répertoire des favicons sont bons', 'feed' => 'Flux', 'feeds' => 'Flux', - 'file_is_nok' => 'Veuillez vérifier les droits sur le répertoire <em>%s</em>. Le serveur HTTP doit être capable d’écrire dedans', 'finish_installation' => 'Terminer l’installation', 'first_article' => 'Passer au premier article', 'fix_errors_before' => 'Veuillez corriger les erreurs avant de passer à l’étape suivante.', @@ -249,7 +243,6 @@ return array( 'no_query_filter' => 'Aucun filtre appliqué', 'no_rss_feed' => 'Aucun flux RSS', 'no_selected_feed' => 'Aucun flux sélectionné.', - 'no_update' => 'Aucune mise à jour à appliquer', 'not_read' => '%d non lu', 'not_reads' => '%d non lus', 'not_yet_implemented' => 'Pas encore implémenté', @@ -322,20 +315,13 @@ return array( 'top_line' => 'Ligne du haut', 'unsafe_autologin' => 'Autoriser les connexions automatiques non-sûres au format : ', 'update_apply' => 'Appliquer la mise à jour', - 'update_can_apply' => 'Une mise à jour est disponible.', 'update_check' => 'Vérifier les mises à jour', 'update_end' => 'La mise à jour est terminée, vous pouvez maintenant passer à l’étape finale.', - 'update_finished' => 'La mise à jour est terminée !', 'update_last' => 'Dernière vérification : %s', 'update_long' => 'Ce processus peut prendre longtemps, selon la taille de votre base de données. Vous aurez peut-être à attendre que cette page dépasse son temps maximum d’exécution (~5 minutes) puis à la recharger.', - 'update_problem' => 'La mise à jour a rencontré un problème : %s', - 'update_server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]', 'update_start' => 'Lancer la mise à jour', - 'update_system' => 'Système de mise à jour', 'updated' => 'Modifications enregistrées.', 'upon_reception' => 'dès la réception du nouvel article', - 'user_created' => 'L’utilisateur %s a été créé.', - 'user_deleted' => 'L’utilisateur %s a été supprimé.', 'user_filter' => 'Accéder aux filtres utilisateur', 'user_filter_help' => 'S’il n’y a qu’un filtre utilisateur, celui-ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.', 'username' => 'Nom d’utilisateur', |
