diff --git a/README.md b/README.md index 0e52f0d35..e85171e02 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent If you'd like to add translations, take a look a look at the [English translation file](ui/src/translations/en.ts). -- Languages supported: Catalan, (`ca`), English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`). +- Languages supported: Catalan, (`ca`), Farsi (`fa`), English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`). @@ -169,6 +169,7 @@ lang | done | missing ---- | ---- | ------- ca | 100% | old de | 87% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,old,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +fa | 73% | cross_post,subscribed_to_communities,trending_communities,create_private_message,send_secure_message,send_message,message,mod,mods,moderates,remove_as_mod,appoint_as_mod,modlog,stickied,ban,ban_from_site,unban,unban_from_site,banned,number_of_subscribers,subscribers,both,saved,unsubscribe,subscribe,subscribed,old,api,docs,inbox,inbox_for,message_sent,notifications_error,messages,no_email_setup,matrix_user_id,private_message_disclaimer,url,body,copy_suggested_title,community,expand_here,subscribe_to_communities,theme,sponsor_message,general_sponsors,joined,by,to,from,landing_0,logged_in,community_moderator_already_exists,community_follower_already_exists,community_user_already_banned,no_slurs,admin_already_created,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message eo | 75% | number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message es | 100% | old fi | 100% | old diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 51e7e3a3e..0d3ab177a 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -12,6 +12,7 @@ import { nl } from './translations/nl'; import { it } from './translations/it'; import { fi } from './translations/fi'; import { ca } from './translations/ca'; +import { fa } from './translations/fa'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -27,6 +28,7 @@ const resources = { it, fi, ca, + fa, }; function format(value: any, format: any, lng: any): any { diff --git a/ui/src/translations/fa.ts b/ui/src/translations/fa.ts index 434f7b514..c06045c69 100644 --- a/ui/src/translations/fa.ts +++ b/ui/src/translations/fa.ts @@ -9,7 +9,6 @@ export const fa = { posts: 'مطالب', related_posts: 'این مطالب ممکن است مرتبط باشند', cross_posts: 'این پیوند در اینجا هم منتشر شده:', - cross_post: 'cross-post', comments: 'نظرات', number_of_comments: '{{count}} نظر', remove_comment: 'حذف نظر', @@ -18,8 +17,6 @@ export const fa = { create_a_community: 'ایجاد یک جامعه جدید', create_community: 'ایجاد جامعه', remove_community: 'حذف جامعه', - subscribed_to_communities: 'Subscribed to <1>communities', - trending_communities: 'Trending <1>communities', list_of_communities: 'فهرست جوامع', number_of_communities: '{{count}} جامعه', community_reqs: 'حروف کوچک, زیرخط, و بدون فاصله.', @@ -39,13 +36,7 @@ export const fa = { unsticky: 'غیرچسبان', link: 'پیوند', archive_link: 'بایگاهی پیوند', - mod: 'mod', - mods: 'mods', - moderates: 'Moderates', settings: 'تنظیمات', - remove_as_mod: 'remove as mod', - appoint_as_mod: 'appoint as mod', - modlog: 'Modlog', admin: 'مدیر', admins: 'مدیران', remove_as_admin: 'حذف به عنوان مدیر', @@ -53,7 +44,6 @@ export const fa = { remove: 'حذف', removed: 'حذف شد', locked: 'قفل شد', - stickied: 'stickied', reason: 'دلیل', mark_as_read: 'علامت‌گذاری به عنوان خوانده شده', mark_as_unread: 'علامت‌گذاری به عنوان خوانده نشده', @@ -63,11 +53,6 @@ export const fa = { delete_account_confirm: 'هشدار: این کنش، تمام اطلاعات شما را برای همیشه پاک می‌کند. برای تایید، گذرواژه خود را وارد کنید.', restore: 'بازگردانی', - ban: 'ban', - ban_from_site: 'ban from site', - unban: 'unban', - unban_from_site: 'unban from site', - banned: 'banned', save: 'ذخیره', unsave: 'عدم ذخیره', create: 'ایجاد', @@ -75,18 +60,11 @@ export const fa = { username: 'نام‌کاربری', email_or_username: 'رایانامه یا نام‌کاربری', number_of_users: '{{count}} کاربر', - number_of_subscribers: '{{count}} Subscribers', number_of_points: '{{count}} امتیاز', number_online: '{{count}} کاربر برخط', name: 'نام', title: 'عنوان', category: 'دسته‌بندی', - subscribers: 'Subscribers', - both: 'Both', - saved: 'Saved', - unsubscribe: 'Unsubscribe', - subscribe: 'Subscribe', - subscribed: 'Subscribed', prev: 'پیش', next: 'بعد', sidebar: 'نوار کناری', @@ -99,10 +77,6 @@ export const fa = { year: 'سال', all: 'همه', top: 'بالاترین', - api: 'API', - docs: 'Docs', - inbox: 'Inbox', - inbox_for: 'Inbox for <1>{{user}}', mark_all_as_read: 'علامت زدن همه به عنوان خوانده شده', type: 'نوع', unread: 'خوانده‌نشده', @@ -116,8 +90,6 @@ export const fa = { login_sign_up: 'ورود / نام‌نویسی', login: 'ورود', sign_up: 'نام‌نویسی', - notifications_error: - 'Desktop notifications not available in your browser. Try Firefox or Chrome.', unread_messages: 'پیام‌های خوانده نشده', password: 'گذرواژه', verify_password: 'تایید گذرواژه', @@ -126,7 +98,6 @@ export const fa = { reset_password_mail_sent: 'رایانامه‌ای برای بازنشانی گذرواژه فرستاده شد.', password_change: 'تغییر گذرواژه', new_password: 'گذرواژه جدید', - no_email_setup: "This server hasn't correctly set up email.", email: 'رایانامه', send_notifications_to_email: 'فرستادن اعلانات به رایانامه', optional: 'انتخابی', @@ -138,12 +109,6 @@ export const fa = { open_registration: 'باز کردن نام‌نویسی', registration_closed: 'نام‌نویسی بسته است', enable_nsfw: 'فعال‌سازی NSFW', - url: 'URL', - body: 'Body', - copy_suggested_title: 'copy suggested title: {{title}}', - community: 'Community', - expand_here: 'Expand here', - subscribe_to_communities: 'Subscribe to some <1>communities.', chat: 'گپ', recent_comments: 'نظرات اخیر', no_results: 'بدون نتیجه.', @@ -154,66 +119,51 @@ export const fa = { modified: 'تغییر یافت', nsfw: 'NSFW', show_nsfw: 'نمایش محتوای NSFW', - theme: 'Theme', sponsors: 'حامیان', sponsors_of_lemmy: 'حامیان لمی', - sponsor_message: - 'Lemmy is free, <1>open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project. Thank you to the following people:', support_on_patreon: 'حمایت روی Patreon', donate_to_lemmy: 'اعطای اعانه به لمی', donate: 'اعانه', - general_sponsors: - 'General Sponsors are those that pledged $10 to $39 to Lemmy.', crypto: 'رمزارز', bitcoin: 'بیت‌کوین', ethereum: 'اتریوم', monero: 'مونرو', code: 'کد', - joined: 'Joined', - by: 'by', - to: 'to', transfer_community: 'انتقال جامعه', transfer_site: 'انتقال پایگاه', are_you_sure: 'مطمئنید؟', yes: 'بله', no: 'خیر', powered_by: 'نیرو گرفته از', - landing_0: - "Lemmy is a <1>link aggregator / reddit alternative, intended to work in the <2>fediverse.<3>It's self-hostable, has live-updating comment threads, and is tiny (<4>~80kB). Federation into the ActivityPub network is on the roadmap. <5>This is a <6>very early beta version, and a lot of features are currently broken or missing. <7>Suggest new features or report bugs <8>here.<9>Made with <10>Rust, <11>Actix, <12>Inferno, <13>Typescript.", not_logged_in: 'وارد نشده‌اید.', community_ban: 'فعالیت شما در این جامعه ممنوع شده است.', site_ban: 'فعالیت شما در این پایگاه ممنوع شده است', - couldnt_create_comment: "ناتوانی در ایجاد نظر.", - couldnt_like_comment: "ناتوانی در پسنیدن نظر.", - couldnt_update_comment: "ناتوانی در به‌روزرسانی نظر.", - couldnt_save_comment: "ناتوانی در ذخیره نظر.", + couldnt_create_comment: 'ناتوانی در ایجاد نظر.', + couldnt_like_comment: 'ناتوانی در پسنیدن نظر.', + couldnt_update_comment: 'ناتوانی در به‌روزرسانی نظر.', + couldnt_save_comment: 'ناتوانی در ذخیره نظر.', no_comment_edit_allowed: 'مجاز به ویرایش نظر نیستید.', no_post_edit_allowed: 'مجاز به ویرایش مطلب نیستید.', no_community_edit_allowed: 'مجاز به ویرایش جامعه نیستید.', - couldnt_find_community: "ناتوانی در یافتن جامعه.", - couldnt_update_community: "ناتوانی در به‌روزرسانی جامعه.", + couldnt_find_community: 'ناتوانی در یافتن جامعه.', + couldnt_update_community: 'ناتوانی در به‌روزرسانی جامعه.', community_already_exists: 'این جامعه از قبل وجود داشته است.', - community_moderator_already_exists: 'Community moderator already exists.', - community_follower_already_exists: 'Community follower already exists.', - community_user_already_banned: 'Community user already banned.', - couldnt_create_post: "ناتوانی در ایجاد مطلب.", - couldnt_like_post: "ناتوانی در پسندیدن مطلب.", - couldnt_find_post: "ناتوانی در یافتن مطلب.", - couldnt_get_posts: "ناتوانی در دریافت مطالب", - couldnt_update_post: "ناتوای در به‌روزرسانی مطلب", - couldnt_save_post: "ناتوانی در ذخیره مطلب.", - no_slurs: 'No slurs.', + couldnt_create_post: 'ناتوانی در ایجاد مطلب.', + couldnt_like_post: 'ناتوانی در پسندیدن مطلب.', + couldnt_find_post: 'ناتوانی در یافتن مطلب.', + couldnt_get_posts: 'ناتوانی در دریافت مطالب', + couldnt_update_post: 'ناتوای در به‌روزرسانی مطلب', + couldnt_save_post: 'ناتوانی در ذخیره مطلب.', not_an_admin: 'مدیر نیستید.', site_already_exists: 'این پایگاه از قبل وجود داشته است.', - couldnt_update_site: "ناتوانی در به‌روزرسانی پایگاه.", + couldnt_update_site: 'ناتوانی در به‌روزرسانی پایگاه.', couldnt_find_that_username_or_email: - "ناتوانی در یافتن این نام کاربری یا رایانامه.", + 'ناتوانی در یافتن این نام کاربری یا رایانامه.', password_incorrect: 'گذرواژه نادرست.', passwords_dont_match: 'گذرواژه‌ها با هم منطبق نیستند.', - admin_already_created: "Sorry, there's already an admin.", user_already_exists: 'این کاربر از قبل وجود دارد.', email_already_exists: 'این رایانامه از قبل وجود دارد.', - couldnt_update_user: "ناتوانی در به‌روزرسانی کاربر.", + couldnt_update_user: 'ناتوانی در به‌روزرسانی کاربر.', system_err_login: 'خطای سامانه. سعی کنید خارج شده و دوباره وارد شوید.', }, }; diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 0aec7624b..0ec291146 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -9,6 +9,7 @@ import 'moment/locale/nl'; import 'moment/locale/it'; import 'moment/locale/fi'; import 'moment/locale/ca'; +import 'moment/locale/fa'; import { UserOperation, @@ -258,6 +259,7 @@ export const languages = [ { code: 'eo', name: 'Esperanto' }, { code: 'es', name: 'Español' }, { code: 'de', name: 'Deutsch' }, + { code: 'fa', name: 'فارسی' }, { code: 'zh', name: '中文' }, { code: 'fi', name: 'Suomi' }, { code: 'fr', name: 'Français' }, @@ -306,6 +308,8 @@ export function getMomentLanguage(): string { lang = 'fi'; } else if (lang.startsWith('ca')) { lang = 'ca'; + } else if (lang.startsWith('fa')) { + lang = 'fa'; } else { lang = 'en'; } diff --git a/ui/translation_report.ts b/ui/translation_report.ts index 56c09c965..1956b7921 100644 --- a/ui/translation_report.ts +++ b/ui/translation_report.ts @@ -2,6 +2,7 @@ import { en } from './src/translations/en'; import { eo } from './src/translations/eo'; import { es } from './src/translations/es'; import { de } from './src/translations/de'; +import { fa } from './src/translations/fa'; import { zh } from './src/translations/zh'; import { fr } from './src/translations/fr'; import { sv } from './src/translations/sv'; @@ -15,6 +16,7 @@ import fs from 'fs'; const files = [ { t: ca, n: 'ca' }, { t: de, n: 'de' }, + { t: fa, n: 'fa' }, { t: eo, n: 'eo' }, { t: es, n: 'es' }, { t: fi, n: 'fi' },