From 4bd0488a779f1122012c183154010513467a3f68 Mon Sep 17 00:00:00 2001 From: Stephen Burgess Date: Sat, 13 May 2017 10:13:17 -0500 Subject: [PATCH] feat(count): Just yml count syntax to provide different rule for 1 (#2685) Update all translation forms that use this "counter" element. --- app/views/settings/profiles/show.html.haml | 4 ++-- config/locales/devise.tr.yml | 4 ++-- config/locales/simple_form.ar.yml | 4 ++-- config/locales/simple_form.de.yml | 4 ++-- config/locales/simple_form.en.yml | 8 ++++++-- config/locales/simple_form.fa.yml | 4 ++-- config/locales/simple_form.ja.yml | 4 ++-- config/locales/simple_form.pt-BR.yml | 4 ++-- config/locales/simple_form.ru.yml | 4 ++-- config/locales/simple_form.th.yml | 8 ++++++-- config/locales/simple_form.tr.yml | 4 ++-- config/locales/simple_form.uk.yml | 4 ++-- 12 files changed, 32 insertions(+), 24 deletions(-) diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index 7b97fcae0d..cce2d59f70 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -5,8 +5,8 @@ = render 'shared/error_messages', object: @account .fields-group - = f.input :display_name, placeholder: t('simple_form.labels.defaults.display_name'), hint: t('simple_form.hints.defaults.display_name', counter: "#{30 - @account.display_name.size}").html_safe - = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', counter: "#{160 - @account.note.size}").html_safe + = f.input :display_name, placeholder: t('simple_form.labels.defaults.display_name'), hint: t('simple_form.hints.defaults.display_name', count: "#{30 - @account.display_name.size}").html_safe + = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: "#{160 - @account.note.size}").html_safe = f.input :avatar, wrapper: :with_label, input_html: { accept: AccountAvatar::IMAGE_MIME_TYPES.join(',') }, hint: t('simple_form.hints.defaults.avatar') = f.input :header, wrapper: :with_label, input_html: { accept: AccountHeader::IMAGE_MIME_TYPES.join(',') }, hint: t('simple_form.hints.defaults.header') diff --git a/config/locales/devise.tr.yml b/config/locales/devise.tr.yml index b46c12c15b..f00dd2a959 100644 --- a/config/locales/devise.tr.yml +++ b/config/locales/devise.tr.yml @@ -5,10 +5,10 @@ tr: hints: defaults: avatar: En fazla 2MB olacak şekilde PNG, GIF veya JPG formatında yükleyiniz. 120x120px büyüklüğüne indirgenecektir - display_name: '%{counter} karakter kaldı' + display_name: '%{count} karakter kaldı' header: En fazla 2MB olacak şekilde PNG, GIF veya JPG formatında yükleyiniz. 700x335px büyüklüğüne indirgenecektir. locked: Takipçilerinizi manuel olarak kabul etmenizi ve gönderilerinizi varsayılan olarak sadece takipçilerinizin göreceği şekilde paylaşmanızı sağlar. - note: '%{counter} karakter kaldı' + note: '%{count} karakter kaldı' imports: data: Diğer Mastodon sunucusundan dışarı aktardığınız CSV dosyası sessions: diff --git a/config/locales/simple_form.ar.yml b/config/locales/simple_form.ar.yml index 39140b5a18..bc41c9fae7 100644 --- a/config/locales/simple_form.ar.yml +++ b/config/locales/simple_form.ar.yml @@ -4,10 +4,10 @@ ar: hints: defaults: avatar: PNG, GIF أو JPG. على الأكثر 2 ميغابيت . سوف يتم تصغيرها إلى 120x120px - display_name: "%{counter} أحرف متبقية" + display_name: "%{count} أحرف متبقية" header: PNG, GIF or JPG. على الأكثر 2 ميغابيت . سوف يتم تصغيرها إلى 700x335px locked: يتطلب منك الموافقة يدويا على كل طلب للإشتراك بحسابك و منشوراتك تعرض لمتابعيك فقط دون غيرهم - note: "%{counter} أحرف متبقية" + note: "%{count} أحرف متبقية" imports: data: ملف CSV تم تصديره من خادوم مثيل آخر لماستدون sessions: diff --git a/config/locales/simple_form.de.yml b/config/locales/simple_form.de.yml index 1c8178a611..5797eb3180 100644 --- a/config/locales/simple_form.de.yml +++ b/config/locales/simple_form.de.yml @@ -4,10 +4,10 @@ de: hints: defaults: avatar: PNG, GIF oder JPG. Maximal 2MB. Wird auf 120x120px herunterskaliert - display_name: '%{counter} Zeichen verbleiben' + display_name: '%{count} Zeichen verbleiben' header: PNG, GIF oder JPG. Maximal 2MB. Wird auf 700x335px herunterskaliert locked: Erlaubt dir, Nutzer zu überprüfen, bevor sie dir folgen können - note: '%{counter} Zeichen verbleiben' + note: '%{count} Zeichen verbleiben' imports: data: CSV-Datei, die von einer anderen Mastodon-Instanz exportiert wurde sessions: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 941d83a475..8319d921df 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -4,10 +4,14 @@ en: hints: defaults: avatar: PNG, GIF or JPG. At most 2MB. Will be downscaled to 120x120px - display_name: '%{counter} characters left' + display_name: + one: '1 character left' + other: '%{count} characters left' header: PNG, GIF or JPG. At most 2MB. Will be downscaled to 700x335px locked: Requires you to manually approve followers and defaults post privacy to followers-only - note: '%{counter} characters left' + note: + one: '1 character left' + other: '%{count} characters left' imports: data: CSV file exported from another Mastodon instance sessions: diff --git a/config/locales/simple_form.fa.yml b/config/locales/simple_form.fa.yml index 385dc76cf7..e3c59fa4ab 100644 --- a/config/locales/simple_form.fa.yml +++ b/config/locales/simple_form.fa.yml @@ -4,10 +4,10 @@ fa: hints: defaults: avatar: یکی از قالب‌های PNG یا GIF یا JPG. بیشترین اندازه ۲ مگابایت. تصویر به اندازهٔ ۱۲۰×۱۲۰ پیکسل تبدیل خواهد شد. - display_name: '%{counter} حرف باقی مانده' + display_name: '%{count} حرف باقی مانده' header: یکی از قالب‌های PNG یا GIF یا JPG. بیشترین اندازه ۲ مگابایت. تصویر به اندازهٔ ۳۳۵×۷۰۰ پیکسل تبدیل خواهد شد locked: باید پیگیران تازه را خودتان تأیید کنید. حریم خصوصی پیش‌فرض نوشته‌ها را روی پیگیران تنظیم می‌کند - note: '%{counter} حرف باقی مانده' + note: '%{count} حرف باقی مانده' imports: data: پروندهٔ CSV که از سرور ماستدون دیگری برون‌سپاری شده sessions: diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index f4b1566bdb..811e474fef 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -4,10 +4,10 @@ ja: hints: defaults: avatar: 2MBまでのPNGやGIF、JPGが利用可能です。120x120pxまで縮小されます。 - display_name: あと%{counter}文字入力できます。 + display_name: あと%{count}文字入力できます。 header: 2MBまでのPNGやGIF、JPGが利用可能です。 700x335pxまで縮小されます。 locked: フォロワーを手動で承認する必要があります。デフォルトではトゥートの公開範囲はフォロワーのみです。 - note: あと%{counter}文字入力できます。 + note: あと%{count}文字入力できます。 imports: data: 他の Mastodon インスタンスからエクスポートしたCSVファイルを選択して下さい sessions: diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index 06e90832d6..82c9000f1d 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -4,10 +4,10 @@ pt-BR: labels: defaults: avatar: PNG, GIF or JPG. Máximo 2MB. Será reduzido para 120x120px - display_name: '%{counter} caracteres restantes' + display_name: '%{count} caracteres restantes' header: PNG, GIF or JPG. Máximo 2MB. Será reduzido para 700x335px locked: Requer você aprovação manualmente seguidores e posts padrão de privacidade para seguidores-apenas - note: '%{counter} caracteres restantes' + note: '%{count} caracteres restantes' imports: data: Arquivo CSV exportado de outra instancia Mastodon sessions: diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index 1134925520..ab96985c1b 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -4,10 +4,10 @@ ru: hints: defaults: avatar: PNG, GIF или JPG. Максимально 2MB. Будет уменьшено до 120x120px - display_name: 'Осталось символов: %{counter}' + display_name: 'Осталось символов: %{count}' header: PNG, GIF или JPG. Максимально 2MB. Будет уменьшено до 700x335px locked: Потребует от Вас ручного подтверждения подписчиков, изменит приватность постов по умолчанию на "только для подписчиков" - note: 'Осталось символов: %{counter}' + note: 'Осталось символов: %{count}' imports: data: Файл CSV, экспортированный с другого узла Mastodon sessions: diff --git a/config/locales/simple_form.th.yml b/config/locales/simple_form.th.yml index 22d6e870f1..388886bf0f 100644 --- a/config/locales/simple_form.th.yml +++ b/config/locales/simple_form.th.yml @@ -4,10 +4,14 @@ th: hints: defaults: avatar: PNG, GIF or JPG. At most 2MB. Will be downscaled to 120x120px - display_name: '%{counter} characters left' + display_name: + one: '1 character left' + other: '%{count} characters left' header: PNG, GIF or JPG. At most 2MB. Will be downscaled to 700x335px locked: Requires you to manually approve followers and defaults post privacy to followers-only - note: '%{counter} characters left' + note: + one: '1 character left' + other: '%{count} characters left' imports: data: CSV file exported from another Mastodon instance sessions: diff --git a/config/locales/simple_form.tr.yml b/config/locales/simple_form.tr.yml index e3b898f8b6..ff82f09724 100644 --- a/config/locales/simple_form.tr.yml +++ b/config/locales/simple_form.tr.yml @@ -5,10 +5,10 @@ tr: hints: defaults: avatar: En fazla 2MB olacak şekilde PNG, GIF veya JPG formatında yükleyiniz. 120x120px büyüklüğüne indirgenecektir - display_name: '%{counter} karakter kaldı' + display_name: '%{count} karakter kaldı' header: En fazla 2MB olacak şekilde PNG, GIF veya JPG formatında yükleyiniz. 700x335px büyüklüğüne indirgenecektir. locked: Takipçilerinizi manuel olarak kabul etmenizi ve gönderilerinizi varsayılan olarak sadece takipçilerinizin göreceği şekilde paylaşmanızı sağlar. - note: '%{counter} karakter kaldı' + note: '%{count} karakter kaldı' imports: data: Diğer Mastodon sunucusundan dışarı aktardığınız CSV dosyası sessions: diff --git a/config/locales/simple_form.uk.yml b/config/locales/simple_form.uk.yml index cf829c7683..3ec81f0acc 100644 --- a/config/locales/simple_form.uk.yml +++ b/config/locales/simple_form.uk.yml @@ -4,10 +4,10 @@ uk: hints: defaults: avatar: PNG, GIF, або JPG. Максимум - 2МБ. Буде зменшено до 120x120px - display_name: 'Залишилося символів: %{counter}' + display_name: 'Залишилося символів: %{count}' header: PNG, GIF, або JPG. Максимум - 2МБ. Буде зменшено до 700x335px locked: Буде вимагати від Вас самостійного підтверждення підписників, змінить приватність постів за замовчуванням на "тільки для підписників" - note: 'Осталось символов: %{counter}' + note: 'Осталось символов: %{count}' imports: data: Файл CSV, экспортированный с другого узла Mastodon sessions: