Browse Source

Improve i18n for JavaScript

notif_* messages have been moved into feedback array.
Marien Fressinaud 11 years ago
parent
commit
bf2f7176ee
3 changed files with 8 additions and 8 deletions
  1. 3 3
      app/i18n/en/gen.php
  2. 3 3
      app/i18n/fr/gen.php
  3. 2 2
      app/views/helpers/javascript_vars.phtml

+ 3 - 3
app/i18n/en/gen.php

@@ -96,11 +96,11 @@ return array(
 		'confirm_action' => 'Are you sure you want to perform this action? It cannot be cancelled!',
 		'confirm_action_feed_cat' => 'Are you sure you want to perform this action? You will lose related favorites and user queries. It cannot be cancelled!',
 		'feedback' => array(
-			'request_failed' => 'A problem happened and the request failed.'
+			'body_new_articles' => 'There are \\d new articles to read on FreshRSS.',
+			'request_failed' => 'A problem happened and the request failed.',
+			'title_new_articles' => 'FreshRSS: new articles!',
 		),
 		'new_article' => 'There are new available articles, click to refresh the page.',
-		'notif_body_new_articles' => 'There are \\d new articles to read on FreshRSS.',
-		'notif_title_new_articles' => 'FreshRSS: new articles!',
 		'should_be_activated' => 'JavaScript must be enabled',
 	),
 	'lang' => array(

+ 3 - 3
app/i18n/fr/gen.php

@@ -96,11 +96,11 @@ return array(
 		'confirm_action' => 'Êtes-vous sûr(e) de vouloir continuer ? Cette action ne peut être annulée !',
 		'confirm_action_feed_cat' => 'Êtes-vous sûr(e) de vouloir continuer ? Vous perdrez les favoris et les filtres associés. Cette action ne peut être annulée !',
 		'feedback' => array(
-			'request_failed' => 'Un problème est survenu et la requête a échoué.'
+			'body_new_articles' => 'Il y a \\d nouveaux articles à lire sur FreshRSS.',
+			'request_failed' => 'Un problème est survenu et la requête a échoué.',
+			'title_new_articles' => 'FreshRSS : nouveaux articles !',
 		),
 		'new_article' => 'Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.',
-		'notif_body_new_articles' => 'Il y a \\d nouveaux articles à lire sur FreshRSS.',
-		'notif_title_new_articles' => 'FreshRSS : nouveaux articles !',
 		'should_be_activated' => 'Le JavaScript doit être activé.',
 	),
 	'lang' => array(

+ 2 - 2
app/views/helpers/javascript_vars.phtml

@@ -60,8 +60,8 @@ echo 'url={',
 
 echo 'i18n={',
 	'confirmation_default:"', _t('gen.js.confirm_action'), '",',
-	'notif_title_articles:"', _t('gen.js.notif_title_new_articles'), '",',
-	'notif_body_articles:"', _t('gen.js.notif_body_new_articles'), '",',
+	'notif_title_articles:"', _t('gen.js.feedback.title_new_articles'), '",',
+	'notif_body_articles:"', _t('gen.js.feedback.body_new_articles'), '",',
 	'notif_request_failed:"', _t('gen.js.feedback.request_failed'), '",',
 	'category_empty:"', _t('gen.js.category_empty'), '"',
 "},\n";