From c6f018091e10aa28bd93d6439aaa571e71f99bea Mon Sep 17 00:00:00 2001 From: mayaeh Date: Wed, 13 Mar 2019 22:56:40 +0900 Subject: [PATCH 1/2] i18n: Add Japanese translations for new landing page (#10254) * yarn manage:translations && i18n-tasks add-missing * Update Japanese translations for new landing page. I don't change the tagline from English yet. I think that translating a tagline is difficult and requires time-consuming discussions. Some translations related about the poll are already done in Weblate, so I will leave it as it is. --- .../mastodon/locales/defaultMessages.json | 72 ++++++++++++++----- app/javascript/mastodon/locales/en.json | 11 ++- app/javascript/mastodon/locales/ja.json | 12 +++- config/locales/ja.yml | 29 ++++++++ 4 files changed, 104 insertions(+), 20 deletions(-) diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index 0afe3955b5..c4f32891f1 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -17,6 +17,10 @@ { "defaultMessage": "File upload limit exceeded.", "id": "upload_error.limit" + }, + { + "defaultMessage": "File upload not allowed with polls.", + "id": "upload_error.poll" } ], "path": "app/javascript/mastodon/actions/compose.json" @@ -907,6 +911,52 @@ ], "path": "app/javascript/mastodon/features/compose/components/navigation_bar.json" }, + { + "descriptors": [ + { + "defaultMessage": "Add a poll", + "id": "poll_button.add_poll" + }, + { + "defaultMessage": "Remove poll", + "id": "poll_button.remove_poll" + } + ], + "path": "app/javascript/mastodon/features/compose/components/poll_button.json" + }, + { + "descriptors": [ + { + "defaultMessage": "Choice {number}", + "id": "compose_form.poll.option_placeholder" + }, + { + "defaultMessage": "Add a choice", + "id": "compose_form.poll.add_option" + }, + { + "defaultMessage": "Remove this choice", + "id": "compose_form.poll.remove_option" + }, + { + "defaultMessage": "Poll duration", + "id": "compose_form.poll.duration" + }, + { + "defaultMessage": "{number, plural, one {# minute} other {# minutes}}", + "id": "intervals.full.minutes" + }, + { + "defaultMessage": "{number, plural, one {# hour} other {# hours}}", + "id": "intervals.full.hours" + }, + { + "defaultMessage": "{number, plural, one {# day} other {# days}}", + "id": "intervals.full.days" + } + ], + "path": "app/javascript/mastodon/features/compose/components/poll_form.json" + }, { "descriptors": [ { @@ -1853,6 +1903,10 @@ { "defaultMessage": "{name} boosted your status", "id": "notification.reblog" + }, + { + "defaultMessage": "Your poll has ended", + "id": "notification.poll" } ], "path": "app/javascript/mastodon/features/notifications/components/notification.json" @@ -1914,24 +1968,6 @@ ], "path": "app/javascript/mastodon/features/reblogs/index.json" }, - { - "descriptors": [ - { - "defaultMessage": "A look inside...", - "id": "standalone.public_title" - } - ], - "path": "app/javascript/mastodon/features/standalone/community_timeline/index.json" - }, - { - "descriptors": [ - { - "defaultMessage": "A look inside...", - "id": "standalone.public_title" - } - ], - "path": "app/javascript/mastodon/features/standalone/public_timeline/index.json" - }, { "descriptors": [ { diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index d20bc47bc1..01a7faaba8 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -73,6 +73,10 @@ "compose_form.lock_disclaimer": "Your account is not {locked}. Anyone can follow you to view your follower-only posts.", "compose_form.lock_disclaimer.lock": "locked", "compose_form.placeholder": "What's on your mind?", + "compose_form.poll.add_option": "Add a choice", + "compose_form.poll.duration": "Poll duration", + "compose_form.poll.option_placeholder": "Choice {number}", + "compose_form.poll.remove_option": "Remove this choice", "compose_form.publish": "Toot", "compose_form.publish_loud": "{publish}!", "compose_form.sensitive.marked": "Media is marked as sensitive", @@ -151,6 +155,9 @@ "home.column_settings.basic": "Basic", "home.column_settings.show_reblogs": "Show boosts", "home.column_settings.show_replies": "Show replies", + "intervals.full.days": "{number, plural, one {# day} other {# days}}", + "intervals.full.hours": "{number, plural, one {# hour} other {# hours}}", + "intervals.full.minutes": "{number, plural, one {# minute} other {# minutes}}", "introduction.federation.action": "Next", "introduction.federation.federated.headline": "Federated", "introduction.federation.federated.text": "Public posts from other servers of the fediverse will appear in the federated timeline.", @@ -265,6 +272,8 @@ "poll.refresh": "Refresh", "poll.total_votes": "{count, plural, one {# vote} other {# votes}}", "poll.vote": "Vote", + "poll_button.add_poll": "Add a poll", + "poll_button.remove_poll": "Remove poll", "privacy.change": "Adjust status privacy", "privacy.direct.long": "Post to mentioned users only", "privacy.direct.short": "Direct", @@ -299,7 +308,6 @@ "search_results.hashtags": "Hashtags", "search_results.statuses": "Toots", "search_results.total": "{count, number} {count, plural, one {result} other {results}}", - "standalone.public_title": "A look inside...", "status.admin_account": "Open moderation interface for @{name}", "status.admin_status": "Open this status in the moderation interface", "status.block": "Block @{name}", @@ -357,6 +365,7 @@ "upload_area.title": "Drag & drop to upload", "upload_button.label": "Add media (JPEG, PNG, GIF, WebM, MP4, MOV)", "upload_error.limit": "File upload limit exceeded.", + "upload_error.poll": "File upload not allowed with polls.", "upload_form.description": "Describe for the visually impaired", "upload_form.focus": "Change preview", "upload_form.undo": "Delete", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index b7c38738c3..adf93cae06 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -73,6 +73,10 @@ "compose_form.lock_disclaimer": "あなたのアカウントは{locked}になっていません。誰でもあなたをフォローすることができ、フォロワー限定の投稿を見ることができます。", "compose_form.lock_disclaimer.lock": "承認制", "compose_form.placeholder": "今なにしてる?", + "compose_form.poll.add_option": "Add a choice", + "compose_form.poll.duration": "Poll duration", + "compose_form.poll.option_placeholder": "Choice {number}", + "compose_form.poll.remove_option": "Remove this choice", "compose_form.publish": "トゥート", "compose_form.publish_loud": "{publish}!", "compose_form.sensitive.marked": "メディアに閲覧注意が設定されています", @@ -151,6 +155,9 @@ "home.column_settings.basic": "基本設定", "home.column_settings.show_reblogs": "ブースト表示", "home.column_settings.show_replies": "返信表示", + "intervals.full.days": "{number, plural, one {# day} other {# days}}", + "intervals.full.hours": "{number, plural, one {# hour} other {# hours}}", + "intervals.full.minutes": "{number, plural, one {# minute} other {# minutes}}", "introduction.federation.action": "次へ", "introduction.federation.federated.headline": "連合タイムライン", "introduction.federation.federated.text": "Fediverseの他のサーバーからの公開投稿は連合タイムラインに表示されます。", @@ -240,6 +247,7 @@ "notification.favourite": "{name}さんがあなたのトゥートをお気に入りに登録しました", "notification.follow": "{name}さんにフォローされました", "notification.mention": "{name}さんがあなたに返信しました", + "notification.poll": "Your poll has ended", "notification.reblog": "{name}さんがあなたのトゥートをブーストしました", "notifications.clear": "通知を消去", "notifications.clear_confirmation": "本当に通知を消去しますか?", @@ -264,6 +272,8 @@ "poll.refresh": "Refresh", "poll.total_votes": "{count, plural, one {# vote} other {# votes}}", "poll.vote": "Vote", + "poll_button.add_poll": "Add a poll", + "poll_button.remove_poll": "Remove poll", "privacy.change": "公開範囲を変更", "privacy.direct.long": "メンションしたユーザーだけに公開", "privacy.direct.short": "ダイレクト", @@ -298,7 +308,6 @@ "search_results.hashtags": "ハッシュタグ", "search_results.statuses": "トゥート", "search_results.total": "{count, number}件の結果", - "standalone.public_title": "今こんな話をしています...", "status.admin_account": "@{name} のモデレーション画面を開く", "status.admin_status": "このトゥートをモデレーション画面で開く", "status.block": "@{name}さんをブロック", @@ -356,6 +365,7 @@ "upload_area.title": "ドラッグ&ドロップでアップロード", "upload_button.label": "メディアを追加 (JPEG, PNG, GIF, WebM, MP4, MOV)", "upload_error.limit": "アップロードできる上限を超えています。", + "upload_error.poll": "File upload not allowed with polls.", "upload_form.description": "視覚障害者のための説明", "upload_form.focus": "焦点", "upload_form.undo": "削除", diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 6d5574ba10..2bc6654264 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -4,25 +4,36 @@ ja: about_hashtag_html: ハッシュタグ #%{hashtag} の付いた公開トゥートです。どこでもいいので、連合に参加しているSNS上にアカウントを作れば会話に参加することができます。 about_mastodon_html: Mastodon は、オープンなウェブプロトコルを採用した、自由でオープンソースなソーシャルネットワークです。電子メールのような分散型の仕組みを採っています。 about_this: 詳細情報 + active_count_after: 人アクティブ + active_footnote: 月間アクティブユーザー数 (MAU) administered_by: '管理者:' api: API apps: アプリ + apps_platforms: iOSやAndroid、その他プラットフォームから使用する + browse_directory: ディレクトリで関心を軸に見つける + browse_public_posts: Mastodonの公開ライブストリームを見てみる contact: 連絡先 contact_missing: 未設定 contact_unavailable: N/A + discover_users: ユーザーを見つける documentation: ドキュメント extended_description_html: |

ルールを書くのに適した場所

詳細説明が設定されていません。

+ federation_hint_html: "%{instance} にアカウントを作ればどこのMastodonや互換性のあるサーバーのユーザーでもフォローできます。" generic_description: "%{domain} は、Mastodon サーバーの一つです" + get_apps: モバイルアプリを試す hosted_on: Mastodon hosted on %{domain} learn_more: もっと詳しく privacy_policy: プライバシーポリシー + see_whats_happening: 何が起きているのか見てみる + server_stats: 'サーバー統計:' source_code: ソースコード status_count_after: one: トゥート other: トゥート status_count_before: トゥート数 + tagline: Follow friends and discover new ones terms: 利用規約 user_count_after: one: 人 @@ -487,6 +498,7 @@ ja: auth: agreement_html: 登録するをクリックすると サーバーのルールプライバシーポリシー に従うことに同意したことになります。 change_password: パスワード + checkbox_agreement_html: サーバーのルールプライバシーポリシー に同意します confirm_email: メールアドレスの確認 delete_account: アカウントの削除 delete_account_html: アカウントを削除したい場合、こちら から手続きが行えます。削除する前に、確認画面があります。 @@ -502,10 +514,12 @@ ja: cas: CAS saml: SAML register: 登録する + registration_closed: "%{instance} は現在新しいメンバーを受け入れていません" resend_confirmation: 確認メールを再送する reset_password: パスワードを再発行 security: セキュリティ set_new_password: 新しいパスワード + trouble_logging_in: ログインできませんか? authorize_follow: already_following: あなたは既にこのアカウントをフォローしています error: 残念ながら、リモートアカウント情報の取得中にエラーが発生しました @@ -720,6 +734,16 @@ ja: older: 以前のトゥート prev: 前 truncate: "…" + polls: + errors: + already_voted: You have already voted on this poll + duplicate_options: contain duplicate items + duration_too_long: is too far into the future + duration_too_short: is too soon + expired: The poll has already ended + over_character_limit: cannot be longer than %{max} characters each + too_few_options: must have more than one item + too_many_options: can't contain more than %{max} items preferences: languages: 言語 other: その他 @@ -829,6 +853,11 @@ ja: ownership: 他人のトゥートを固定することはできません private: 非公開のトゥートを固定することはできません reblog: ブーストされたトゥートを固定することはできません + poll: + total_votes: + one: "%{count} vote" + other: "%{count} votes" + vote: Vote show_more: もっと見る sign_in_to_participate: ログインして会話に参加 title: '%{name}: "%{quote}"' From 65d9004ac90209a035e2f103e271986ff8650410 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 13 Mar 2019 19:29:54 +0100 Subject: [PATCH 2/2] Add UI for enabling/disabling poll notifications (#10255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add UI for enabling/disabling poll notifications * Add poll notifications to the (advanced) quick filter bar * Update poll notification message “Your poll has ended” → “A poll you have voted in has ended” * Clear up associated notifications when a poll is deleted --- .../notifications/components/column_settings.js | 11 +++++++++++ .../features/notifications/components/filter_bar.js | 8 ++++++++ .../features/notifications/components/notification.js | 4 ++-- app/javascript/mastodon/locales/en.json | 2 +- .../mastodon/reducers/push_notifications.js | 1 + app/models/poll.rb | 2 ++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.js b/app/javascript/mastodon/features/notifications/components/column_settings.js index a334fd63cc..60a86312a1 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.js +++ b/app/javascript/mastodon/features/notifications/components/column_settings.js @@ -89,6 +89,17 @@ export default class ColumnSettings extends React.PureComponent { + +
+ + +
+ + {showPushSettings && } + + +
+
); } diff --git a/app/javascript/mastodon/features/notifications/components/filter_bar.js b/app/javascript/mastodon/features/notifications/components/filter_bar.js index 6ae8b7491a..3f3e6ab7d2 100644 --- a/app/javascript/mastodon/features/notifications/components/filter_bar.js +++ b/app/javascript/mastodon/features/notifications/components/filter_bar.js @@ -7,6 +7,7 @@ const tooltips = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favourites' }, boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Boosts' }, + polls: { id: 'notifications.filter.polls', defaultMessage: 'Poll results' }, follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' }, }); @@ -79,6 +80,13 @@ class FilterBar extends React.PureComponent { > +