From 38edb60be9f09a8290cab8c62bc342099e110d63 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 26 Aug 2019 14:42:53 -0700 Subject: Adding Esperanto. - Fixes #240 --- ui/src/components/moment-time.tsx | 6 -- ui/src/i18next.ts | 2 + ui/src/translations/eo.ts | 173 ++++++++++++++++++++++++++++++++++++++ ui/src/utils.ts | 10 +++ 4 files changed, 185 insertions(+), 6 deletions(-) create mode 100644 ui/src/translations/eo.ts (limited to 'ui/src') diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx index 78b3df02..c6cd981b 100644 --- a/ui/src/components/moment-time.tsx +++ b/ui/src/components/moment-time.tsx @@ -1,11 +1,5 @@ import { Component } from 'inferno'; import * as moment from 'moment'; -import 'moment/locale/es'; -import 'moment/locale/de'; -import 'moment/locale/zh-cn'; -import 'moment/locale/fr'; -import 'moment/locale/sv'; -import 'moment/locale/ru'; import { getMomentLanguage } from '../utils'; import { i18n } from '../i18next'; diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 5b22aaaa..ba81b8d4 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -1,6 +1,7 @@ import * as i18n from 'i18next'; import { getLanguage } from './utils'; import { en } from './translations/en'; +import { eo } from './translations/eo'; import { es } from './translations/es'; import { de } from './translations/de'; import { zh } from './translations/zh'; @@ -12,6 +13,7 @@ import { ru } from './translations/ru'; // TODO don't forget to add moment locales for new languages. const resources = { en, + eo, es, de, zh, diff --git a/ui/src/translations/eo.ts b/ui/src/translations/eo.ts new file mode 100644 index 00000000..07ad7fb7 --- /dev/null +++ b/ui/src/translations/eo.ts @@ -0,0 +1,173 @@ +export const eo = { + translation: { + post: 'Poŝti', + remove_post: 'Fortiri Poŝton', + no_posts: 'Ne Poŝtoj.', + create_a_post: 'Verki Poŝton', + create_post: 'Verki Poŝton', + number_of_posts:'{{count}} Poŝtoj', + posts: 'Poŝtoj', + related_posts: 'Tiuj poŝtoj eble rilatas', + cross_posts: 'Tiuj ligilo ankaŭ estas poŝtinta al:', + cross_post: 'laŭapoŝto', + comments: 'Komentoj', + number_of_comments:'{{count}} Komentoj', + remove_comment: 'Fortiri Komentojn', + communities: 'Komunumoj', + users: 'Uzantoj', + create_a_community: 'Krei komunumon', + create_community: 'Krei Komunumon', + remove_community: 'Forigi Komunumon', + subscribed_to_communities:'Abonita al <1>komunumoj', + trending_communities:'Furora <1>komunumoj', + list_of_communities: 'Listo de komunumoj', + community_reqs: 'minusklaj leteroj, substrekoj, kaj ne spacetoj.', + edit: 'redakti', + reply: 'repliki', + cancel: 'nuligi', + unlock: 'malŝlosi', + lock: 'ŝlosi', + link: 'ligi', + mod: 'moderanto', + mods: 'moderantoj', + moderates: 'Moderigas', + settings: 'Agordoj', + remove_as_mod: 'forigi per moderanto', + appoint_as_mod: 'nomumi per moderanto', + modlog: 'Moderlogo', + admin: 'administranto', + admins: 'administrantoj', + remove_as_admin: 'forigi per administranto', + appoint_as_admin: 'nomumi per administranto', + remove: 'fortiri', + removed: 'fortirita', + locked: 'ŝlosita', + reason: 'Kialo', + mark_as_read: 'marki kiel legita', + mark_as_unread: 'marki kiel nelegita', + delete: 'forigi', + deleted: 'forigita', + restore: 'restaŭri', + ban: 'forbari', + ban_from_site: 'forbari de retejo', + unban: 'malforbari', + unban_from_site: 'malforbari de retejo', + save: 'konservi', + unsave: 'malkonservi', + create: 'krei', + username: 'Uzantnomo', + email_or_username: 'Retadreso aŭ Uzantnomo', + number_of_users:'{{count}} Uzantoj', + number_of_subscribers:'{{count}} Abonantoj', + number_of_points:'{{count}} Voĉdonoj', + name: 'Nomo', + title: 'Titolo', + category: 'Kategorio', + subscribers: 'Abonantoj', + both: 'Ambaŭ', + saved: 'Konservita', + unsubscribe: 'Malaboni', + subscribe: 'Aboni', + subscribed: 'Abonita', + prev: 'Antaŭe', + next: 'Poste', + sidebar: 'Flankstango', + sort_type: 'Klasi per kia', + hot: 'Varmaj', + new: 'Novaj', + top_day: 'Supraj tagaj', + week: 'Semajno', + month: 'Monato', + year: 'Jaro', + all: 'Ĉiam', + top: 'Supraj', + api: 'API', + inbox: 'Ricevujo', + inbox_for: 'Ricevujo de <1>{{user}}', + mark_all_as_read: 'marki ĉiujn kiel legitaj', + type: 'Tipo', + unread: 'Nelegitaj', + reply_sent: 'Repliko sendis', + search: 'Serĉi', + overview: 'Resumo', + view: 'Rigardi', + logout: 'Elsaluti', + login_sign_up: 'Ensaluti / Registriĝi', + login: 'Ensaluti', + sign_up: 'Registriĝi', + notifications_error: 'Labortablaj avizoj estas nehavebla en via retumilo. Provu Firefox-on aŭ Chrome-on.', + unread_messages: 'Nelegitaj Mesaĝoj', + password: 'Pasvorto', + verify_password: 'Konfirmu Vian Pasvorton', + email: 'Retadreso', + optional: 'Fakultativa', + expires: 'Finiĝos', + url: 'URL', + body: 'Ĉefparto', + copy_suggested_title: 'kopii la sugestiitan titolon: {{title}}', + community: 'Komunumo', + expand_here: 'Ekspansii ĉi tie', + subscribe_to_communities: 'Aboni al iuj <1>komunumoj.', + chat: 'Babilo', + recent_comments: 'Freŝaj Komentoj', + no_results: 'Ne rezultoj.', + setup: 'Agordi', + lemmy_instance_setup: 'Agordi Instancon de Lemmy', + setup_admin: 'Agordi Retejan Administranton', + your_site: 'via retejo', + modified: 'modifita', + nsfw: 'NSFW', + show_nsfw: 'Vidigi NSFW-an enhavon', + sponsors: 'Subtenantoj', + sponsors_of_lemmy: 'Subtenantoj de Lemmy', + sponsor_message: 'Lemmy estas senpaga, <1>liberkoda programaro. Tio signifas ne reklami, pagigi, aŭ riska kapitalo, ĉiam. Viaj donacoj rekte subtenas plentempan evoluon de la projekto. Dankon al tiuj homoj:', + support_on_patreon: 'Subteni per Patreon', + general_sponsors:'Ĝeneralaj Subtenantoj estas tiuj ke donacis inter $10 kaj $39 al Lemmy.', + crypto: 'Crypto', + bitcoin: 'Bitcoin', + ethereum: 'Ethereum', + monero: 'Monero', + code: 'Kodo', + joined: 'Unuiĝis', + by: 'de', + to: 'al', + transfer_community: 'transdoni la komunumon', + transfer_site: 'transdoni la retejon', + powered_by: 'Konstruis per', + landing_0: 'Lemmy estas <1>ligila agregatilo / Reddit anstataŭo ke intenciĝas funkci en la <2>federacio-universo.<3>ĝi estas mem-gastigebla, havas nuna-ĝisdatigajn komentarojn, kaj estas malgrandega (<4>~80kB). Federacio en la ActivityPub-an reton estas planizita. <5>Estas <6>fruega beta versio, kaj multaj trajtoj estas nune difektaj aŭ mankaj. <7>Sugestias novajn trajtojn aŭ raportas cimojn <8>ĉi tie.<9>Faris per <10>Rust, <11>Actix, <12>Inferno, <13>Typescript.', + not_logged_in: 'Ne estas ensalutinta.', + community_ban: 'Vi estas forbarita de la komunumo.', + site_ban: 'Vi estas forbarita de la retejo', + couldnt_create_comment: 'Ne povis krei la komenton.', + couldnt_like_comment: 'Ne povis ŝati la komenton.', + couldnt_update_comment: 'Ne povis ĝisdatigi komenton.', + couldnt_save_comment: 'Ne povis konservi komenton.', + no_comment_edit_allowed: 'Ne rajtas redakti la komenton.', + no_post_edit_allowed: 'Ne rajtas redakti la poŝton.', + no_community_edit_allowed: 'Ne rajtas redakti la komunumon.', + couldnt_find_community: 'Ne povis trovi la komunumon.', + couldnt_update_community: 'Ne povis ĝisdatigi la komunumon.', + community_already_exists: 'Komunumo jam ekzistas.', + community_moderator_already_exists: 'Komunuma moderanto jam ekzistas.', + community_follower_already_exists: 'Komunuma sekvanto.', + community_user_already_banned: 'Komunuma uzanto jam estas forbarita.', + couldnt_create_post: 'Ne povis krei la poŝton.', + couldnt_like_post: 'Ne povis ŝati la poŝton.', + couldnt_find_post: 'Ne povis trovi la poŝton.', + couldnt_get_posts: 'Ne povis irpreni poŝtojn', + couldnt_update_post: 'Ne povis ĝisdatigi la poŝton', + couldnt_save_post: 'Ne povis konservi la poŝton.', + no_slurs: 'Ne bigotaj vortoj.', + not_an_admin: 'Ne estas administranto.', + site_already_exists: 'Retejo jam ekzistas.', + couldnt_update_site: 'Ne povis ĝisdatigi la retejon.', + couldnt_find_that_username_or_email: 'Ne povis trovi tiun uzantnomon aŭ retadreson.', + password_incorrect: 'Pasvorto malĝustas.', + passwords_dont_match: 'Pasvortoj ne samas.', + admin_already_created: 'Pardonu, jam estas administranto.', + user_already_exists: 'Uzanto jam ekzistas.', + couldnt_update_user: 'Ne povis ĝisdatigi la uzanton.', + system_err_login: 'Sistema eraro. Provu elsaluti kaj ensaluti.', + }, +} + diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 1cd5c9c4..c7de7a51 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -1,3 +1,11 @@ +import 'moment/locale/es'; +import 'moment/locale/eo'; +import 'moment/locale/de'; +import 'moment/locale/zh-cn'; +import 'moment/locale/fr'; +import 'moment/locale/sv'; +import 'moment/locale/ru'; + import { UserOperation, Comment, User, SortType, ListingType } from './interfaces'; import * as markdown_it from 'markdown-it'; import * as markdown_it_container from 'markdown-it-container'; @@ -188,6 +196,8 @@ export function getMomentLanguage(): string { lang = 'ru'; } else if (lang.startsWith('es')) { lang = 'es'; + } else if (lang.startsWith('eo')) { + lang = 'eo'; } else { lang = 'en'; } -- cgit v1.2.3