From df3a7e724dc72146a09fd72efd95d7e206b4b881 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 25 Oct 2018 00:09:45 +0200 Subject: [PATCH] Fix missing plural keys (#9084) * Update i18n-tasks to feature-missing-plural-keys * Fix pluralizations with missing keys in Arabic Fix #8554 * Add i18n-tasks missing-plural-keys to CircleCI --- .circleci/config.yml | 1 + Gemfile | 2 +- Gemfile.lock | 27 ++++++++++++-------- config/locales/ar.yml | 48 +++++++++--------------------------- config/locales/devise.ar.yml | 4 +-- 5 files changed, 32 insertions(+), 50 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 674d1b02d..add73d677 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -175,6 +175,7 @@ jobs: - *attach_workspace - run: bundle exec i18n-tasks check-normalized - run: bundle exec i18n-tasks unused + - run: bundle exec i18n-tasks missing-plural-keys workflows: version: 2 diff --git a/Gemfile b/Gemfile index cfd88f323..c9a16ee14 100644 --- a/Gemfile +++ b/Gemfile @@ -95,7 +95,7 @@ gem 'rdf-normalize', '~> 0.3' group :development, :test do gem 'fabrication', '~> 2.20' gem 'fuubar', '~> 2.3' - gem 'i18n-tasks', '~> 0.9', require: false + gem 'i18n-tasks', '~> 0.9', require: false, git: 'https://github.com/Gargron/i18n-tasks.git', ref: '7a57fbe7000f4f8120e250a757ab345c28c6885c' gem 'pry-byebug', '~> 3.6' gem 'pry-rails', '~> 0.3' gem 'rspec-rails', '~> 3.8' diff --git a/Gemfile.lock b/Gemfile.lock index 9fac173cc..edb552abb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,19 @@ +GIT + remote: https://github.com/Gargron/i18n-tasks.git + revision: 7a57fbe7000f4f8120e250a757ab345c28c6885c + ref: 7a57fbe7000f4f8120e250a757ab345c28c6885c + specs: + i18n-tasks (0.9.27) + activesupport (>= 4.0.2) + ast (>= 2.1.0) + erubi + highline (>= 2.0.0) + i18n + parser (>= 2.2.3.0) + rails-i18n + rainbow (>= 2.2.2, < 4.0) + terminal-table (>= 1.5.1) + GIT remote: https://github.com/rtomayko/posix-spawn revision: 58465d2e213991f8afb13b984854a49fcdcc980c @@ -272,15 +288,6 @@ GEM rainbow (>= 2.0.0) i18n (1.1.1) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.27) - activesupport (>= 4.0.2) - ast (>= 2.1.0) - erubi - highline (>= 2.0.0) - i18n - parser (>= 2.2.3.0) - rainbow (>= 2.2.2, < 4.0) - terminal-table (>= 1.5.1) idn-ruby (0.1.0) ipaddress (0.8.3) iso-639 (0.2.8) @@ -691,7 +698,7 @@ DEPENDENCIES http_accept_language (~> 2.1) http_parser.rb (~> 0.6)! httplog (~> 1.1) - i18n-tasks (~> 0.9) + i18n-tasks (~> 0.9)! idn-ruby iso-639 json-ld (~> 2.2) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 4499830f9..36922f1f8 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -30,22 +30,16 @@ ar: other_instances: خوادم أخرى privacy_policy: سياسة الخصوصية source_code: الشفرة المصدرية - status_count_after: - one: منشور - other: منشورات + status_count_after: منشورات status_count_before: نشروا terms: شروط الخدمة - user_count_after: - one: مستخدِم - other: مستخدِمين + user_count_after: مستخدِمين user_count_before: يستضيف what_is_mastodon: ما هو ماستدون ؟ accounts: choices_html: 'توصيات %{name} :' follow: إتبع - followers: - one: مُتابِع - other: مُتابِعون + followers: مُتابِعون following: مُتابَع joined: انضم·ت في %{date} link_verified_on: تم التحقق مِن مالك هذا الرابط بتاريخ %{date} @@ -57,9 +51,7 @@ ar: people_who_follow: الأشخاص الذين يتبعون %{name} pin_errors: following: يجب أن تكون مِن متابعي حساب الشخص الذي تريد إبرازه - posts: - one: تبويق - other: تبويقات + posts: تبويقات posts_tab_heading: تبويقات posts_with_replies: التبويقات و الردود reserved_username: إسم المستخدم محجوز @@ -268,9 +260,7 @@ ar: suspend: تعليق severity: الشدة show: - affected_accounts: - one: حساب واحد معني في قاعدة البيانات - other: "%{count} حسابات معنية في قاعدة البيانات" + affected_accounts: "%{count} حسابات معنية في قاعدة البيانات" retroactive: silence: إلغاء الكتم عن كافة الحسابات المتواجدة على هذا النطاق suspend: إلغاء التعليق المفروض على كافة حسابات هذا النطاق @@ -570,9 +560,7 @@ ar: generic: changes_saved_msg: تم حفظ التعديلات بنجاح ! save_changes: حفظ التغييرات - validation_errors: - one: هناك شيء ما لا يبدو أنه على ما يُرام بعدُ. يُرجى الإطلاع على الخطأ أدناه - other: هناك شيء ليس على ما يُرام! يُرجى معاينة الأخطاء الـ %{count} التالية + validation_errors: هناك شيء ليس على ما يُرام! يُرجى معاينة الأخطاء الـ %{count} التالية imports: preface: بإمكانك استيراد بيانات قد قُمتَ بتصديرها مِن مثيل خادوم آخَر، كقوائم المستخدِمين الذين كنتَ تتابِعهم أو قُمتَ بحظرهم. success: تم تحميل بياناتك بنجاح وسيتم معالجتها في الوقت المناسب @@ -595,9 +583,7 @@ ar: expires_in_prompt: أبدا generate: توليد invited_by: 'تمت دعوتك من طرف :' - max_uses: - one: استعمال واحد - other: "%{count} استخدامات" + max_uses: "%{count} استخدامات" max_uses_prompt: بلا حدود prompt: توليد و مشاركة روابط للسماح للآخَرين بالنفاذ إلى مثيل الخادوم هذا table: @@ -623,12 +609,8 @@ ar: action: معاينة كافة الإشعارات body: هذا هو مُلَخَّص الرسائل التي فاتتك وذلك منذ آخر زيارة لك في %{since} mention: "%{name} أشار إليك في :" - new_followers_summary: - one: و لقد تحصّلت أيضا على متابِع جديد أثناء فترة غيابك! يا للروعة! - other: رائع، لقد قام بمتابعتك %{count} مُتابِعون جُدد أثناء فترة غيابك عن ماستدون ! - subject: - one: "إشعار جديد واحد منذ آخر زيارة لك لـ \U0001F418" - other: "%{count} إشعارات جديدة منذ آخر زيارة لك إلى \U0001F418" + new_followers_summary: رائع، لقد قام بمتابعتك %{count} مُتابِعون جُدد أثناء فترة غيابك عن ماستدون ! + subject: "%{count} إشعارات جديدة منذ آخر زيارة لك إلى \U0001F418" title: أثناء فترة غيابك … favourite: body: 'أُعجب %{name} بمنشورك :' @@ -746,17 +728,11 @@ ar: statuses: attached: description: 'مُرفَق : %{attached}' - image: - one: "%{count} صورة" - other: "%{count} صُوَر" - video: - one: "%{count} فيديو" - other: "%{count} فيديوهات" + image: "%{count} صُوَر" + video: "%{count} فيديوهات" boosted_from_html: تم إعادة ترقيته مِن %{acct_link} content_warning: 'تحذير عن المحتوى : %{warning}' - disallowed_hashtags: - one: 'يحتوي على وسم ممنوع: %{tags}' - other: 'يحتوي على أحد الوسوم الممنوعة: %{tags}' + disallowed_hashtags: 'يحتوي على أحد الوسوم الممنوعة: %{tags}' language_detection: اكتشاف اللغة تلقائيا open_in_web: إفتح في الويب over_character_limit: تم تجاوز حد الـ %{max} حرف المسموح بها diff --git a/config/locales/devise.ar.yml b/config/locales/devise.ar.yml index cadc4daa8..4d80176c6 100644 --- a/config/locales/devise.ar.yml +++ b/config/locales/devise.ar.yml @@ -77,6 +77,4 @@ ar: expired: إنتهت مدة صلاحيته، الرجاء طلب واحد جديد not_found: لا يوجد not_locked: ليس مقفلاً - not_saved: - one: 'خطأ واحد منَعَ %{resource} مِن القيام بالإحتفاظ :' - other: "%{count} أخطاء منعت %{resource} مِن القيام بالإحتفاظ :" + not_saved: "%{count} أخطاء منعت %{resource} مِن القيام بالإحتفاظ :"