From 7dd5ba42a394e64ef55b066628294cc0c61d2d58 Mon Sep 17 00:00:00 2001 From: Korbinian Date: Mon, 3 Apr 2017 19:01:17 +0200 Subject: Updated and fixed german orthography --- config/locales/devise.de.yml | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'config') diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml index 181502f9c..58bfaa3d6 100644 --- a/config/locales/devise.de.yml +++ b/config/locales/devise.de.yml @@ -2,59 +2,59 @@ de: devise: confirmations: - confirmed: "Vielen Dank für Deine Registrierung. Bitte melde dich jetzt an." - send_instructions: "Du erhältst in wenigen Minuten eine E-Mail, mit der Du Deine Registrierung bestätigen kannst." - send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert erhältst Du in wenigen Minuten eine E-Mail mit der Du Deine Registrierung bestätigen kannst." + confirmed: "Vielen Dank für deine Registrierung. Bitte melde dich jetzt an." + send_instructions: "Du erhältst in wenigen Minuten eine E-Mail, mit der du deine Registrierung bestätigen kannst." + send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert, erhältst Du in wenigen Minuten eine E-Mail mit der du deine Registrierung bestätigen kannst." failure: already_authenticated: "Du bist bereits angemeldet." inactive: "Dein Account ist nicht aktiv." invalid: "Ungültige Anmeldedaten." - last_attempt: "Du hast noch einen Versuch bevor dein Account gesperrt wird" + last_attempt: "Du hast noch einen Versuch bevor dein Account gesperrt wird." locked: "Dein Account ist gesperrt." not_found_in_database: "E-Mail-Adresse oder Passwort ungültig." - timeout: "Deine Sitzung ist abgelaufen, bitte melde Dich erneut an." - unauthenticated: "Du musst Dich anmelden oder registrieren, bevor Du fortfahren kannst." - unconfirmed: "Du musst Deinen Account bestätigen, bevor Du fortfahren kannst." + timeout: "Deine Sitzung ist abgelaufen, bitte melde dich erneut an." + unauthenticated: "Du musst Dich anmelden oder registrieren, bevor du fortfahren kannst." + unconfirmed: "Du musst deinen Account bestätigen, bevor du fortfahren kannst." mailer: confirmation_instructions: - subject: "Mastodon: Anleitung zur Bestätigung Deines Accounts" + subject: "Mastodon: Anleitung zur Bestätigung deines Accounts" password_change: subject: 'Mastodon: Passwort wurde geändert' reset_password_instructions: - subject: "Mastodon: Anleitung um Dein Passwort zurückzusetzen" + subject: "Mastodon: Anleitung um dein Passwort zurückzusetzen" unlock_instructions: - subject: "Mastodon: Anleitung um Deinen Account freizuschalten" + subject: "Mastodon: Anleitung um deinen Account freizuschalten" omniauth_callbacks: - failure: "Du konntest nicht Deinem %{kind}-Account angemeldet werden, weil '%{reason}'." - success: "Du hast Dich erfolgreich mit Deinem %{kind}-Account angemeldet." + failure: "Du konntest nicht mit deinem %{kind}-Account angemeldet werden, weil '%{reason}'." + success: "Du hast dich erfolgreich mit Deinem %{kind}-Account angemeldet." passwords: - no_token: "Du kannst diese Seite nur von dem Link aus einer E-Mail zum Passwort-Zurücksetzen aufrufen. Wenn du einen solchen Link aufgerufen hast stelle bitte sicher, dass du die vollständige Adresse aufrufst." - send_instructions: "Du erhältst in wenigen Minuten eine E-Mail mit der Anleitung, wie Du Dein Passwort zurücksetzen kannst." - send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert erhältst Du in wenigen Minuten eine E-Mail mit der Anleitung, wie Du Dein Passwort zurücksetzen können." + no_token: "Du kannst diese Seite nur über den Link aus der E-Mail zum Passwort-Zurücksetzen aufrufen. Wenn du einen solchen Link aufgerufen hast, stelle bitte sicher, dass du die vollständige Adresse aufrufst." + send_instructions: "Du erhältst in wenigen Minuten eine E-Mail mit der Anleitung, wie du dein Passwort zurücksetzen kannst." + send_paranoid_instructions: "Falls deine E-Mail-Adresse in unserer Datenbank existiert erhältst du in wenigen Minuten eine E-Mail mit der Anleitung, wie du dein Passwort zurücksetzen kannst." updated: "Dein Passwort wurde geändert. Du bist jetzt angemeldet." updated_not_active: "Dein Passwort wurde geändert." registrations: destroyed: "Dein Account wurde gelöscht." signed_up: "Du hast dich erfolgreich registriert." - signed_up_but_inactive: "Du hast dich erfolgreich registriert. Wir konnten Dich noch nicht anmelden, da Dein Account inaktiv ist." - signed_up_but_locked: "Du hast dich erfolgreich registriert. Wir konnten Dich noch nicht anmelden, da Dein Account gesperrt ist." - signed_up_but_unconfirmed: "Du hast Dich erfolgreich registriert. Wir konnten Dich noch nicht anmelden, da Dein Account noch nicht bestätigt ist. Du erhältst in Kürze eine E-Mail mit der Anleitung, wie Du Deinen Account freischalten kannst." - update_needs_confirmation: "Deine Daten wurden aktualisiert, aber Du musst Deine neue E-Mail-Adresse bestätigen. Du erhälst in wenigen Minuten eine E-Mail, mit der Du die Änderung Deiner E-Mail-Adresse abschließen kannst." + signed_up_but_inactive: "Du hast dich erfolgreich registriert. Wir konnten dich noch nicht anmelden, da dein Account inaktiv ist." + signed_up_but_locked: "Du hast dich erfolgreich registriert. Wir konnten dich noch nicht anmelden, da dein Account gesperrt ist." + signed_up_but_unconfirmed: "Du hast Dich erfolgreich registriert. Wir konnten dich noch nicht anmelden, da dein Account noch nicht bestätigt ist. Du erhältst in Kürze eine E-Mail mit der Anleitung, wie Du Deinen Account freischalten kannst." + update_needs_confirmation: "Deine Daten wurden aktualisiert, aber du musst deine neue E-Mail-Adresse bestätigen. Du erhälst in wenigen Minuten eine E-Mail, mit der du die Änderung deiner E-Mail-Adresse abschließen kannst." updated: "Deine Daten wurden aktualisiert." sessions: already_signed_out: "Erfolgreich abgemeldet." signed_in: "Erfolgreich angemeldet." signed_out: "Erfolgreich abgemeldet." unlocks: - send_instructions: "Du erhältst in wenigen Minuten eine E-Mail mit der Anleitung, wie Du Deinen Account entsperren können." - send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert erhältst Du in wenigen Minuten eine E-Mail mit der Anleitung, wie Du Deinen Account entsperren kannst." + send_instructions: "Du erhältst in wenigen Minuten eine E-Mail mit der Anleitung, wie du deinen Account entsperren können." + send_paranoid_instructions: "Falls deine E-Mail-Adresse in unserer Datenbank existiert erhältst du in wenigen Minuten eine E-Mail mit der Anleitung, wie du deinen Account entsperren kannst." unlocked: "Dein Account wurde entsperrt. Du bist jetzt angemeldet." errors: messages: - already_confirmed: "wurde bereits bestätigt" - confirmation_period_expired: "muss innerhalb %{period} bestätigt werden, bitte fordere einen neuen Link an" - expired: "ist abgelaufen, bitte neu anfordern" - not_found: "nicht gefunden" + already_confirmed: "wurde bereits bestätigt." + confirmation_period_expired: "muss innerhalb %{period} bestätigt werden, bitte fordere einen neuen Link an." + expired: "ist abgelaufen, bitte neu anfordern." + not_found: "wurde nicht gefunden." not_locked: "ist nicht gesperrt" not_saved: one: "Konnte %{resource} nicht speichern: ein Fehler." -- cgit From ec8029a95531bd52bc6ed1e83c52362411210d5e Mon Sep 17 00:00:00 2001 From: Korbinian Date: Mon, 3 Apr 2017 19:10:48 +0200 Subject: Updated and fixed orthography --- config/locales/de.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'config') diff --git a/config/locales/de.yml b/config/locales/de.yml index 320bd3144..d44845c6b 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1,14 +1,14 @@ --- de: about: - about_mastodon: Mastodon ist ein freier, quelloffener soziales Netzwerkserver. Eine dezentralisierte Alternative zu kommerziellen Plattformen, verhindert es die Risiken, die entstehen, wenn eine einzelne Firma deine Kommunikation monopolisiert. Jeder kann Mastodon verwenden und ganz einfach am sozialen Netzwerk teilnehmen. + about_mastodon: Mastodon ist ein freier, quelloffener soziales Netzwerkserver. Als dezentralisierte Alternative zu kommerziellen Plattformen verhindert es die Risiken, die entstehen, wenn eine einzelne Firma deine Kommunikation monopolisiert. Jeder kann Mastodon verwenden und ganz einfach am sozialen Netzwerk teilnehmen. get_started: Erste Schritte source_code: Quellcode terms: AGB accounts: follow: Folgen - followers: Folger - following: Folgt + followers: Follower + following: Gefolgt nothing_here: Hier gibt es nichts! people_followed_by: Nutzer, denen %{name} folgt people_who_follow: Nutzer, die %{name} folgen @@ -27,7 +27,7 @@ de: reset_password: Passwort zurücksetzen set_new_password: Neues Passwort setzen authorize_follow: - error: Das entfernte Profil konnte nicht geladen werden + error: Das Profil konnte nicht geladen werden follow: Folgen prompt_html: 'Du (%{self}) möchtest dieser Person folgen:' title: "%{acct} folgen" @@ -55,25 +55,25 @@ de: notification_mailer: favourite: body: 'Dein Beitrag wurde von %{name} favorisiert:' - subject: "%{name} hat deinen Beitrag favorisiert" + subject: "%{name} hat deinen Beitrag favorisiert." follow: body: "%{name} folgt dir jetzt!" - subject: "%{name} folgt dir nun" + subject: "%{name} folgt dir jetzt." follow_request: body: "%{name} möchte dir folgen:" - subject: "%{name} möchte dir folgen" + subject: "%{name} möchte dir folgen." mention: body: "%{name} hat dich erwähnt:" - subject: "%{name} hat dich erwähnt" + subject: "%{name} hat dich erwähnt." reblog: body: 'Dein Beitrag wurde von %{name} geteilt:' - subject: "%{name} teilte deinen Beitrag" + subject: "%{name} teilte deinen Beitrag." pagination: next: Vorwärts prev: Zurück remote_follow: - acct: Dein Nutzername@Domain, von dem du dieser Person folgen möchtest - missing_resource: Die erforderliche Weiterleitungs-URL konnte leider in deinem Profil nicht gefunden werden + acct: Dein Nutzername@Domain, von dem aus du dieser Person folgen möchtest. + missing_resource: Die erforderliche Weiterleitungs-URL konnte leider in deinem Profil nicht gefunden werden. proceed: Weiter prompt: 'Du wirst dieser Person folgen:' settings: -- cgit From 0700521ef36e5404f764523f387dafa331fa2b52 Mon Sep 17 00:00:00 2001 From: axolotl Date: Mon, 3 Apr 2017 20:22:50 +0200 Subject: added Esperanto (eo) --- app/helpers/settings_helper.rb | 1 + config/application.rb | 2 +- config/locales/devise.eo.yml | 61 ++++++++++++++ config/locales/doorkeeper.eo.yml | 113 ++++++++++++++++++++++++++ config/locales/eo.yml | 164 ++++++++++++++++++++++++++++++++++++++ config/locales/simple_form.eo.yml | 46 +++++++++++ 6 files changed, 386 insertions(+), 1 deletion(-) create mode 100644 config/locales/devise.eo.yml create mode 100644 config/locales/doorkeeper.eo.yml create mode 100644 config/locales/eo.yml create mode 100644 config/locales/simple_form.eo.yml (limited to 'config') diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index 74215e8df..f92abb9bc 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -10,6 +10,7 @@ module SettingsHelper hu: 'Magyar', uk: 'Українська', 'zh-CN': '简体中文', + eo: 'Esperanto', }.freeze def human_locale(locale) diff --git a/config/application.rb b/config/application.rb index 9d32f30cb..77cd254af 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,7 +24,7 @@ module Mastodon # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - config.i18n.available_locales = [:en, :de, :es, :pt, :fr, :hu, :uk, 'zh-CN'] + config.i18n.available_locales = [:en, :de, :es, :pt, :fr, :hu, :uk, 'zh-CN', :eo] config.i18n.default_locale = :en # config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb') diff --git a/config/locales/devise.eo.yml b/config/locales/devise.eo.yml new file mode 100644 index 000000000..b786647dd --- /dev/null +++ b/config/locales/devise.eo.yml @@ -0,0 +1,61 @@ +--- +eo: + devise: + confirmations: + confirmed: Via konto estas konfirmita. + send_instructions: Vi ricevos instrukciojn por konfirmi vian konton post kelkaj minutoj. + send_paranoid_instructions: Se via retpoŝt-adreso ekzistas en nia datumbazo, vi baldaŭ ricevos retpoŝt-mesaĝon, kiu enhavas la instrukciojn por konfirmi vian konton. + failure: + already_authenticated: Vi jam estas ensalutita. + inactive: Via konto ankoraŭ ne estas konfirmita. + invalid: Malĝusta retpoŝt-adreso aŭ pasvorto. + last_attempt: Vi ankoraŭ povas provi unufoje antaŭ ol via konto estos ŝlosita. + locked: Via konto estas ŝlosita. + not_found_in_database: Malĝusta retpoŝt-adreso aŭ pasvorto. + timeout: Via sesio eksiĝis. Bonvolu reensaluti por daŭrigi. + unauthenticated: Vi devas ensaluti aŭ membriĝi por daŭrigi. + unconfirmed: Vi devas konfirmi vian konton por daŭrigi. + mailer: + confirmation_instructions: + subject: Instrukcioj por konfirmi + password_change: + subject: Via pasvorto estis ŝanĝita senprobleme. + reset_password_instructions: + subject: Instrukcioj por ŝanĝi la pasvorton + unlock_instructions: + subject: Instrukcioj por malŝlosi la konton + omniauth_callbacks: + failure: 'Ni ne povis aŭtentigi vin per %{kind}: ''%{reason}''.' + success: Aŭtentigita senprobleme per %{kind}. + passwords: + no_token: Vi ne povas iri al tiu paĝo per alia vojo ol retpoŝt-mesaĝo por ŝanĝi pasvorton. Se vi venas de tia retpoŝt-mesaĝo, kontrolu ke vi uzis la tutan URL. + send_instructions: Vi ricevos retpoŝt-mesaĝon kun instrukcioj por ŝanĝi vian pasvorton post kelkaj minutoj. + send_paranoid_instructions: Se via retpoŝt-adreso ekzistas en nia datumbazo, vi ricevos ligilon por ŝanĝi vian pasvorton per retpoŝt-mesaĝo. + updated: Via pasvorto estis redaktita senprobleme, vi nun estas ensalutita. + updated_not_active: Via pasvorto estis redaktita senprobleme. + registrations: + destroyed: Ĝis! Via konto estis forigita senprobleme. Ni esperas revidi vin baldaŭ. + signed_up: Bonvenon! Vi membriĝis senprobleme. + signed_up_but_inactive: Vi bone membriĝis, sed vi ankoraŭ ne povas ensaluti ĉar via konto ne estis konfirmita. + signed_up_but_locked: Vi bone membriĝis, sed vi ne povas ensaluti ĉar via konto estas ŝlosita. + signed_up_but_unconfirmed: Retpoŝt-mesaĝo kun via ligilo por konfirmi vian konton estis sendita al via retpoŝt-adreso. Bonvolu uzi tiun ligilon por konfirmi vian konton. + update_needs_confirmation: Vi bone aktualigis vian konton, sed ni bezonas kontroli vian novan retpoŝt-adreson. Bonvolu kontroli viajn retpoŝt-mesaĝojn kaj uzi la ligilon por konfirmi vian novan retpoŝt-adreson. + updated: Via konto estis aktualigita senprobleme. + sessions: + already_signed_out: Elsalutita. + signed_in: Ensalutita. + signed_out: Elsalutita. + unlocks: + send_instructions: Vi ricevos retpoŝt-mesaĝon kun instrukcioj por malŝlosi vian konton post kelkaj minutoj. + send_paranoid_instructions: Se via retpoŝt-adreso ekzistas en nia datumbazo, vi ricevos ligilon por malŝlosi vian konton per retpoŝt-mesaĝo. + unlocked: Via konto estis malŝlosita senprobleme, vi nun estas ensalutita. + errors: + messages: + already_confirmed: jam estis konfirmita, bonvolu provi ensaluti + confirmation_period_expired: devas esti konfirmita en %{period}, bonvolu repeti + expired: eksiĝis, bonvolu repeti + not_found: ne estis trovita + not_locked: ne estis ŝlosita + not_saved: + one: '1 eraro malpermesis al tiu %{resource} esti konservita:' + other: '%{count} eraroj malpermesis al tiu %{resource} esti konservita:' diff --git a/config/locales/doorkeeper.eo.yml b/config/locales/doorkeeper.eo.yml new file mode 100644 index 000000000..33cc7cc19 --- /dev/null +++ b/config/locales/doorkeeper.eo.yml @@ -0,0 +1,113 @@ +--- +eo: + activerecord: + attributes: + doorkeeper/application: + name: Nomo + redirect_uri: URI de plusendo + errors: + models: + doorkeeper/application: + attributes: + redirect_uri: + fragment_present: ne povas enhavi eron. + invalid_uri: devas esti valida URI. + relative_uri: devas esti absoluta URI. + secured_uri: devas esti HTTPS/SSL-a URI. + doorkeeper: + applications: + buttons: + authorize: Rajtigi + cancel: Rezigni + destroy: Detrui + edit: Redakti + submit: Sendi + confirmations: + destroy: Ĉu vi certas? + edit: + title: Redakti aplikaĵon + form: + error: Ups! Kontrolu vian formularon ĉu estas eraroj + help: + native_redirect_uri: Uzu %{native_redirect_uri} por lokaj provoj + redirect_uri: Uzu unu linion por ĉiu URI + scopes: Apartigu ampleksojn per spacetoj. Lasu malplena por uzi la senŝanĝajn ampleksojn. + index: + callback_url: URL vokita per referenco + name: Nomo + new: Nova Aplikaĵo + title: Viaj aplikaĵoj + new: + title: Nova aplikaĵo + show: + actions: Agoj + application_id: Identigo de la aplikaĵo + callback_urls: URL-j vokitaj per referenco + scopes: Ampleksoj + secret: Sekreto + title: 'Aplikaĵo: %{name}' + authorizations: + buttons: + authorize: Rajtigi + deny: Rifuzi + error: + title: Eraro okazis + new: + able_to: Povos + prompt: La aplikaĵo %{client_name} petas aliron al via konto + title: Rajtigo bezonata + show: + title: Rajtiga kodo + authorized_applications: + buttons: + revoke: Malrajtigi + confirmations: + revoke: Ĉu vi certas? + index: + application: Aplikaĵo + created_at: Rajtigita + date_format: "%Y-%m-%d %H:%M:%S" + scopes: Ampleksoj + title: Viaj rajtigitaj aplikaĵoj + errors: + messages: + access_denied: La posedanto de la rimedo aŭ la rajtiga servilo rifuzis vian peton. + credential_flow_not_configured: La sendado de la identigiloj de la posedanto de la rimedo malsukcesis ĉar Doorkeeper.configure.resource_owner_from_credentials ne estis agordita. + invalid_client: La aŭtentigo de la kliento malsukcesis ĉar la kliento estas nekonata, aŭ mankis peto aŭtentigi, aŭ la aŭtentig-metodo ne estas subtenata. + invalid_grant: La rajtiga konsento ne estas valida, ne plu estas valida, estis forigita, ne kongruas kun la plusenda URI uzita en la aŭtentiga peto, aŭ estis sendita al alia kliento. + invalid_redirect_uri: La plusenda URI uzita en estas valida. + invalid_request: Mankis al la peto nepra parametro, enhavas nesubtenatan parametran valoron, aŭ la peto simple estas misformita. + invalid_resource_owner: La donitaj identigiloj pri la posedanto de la rimedo ne estas validaj, aŭ tiu ne povas esti trovita. + invalid_scope: La petita amplekso ne estas valida, estas nekonata, aŭ estas misformita. + invalid_token: + expired: La atingoĵetono eskiĝis. + revoked: La atingoĵetono estis rifuzita. + unknown: La atingoĵetono ne estas valida. + resource_owner_authenticator_not_configured: La posedanto de la rimedo ne povis esti trovita ĉar Doorkeeper.configure.resource_owner_authenticator ne estas agordita. + server_error: La rajtiga servilo rimarkis neatenditan kondiĉon, kiu malpermesis al ĝi plenumi la peton. + temporarily_unavailable: La rajtiga servilo ne povas nun plenumi la peton pro dumtempa superŝarĝo aŭ prizorgado de la servilo. + unauthorized_client: La kliento ne rajtas fari tian peton uzante tiun metodon. + unsupported_grant_type: La tipo de la rajtiga konsento ne estas subtenata de la rajtiga servilo. + unsupported_response_type: La rajtiga servilo ne subtenas tian respondon. + flash: + applications: + create: + notice: Aplikaĵo kreita. + destroy: + notice: Aplikaĵo forigita. + update: + notice: Aplikaĵo aktualigita. + authorized_applications: + destroy: + notice: Aplikaĵo malrajtigita. + layouts: + admin: + nav: + applications: Aplikaĵoj + oauth2_provider: OAuth2-provizanto + application: + title: OAuth-a rajtigo bezonata + scopes: + follow: sekvi, bloki, malbloki kaj malsekvi kontojn + read: legi la datumojn de via konto + write: mesaĝi kiel vi diff --git a/config/locales/eo.yml b/config/locales/eo.yml new file mode 100644 index 000000000..3644b37bb --- /dev/null +++ b/config/locales/eo.yml @@ -0,0 +1,164 @@ +--- +eo: + about: + about_mastodon: Mastodon estas senpaga, malfermitkoda socia reto. Ĝi estas sencentra alia eblo al komercaj servoj. Ĝi evitigas, ke unusola firmao regu vian tutan komunikadon. Elektu servilon, kiun vi fidas. Kiu ajn estas via elekto, vi povas interagi kun ĉiuj aliaj uzantoj. Iu ajn povas krei sian propran aperaĵon de Mastodon en sia servilo, kaj partopreni en la socia reto tute glate. + about_this: Pri tiu aperaĵo + apps: Aplikaĵoj + business_email: 'Profesia retpoŝt-adreso:' + contact: Kontakti + description_headline: Kio estas %{domain}? + domain_count_after: aliaj aperaĵoj + domain_count_before: Konektita al + features: + api: Malfermita API por aplikaĵoj kaj servoj + blocks: Kompletaj iloj por bloki kaj kaŝi + characters: Po 500 signoj por ĉiu mesaĝo + chronology: Tempolinioj laŭtempaj + ethics: 'Etike kreita: neniu reklamo, neniu ŝpurado' + gifv: Eblo diskonigi etajn videojn kaj GIFV + privacy: Videbleco agordita laŭ la mesaĝo + public: Publikaj tempolinioj + features_headline: Kiel Mastodon estas malsimila + get_started: Komenci + links: Ligiloj + other_instances: Aliaj aperaĵoj + source_code: Fontkodo + status_count_after: mesaĝoj + status_count_before: Kiu publikigis + terms: Terms + user_count_after: uzantoj + user_count_before: Hejmo de + accounts: + follow: Sekvi + followers: Sekvantoj + following: Sekvatoj + nothing_here: Estas nenio ĉi tie! + people_followed_by: Sekvatoj de %{name} + people_who_follow: Sekvantoj de %{name} + posts: Mesaĝoj + remote_follow: Fore sekvi + unfollow: Malsekvi + application_mailer: + settings: 'Ŝanĝi la retpoŝt-mesaĝajn preferojn: %{link}' + signature: Sciigoj de Mastodon el %{instance} + view: 'Vidi:' + applications: + invalid_url: La URL donita ne estas valida + auth: + change_password: Ŝanĝi pasvorton + didnt_get_confirmation: Ĉu vi ne ricevis la instrukciojn por konfirmi? + forgot_password: Pasvorto forgesita? + login: Ensaluti + logout: Elsaluti + register: Membriĝi + resend_confirmation: Resendi la instrukciojn por konfirmi + reset_password: Ŝanĝi la pasvorton + set_new_password: Elekti novan pasvorton + authorize_follow: + error: Bedaŭrinde, okazis eraro provante konsulti la foran konton + follow: Sekvi + prompt_html: 'Vi (%{self}) petis sekvi:' + title: Sekvi %{acct} + datetime: + distance_in_words: + about_x_hours: "%{count}h" + about_x_months: "%{count}mo" + about_x_years: "%{count}j" + almost_x_years: "%{count}j" + half_a_minute: Ĵus + less_than_x_minutes: "%{count}m" + less_than_x_seconds: Ĵus + over_x_years: "%{count}j" + x_days: "%{count}t" + x_minutes: "%{count}m" + x_months: "%{count}mo" + x_seconds: "%{count}s" + exports: + blocks: Vi blokas + csv: CSV + follows: Vi sekvas + storage: Mediaĵa konservado + generic: + changes_saved_msg: Ŝanĝoj senprobleme konservitaj! + powered_by: povigita de %{link} + save_changes: Konservi la ŝanĝojn + validation_errors: + one: Io ne okazis senprobleme! Bonvolu konsulti la suban erar-raporton. + other: Io ne okazis senprobleme! Bonvolu konsulti la subajn %{count} erar-raportojn. + imports: + preface: Vi povas alporti kelkajn datumojn, kiel listojn de ĉiuj homoj kiujn vi sekvas aŭ blokas, al via konto de ĉi tiu aperaĵo, per dosiero elportita de alia aperaĵo. + success: Viaj datumoj estis senprobleme alportitaj kaj estos traktitaj kiel planite. + types: + blocking: Listo de blokitoj + following: Listo de sekvatoj + upload: Alporti + landing_strip_html: %{name} estas uzanto en %{domain}. Vi povas sekvi tiun aŭ interagi kun tiu, se vi havas konton ie ajn en la Fediverse. Se vi ne havas, vi povas membriĝi ĉi tie.. + notification_mailer: + digest: + body: 'Jen eta resumo de tio, kio okazis en %{instance}, ekde kiam vi laste vizitis en %{since}:' + mention: "%{name} menciis vin en:" + new_followers_summary: + one: Vi ekhavis novan sekvanton! Jej! + other: Vi ekhavis %{count} novajn sekvantojn! Mirinde! + subject: + one: "1 nova sciigo ekde via lasta vizito \U0001F418" + other: "%{count} novaj sciigoj ekde via lasta vizito \U0001F418" + favourite: + body: '%{name} favoris vian mesaĝon:' + subject: "%{name} favoris vian mesaĝon" + follow: + body: "%{name} eksekvis vin:" + subject: "%{name} eksekvis vin" + follow_request: + body: "%{name} petis sekvi vin:" + subject: '%{name} petis sekvi vin' + mention: + body: '%{name} menciis vin en:' + subject: '%{name} menciis vin' + reblog: + body: '%{name} diskonigis vian mesaĝon:' + subject: "%{name} diskonigis vian mesaĝon" + pagination: + next: Sekva + prev: Malsekva + remote_follow: + acct: Enmetu vian uzantnomo@aperaĵo de kie vi volas sekvi tiun uzanton + missing_resource: La URL de plusendado ne povis esti trovita + proceed: Daŭrigi por plusendi + prompt: 'Vi eksekvos:' + settings: + authorized_apps: Rajtigitaj aplikaĵoj + back: Reveni al Mastodon + edit_profile: Redakti la profilon + export: Elporti datumojn + import: Alporti + preferences: Preferoj + settings: Agordoj + two_factor_auth: Dufaktora aŭtentigo + statuses: + open_in_web: Malfermi retumile + over_character_limit: limo de %{max} signoj trapasita + show_more: Montri pli + visibilities: + private: Montri nur al sekvantoj + public: Publika + unlisted: Publika, sed ne aperos en publikaj tempolinioj + stream_entries: + click_to_show: Alklaki por montri + reblogged: diskonigita + sensitive_content: Tikla enhavo + time: + formats: + default: "%b %d, %Y, %H:%M" + two_factor_auth: + description_html: Se vi ebligas dufaktoran aŭtentigon, vi bezonos vian poŝtelefonon por ensaluti, ĉar ĝi kreos nombrojn, kiujn vi devos entajpi. + disable: Malebligi + enable: Ebligi + instructions_html: "Skanu tiun QR-kodon per Google Authenticator aŭ per simila aplikaĵo de via poŝtelefono. De tiam, la aplikaĵo kreos nombrojn, kiujn vi devos entajpi." + plaintext_secret_html: 'Rekte legebla sekreta kodo: %{secret}' + warning: Se vi ne povas agordi aŭtentigan aplikaĵon nun, elektu "malebligi" aŭ vi ne plu povos ensaluti. + users: + invalid_email: La retpoŝt-adreso ne estas valida + invalid_otp_token: La dufaktora aŭtentigila kodo ne estas valida + will_paginate: + page_gap: "…" diff --git a/config/locales/simple_form.eo.yml b/config/locales/simple_form.eo.yml new file mode 100644 index 000000000..8c89a56e7 --- /dev/null +++ b/config/locales/simple_form.eo.yml @@ -0,0 +1,46 @@ +--- +eo: + simple_form: + hints: + defaults: + avatar: En la formato PNG, GIF aŭ JPG. Ĝis 2Mo. Estos malgrandigita al 120x120px + display_name: 30 signoj pleje + header: En la formato PNG, GIF aŭ JPG. Ĝis 2Mo. Estos malgrandigita al 700x335px + locked: Vi devos aprobi ĉiun peton de sekvado, kaj viaj mesaĝoj estos senŝanĝe nur por viaj sekvantoj. + note: 160 signoj pleje + imports: + data: Dosiero CSV el alia aperaĵo de Mastodon + labels: + defaults: + avatar: Profilbildo + confirm_new_password: Konfirmi novan pasvorton + confirm_password: Konfirmi la pasvorton + current_password: Nuna pasvorto + data: Datumoj + display_name: Publika nomo + email: Retpoŝt-adreso + header: Kapbildo + locale: Lingvo + locked: Privatigi la konton + new_password: Nova pasvorto + note: Sinprezento + otp_attempt: Dufaktora identigilo + password: Pasvorto + setting_default_privacy: Videbleco de la mesaĝoj + type: Tipo de alportado + username: Uzantnomo + interactions: + must_be_follower: Kaŝi la sciigojn de homoj, kiuj ne sekvas vin + must_be_following: Kaŝi la sciigojn de homoj, kiujn vi ne sekas + notification_emails: + digest: Sendi resumajn retpoŝt-mesaĝojn + favourite: Sendi retpoŝt-mesaĝon, kiam iu favoras mesaĝon de vi + follow: Sendi retpoŝt-mesaĝon, kiam iu eksekvas vin + follow_request: Sendi retpoŝt-mesaĝon, kiam iu petas sekvi vin + mention: Sendi retpoŝt-mesaĝon, kiam iu mencias vin + reblog: Sendi retpoŝt-mesaĝon, kiam iu diskonigas mesaĝon de vi + 'no': 'Ne' + required: + mark: "*" + text: bezonata + 'yes': 'Jes' -- cgit From ce1ca2859403fd21db1f6237ce6a563edd4f62ae Mon Sep 17 00:00:00 2001 From: Neville Park Date: Mon, 3 Apr 2017 17:45:36 -0400 Subject: Changed "reblogs" to "boosts" --- config/locales/simple_form.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 4d1758f82..c781831a8 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -33,7 +33,7 @@ en: follow: Send e-mail when someone follows you follow_request: Send e-mail when someone requests to follow you mention: Send e-mail when someone mentions you - reblog: Send e-mail when someone reblogs your status + reblog: Send e-mail when someone boosts your status 'no': 'No' required: mark: "*" -- cgit From dc89fc17cc35f8e1deaffb30ae581ac453a7a9fc Mon Sep 17 00:00:00 2001 From: JantsoP Date: Tue, 4 Apr 2017 08:29:53 +0200 Subject: updated translation --- config/locales/simple_form.fi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 02c11752f..02943cea3 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -6,7 +6,7 @@ fi: avatar: PNG, GIF tai JPG. Korkeintaan 2MB. Skaalataan kokoon 120x120px display_name: Korkeintaan 30 merkkiä header: PNG, GIF tai JPG. Korkeintaan 2MB. Skaalataan kokoon 700x335px - locked: Vaatii sinun manuaalisesti hyväksymään seuraajat ja asettaa julkaisun yksityisyyden vain seuraajille + locked: Vaatii sinun manuaalisesti hyväksymään seuraajat ja asettaa julkaisujen yksityisyyden vain seuraajille note: Korkeintaan 160 merkkiä imports: data: CSV tiedosto tuotu toiselta Mastodon palvelimelta -- cgit From e9a6da6bc739f4f68447f56b93810762da388ce8 Mon Sep 17 00:00:00 2001 From: Pete Keen Date: Tue, 4 Apr 2017 11:04:44 -0400 Subject: [#817] Add email whitelist This adds the ability to filter user signup with a whitelist instead of or in addition to a blacklist. Fixes #817 --- .env.production.sample | 2 ++ app/lib/email_validator.rb | 17 +++++++++++++++-- config/initializers/blacklists.rb | 1 + spec/models/user_spec.rb | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/.env.production.sample b/.env.production.sample index bd81b8fca..a7f9eb4bf 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -22,6 +22,8 @@ OTP_SECRET= # SINGLE_USER_MODE=true # Prevent registrations with following e-mail domains # EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc +# Only allow registrations with the following e-mail domains +# EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc # E-mail configuration SMTP_SERVER=smtp.mailgun.org diff --git a/app/lib/email_validator.rb b/app/lib/email_validator.rb index 856b8b1f7..06e9375f6 100644 --- a/app/lib/email_validator.rb +++ b/app/lib/email_validator.rb @@ -2,17 +2,30 @@ class EmailValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) - return if Rails.configuration.x.email_domains_blacklist.empty? - record.errors.add(attribute, I18n.t('users.invalid_email')) if blocked_email?(value) end private def blocked_email?(value) + on_blacklist?(value) || not_on_whitelist?(value) + end + + def on_blacklist?(value) + return false if Rails.configuration.x.email_domains_blacklist.blank? + domains = Rails.configuration.x.email_domains_blacklist.gsub('.', '\.') regexp = Regexp.new("@(.+\\.)?(#{domains})", true) value =~ regexp end + + def not_on_whitelist?(value) + return false if Rails.configuration.x.email_domains_whitelist.blank? + + domains = Rails.configuration.x.email_domains_whitelist.gsub('.', '\.') + regexp = Regexp.new("@(.+\\.)?(#{domains})", true) + + value !~ regexp + end end diff --git a/config/initializers/blacklists.rb b/config/initializers/blacklists.rb index 52646e64d..6db7be7dc 100644 --- a/config/initializers/blacklists.rb +++ b/config/initializers/blacklists.rb @@ -2,4 +2,5 @@ Rails.application.configure do config.x.email_domains_blacklist = ENV.fetch('EMAIL_DOMAIN_BLACKLIST') { 'mvrht.com' } + config.x.email_domains_whitelist = ENV.fetch('EMAIL_DOMAIN_WHITELIST') { '' } end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 64de06749..aa777fd39 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,5 +1,42 @@ require 'rails_helper' RSpec.describe User, type: :model do + let(:account) { Fabricate(:account, username: 'alice') } + let(:password) { 'abcd1234' } + describe 'blacklist' do + it 'should allow a non-blacklisted user to be created' do + user = User.new(email: 'foo@example.com', account: account, password: password) + + expect(user.valid?).to be_truthy + end + + it 'should not allow a blacklisted user to be created' do + user = User.new(email: 'foo@mvrht.com', account: account, password: password) + + expect(user.valid?).to be_falsey + end + end + + describe 'whitelist' do + around(:each) do |example| + old_whitelist = Rails.configuration.x.email_whitelist + + Rails.configuration.x.email_domains_whitelist = 'mastodon.space' + + example.run + + Rails.configuration.x.email_domains_whitelist = old_whitelist + end + + it 'should not allow a user to be created unless they are whitelisted' do + user = User.new(email: 'foo@example.com', account: account, password: password) + expect(user.valid?).to be_falsey + end + + it 'should allow a user to be created if they are whitelisted' do + user = User.new(email: 'foo@mastodon.space', account: account, password: password) + expect(user.valid?).to be_truthy + end + end end -- cgit From 9a5d6e97150c0c1ab0f402e121d7dbafdd46998e Mon Sep 17 00:00:00 2001 From: "Thibaut (Eychics)" Date: Tue, 4 Apr 2017 18:58:19 +0200 Subject: Add closed_registrations message on French language --- config/locales/fr.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 758501403..e9989e383 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -5,6 +5,7 @@ fr: about_this: À propos de cette instance apps: Applications business_email: E-mail professionnel + closed_registrations: Les inscriptions sont actuellement fermées sur cette instance. . description_headline: Qu'est-ce que %{domain} ? domain_count_after: autres instances domain_count_before: Connectés à -- cgit From 350958babfe9473ec362f6693abbcc4137b5ace4 Mon Sep 17 00:00:00 2001 From: Clément D Date: Tue, 4 Apr 2017 19:09:54 +0200 Subject: Fix typos on french translations --- config/locales/doorkeeper.fr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/locales/doorkeeper.fr.yml b/config/locales/doorkeeper.fr.yml index c94e5c095..be109df9c 100644 --- a/config/locales/doorkeeper.fr.yml +++ b/config/locales/doorkeeper.fr.yml @@ -62,7 +62,7 @@ fr: buttons: revoke: Annuler confirmations: - revoke: Êtes-vous certain? + revoke: Êtes-vous certain ? index: application: Application created_at: Créé le @@ -72,19 +72,19 @@ fr: errors: messages: access_denied: Le propriétaire de la ressource ou le serveur d'autorisation a refusé la demande. - credential_flow_not_configured: Le flux des identifiants du mot de passe du propriétaire de la ressource a échoué en raison de Doorkeeper.configure.resource_owner_from_credentials n'est pas configuré. + credential_flow_not_configured: Le flux des identifiants du mot de passe du propriétaire de la ressource a échoué car Doorkeeper.configure.resource_owner_from_credentials n'est pas configuré. invalid_client: L'authentification du client a échoué à cause d'un client inconnu, d'aucune authentification de client incluse, ou d'une méthode d'authentification non prise en charge. invalid_grant: Le consentement d'autorisation accordé n'est pas valide, a expiré, est annulé, ne concorde pas avec l'URL de redirection utilisée dans la demande d'autorisation, ou a été émis à un autre client. invalid_redirect_uri: L'URL de redirection n'est pas valide. invalid_request: La demande manque un paramètre requis, inclut une valeur de paramètre non prise en charge, ou est autrement mal formée. - invalid_resource_owner: Les identifiants fournis du propriétaire de la ressource ne sont pas valides, ou le propriétaire de la ressource ne peut être trouvé + invalid_resource_owner: Les identifiants fournis par le propriétaire de la ressource ne sont pas valides, ou le propriétaire de la ressource ne peut être trouvé invalid_scope: La portée demandée n'est pas valide, est inconnue, ou est mal formée. invalid_token: expired: Le jeton d'accès a expiré revoked: Le jeton d'accès a été révoqué unknown: Le jeton d'accès n'est pas valide - resource_owner_authenticator_not_configured: La recherche du propriétaire de la ressource a échoué en raison de Doorkeeper.configure.resource_owner_authenticator n'est pas configuré. - server_error: Le serveur d'autorisation a rencontré une condition inattendue qui l'a empêché de remplir la demande. + resource_owner_authenticator_not_configured: La recherche du propriétaire de la ressource a échoué car Doorkeeper.configure.resource_owner_authenticator n'est pas configuré. + server_error: Le serveur d'autorisation a rencontré une condition inattendue l'empêchant de remplir la demande. temporarily_unavailable: Le serveur d'autorisation est actuellement incapable de traiter la demande à cause d'une surcharge ou d'un entretien temporaire du serveur. unauthorized_client: Le client n'est pas autorisé à effectuer cette demande à l'aide de cette méthode. unsupported_grant_type: Le type de consentement d'autorisation n'est pas pris en charge par le serveur d'autorisation. -- cgit From 667ffafef8c8b7956cdd31b8f65d5e82778211d8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 5 Apr 2017 03:31:26 +0200 Subject: Fix spec --- config/locales/en.yml | 2 +- spec/models/user_spec.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index 750af0b7a..742219df9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -5,8 +5,8 @@ en: about_this: About this instance apps: Apps business_email: 'Business e-mail:' - contact: Contact closed_registrations: Registrations are currently closed on this instance. + contact: Contact description_headline: What is %{domain}? domain_count_after: other instances domain_count_before: Connected to diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 5575ba107..eb2a4aaea 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -45,8 +45,9 @@ RSpec.describe User, type: :model do expect(User.confirmed).to match_array([user_2]) end end + end - let(:account) { Fabricate(:account, username: 'alice') } + let(:account) { Fabricate(:account, username: 'alice') } let(:password) { 'abcd1234' } describe 'blacklist' do @@ -55,7 +56,7 @@ RSpec.describe User, type: :model do expect(user.valid?).to be_truthy end - + it 'should not allow a blacklisted user to be created' do user = User.new(email: 'foo@mvrht.com', account: account, password: password) -- cgit From b845ef395d2dc86f32beb7e2071cc828258816b5 Mon Sep 17 00:00:00 2001 From: JantsoP Date: Wed, 5 Apr 2017 09:51:35 +0200 Subject: updated reblog translation --- config/locales/simple_form.fi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 02943cea3..684cbe39c 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -38,7 +38,7 @@ fi: follow: Lähetä s-posti kun joku seuraa sinua follow_request: Lähetä s-posti kun joku pyytää seurata sinua mention: Lähetä s-posti kun joku mainitsee sinut - reblog: Lähetä s-posti kun joku uudestaanblogaa julkaisusi + reblog: Lähetä s-posti kun joku reblogaa julkaisusi 'no': 'Ei' required: mark: "*" -- cgit From 473e4f781318b24c1df11da36e7846080de27ea9 Mon Sep 17 00:00:00 2001 From: JantsoP Date: Wed, 5 Apr 2017 09:52:31 +0200 Subject: udpdated display_name translation --- config/locales/simple_form.fi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 684cbe39c..7e1205fdc 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -17,7 +17,7 @@ fi: confirm_password: Varmista salasana current_password: Nykyinen salasana data: Data - display_name: Näyttö nimi + display_name: Näykyvä nimi email: Sähköpostiosoite header: Header locale: Kieli -- cgit From 3ec221d3b7093e2a2606ec04036cca9e9f1f733d Mon Sep 17 00:00:00 2001 From: JantsoP Date: Wed, 5 Apr 2017 09:57:25 +0200 Subject: updated reblog to boost translation Since it is that :D --- config/locales/simple_form.fi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 7e1205fdc..2bacd6d2c 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -38,7 +38,7 @@ fi: follow: Lähetä s-posti kun joku seuraa sinua follow_request: Lähetä s-posti kun joku pyytää seurata sinua mention: Lähetä s-posti kun joku mainitsee sinut - reblog: Lähetä s-posti kun joku reblogaa julkaisusi + reblog: Lähetä s-posti kun joku buustaa julkaisusi 'no': 'Ei' required: mark: "*" -- cgit From d3bf0307dbcf4d0f99615f1b3cb90565721de81c Mon Sep 17 00:00:00 2001 From: Jantso Porali Date: Wed, 5 Apr 2017 14:47:42 +0200 Subject: updated translation for about page --- config/locales/fi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 3bcfe5c20..c2f81413a 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -21,12 +21,12 @@ fi: features_headline: Mikä erottaa Mastodonin muista get_started: Aloita käyttö links: Linkit - other_instances: Muut palvelimet + other_instances: muuhun palvelimeen source_code: Lähdekoodi - status_count_after: statukset - status_count_before: Kuka loi + status_count_after: statusta + status_count_before: Ovat luoneet terms: Ehdot - user_count_after: käyttäjät + user_count_after: käyttäjää user_count_before: Koti käyttäjälle accounts: follow: Seuraa -- cgit From deb001bba87cc2e1b65de05ce6569e98ab3b0caa Mon Sep 17 00:00:00 2001 From: Jantso Porali Date: Wed, 5 Apr 2017 14:49:29 +0200 Subject: updated two-way auth and preferences translation --- config/locales/fi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/locales/fi.yml b/config/locales/fi.yml index c2f81413a..d5dfd8183 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -132,7 +132,7 @@ fi: edit_profile: Muokkaa profiilia export: Datan vienti import: Datan tuonti - preferences: Mieltymykset + preferences: Ominaisuudet settings: Asetukset two_factor_auth: Kaksivaiheinen tunnistus statuses: @@ -154,7 +154,7 @@ fi: description_html: Jos otat käyttöön kaksivaiheisen tunnistuksen, kirjautumiseen vaaditaan puhelin, joka voi generoida tokeneita kirjautumista varten. disable: Poista käytöstä enable: Ota käyttöön - instructions_html: "Skannaa tämä QR-koodi Google Authenticator tai samanlaiseen sovellukseen puhelimellasi. Tästä hetkestä lähtien, ohjelma generoi tokenit mikä sinun tarvitsee syöttää sisäänkirjautuessa." + instructions_html: "Skannaa tämä QR-koodi Google Authenticator tai samanlaiseen sovellukseen puhelimellasi. Tästä hetkestä lähtien ohjelma generoi koodin, mikä sinun tarvitsee syöttää sisäänkirjautuessa." plaintext_secret_html: 'Plain-text secret: %{secret}' warning: Jos et juuri nyt voi konfiguroida authenticator-applikaatiota juuri nyt, sinun pitäisi klikata "Poista käytöstä" tai et voi kirjautua sisään. users: -- cgit From 837030db98d2e3a054d2f74ba2aa331d58671c4b Mon Sep 17 00:00:00 2001 From: Jantso Porali Date: Wed, 5 Apr 2017 14:53:35 +0200 Subject: updated blocking translation --- config/locales/fi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/locales/fi.yml b/config/locales/fi.yml index d5dfd8183..cdb2b9886 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -89,7 +89,7 @@ fi: preface: Voit tuoda tiettyä dataa kaikista ihmisistä joita seuraat tai estät tilillesi tälle palvelimelle tiedostoista, jotka on luotu toisella palvelimella success: Datasi on onnistuneesti ladattu ja käsitellään pian types: - blocking: Esto lista + blocking: Estetyt lista following: Seuratut lista upload: Lähetä landing_strip_html: %{name} on käyttäjä domainilla %{domain}. Voit seurata tai vuorovaikuttaa heidän kanssaan jos sinulla on tili yleisessä verkossa. Jos sinulla ei ole tiliä, voit rekisteröityä täällä. -- cgit From 29ffe1cad3f473c7b6c0b651d065f8ed9373d37e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 5 Apr 2017 18:51:15 +0200 Subject: Make sure Rabl is using Oj --- config/initializers/rabl_init.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/initializers/rabl_init.rb b/config/initializers/rabl_init.rb index f7be0c607..132a42144 100644 --- a/config/initializers/rabl_init.rb +++ b/config/initializers/rabl_init.rb @@ -1,4 +1,5 @@ Rabl.configure do |config| + config.json_engine = Oj config.cache_all_output = false config.cache_sources = Rails.env.production? config.include_json_root = false -- cgit From 1c351709bc45611c2ed48fb8539c2b27ab51b6fe Mon Sep 17 00:00:00 2001 From: Eugen Date: Fri, 7 Apr 2017 11:09:14 +0200 Subject: Force UTF8 encoding on generated XML (#1140) --- Procfile | 2 +- app/lib/atom_serializer.rb | 2 +- app/views/layouts/application.html.haml | 6 ++++-- config/puma.rb | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/Procfile b/Procfile index 6cdd89518..646e26059 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: bundle exec puma -C config/puma.rb -worker: bundle exec sidekiq -q default -q mailers -q push +worker: bundle exec sidekiq -q default -q push -q pull -q mailers diff --git a/app/lib/atom_serializer.rb b/app/lib/atom_serializer.rb index 21f485c2d..4e01c3d43 100644 --- a/app/lib/atom_serializer.rb +++ b/app/lib/atom_serializer.rb @@ -7,7 +7,7 @@ class AtomSerializer def render(element) document = Ox::Document.new(version: '1.0') document << element - "#{Ox.dump(element)}" + ('' + Ox.dump(element)).force_encoding('UTF-8') end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 7eae6982b..abab14a28 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,8 +11,10 @@ %meta{:name => "theme-color", :content => "#282c37"}/ %meta{:name => "apple-mobile-web-app-capable", :content => "yes"}/ - %title - = "#{yield(:page_title)} - " if content_for?(:page_title) + %title< + - if content_for?(:page_title) + = yield(:page_title) + = ' - ' = Setting.site_title = stylesheet_link_tag 'application', media: 'all' diff --git a/config/puma.rb b/config/puma.rb index 550129bdc..191f00cca 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -9,7 +9,7 @@ preload_app! on_worker_boot do if ENV['HEROKU'] # Spawn the workers from Puma, to only use one dyno - @sidekiq_pid ||= spawn('bundle exec sidekiq -q default -q mailers -q push') + @sidekiq_pid ||= spawn('bundle exec sidekiq -q default -q push -q pull -q mailers ') end ActiveRecord::Base.establish_connection if defined?(ActiveRecord) -- cgit From e3a3422a65901c71ec3ff4a2729309c441660d63 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 7 Apr 2017 12:40:26 +0200 Subject: Allow setting of default language through config Setting of locale in controller extracted to Localized concern, the doorkeeper authorized applications controller moved under custom namespace with inclusion of Localized, which resolves the "it sometimes appears in a different random language" bug --- .env.production.sample | 3 +++ app/controllers/application_controller.rb | 9 ++------- app/controllers/concerns/localized.rb | 19 ++++++++++++++++++ app/controllers/oauth/authorizations_controller.rb | 9 ++------- .../oauth/authorized_applications_controller.rb | 16 +++++++++++++++ .../authorized_applications/index.html.haml | 23 ---------------------- .../oauth/authorized_applications/index.html.haml | 23 ++++++++++++++++++++++ config/routes.rb | 2 +- 8 files changed, 66 insertions(+), 38 deletions(-) create mode 100644 app/controllers/concerns/localized.rb create mode 100644 app/controllers/oauth/authorized_applications_controller.rb delete mode 100644 app/views/doorkeeper/authorized_applications/index.html.haml create mode 100644 app/views/oauth/authorized_applications/index.html.haml (limited to 'config') diff --git a/.env.production.sample b/.env.production.sample index a7f9eb4bf..a0e963ca6 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -25,6 +25,9 @@ OTP_SECRET= # Only allow registrations with the following e-mail domains # EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc +# Optionally change default language +# DEFAULT_LOCALE=de + # E-mail configuration SMTP_SERVER=smtp.mailgun.org SMTP_PORT=587 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c06142fd4..f00f9c1e3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class ApplicationController < ActionController::Base + include Localized + # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception @@ -14,7 +16,6 @@ class ApplicationController < ActionController::Base rescue_from ActionController::InvalidAuthenticityToken, with: :unprocessable_entity before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? - before_action :set_locale before_action :set_user_activity before_action :check_suspension, if: :user_signed_in? @@ -28,12 +29,6 @@ class ApplicationController < ActionController::Base store_location_for(:user, request.url) end - def set_locale - I18n.locale = current_user.try(:locale) || I18n.default_locale - rescue I18n::InvalidLocale - I18n.locale = I18n.default_locale - end - def require_admin! redirect_to root_path unless current_user&.admin? end diff --git a/app/controllers/concerns/localized.rb b/app/controllers/concerns/localized.rb new file mode 100644 index 000000000..b6f868090 --- /dev/null +++ b/app/controllers/concerns/localized.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Localized + extend ActiveSupport::Concern + + included do + before_action :set_locale + end + + def set_locale + I18n.locale = current_user.try(:locale) || default_locale + rescue I18n::InvalidLocale + I18n.locale = default_locale + end + + def default_locale + ENV.fetch('DEFAULT_LOCALE') { I18n.default_locale } + end +end diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb index 7c25266d8..cdbfde0fb 100644 --- a/app/controllers/oauth/authorizations_controller.rb +++ b/app/controllers/oauth/authorizations_controller.rb @@ -1,9 +1,10 @@ # frozen_string_literal: true class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController + include Localized + skip_before_action :authenticate_resource_owner! - before_action :set_locale before_action :store_current_location before_action :authenticate_resource_owner! @@ -12,10 +13,4 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController def store_current_location store_location_for(:user, request.url) end - - def set_locale - I18n.locale = current_user.try(:locale) || I18n.default_locale - rescue I18n::InvalidLocale - I18n.locale = I18n.default_locale - end end diff --git a/app/controllers/oauth/authorized_applications_controller.rb b/app/controllers/oauth/authorized_applications_controller.rb new file mode 100644 index 000000000..09dd5d3c4 --- /dev/null +++ b/app/controllers/oauth/authorized_applications_controller.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController + include Localized + + skip_before_action :authenticate_resource_owner! + + before_action :store_current_location + before_action :authenticate_resource_owner! + + private + + def store_current_location + store_location_for(:user, request.url) + end +end diff --git a/app/views/doorkeeper/authorized_applications/index.html.haml b/app/views/doorkeeper/authorized_applications/index.html.haml deleted file mode 100644 index d4719881c..000000000 --- a/app/views/doorkeeper/authorized_applications/index.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -- content_for :page_title do - = t('doorkeeper.authorized_applications.index.title') - -%table.table - %thead - %tr - %th= t('doorkeeper.authorized_applications.index.application') - %th= t('doorkeeper.authorized_applications.index.scopes') - %th= t('doorkeeper.authorized_applications.index.created_at') - %th - %tbody - - @applications.each do |application| - %tr - %td - - if application.website.blank? - = application.name - - else - = link_to application.name, application.website - %th= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('
').html_safe - %td= l application.created_at - %td - - unless application.superapp? - = table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') } diff --git a/app/views/oauth/authorized_applications/index.html.haml b/app/views/oauth/authorized_applications/index.html.haml new file mode 100644 index 000000000..d4719881c --- /dev/null +++ b/app/views/oauth/authorized_applications/index.html.haml @@ -0,0 +1,23 @@ +- content_for :page_title do + = t('doorkeeper.authorized_applications.index.title') + +%table.table + %thead + %tr + %th= t('doorkeeper.authorized_applications.index.application') + %th= t('doorkeeper.authorized_applications.index.scopes') + %th= t('doorkeeper.authorized_applications.index.created_at') + %th + %tbody + - @applications.each do |application| + %tr + %td + - if application.website.blank? + = application.name + - else + = link_to application.name, application.website + %th= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('
').html_safe + %td= l application.created_at + %td + - unless application.superapp? + = table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') } diff --git a/config/routes.rb b/config/routes.rb index ca77191f7..315ad5da5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,7 +11,7 @@ Rails.application.routes.draw do end use_doorkeeper do - controllers authorizations: 'oauth/authorizations' + controllers authorizations: 'oauth/authorizations', authorized_applications: 'oauth/authorized_applications' end get '.well-known/host-meta', to: 'xrd#host_meta', as: :host_meta -- cgit From 786e6f94b986dbf98eae9d79bc75e147fcefc8ec Mon Sep 17 00:00:00 2001 From: Jantso Porali Date: Fri, 7 Apr 2017 12:58:12 +0200 Subject: Update Finnish translations, add sample Minio config (#954) --- .env.production.sample | 10 ++++++++++ app/views/user_mailer/confirmation_instructions.fi.html.erb | 5 +++++ app/views/user_mailer/confirmation_instructions.fi.text.erb | 5 +++++ app/views/user_mailer/password_change.fi.html.erb | 3 +++ app/views/user_mailer/password_change.fi.text.erb | 3 +++ .../user_mailer/reset_password_instructions.fi.html.erb | 8 ++++++++ .../user_mailer/reset_password_instructions.fi.text.erb | 8 ++++++++ config/locales/fi.yml | 12 ++++++------ docs/Using-Mastodon/FAQ.md | 3 ++- 9 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 app/views/user_mailer/confirmation_instructions.fi.html.erb create mode 100644 app/views/user_mailer/confirmation_instructions.fi.text.erb create mode 100644 app/views/user_mailer/password_change.fi.html.erb create mode 100644 app/views/user_mailer/password_change.fi.text.erb create mode 100644 app/views/user_mailer/reset_password_instructions.fi.html.erb create mode 100644 app/views/user_mailer/reset_password_instructions.fi.text.erb (limited to 'config') diff --git a/.env.production.sample b/.env.production.sample index a7f9eb4bf..a4eabc384 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -44,6 +44,16 @@ SMTP_FROM_ADDRESS=notifications@example.com # S3_PROTOCOL=http # S3_HOSTNAME=192.168.1.123:9000 +# S3 (Minio Config (optional) Please check Minio instance for details) +# S3_ENABLED=true +# S3_BUCKET= +# AWS_ACCESS_KEY_ID= +# AWS_SECRET_ACCESS_KEY= +# S3_REGION= +# S3_PROTOCOL=https +# S3_HOSTNAME= +# S3_ENDPOINT= + # Optional alias for S3 if you want to use Cloudfront or Cloudflare in front # S3_CLOUDFRONT_HOST= diff --git a/app/views/user_mailer/confirmation_instructions.fi.html.erb b/app/views/user_mailer/confirmation_instructions.fi.html.erb new file mode 100644 index 000000000..8b72722da --- /dev/null +++ b/app/views/user_mailer/confirmation_instructions.fi.html.erb @@ -0,0 +1,5 @@ +

Tervetuloa <%= @resource.email %>!

+ +

Voit vahvistaa Mastodon tilisi klikkaamalla alla olevaa linkkiä:

+ +

<%= link_to 'Varmista tilini', confirmation_url(@resource, confirmation_token: @token) %>

diff --git a/app/views/user_mailer/confirmation_instructions.fi.text.erb b/app/views/user_mailer/confirmation_instructions.fi.text.erb new file mode 100644 index 000000000..796913abb --- /dev/null +++ b/app/views/user_mailer/confirmation_instructions.fi.text.erb @@ -0,0 +1,5 @@ +Tervetuloa <%= @resource.email %>! + +Voit vahvistaa Mastodon tilisi klikkaamalla alla olevaa linkkiä: + +<%= confirmation_url(@resource, confirmation_token: @token) %> diff --git a/app/views/user_mailer/password_change.fi.html.erb b/app/views/user_mailer/password_change.fi.html.erb new file mode 100644 index 000000000..c56b96593 --- /dev/null +++ b/app/views/user_mailer/password_change.fi.html.erb @@ -0,0 +1,3 @@ +

Hei <%= @resource.email %>!

+ +

Lähetämme tämän viestin ilmoittaaksemme että salasanasi on vaihdettu.

diff --git a/app/views/user_mailer/password_change.fi.text.erb b/app/views/user_mailer/password_change.fi.text.erb new file mode 100644 index 000000000..d90c3fdeb --- /dev/null +++ b/app/views/user_mailer/password_change.fi.text.erb @@ -0,0 +1,3 @@ +Hei <%= @resource.email %>! + +Lähetämme tämän viestin ilmoittaaksemme että salasanasi on vaihdettu. diff --git a/app/views/user_mailer/reset_password_instructions.fi.html.erb b/app/views/user_mailer/reset_password_instructions.fi.html.erb new file mode 100644 index 000000000..53be0b62b --- /dev/null +++ b/app/views/user_mailer/reset_password_instructions.fi.html.erb @@ -0,0 +1,8 @@ +

Hei <%= @resource.email %>!

+ +

Joku on pyytänyt salasanvaihto Mastodonissa. Voit tehdä sen allaolevassa linkissä.

+ +

<%= link_to 'Vaihda salasanani', edit_password_url(@resource, reset_password_token: @token) %>

+ +

Jos et pyytänyt vaihtoa, poista tämä viesti.

+

Salasanaasi ei vaihdeta ennen kuin menet ylläolevaan linkkiin ja luot uuden.

diff --git a/app/views/user_mailer/reset_password_instructions.fi.text.erb b/app/views/user_mailer/reset_password_instructions.fi.text.erb new file mode 100644 index 000000000..c826d5fc8 --- /dev/null +++ b/app/views/user_mailer/reset_password_instructions.fi.text.erb @@ -0,0 +1,8 @@ +Hei <%= @resource.email %>! + +Joku on pyytänyt salasanvaihto Mastodonissa. Voit tehdä sen allaolevassa linkissä. + +<%= edit_password_url(@resource, reset_password_token: @token) %> + +Jos et pyytänyt vaihtoa, poista tämä viesti. +Salasanaasi ei vaihdeta ennen kuin menet ylläolevaan linkkiin ja luot uuden. diff --git a/config/locales/fi.yml b/config/locales/fi.yml index cdb2b9886..947d3f646 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -16,18 +16,18 @@ fi: chronology: Aikajana on kronologisessa järjestyksessä ethics: 'Eettinen suunnittelu: ei mainoksia, no seurantaa' gifv: GIFV settejä ja lyhyitä videoita - privacy: Julkaisu kohtainen yksityisyys aseuts + privacy: Julkaisu kohtainen yksityisyys asetus public: Julkiset aikajanat features_headline: Mikä erottaa Mastodonin muista get_started: Aloita käyttö links: Linkit - other_instances: muuhun palvelimeen + other_instances: Muut palvelimet source_code: Lähdekoodi status_count_after: statusta status_count_before: Ovat luoneet terms: Ehdot - user_count_after: käyttäjää - user_count_before: Koti käyttäjälle + user_count_after: käyttäjälle + user_count_before: Koti accounts: follow: Seuraa followers: Seuraajat @@ -130,8 +130,8 @@ fi: authorized_apps: Valtuutetut ohjelmat back: Takaisin Mastodoniin edit_profile: Muokkaa profiilia - export: Datan vienti - import: Datan tuonti + export: Vie dataa + import: Tuo dataa preferences: Ominaisuudet settings: Asetukset two_factor_auth: Kaksivaiheinen tunnistus diff --git a/docs/Using-Mastodon/FAQ.md b/docs/Using-Mastodon/FAQ.md index daedcbdd8..3b03a8ee4 100644 --- a/docs/Using-Mastodon/FAQ.md +++ b/docs/Using-Mastodon/FAQ.md @@ -36,8 +36,9 @@ While Mastodon is compatible with GNU social in terms of server to server commun Because Mastodon has been created from a blank slate, it is much simpler to have the API mirror internal structures as closely as possible, rather than build an emulation layer. Secondly, the GNU social client API is actually a half-way implementation of the legacy Twitter API - that's the reason why it works with some older Twitter client apps. However, many of those apps are not maintained anymore, the GNU social API does not actually keep up with the real Twitter API and never fully implemented all its features; at the same time, the Twitter API was never meant for a federated service and so obscures some of the functionality. + #### How is Mastodon funded? Development of Mastodon and hosting of mastodon.social is funded through my [Patreon (also BTC/PayPal donations)](https://www.patreon.com/user?u=619786). Beyond that, I am not interested in VC funding, monetizing, advertising, or anything of that sort. I could offer setup/maintenance services on demand. -The software is free and open source and communities should host their own servers if they can, that way the costs are more or less distributed. Obviously it'd be hard for me to pay the bills if literally everyone decided to use the mastodon.social instance only. \ No newline at end of file +The software is free and open source and communities should host their own servers if they can, that way the costs are more or less distributed. Obviously it'd be hard for me to pay the bills if literally everyone decided to use the mastodon.social instance only. -- cgit From ad5ddd5e95062d0d5cd4bc56baff53698c598723 Mon Sep 17 00:00:00 2001 From: Chad Pytel Date: Fri, 7 Apr 2017 14:19:16 -0400 Subject: Use I18n for media attachment validation errors These are currently user facing errors, but are not localized. This adds the ability for these messages to be localized. --- app/services/post_status_service.rb | 4 ++-- config/locales/en.yml | 4 ++++ spec/services/post_status_service_spec.rb | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index b8179f7dc..221aa42a3 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -37,11 +37,11 @@ class PostStatusService < BaseService def validate_media!(media_ids) return if media_ids.nil? || !media_ids.is_a?(Enumerable) - raise Mastodon::ValidationError, 'Cannot attach more than 4 files' if media_ids.size > 4 + raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if media_ids.size > 4 media = MediaAttachment.where(status_id: nil).where(id: media_ids.take(4).map(&:to_i)) - raise Mastodon::ValidationError, 'Cannot attach a video to a toot that already contains images' if media.size > 1 && media.find(&:video?) + raise Mastodon::ValidationError, I18n.t('media_attachments.validations.images_and_video') if media.size > 1 && media.find(&:video?) media end diff --git a/config/locales/en.yml b/config/locales/en.yml index 742219df9..aa3a732f9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -163,3 +163,7 @@ en: invalid_otp_token: Invalid two-factor code will_paginate: page_gap: "…" + media_attachments: + validations: + too_many: Cannot attach more than 4 files + images_and_video: Cannot attach a video to a status that already contains images diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 3fe878f63..0e39cd969 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -141,7 +141,7 @@ RSpec.describe PostStatusService do ) end.to raise_error( Mastodon::ValidationError, - 'Cannot attach more than 4 files', + I18n.t('media_attachments.validations.too_many'), ) end @@ -160,7 +160,7 @@ RSpec.describe PostStatusService do ) end.to raise_error( Mastodon::ValidationError, - 'Cannot attach a video to a toot that already contains images', + I18n.t('media_attachments.validations.images_and_video'), ) end -- cgit