diff --git a/src/main/java/com/commafeed/backend/dao/FeedDAO.java b/src/main/java/com/commafeed/backend/dao/FeedDAO.java index dd44d1cf..eb031403 100644 --- a/src/main/java/com/commafeed/backend/dao/FeedDAO.java +++ b/src/main/java/com/commafeed/backend/dao/FeedDAO.java @@ -18,12 +18,13 @@ import com.commafeed.backend.model.Feed; import com.commafeed.backend.model.FeedPushInfo; import com.commafeed.backend.model.Feed_; import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; import com.uaihebert.model.EasyCriteria; @Stateless public class FeedDAO extends GenericDAO { - private Predicate[] getUpdatablePredicates(Root root) { + private List getUpdatablePredicates(Root root) { Date now = Calendar.getInstance().getTime(); Predicate hasSubscriptions = builder.isNotEmpty(root @@ -38,9 +39,9 @@ public class FeedDAO extends GenericDAO { Predicate disabledDateIsInPast = builder.lessThan( root.get(Feed_.disabledUntil), now); - return new Predicate[] { hasSubscriptions, + return Lists.newArrayList(hasSubscriptions, builder.or(neverUpdated, updatedBeforeThreshold), - builder.or(disabledDateIsNull, disabledDateIsInPast) }; + builder.or(disabledDateIsNull, disabledDateIsInPast)); } public Long getUpdatableCount() { @@ -48,7 +49,10 @@ public class FeedDAO extends GenericDAO { Root root = query.from(getType()); query.select(builder.count(root)); - query.where(getUpdatablePredicates(root)); + + List preds = getUpdatablePredicates(root); + preds.add(builder.lessThanOrEqualTo(root.get(Feed_.errorCount), 10)); + query.where(preds.toArray(new Predicate[0])); TypedQuery q = em.createQuery(query); return q.getSingleResult(); @@ -58,7 +62,7 @@ public class FeedDAO extends GenericDAO { CriteriaQuery query = builder.createQuery(getType()); Root root = query.from(getType()); - query.where(getUpdatablePredicates(root)); + query.where(getUpdatablePredicates(root).toArray(new Predicate[0])); query.orderBy(builder.asc(root.get(Feed_.lastUpdated))); TypedQuery q = em.createQuery(query); diff --git a/src/main/java/com/commafeed/backend/feeds/FeedUtils.java b/src/main/java/com/commafeed/backend/feeds/FeedUtils.java index 25dede29..50382d8c 100644 --- a/src/main/java/com/commafeed/backend/feeds/FeedUtils.java +++ b/src/main/java/com/commafeed/backend/feeds/FeedUtils.java @@ -131,7 +131,7 @@ public class FeedUtils { if (errorCount >= retriesBeforeDisable) { int disabledHours = errorCount - retriesBeforeDisable + 1; - disabledHours = Math.min(24, disabledHours); + disabledHours = Math.min(24 * 7, disabledHours); return DateUtils.addHours(now, disabledHours); } return null; diff --git a/src/main/resources/i18n/de.properties b/src/main/resources/i18n/de.properties index 6b6a8af8..d2737a82 100644 --- a/src/main/resources/i18n/de.properties +++ b/src/main/resources/i18n/de.properties @@ -94,6 +94,7 @@ about.goodies=Goodies about.goodies.subscribe_url=Abonnement-URL about.goodies.chrome_extension=Chrome Erweiterung about.goodies.firefox_extension=Firefox Add-on +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Abonnieren-bookmarklet (klicken) about.goodies.next_unread_bookmarklet=Nächster ungelesener Artikel-bookmarklet (in Lesezeichenleiste ziehen) about.translation=Übersetzung diff --git a/src/main/resources/i18n/en.properties b/src/main/resources/i18n/en.properties index 3fe82b70..c8ab9924 100644 --- a/src/main/resources/i18n/en.properties +++ b/src/main/resources/i18n/en.properties @@ -94,6 +94,7 @@ about.goodies=Goodies about.goodies.subscribe_url=Subscribe URL about.goodies.chrome_extension=Chrome extension about.goodies.firefox_extension=Firefox extension +about.goodies.opera_extension=Opera extension about.goodies.subscribe_bookmarklet=Add subscription bookmarklet (click) about.goodies.next_unread_bookmarklet=Next unread item bookmarklet (drag to bookmark bar) about.translation=Translation diff --git a/src/main/resources/i18n/es.properties b/src/main/resources/i18n/es.properties index ce47b2b0..541fa587 100644 --- a/src/main/resources/i18n/es.properties +++ b/src/main/resources/i18n/es.properties @@ -94,6 +94,7 @@ about.goodies=Goodies about.goodies.subscribe_url=Subscribe URL ####### Needs translation about.goodies.chrome_extension=Extensión de Chrome about.goodies.firefox_extension=Extensión de Firefox +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Add subscription bookmarklet (click) ####### Needs translation about.goodies.next_unread_bookmarklet=Next unread item bookmarklet (drag to bookmark bar) ####### Needs translation about.translation=Traducción diff --git a/src/main/resources/i18n/fa.properties b/src/main/resources/i18n/fa.properties new file mode 100644 index 00000000..72496f2c --- /dev/null +++ b/src/main/resources/i18n/fa.properties @@ -0,0 +1,121 @@ +global.save= ذخیره +global.cancel=لغو +global.delete=حذف +global.required=لازم +global.download=بارگذاری +global.link=پیوند +global.bookmark=بوکمارک +global.close=بستن + +tree.subscribe=مشترک شوید +tree.import=درون ریزی +tree.new_category=دسته جدید +tree.all=کل مطالب +tree.starred=ستاره‌دار + +subscribe.feed_url=آدرس فید +subscribe.feed_name=نام فید +subscribe.category=دسته + +import.google_reader_prefix=اجازه می دهید فید های شماره از اکنت +import.google_reader_suffix= تا وارد کنیم. +import.google_download=یا به جای آن, فایل subscriptions.xml خود را آپلود کنید. +import.google_download_link=اون از اینجا دانلود کنید. +import.xml_file=XML File + +new_category.name=نام +new_category.parent=پدر + +toolbar.unread=نخوانده +toolbar.all=کل مطالب +toolbar.previous_entry=مطلب قبلی +toolbar.next_entry=مطلب بعدی +toolbar.refresh=بارگزاری مجدد +toolbar.sort_by_asc_desc=مرتب کردن بر اساس تاریخ +toolbar.titles_only=تنها عناوین +toolbar.expanded_view=نمای کامل +toolbar.mark_all_as_read=علامت گذاری تمامی مطالب به عنوان خوانده شده +toolbar.mark_all_older_day=مطالب قدیمی تر از یک روز +toolbar.mark_all_older_week=مطالب قدیمی تر از یک هفته +toolbar.mark_all_older_two_weeks= مطالب قدیمی تر از چند هفته قیل +toolbar.settings=تنظیمات +toolbar.profile=نمایه +toolbar.admin=مدیریت +toolbar.about=درباره +toolbar.logout=خروج +toolbar.donate=کمک مالی + +view.error_while_loading_feed=متاسفانه، هنگام بارگذاری این فید خطایی رخ داده است. +view.keep_unread=نخوانده شده نگهدار +view.no_unread_items=فید خوانده نشده. + +settings.general=همگانی +settings.general.language=زبان +settings.general.language.contribute=مشارکت در ترجمه +settings.general.show_unread=تنها فید ها و دسته های را که دارای مطالب نخوانده هستند نمایش بده. +settings.general.social_buttons=نشان دادن دکمه های اشتراک گذاری در شبکه های اجتماعی +settings.general.scroll_marks=در نمای کامل، با اسکرول شدن مطالب آنها به عنوان خوانده شده در نظر گرفتن شوند. +settings.custom_css=شخصی سازی پوسته + +details.feed_details=جزئیات فید +details.url=آدرس +details.name=نام +details.category=دسته +details.last_refresh=آخرین بروزرسانی +details.next_refresh=بروزرسانی بعدی +details.queued_for_refresh=منتظر برای بروزرسانی +details.feed_url=آدرس فید +details.generate_api_key_first=ابتدا یک کلید API در نمایه ی خود ایجاد کنید. +details.unsubscribe=لغو اشتراک +details.category_details=جزئیات دسته +details.parent_category=پدر دسته + +profile.user_name=نام کاربری +profile.email=رایانامه +profile.change_password=تغییر رمز عبور +profile.confirm_password=تأیید رمز عبور +profile.minimum_6_chars=حداقل 6 حرف +profile.passwords_do_not_match=رمز‌های عبور وارد شده مطابقت ندارند +profile.api_key=کلید API +profile.api_key_not_generated=هنوز ایجاد نشده است +profile.generate_new_api_key=ایجاد کلید API جدید +profile.generate_new_api_key_info=هنگام ایجاد یک کلید API پسور خود را تغییر دهید. +profile.opml_export=خروجی گرفتن OPML +profile.delete_account=حذف حساب کاربری + +about.rest_api=دوباره سازی API +about.keyboard_shortcuts=کلید های میانبر +about.line1_prefix=کامافید یک پروژه باز-متن است. مخازن آن در +about.line1_suffix=میزبانی می شود. +about.line2_prefix=اگر شما به مسئله ای برخورده اید, لطفاً آن را در صفحه مسائل گزارش دهید +about.line2_suffix=\ پروژه. +about.line3=در صورتی که شما به این پروژه علاقمندید,لطفا مبلغی را هرچند ناچیزه هدیه کنید تا توسعه دهندگان بتوانند به کار خودشان ادامه دهند و سایت سرپا بماند. +about.goodies=افزونه‌ها +about.goodies.subscribe_url=مشترک شو آدرس +about.goodies.chrome_extension=افزونه کروم +about.goodies.firefox_extension=افزونه فایرفاکس +about.goodies.opera_extension=Opera extension ####### Needs translation +about.goodies.subscribe_bookmarklet=مشترک شدن توسط Bookmarklet (با کلیلک) +about.goodies.next_unread_bookmarklet=bookmarklet کردن آیتم خوانده نشده بعدی (با کشیدن و رها کردن در نوار بوکمارک) +about.translation=ترجمه +about.translation.message=ما به کمک شما برای بومی سازی و ترجمه کاما فید نسازمدیم. +about.translation.link=ببینید چگونه می توانید در بومی سازی کمک کنید. +about.announcements=اطلاعیه ها +about.rest_api.line1=کاما فید بر روی بستر فوقانی JAX-RS و AngularJS تعبیه شده است. به طوری که این مسئله امکان دوباره سازی کلید های API را فراهم میکند. +about.rest_api.link_to_documentation=پیوند به مستندات. + +about.shortcuts.mouse_middleclick=کلیک وسطی موشواره +about.shortcuts.open_next_entry=باز کردن مطلب بعدی +about.shortcuts.open_previous_entry=باز کردن مطلب قبلی +about.shortcuts.focus_next_entry=رفتن بر روی مطلب بعدی بدون باز کردن کامل آن +about.shortcuts.focus_previous_entry=رفتن بر روی مطلب بعدی قبلی باز کردن کامل آن +about.shortcuts.open_next_feed=باز کردن فید یا دسته ی بعدی +about.shortcuts.open_previous_feed=باز کردن فید یا دسته ی بعدی +about.shortcuts.open_close_current_entry=باز/بستن مطلب جاری +about.shortcuts.open_current_entry_in_new_window=باز کردن مطلب جاری در پنجره ای جدید +about.shortcuts.open_current_entry_in_new_window_background=باز کردن مطلب جاری در پنجره ای جدید در پس زمینه +about.shortcuts.star_unstar=نشانه دار کردن/نکردن مطلب جاری +about.shortcuts.mark_current_entry=علامت گذاری به عنوان خوانده شده/نشده مطلب جاری +about.shortcuts.mark_all_as_read=علامت گذاری تمامی مطالب به عنوان خوانده شده +about.shortcuts.open_in_new_tab_mark_as_read=باز کردن مطلب در تب جدید و علامت گذاری آن به عنوان خوانده شده + diff --git a/src/main/resources/i18n/fi.properties b/src/main/resources/i18n/fi.properties index 61bfa631..93053945 100644 --- a/src/main/resources/i18n/fi.properties +++ b/src/main/resources/i18n/fi.properties @@ -94,6 +94,7 @@ about.goodies=Ekstrat about.goodies.subscribe_url=Tilausosoite about.goodies.chrome_extension=Chrome-laajennus about.goodies.firefox_extension=Firefox-laajennus +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Lisää tilaus -kirjanmerkki (klikkaa) about.goodies.next_unread_bookmarklet=Seuraava lukematon otsikko -kirjanmerkki (raahaa kirjanmerkkipalkkiin) about.translation=Kääntäminen diff --git a/src/main/resources/i18n/fr.properties b/src/main/resources/i18n/fr.properties index 8fbd1786..8a17cf27 100644 --- a/src/main/resources/i18n/fr.properties +++ b/src/main/resources/i18n/fr.properties @@ -94,6 +94,7 @@ about.goodies=Extensions about.goodies.subscribe_url=URL pour s'abonner about.goodies.chrome_extension=Extension Chrome about.goodies.firefox_extension=Extension Firefox +about.goodies.opera_extension=Extension Opera about.goodies.subscribe_bookmarklet=Bookmarklet d'ajout d'abonnement about.goodies.next_unread_bookmarklet=Bookmarklet vers le prochain article non-lu about.translation=Traduction diff --git a/src/main/resources/i18n/gl.properties b/src/main/resources/i18n/gl.properties index 9bcd7aa5..e83eb22d 100644 --- a/src/main/resources/i18n/gl.properties +++ b/src/main/resources/i18n/gl.properties @@ -94,6 +94,7 @@ about.goodies=Extras about.goodies.subscribe_url=Suscribirse a URL about.goodies.chrome_extension=Engadido de Chrome about.goodies.firefox_extension=Engadido de Firefox +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Add subscription bookmarklet (click) ## Pendente about.goodies.next_unread_bookmarklet=Next unread item bookmarklet (drag to bookmark bar) ####### Pendente about.translation=Traducción diff --git a/src/main/resources/i18n/hu.properties b/src/main/resources/i18n/hu.properties index e20c8e98..3c33ff0d 100644 --- a/src/main/resources/i18n/hu.properties +++ b/src/main/resources/i18n/hu.properties @@ -94,6 +94,7 @@ about.goodies=Hasznos dolgok about.goodies.subscribe_url=Feliratkozás az URL-re about.goodies.chrome_extension=Chrome kiterjesztés about.goodies.firefox_extension=Firefox kiterjesztés +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Feliratkozás bookmarklet hozzáadása (klikkeléssel) about.goodies.next_unread_bookmarklet=Következő olvasatlan elem bookmarklet (húzza fel a könyvjelzősávba) about.translation=Fordítás diff --git a/src/main/resources/i18n/it.properties b/src/main/resources/i18n/it.properties index 275ba04d..7cd2e55e 100644 --- a/src/main/resources/i18n/it.properties +++ b/src/main/resources/i18n/it.properties @@ -94,6 +94,7 @@ about.goodies=Goodies about.goodies.subscribe_url=Subscribe URL ####### Needs translation about.goodies.chrome_extension=Chrome extension ####### Needs translation about.goodies.firefox_extension=Firefox extension ####### Needs translation +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Add subscription bookmarklet (click) ####### Needs translation about.goodies.next_unread_bookmarklet=Next unread item bookmarklet (drag to bookmark bar) ####### Needs translation about.translation=Traduzioni diff --git a/src/main/resources/i18n/ko.properties b/src/main/resources/i18n/ko.properties index 5f8bedf9..0f7a27b0 100644 --- a/src/main/resources/i18n/ko.properties +++ b/src/main/resources/i18n/ko.properties @@ -94,6 +94,7 @@ about.goodies=Goodies about.goodies.subscribe_url=Subscribe URL ####### Needs translation about.goodies.chrome_extension=Chrome extension ####### Needs translation about.goodies.firefox_extension=Firefox extension ####### Needs translation +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Add subscription bookmarklet (click) ####### Needs translation about.goodies.next_unread_bookmarklet=Next unread item bookmarklet (drag to bookmark bar) ####### Needs translation about.translation=번역 diff --git a/src/main/resources/i18n/languages.properties b/src/main/resources/i18n/languages.properties index cca78afc..88df27c2 100644 --- a/src/main/resources/i18n/languages.properties +++ b/src/main/resources/i18n/languages.properties @@ -1,6 +1,7 @@ en=English es=Español de=Deutsch +fa=Farsi fr=Français gl=Galician hu=Magyar diff --git a/src/main/resources/i18n/nl.properties b/src/main/resources/i18n/nl.properties index ac20d794..bbf757e6 100644 --- a/src/main/resources/i18n/nl.properties +++ b/src/main/resources/i18n/nl.properties @@ -94,6 +94,7 @@ about.goodies=Goodies about.goodies.subscribe_url=Subscribe URL ####### Needs translation about.goodies.chrome_extension=Chrome extension ####### Needs translation about.goodies.firefox_extension=Firefox extension ####### Needs translation +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Add subscription bookmarklet (click) ####### Needs translation about.goodies.next_unread_bookmarklet=Next unread item bookmarklet (drag to bookmark bar) ####### Needs translation about.translation=Vertalingen diff --git a/src/main/resources/i18n/no.properties b/src/main/resources/i18n/no.properties index abd8644d..ead008de 100644 --- a/src/main/resources/i18n/no.properties +++ b/src/main/resources/i18n/no.properties @@ -94,6 +94,7 @@ about.goodies=Godbiter about.goodies.subscribe_url=Abonner URL about.goodies.chrome_extension=Chrome utvidelse about.goodies.firefox_extension=Firefox utvidelse +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Nytt abonnement-bokmerkeprogram (click) about.goodies.next_unread_bookmarklet=Neste uleste artikkel-bokmerkeprogram (dra til bokmerkemenyen) about.translation=Oversettelse diff --git a/src/main/resources/i18n/pl.properties b/src/main/resources/i18n/pl.properties index 94d8ad2e..3ff86d44 100644 --- a/src/main/resources/i18n/pl.properties +++ b/src/main/resources/i18n/pl.properties @@ -94,6 +94,7 @@ about.goodies=Dodatki about.goodies.subscribe_url=Subskrybuj URL about.goodies.chrome_extension=Dodatek do Chrome about.goodies.firefox_extension=Dodatek do Firefoxa +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Dodaj subskrybcje jako skryptozakładkę (kliknij) about.goodies.next_unread_bookmarklet=Następny nieprzeczytany element jako skryptozakładka (przeciągnij na pasek zakładek) about.translation=Tłumaczenia diff --git a/src/main/resources/i18n/pt.properties b/src/main/resources/i18n/pt.properties index 31961e1c..4280cc66 100644 --- a/src/main/resources/i18n/pt.properties +++ b/src/main/resources/i18n/pt.properties @@ -94,6 +94,7 @@ about.goodies=Extras about.goodies.subscribe_url=URL de inscrição about.goodies.chrome_extension=Extensão para o Chrome about.goodies.firefox_extension=Extensão para o Firefox +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Bookmarklet para adicionar inscrição (clique) about.goodies.next_unread_bookmarklet=Bookmarklet para o próximo item não lido (arraste para a barra de favoritos) about.translation=Tradução diff --git a/src/main/resources/i18n/ru.properties b/src/main/resources/i18n/ru.properties index 7ba91863..b9eb0626 100644 --- a/src/main/resources/i18n/ru.properties +++ b/src/main/resources/i18n/ru.properties @@ -94,6 +94,7 @@ about.goodies=Дополнения about.goodies.subscribe_url=Адрес для подписки (заменить FEED_URL_HERE на адрес ленты) about.goodies.chrome_extension=Расширение для Хрома about.goodies.firefox_extension=Расширение для Файрфокса +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Закладка для быстрой подписки на ленты (нужно кликнуть) about.goodies.next_unread_bookmarklet=Открыть следующую непочитанную запись в новой вкладке (перетащить на панель закладок) about.translation=Перевод diff --git a/src/main/resources/i18n/sv.properties b/src/main/resources/i18n/sv.properties index 311effa8..581edbf5 100644 --- a/src/main/resources/i18n/sv.properties +++ b/src/main/resources/i18n/sv.properties @@ -94,6 +94,7 @@ about.goodies=Godsaker about.goodies.subscribe_url=Prenumerations-URL about.goodies.chrome_extension=Chrome-tillägg about.goodies.firefox_extension=Firefox-tillägg +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=Bokmärke för tillägg av prenumeration (klicka) about.goodies.next_unread_bookmarklet=Bokmärke för nästa olästa post (dra till bokmärkesfält) about.translation=Översättning diff --git a/src/main/resources/i18n/zh.properties b/src/main/resources/i18n/zh.properties index 60b5e414..f92e3c4c 100644 --- a/src/main/resources/i18n/zh.properties +++ b/src/main/resources/i18n/zh.properties @@ -94,6 +94,7 @@ about.goodies=扩展 about.goodies.subscribe_url=订阅地址 about.goodies.chrome_extension=Chrome 扩展 about.goodies.firefox_extension=Firefox 扩展 +about.goodies.opera_extension=Opera extension ####### Needs translation about.goodies.subscribe_bookmarklet=添加一个订阅书签 (点击这) about.goodies.next_unread_bookmarklet=最新未读文章书签 (拖动到书签栏上) about.translation=翻译 diff --git a/src/main/webapp/templates/feeds.help.html b/src/main/webapp/templates/feeds.help.html index ed8b7563..c67affe8 100644 --- a/src/main/webapp/templates/feeds.help.html +++ b/src/main/webapp/templates/feeds.help.html @@ -34,6 +34,10 @@

${about.goodies.firefox_extension}

+

+ ${about.goodies.opera_extension} +

+

${about.goodies.subscribe_url}: rest/feed/subscribe?url=FEED_URL_HERE