Removing english placeholders for Farsi.

pull/722/head
Dessalines 2020-01-29 20:35:41 -05:00
parent c93a56a964
commit c3a4097421
5 changed files with 25 additions and 66 deletions

3
README.md vendored
View File

@ -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). 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`).
<!-- translations --> <!-- translations -->
@ -169,6 +169,7 @@ lang | done | missing
---- | ---- | ------- ---- | ---- | -------
ca | 100% | old 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 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 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 es | 100% | old
fi | 100% | old fi | 100% | old

2
ui/src/i18next.ts vendored
View File

@ -12,6 +12,7 @@ import { nl } from './translations/nl';
import { it } from './translations/it'; import { it } from './translations/it';
import { fi } from './translations/fi'; import { fi } from './translations/fi';
import { ca } from './translations/ca'; import { ca } from './translations/ca';
import { fa } from './translations/fa';
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
const resources = { const resources = {
@ -27,6 +28,7 @@ const resources = {
it, it,
fi, fi,
ca, ca,
fa,
}; };
function format(value: any, format: any, lng: any): any { function format(value: any, format: any, lng: any): any {

View File

@ -9,7 +9,6 @@ export const fa = {
posts: 'مطالب', posts: 'مطالب',
related_posts: 'این مطالب ممکن است مرتبط باشند', related_posts: 'این مطالب ممکن است مرتبط باشند',
cross_posts: 'این پیوند در اینجا هم منتشر شده:', cross_posts: 'این پیوند در اینجا هم منتشر شده:',
cross_post: 'cross-post',
comments: 'نظرات', comments: 'نظرات',
number_of_comments: '{{count}} نظر', number_of_comments: '{{count}} نظر',
remove_comment: 'حذف نظر', remove_comment: 'حذف نظر',
@ -18,8 +17,6 @@ export const fa = {
create_a_community: 'ایجاد یک جامعه جدید', create_a_community: 'ایجاد یک جامعه جدید',
create_community: 'ایجاد جامعه', create_community: 'ایجاد جامعه',
remove_community: 'حذف جامعه', remove_community: 'حذف جامعه',
subscribed_to_communities: 'Subscribed to <1>communities</1>',
trending_communities: 'Trending <1>communities</1>',
list_of_communities: 'فهرست جوامع', list_of_communities: 'فهرست جوامع',
number_of_communities: '{{count}} جامعه', number_of_communities: '{{count}} جامعه',
community_reqs: 'حروف کوچک, زیرخط, و بدون فاصله.', community_reqs: 'حروف کوچک, زیرخط, و بدون فاصله.',
@ -39,13 +36,7 @@ export const fa = {
unsticky: 'غیرچسبان', unsticky: 'غیرچسبان',
link: 'پیوند', link: 'پیوند',
archive_link: 'بایگاهی پیوند', archive_link: 'بایگاهی پیوند',
mod: 'mod',
mods: 'mods',
moderates: 'Moderates',
settings: 'تنظیمات', settings: 'تنظیمات',
remove_as_mod: 'remove as mod',
appoint_as_mod: 'appoint as mod',
modlog: 'Modlog',
admin: 'مدیر', admin: 'مدیر',
admins: 'مدیران', admins: 'مدیران',
remove_as_admin: 'حذف به عنوان مدیر', remove_as_admin: 'حذف به عنوان مدیر',
@ -53,7 +44,6 @@ export const fa = {
remove: 'حذف', remove: 'حذف',
removed: 'حذف شد', removed: 'حذف شد',
locked: 'قفل شد', locked: 'قفل شد',
stickied: 'stickied',
reason: 'دلیل', reason: 'دلیل',
mark_as_read: 'علامت‌گذاری به عنوان خوانده شده', mark_as_read: 'علامت‌گذاری به عنوان خوانده شده',
mark_as_unread: 'علامت‌گذاری به عنوان خوانده نشده', mark_as_unread: 'علامت‌گذاری به عنوان خوانده نشده',
@ -63,11 +53,6 @@ export const fa = {
delete_account_confirm: delete_account_confirm:
'هشدار: این کنش، تمام اطلاعات شما را برای همیشه پاک می‌کند. برای تایید، گذرواژه خود را وارد کنید.', 'هشدار: این کنش، تمام اطلاعات شما را برای همیشه پاک می‌کند. برای تایید، گذرواژه خود را وارد کنید.',
restore: 'بازگردانی', restore: 'بازگردانی',
ban: 'ban',
ban_from_site: 'ban from site',
unban: 'unban',
unban_from_site: 'unban from site',
banned: 'banned',
save: 'ذخیره', save: 'ذخیره',
unsave: 'عدم ذخیره', unsave: 'عدم ذخیره',
create: 'ایجاد', create: 'ایجاد',
@ -75,18 +60,11 @@ export const fa = {
username: 'نام‌کاربری', username: 'نام‌کاربری',
email_or_username: 'رایانامه یا نام‌کاربری', email_or_username: 'رایانامه یا نام‌کاربری',
number_of_users: '{{count}} کاربر', number_of_users: '{{count}} کاربر',
number_of_subscribers: '{{count}} Subscribers',
number_of_points: '{{count}} امتیاز', number_of_points: '{{count}} امتیاز',
number_online: '{{count}} کاربر برخط', number_online: '{{count}} کاربر برخط',
name: 'نام', name: 'نام',
title: 'عنوان', title: 'عنوان',
category: 'دسته‌بندی', category: 'دسته‌بندی',
subscribers: 'Subscribers',
both: 'Both',
saved: 'Saved',
unsubscribe: 'Unsubscribe',
subscribe: 'Subscribe',
subscribed: 'Subscribed',
prev: 'پیش', prev: 'پیش',
next: 'بعد', next: 'بعد',
sidebar: 'نوار کناری', sidebar: 'نوار کناری',
@ -99,10 +77,6 @@ export const fa = {
year: 'سال', year: 'سال',
all: 'همه', all: 'همه',
top: 'بالاترین', top: 'بالاترین',
api: 'API',
docs: 'Docs',
inbox: 'Inbox',
inbox_for: 'Inbox for <1>{{user}}</1>',
mark_all_as_read: 'علامت زدن همه به عنوان خوانده شده', mark_all_as_read: 'علامت زدن همه به عنوان خوانده شده',
type: 'نوع', type: 'نوع',
unread: 'خوانده‌نشده', unread: 'خوانده‌نشده',
@ -116,8 +90,6 @@ export const fa = {
login_sign_up: 'ورود / نام‌نویسی', login_sign_up: 'ورود / نام‌نویسی',
login: 'ورود', login: 'ورود',
sign_up: 'نام‌نویسی', sign_up: 'نام‌نویسی',
notifications_error:
'Desktop notifications not available in your browser. Try Firefox or Chrome.',
unread_messages: 'پیام‌های خوانده نشده', unread_messages: 'پیام‌های خوانده نشده',
password: 'گذرواژه', password: 'گذرواژه',
verify_password: 'تایید گذرواژه', verify_password: 'تایید گذرواژه',
@ -126,7 +98,6 @@ export const fa = {
reset_password_mail_sent: 'رایانامه‌ای برای بازنشانی گذرواژه فرستاده شد.', reset_password_mail_sent: 'رایانامه‌ای برای بازنشانی گذرواژه فرستاده شد.',
password_change: 'تغییر گذرواژه', password_change: 'تغییر گذرواژه',
new_password: 'گذرواژه جدید', new_password: 'گذرواژه جدید',
no_email_setup: "This server hasn't correctly set up email.",
email: 'رایانامه', email: 'رایانامه',
send_notifications_to_email: 'فرستادن اعلانات به رایانامه', send_notifications_to_email: 'فرستادن اعلانات به رایانامه',
optional: 'انتخابی', optional: 'انتخابی',
@ -138,12 +109,6 @@ export const fa = {
open_registration: 'باز کردن نام‌نویسی', open_registration: 'باز کردن نام‌نویسی',
registration_closed: 'نام‌نویسی بسته است', registration_closed: 'نام‌نویسی بسته است',
enable_nsfw: 'فعال‌سازی NSFW', 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</1>.',
chat: 'گپ', chat: 'گپ',
recent_comments: 'نظرات اخیر', recent_comments: 'نظرات اخیر',
no_results: 'بدون نتیجه.', no_results: 'بدون نتیجه.',
@ -154,66 +119,51 @@ export const fa = {
modified: 'تغییر یافت', modified: 'تغییر یافت',
nsfw: 'NSFW', nsfw: 'NSFW',
show_nsfw: 'نمایش محتوای NSFW', show_nsfw: 'نمایش محتوای NSFW',
theme: 'Theme',
sponsors: 'حامیان', sponsors: 'حامیان',
sponsors_of_lemmy: 'حامیان لمی', sponsors_of_lemmy: 'حامیان لمی',
sponsor_message:
'Lemmy is free, <1>open-source</1> 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', support_on_patreon: 'حمایت روی Patreon',
donate_to_lemmy: 'اعطای اعانه به لمی', donate_to_lemmy: 'اعطای اعانه به لمی',
donate: 'اعانه', donate: 'اعانه',
general_sponsors:
'General Sponsors are those that pledged $10 to $39 to Lemmy.',
crypto: 'رمزارز', crypto: 'رمزارز',
bitcoin: 'بیت‌کوین', bitcoin: 'بیت‌کوین',
ethereum: 'اتریوم', ethereum: 'اتریوم',
monero: 'مونرو', monero: 'مونرو',
code: 'کد', code: 'کد',
joined: 'Joined',
by: 'by',
to: 'to',
transfer_community: 'انتقال جامعه', transfer_community: 'انتقال جامعه',
transfer_site: 'انتقال پایگاه', transfer_site: 'انتقال پایگاه',
are_you_sure: 'مطمئنید؟', are_you_sure: 'مطمئنید؟',
yes: 'بله', yes: 'بله',
no: 'خیر', no: 'خیر',
powered_by: 'نیرو گرفته از', powered_by: 'نیرو گرفته از',
landing_0:
"Lemmy is a <1>link aggregator</1> / reddit alternative, intended to work in the <2>fediverse</2>.<3></3>It's self-hostable, has live-updating comment threads, and is tiny (<4>~80kB</4>). Federation into the ActivityPub network is on the roadmap. <5></5>This is a <6>very early beta version</6>, and a lot of features are currently broken or missing. <7></7>Suggest new features or report bugs <8>here.</8><9></9>Made with <10>Rust</10>, <11>Actix</11>, <12>Inferno</12>, <13>Typescript</13>.",
not_logged_in: 'وارد نشده‌اید.', not_logged_in: 'وارد نشده‌اید.',
community_ban: 'فعالیت شما در این جامعه ممنوع شده است.', community_ban: 'فعالیت شما در این جامعه ممنوع شده است.',
site_ban: 'فعالیت شما در این پایگاه ممنوع شده است', site_ban: 'فعالیت شما در این پایگاه ممنوع شده است',
couldnt_create_comment: "ناتوانی در ایجاد نظر.", couldnt_create_comment: 'ناتوانی در ایجاد نظر.',
couldnt_like_comment: "ناتوانی در پسنیدن نظر.", couldnt_like_comment: 'ناتوانی در پسنیدن نظر.',
couldnt_update_comment: "ناتوانی در به‌روزرسانی نظر.", couldnt_update_comment: 'ناتوانی در به‌روزرسانی نظر.',
couldnt_save_comment: "ناتوانی در ذخیره نظر.", couldnt_save_comment: 'ناتوانی در ذخیره نظر.',
no_comment_edit_allowed: 'مجاز به ویرایش نظر نیستید.', no_comment_edit_allowed: 'مجاز به ویرایش نظر نیستید.',
no_post_edit_allowed: 'مجاز به ویرایش مطلب نیستید.', no_post_edit_allowed: 'مجاز به ویرایش مطلب نیستید.',
no_community_edit_allowed: 'مجاز به ویرایش جامعه نیستید.', no_community_edit_allowed: 'مجاز به ویرایش جامعه نیستید.',
couldnt_find_community: "ناتوانی در یافتن جامعه.", couldnt_find_community: 'ناتوانی در یافتن جامعه.',
couldnt_update_community: "ناتوانی در به‌روزرسانی جامعه.", couldnt_update_community: 'ناتوانی در به‌روزرسانی جامعه.',
community_already_exists: 'این جامعه از قبل وجود داشته است.', community_already_exists: 'این جامعه از قبل وجود داشته است.',
community_moderator_already_exists: 'Community moderator already exists.', couldnt_create_post: 'ناتوانی در ایجاد مطلب.',
community_follower_already_exists: 'Community follower already exists.', couldnt_like_post: 'ناتوانی در پسندیدن مطلب.',
community_user_already_banned: 'Community user already banned.', couldnt_find_post: 'ناتوانی در یافتن مطلب.',
couldnt_create_post: "ناتوانی در ایجاد مطلب.", couldnt_get_posts: 'ناتوانی در دریافت مطالب',
couldnt_like_post: "ناتوانی در پسندیدن مطلب.", couldnt_update_post: 'ناتوای در به‌روزرسانی مطلب',
couldnt_find_post: "ناتوانی در یافتن مطلب.", couldnt_save_post: 'ناتوانی در ذخیره مطلب.',
couldnt_get_posts: "ناتوانی در دریافت مطالب",
couldnt_update_post: "ناتوای در به‌روزرسانی مطلب",
couldnt_save_post: "ناتوانی در ذخیره مطلب.",
no_slurs: 'No slurs.',
not_an_admin: 'مدیر نیستید.', not_an_admin: 'مدیر نیستید.',
site_already_exists: 'این پایگاه از قبل وجود داشته است.', site_already_exists: 'این پایگاه از قبل وجود داشته است.',
couldnt_update_site: "ناتوانی در به‌روزرسانی پایگاه.", couldnt_update_site: 'ناتوانی در به‌روزرسانی پایگاه.',
couldnt_find_that_username_or_email: couldnt_find_that_username_or_email:
"ناتوانی در یافتن این نام کاربری یا رایانامه.", 'ناتوانی در یافتن این نام کاربری یا رایانامه.',
password_incorrect: 'گذرواژه نادرست.', password_incorrect: 'گذرواژه نادرست.',
passwords_dont_match: 'گذرواژه‌ها با هم منطبق نیستند.', passwords_dont_match: 'گذرواژه‌ها با هم منطبق نیستند.',
admin_already_created: "Sorry, there's already an admin.",
user_already_exists: 'این کاربر از قبل وجود دارد.', user_already_exists: 'این کاربر از قبل وجود دارد.',
email_already_exists: 'این رایانامه از قبل وجود دارد.', email_already_exists: 'این رایانامه از قبل وجود دارد.',
couldnt_update_user: "ناتوانی در به‌روزرسانی کاربر.", couldnt_update_user: 'ناتوانی در به‌روزرسانی کاربر.',
system_err_login: 'خطای سامانه. سعی کنید خارج شده و دوباره وارد شوید.', system_err_login: 'خطای سامانه. سعی کنید خارج شده و دوباره وارد شوید.',
}, },
}; };

4
ui/src/utils.ts vendored
View File

@ -9,6 +9,7 @@ import 'moment/locale/nl';
import 'moment/locale/it'; import 'moment/locale/it';
import 'moment/locale/fi'; import 'moment/locale/fi';
import 'moment/locale/ca'; import 'moment/locale/ca';
import 'moment/locale/fa';
import { import {
UserOperation, UserOperation,
@ -258,6 +259,7 @@ export const languages = [
{ code: 'eo', name: 'Esperanto' }, { code: 'eo', name: 'Esperanto' },
{ code: 'es', name: 'Español' }, { code: 'es', name: 'Español' },
{ code: 'de', name: 'Deutsch' }, { code: 'de', name: 'Deutsch' },
{ code: 'fa', name: 'فارسی' },
{ code: 'zh', name: '中文' }, { code: 'zh', name: '中文' },
{ code: 'fi', name: 'Suomi' }, { code: 'fi', name: 'Suomi' },
{ code: 'fr', name: 'Français' }, { code: 'fr', name: 'Français' },
@ -306,6 +308,8 @@ export function getMomentLanguage(): string {
lang = 'fi'; lang = 'fi';
} else if (lang.startsWith('ca')) { } else if (lang.startsWith('ca')) {
lang = 'ca'; lang = 'ca';
} else if (lang.startsWith('fa')) {
lang = 'fa';
} else { } else {
lang = 'en'; lang = 'en';
} }

View File

@ -2,6 +2,7 @@ import { en } from './src/translations/en';
import { eo } from './src/translations/eo'; import { eo } from './src/translations/eo';
import { es } from './src/translations/es'; import { es } from './src/translations/es';
import { de } from './src/translations/de'; import { de } from './src/translations/de';
import { fa } from './src/translations/fa';
import { zh } from './src/translations/zh'; import { zh } from './src/translations/zh';
import { fr } from './src/translations/fr'; import { fr } from './src/translations/fr';
import { sv } from './src/translations/sv'; import { sv } from './src/translations/sv';
@ -15,6 +16,7 @@ import fs from 'fs';
const files = [ const files = [
{ t: ca, n: 'ca' }, { t: ca, n: 'ca' },
{ t: de, n: 'de' }, { t: de, n: 'de' },
{ t: fa, n: 'fa' },
{ t: eo, n: 'eo' }, { t: eo, n: 'eo' },
{ t: es, n: 'es' }, { t: es, n: 'es' },
{ t: fi, n: 'fi' }, { t: fi, n: 'fi' },