Files
FreshRSS/app/i18n/fa/gen.php
Christian Weiske 1acc646222 Show time since when a feed has problems + new timeago() method and i18n plurals (#8670)
Closes https://github.com/FreshRSS/FreshRSS/issues/8508

Changes proposed in this pull request:

- Use an integer for `Feed::error` everywhere (follow up to #8646)
- Extract `Entry::machineReadableDate()` into function for use in HTML templates
- Add `timeago()` function that converts a unix timestamp into a "4 weeks ago" string
- Show the last successful feed update, and the last erroneous update

How to test the feature manually:

1. Update a feed
2. Modify the feed URL in the database and set it to a non-existing URL
3. Update the feed again
4. Open the "Manage feed" and see the expanded error message:

>  Blast! This feed has encountered a problem. If this situation persists, please verify that it is still reachable.
> Last successful update 3 hours ago, last erroneous update 1 hour ago. 

You can hover the relative dates to see the timestamp.

* Make Feed::error an int everywhere

Related: https://github.com/FreshRSS/FreshRSS/pull/8646

* Extract timestamptomachinedate()

.. for later usage in the feed error time display.

* Show time since when a feed has problems

We add our own "timeago" function that converts a unix timestamp
into a "4 weeks ago" string.

Resolves: https://github.com/FreshRSS/FreshRSS/issues/8508

* Add new translation keys

* i18n fr, en-US

* Minor XHTML preference

* Slightly shorter rewrite, also hopefully easier to read

* Rewrite to allow (simple) plural
I also moved some functions around for hopefully a more generic and better structure.
I made some changes for the sake of speed (e.g. second-based logic instead of datetime intervals).
Note: I used automatic translation as I was worried it would be too complicated to explain to translators... I proofread the few languages I have some familiarity with.

* Add reference to CLDR

* Slightly more compact syntax

* Always show last update, fix case of unknown error date

* Remove forgotten span

* No need for multi-lines anymore

* Fix error date thresshold

* plurals forms

* Extract gettext formula conversion script to cli

* Simplify a bit

* Escort excess parentheses to the door

* Simplify

* Avoid being too clever in localization

* Fix German

* Fix plural TODO parsing

* Ignore en-US translation

* make fix-all

* git update-index --chmod=+x cli/compile.plurals.php

* Heredoc indent PHP 7.3+

* compileAll: Continue on error

* PHP strict comparisons

* Light logical simplification

* Cache plural_message_families

* Avoid case of empty value

* A bit of documentation

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Frans de Jonge <frans@clevercast.com>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2026-04-07 22:56:02 +02:00

333 lines
13 KiB
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/******************************************************************************
* Each entry of that file can be associated with a comment to indicate its *
* state. When there is no comment, it means the entry is fully translated. *
* The recognized comments are (comment matching is case-insensitive): *
* + TODO: the entry has never been translated. *
* + DIRTY: the entry has been translated but needs to be updated. *
* + IGNORE: the entry does not need to be translated. *
* When a comment is not recognized, it is discarded. *
******************************************************************************/
return array(
'action' => array(
'actualize' => ' فیدها را به روز کنید',
'add' => ' اضافه کنید',
'back_to_rss_feeds' => '← به فیدهای RSS خود برگردید',
'cancel' => ' لغو',
'close' => 'بستن',
'create' => ' ایجاد کنید',
'delete_all_feeds' => 'حذف تمام فیدها',
'delete_errored_feeds' => 'فیدهای دارای خطا را حذف کن',
'delete_muted_feeds' => ' فیدهای خاموش را حذف کنید',
'demote' => ' تنزل دادن',
'disable' => ' غیر فعال کردن',
'download' => 'دانلود',
'empty' => ' خالی',
'enable' => ' فعال کنید',
'export' => ' صادرات',
'filter' => ' فیلتر',
'import' => ' واردات',
'load_default_shortcuts' => ' میانبرهای پیش فرض را بارگیری کنید',
'manage' => ' مدیریت',
'mark_read' => ' علامت گذاری به عنوان خوانده شده',
'menu' => array(
'open' => 'باز کردن منو',
),
'nav_buttons' => array(
'next' => 'مقاله بعدی',
'prev' => 'مقاله قبلی',
'up' => 'برو بالا',
),
'open_url' => ' URL را باز کنید',
'promote' => ' ترویج',
'purge' => ' پاکسازی',
'refresh_opml' => ' OPML را بازخوانی کنید',
'remove' => ' حذف کنید',
'rename' => ' تغییر نام',
'see_website' => ' به وب سایت مراجعه کنید',
'submit' => ' ارسال کنید',
'truncate' => ' تمام مقالات را حذف کنید',
'update' => ' به روز رسانی',
),
'auth' => array(
'accept_tos' => ' من <a href="%s">شرایط خدمات</a> را می پذیرم.',
'email' => ' آدرس ایمیل',
'keep_logged_in' => ' مرا به سیستم <small>(%s روز)</small> نگه دارید',
'login' => ' ورود',
'logout' => ' خروج',
'password' => array(
'_' => ' رمز عبور',
'format' => '<small>حداقل 7 نویسه</small>',
),
'reauth' => array(
'header' => 'احراز هویت مجدد لازم است',
'tip' => 'دیگر از شما خواسته نمی‌شود که دوباره وارد شوید <u>%d دقیقه</u>',
'title' => 'ورود مجدد',
),
'registration' => array(
'_' => ' حساب جدید',
'ask' => ' یک حساب کاربری ایجاد کنید؟',
'title' => ' ایجاد حساب',
),
'username' => array(
'_' => ' نام کاربری',
'format' => '<small>حداکثر 16 نویسه الفبای عددی</small>',
),
),
'date' => array(
'Apr' => 'آ/و/ر/ی/ل//',
'Aug' => 'آ/گ/و/س/ت//',
'Dec' => 'د/س/ا/م/ب/ر//',
'Feb' => 'ف/و/ر/ی/ه//',
'Jan' => 'ژ/ا/ن/و/ی/ه//',
'Jul' => 'ژ/و/ئ/ی/ه//',
'Jun' => 'ژ/و/ئ/ن//',
'Mar' => 'م/ا/ر/س//',
'May' => 'م/ی//',
'Nov' => 'ن/و/ا/م/ب/ر//',
'Oct' => 'ا/ک/ت/ب/ر//',
'Sep' => 'س/پ/ت/ا/م/ب/ر//',
'apr' => ' آوریل',
'april' => ' آوریل',
'aug' => ' آگوست',
'august' => ' آگوست',
'before_yesterday' => ' قبل از دیروز',
'dec' => ' دسامبر',
'december' => ' دسامبر',
'feb' => ' فوریه',
'february' => ' فوریه',
'format_date' => 'j %s Y', // IGNORE
'format_date_hour' => 'j %s Y \\a\\t H\\:i', // IGNORE
'fri' => ' جمعه',
'jan' => ' ژانویه',
'january' => ' ژانویه',
'jul' => ' ژوئیه',
'july' => ' ژوئیه',
'jun' => ' ژوئن',
'june' => ' ژوئن',
'last_2_year' => ' دو سال گذشته',
'last_3_month' => ' سه ماه گذشته',
'last_3_year' => ' سه سال گذشته',
'last_5_year' => ' پنج سال گذشته',
'last_6_month' => ' شش ماه گذشته',
'last_month' => ' ماه گذشته',
'last_week' => ' هفته گذشته',
'last_year' => ' سال گذشته',
'mar' => ' مارس.',
'march' => ' مارس',
'may' => ' مه',
'may_' => ' مه',
'mon' => ' دوشنبه',
'month' => ' ماه',
'nov' => ' نوامبر',
'november' => ' نوامبر',
'oct' => ' اکتبر',
'october' => ' اکتبر',
'sat' => ' شنبه',
'sep' => ' سپتامبر.',
'september' => ' سپتامبر',
'sun' => ' یکشنبه',
'thu' => ' پنجشنبه',
'today' => ' امروز',
'tue' => ' سه شنبه',
'wed' => ' چهارشنبه',
'yesterday' => ' دیروز',
),
'dir' => 'rtl',
'freshrss' => array(
'_' => ' FreshRSS',
'about' => 'درباره FreshRSS',
),
'interval' => array(
'day' => array(
0 => '%d روز پیش',
1 => '%d روز پیش',
),
'hour' => array(
0 => '%d ساعت پیش',
1 => '%d ساعت پیش',
),
'justnow' => 'همین الان',
'minute' => array(
0 => '%d دقیقه پیش',
1 => '%d دقیقه پیش',
),
'month' => array(
0 => '%d ماه پیش',
1 => '%d ماه پیش',
),
'second' => array(
0 => '%d ثانیه پیش',
1 => '%d ثانیه پیش',
),
'year' => array(
0 => '%d سال پیش',
1 => '%d سال پیش',
),
),
'js' => array(
'category_empty' => ' دسته خالی',
'confirm_action' => ' آیا مطمئن هستید که می خواهید این عمل را انجام دهید؟ نمی توان آن را لغو کرد!',
'confirm_action_feed_cat' => ' آیا مطمئن هستید که می خواهید این عمل را انجام دهید؟ موارد دلخواه و درخواست های کاربر مرتبط را از دست خواهید داد. نمی توان آن را لغو کرد!',
'confirm_exit_slider' => 'Are you sure you want to discard unsaved settings?', // TODO
'feedback' => array(
'body_new_articles' => ' %%d مقاله جدید برای خواندن در FreshRSS وجود دارد.',
'body_unread_articles' => ' (خوانده نشده: %%d)',
'request_failed' => ' یک درخواست شکست خورده است',
'title_new_articles' => ' FreshRSS: مقالات جدید!',
),
'labels_empty' => 'بدون برچسب',
'new_article' => 'مقالات جدیدی موجود است',
'should_be_activated' => ' جاوا اسکریپت باید فعال باشد',
'unsafe_csp_header' => 'The CSP header in use is unsafe and FreshRSS may be vulnerable to XSS attacks. <a target="_blank" href="https://freshrss.github.io/FreshRSS/en/admins/10_ServerConfig.html#security">See documentation</a>', // TODO
),
'lang' => array(
'cs' => 'Čeština', // IGNORE
'de' => 'Deutsch', // IGNORE
'el' => 'Ελληνικά', // IGNORE
'en' => 'English', // IGNORE
'en-US' => 'English (United States)', // IGNORE
'es' => 'Español', // IGNORE
'fa' => 'فارسی', // IGNORE
'fi' => 'Suomi', // IGNORE
'fr' => 'Français', // IGNORE
'he' => 'עברית', // IGNORE
'hu' => 'Magyar', // IGNORE
'id' => 'Bahasa Indonesia', // IGNORE
'it' => 'Italiano', // IGNORE
'ja' => '日本語', // IGNORE
'ko' => '한국어', // IGNORE
'lv' => 'Latviešu', // IGNORE
'nl' => 'Nederlands', // IGNORE
'oc' => 'Occitan', // IGNORE
'pl' => 'Polski', // IGNORE
'pt-BR' => 'Português (Brasil)', // IGNORE
'pt-PT' => 'Português (Portugal)', // IGNORE
'ru' => 'Русский', // IGNORE
'sk' => 'Slovenčina', // IGNORE
'tr' => 'Türkçe', // IGNORE
'uk' => 'Українська', // IGNORE
'zh-CN' => '简体中文', // IGNORE
'zh-TW' => '正體中文', // IGNORE
),
'menu' => array(
'about' => ' در مورد',
'account' => ' حساب',
'admin' => ' اداره',
'advanced_search' => 'Advanced Search', // TODO
'archiving' => ' آرشیو',
'authentication' => ' احراز هویت',
'check_install' => ' بررسی نصب',
'configuration' => ' پیکربندی',
'display' => 'نمایش',
'extensions' => ' برنامه های افزودنی',
'logs' => ' سیاهههای مربوط',
'privacy' => 'حریم خصوصی',
'queries' => ' پرس و جوهای کاربر',
'reading' => ' خواندن',
'search' => ' کلمات یا #برچسب ها را جستجو کنید',
'search_help' => ' به مستندات <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">پارامترهای جستجوی پیشرفته</a مراجعه کنید >',
'sharing' => ' اشتراک گذاری',
'shortcuts' => ' میانبرها',
'stats' => 'آمار',
'system' => ' پیکربندی سیستم',
'update' => ' به روز رسانی',
'user_management' => ' مدیریت کاربران',
'user_profile' => ' نمایه',
),
'period' => array(
'days' => ' روز',
'hours' => ' ساعت',
'months' => ' ماه',
'weeks' => ' هفته',
'years' => ' سال',
),
'readme' => array(
'contribute' => 'contribute', // IGNORE
'language' => 'Language', // IGNORE
'translated' => 'Progress', // IGNORE
),
'search' => array(
'advanced_search_help' => 'This form helps construct search queries, but manual queries are even more powerful.', // TODO
'authors' => 'Authors', // TODO
'categories' => 'Categories', // TODO
'content' => 'Content', // TODO
'date_from' => 'From', // TODO
'date_modified' => 'Server Modification Date', // TODO
'date_past' => 'In the past', // TODO
'date_published' => 'Publication Date', // TODO
'date_range' => 'Date Range', // TODO
'date_received' => 'Received Date', // TODO
'date_to' => 'To', // TODO
'date_user' => 'User Modification Date', // TODO
'feeds' => 'Feeds', // TODO
'free_text' => 'Free Text', // TODO
'free_text_help' => 'Search both in title and content', // TODO
'full_documentation' => 'View <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">full search documentation</a>', // TODO
'labels' => 'My Labels', // TODO
'multiple_help' => 'Select one or more (hold <kbd>Ctrl</kbd> or <kbd>Cmd</kbd>)', // TODO
'sources' => 'Sources', // TODO
'tags' => 'Article Tags', // TODO
'text' => 'Text Search', // TODO
'text_help' => 'Multiple lines are combined by a logical <i>or</i>. Also supports <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#regex" target="_blank">regular expressions</a>.', // TODO
'text_placeholder' => 'Keyword', // TODO
'title' => 'Title', // TODO
'url' => 'URL', // TODO
'user_queries' => 'User Queries', // TODO
),
'share' => array(
'Known' => ' سایت های مبتنی بر شناخته شده',
'archiveIS' => 'archive.is', // IGNORE
'archiveORG' => ' archive.org',
'archivePH' => ' archive.ph',
'bluesky' => 'Bluesky', // IGNORE
'buffer' => ' بافر',
'clipboard' => ' کلیپ بورد',
'diaspora' => ' دیاسپورا*',
'email' => ' ایمیل',
'email-webmail-firefox-fix' => ' ایمیل (وب میل - تعمیر برای فایرفاکس)',
'facebook' => ' فیس بوک',
'gnusocial' => ' گنو اجتماعی',
'jdh' => 'ژورنال دو هکر',
'lemmy' => ' لمی',
'linkding' => ' پیوند دادن',
'linkedin' => ' لینکدین',
'mastodon' => ' ماستودون',
'movim' => ' Movim',
'omnivore' => ' همه چیزخوار',
'pinboard' => ' پینبرد',
'pinterest' => ' پینترست',
'print' => ' چاپ',
'raindrop' => ' Raindrop.io',
'reddit' => ' Reddit',
'shaarli' => ' شعرلی',
'telegram' => 'Telegram', // IGNORE
'twitter' => ' توییتر',
'wallabag' => ' wallabag نسخه 1',
'wallabagv2' => ' wallabag نسخه 2',
'web-sharing-api' => ' اشتراک گذاری سیستم',
'whatsapp' => ' واتساپ',
'xing' => ' زینگ',
),
'short' => array(
'attention' => ' هشدار!',
'blank_to_disable' => ' برای غیرفعال کردن',
'by_author' => ' توسط:',
'by_default' => ' به طور پیش فرض',
'damn' => ' انفجار!',
'default_category' => ' دسته بندی نشده',
'no' => ' شماره',
'not_applicable' => ' در دسترس نیست',
'ok' => ' باشه!',
'or' => ' یا',
'yes' => ' بله',
),
'stream' => array(
'load_more' => ' بارگذاری مقالات بیشتر',
'mark_all_read' => ' همه را به عنوان خوانده شده علامت گذاری کنید',
'nothing_to_load' => ' مقاله دیگری وجود ندارد',
),
);