From 116a6b50cd1f46e715e7ea6813a29844fcab90d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Tue, 26 Mar 2024 20:36:34 +0900 Subject: [PATCH] =?UTF-8?q?Change:=20=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=89=E5=85=A5=E5=8A=9B=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E6=94=B9=E5=96=84?= =?UTF-8?q?=20(#672)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change: フィールド入力フォームのデザイン改善 * 翻訳の置き場所変更 --- app/javascript/styles/mastodon/forms.scss | 8 +++++++- app/views/settings/profiles/show.html.haml | 8 ++++++-- config/locales/simple_form.en.yml | 3 +++ config/locales/simple_form.ja.yml | 3 +++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index 6ebaace499..6d56ced753 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -118,12 +118,18 @@ code { display: flex; margin: 0 -5px; - .input { + .input, + .fields-label { box-sizing: border-box; flex: 1 1 auto; width: 50%; padding: 0 5px; } + + .fields-label { + font-weight: bold; + margin-left: 12px; + } } .title { diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index 852edc5a24..102141ad32 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -28,10 +28,14 @@ %label= t('simple_form.labels.defaults.fields') %span.hint= t('simple_form.hints.account.fields') + .row + %p.fields-label= t('simple_form.labels.account.fields.name') + %p.fields-label= t('simple_form.labels.account.fields.value') + = f.simple_fields_for :fields do |fields_f| .row - = fields_f.input :name, placeholder: t('simple_form.labels.account.fields.name'), input_html: { maxlength: 255 } - = fields_f.input :value, placeholder: t('simple_form.labels.account.fields.value'), input_html: { maxlength: 255 } + = fields_f.input :name, placeholder: fields_f.index.zero? ? t("simple_form.labels.account.fields.examples.name_#{fields_f.index + 1}") : t('simple_form.labels.account.fields.name'), input_html: { maxlength: 255 } + = fields_f.input :value, placeholder: fields_f.index.zero? ? t("simple_form.labels.account.fields.examples.value_#{fields_f.index + 1}") : t('simple_form.labels.account.fields.value'), input_html: { maxlength: 255 } .fields-row .fields-row__column.fields-row__column-6 diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 18961d45e7..ca9802e6e9 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -168,6 +168,9 @@ en: account: discoverable: Feature profile and posts in discovery algorithms fields: + examples: + name_1: 例) GitHub + value_1: 例) https://github.com/xxxxxx name: Label value: Content indexable: Include public posts in search results diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index 5b96d18456..b6180e167a 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -179,6 +179,9 @@ ja: account: discoverable: アカウントを見つけやすくする fields: + examples: + name_1: 例) GitHub + value_1: 例) https://github.com/xxxxxx name: ラベル value: 内容 indexable: 公開投稿を検索できるようにする