From 14206aca160355507ae50e6337c798733e730c15 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 18 Jan 2015 11:59:03 +0100 Subject: Improve behavior when mark as read / favorite fail If the request fails: - Open a notification to inform user - Remove pending index from the pending_feeds list Fix https://github.com/FreshRSS/FreshRSS/issues/751 --- app/views/helpers/javascript_vars.phtml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views/helpers/javascript_vars.phtml') diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index fec3a6f7c..1fef13b52 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -62,6 +62,7 @@ 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_request_failed:"', _t('gen.js.feedback.request_failed'), '",', 'category_empty:"', _t('gen.js.category_empty'), '"', "},\n"; -- cgit v1.2.3 From bf2f7176ee639ab42e929e7331939da5258165c5 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 18 Jan 2015 12:06:40 +0100 Subject: Improve i18n for JavaScript notif_* messages have been moved into feedback array. --- app/i18n/en/gen.php | 6 +++--- app/i18n/fr/gen.php | 6 +++--- app/views/helpers/javascript_vars.phtml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'app/views/helpers/javascript_vars.phtml') diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index 539feaf40..4e9e2e7d6 100644 --- a/app/i18n/en/gen.php +++ b/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( diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index 05ff9c38d..10b2c8d28 100644 --- a/app/i18n/fr/gen.php +++ b/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( diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 1fef13b52..613521f0f 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/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"; -- cgit v1.2.3 From 2036b9aed32c5446c31578ad5ff63b2a7a02bbc2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 20 Jan 2015 19:54:00 +0100 Subject: Suppress possible warnings after update Prevent JavaScript errors when the shortcuts have not been defined in the config file. https://github.com/FreshRSS/FreshRSS/issues/733 --- app/views/helpers/javascript_vars.phtml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'app/views/helpers/javascript_vars.phtml') diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 613521f0f..adf0783f3 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -35,20 +35,20 @@ echo 'var context={', "},\n"; echo 'shortcuts={', - 'mark_read:"', $s['mark_read'], '",', - 'mark_favorite:"', $s['mark_favorite'], '",', - 'go_website:"', $s['go_website'], '",', - 'prev_entry:"', $s['prev_entry'], '",', - 'next_entry:"', $s['next_entry'], '",', - 'first_entry:"', $s['first_entry'], '",', - 'last_entry:"', $s['last_entry'], '",', - 'collapse_entry:"', $s['collapse_entry'], '",', - 'load_more:"', $s['load_more'], '",', - 'auto_share:"', $s['auto_share'], '",', - 'focus_search:"', $s['focus_search'], '",', - 'user_filter:"', $s['user_filter'], '",', - 'help:"', $s['help'], '",', - 'close_dropdown:"', $s['close_dropdown'], '"', + 'mark_read:"', @$s['mark_read'], '",', + 'mark_favorite:"', @$s['mark_favorite'], '",', + 'go_website:"', @$s['go_website'], '",', + 'prev_entry:"', @$s['prev_entry'], '",', + 'next_entry:"', @$s['next_entry'], '",', + 'first_entry:"', @$s['first_entry'], '",', + 'last_entry:"', @$s['last_entry'], '",', + 'collapse_entry:"', @$s['collapse_entry'], '",', + 'load_more:"', @$s['load_more'], '",', + 'auto_share:"', @$s['auto_share'], '",', + 'focus_search:"', @$s['focus_search'], '",', + 'user_filter:"', @$s['user_filter'], '",', + 'help:"', @$s['help'], '",', + 'close_dropdown:"', @$s['close_dropdown'], '"', "},\n"; echo 'url={', -- cgit v1.2.3