about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStephen Burgess <stephenburgess8@gmail.com>2017-05-13 10:13:17 -0500
committerEugen Rochko <eugen@zeonfederated.com>2017-05-13 17:13:17 +0200
commit4bd0488a779f1122012c183154010513467a3f68 (patch)
tree4be0a10dfa38546638761ed3d3a7b88f645289b8
parent1b17da6ed91d037054ffea9e4533878bc410704d (diff)
feat(count): Just yml count syntax to provide different rule for 1 (#2685)
Update all translation forms that use this "counter" element.
-rw-r--r--app/views/settings/profiles/show.html.haml4
-rw-r--r--config/locales/devise.tr.yml4
-rw-r--r--config/locales/simple_form.ar.yml4
-rw-r--r--config/locales/simple_form.de.yml4
-rw-r--r--config/locales/simple_form.en.yml8
-rw-r--r--config/locales/simple_form.fa.yml4
-rw-r--r--config/locales/simple_form.ja.yml4
-rw-r--r--config/locales/simple_form.pt-BR.yml4
-rw-r--r--config/locales/simple_form.ru.yml4
-rw-r--r--config/locales/simple_form.th.yml8
-rw-r--r--config/locales/simple_form.tr.yml4
-rw-r--r--config/locales/simple_form.uk.yml4
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 7b97fcae0..cce2d59f7 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: "<span class=\"name-counter\">#{30 - @account.display_name.size}</span>").html_safe
-    = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', counter: "<span class=\"note-counter\">#{160 - @account.note.size}</span>").html_safe
+    = f.input :display_name, placeholder: t('simple_form.labels.defaults.display_name'), hint: t('simple_form.hints.defaults.display_name', count: "<span class=\"name-counter\">#{30 - @account.display_name.size}</span>").html_safe
+    = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: "<span class=\"note-counter\">#{160 - @account.note.size}</span>").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 b46c12c15..f00dd2a95 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 39140b5a1..bc41c9fae 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 1c8178a61..5797eb318 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 941d83a47..8319d921d 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 385dc76cf..e3c59fa4a 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 f4b1566bd..811e474fe 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 06e90832d..82c9000f1 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 113492552..ab96985c1 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 22d6e870f..388886bf0 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 e3b898f8b..ff82f0972 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 cf829c768..3ec81f0ac 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: