Skip to content

Commit

Permalink
Merge pull request #2313 from yujideveloper/feature/add-japanese-for-…
Browse files Browse the repository at this point in the history
…subscription

Add Japanese translation for `Faker::Subscription`
  • Loading branch information
koic committed May 6, 2021
2 parents bcd12d9 + 60c31e2 commit 548a23c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/locales/ja.yml
Expand Up @@ -119,6 +119,13 @@ ja:
planet: ["水星", "金星", "地球", "火星", "木星", "土星", "天王星", "海王星"]
galaxy: ["天の川", "小マゼラン雲", "大マゼラン雲", "アンドロメダ銀河", "Ω星団", "さんかく座銀河", "ケンタウルス座A", "ボーデの銀河", "NGC 253", "M83"]

subscription:
plans: ["フリートライアル", "ベーシック", "スターター", "エッセンシャル", "学生", "ブロンズ", "スタンダード", "シルバー", "ゴールド", "プラチナ", "プロフェッショナル", "ビジネス", "ダイヤモンド", "プレミアム"]
statuses: ["アクティブ", "アイドル", "ブロック中", "保留中"]
payment_methods: ["クレジットカード", "デビットカード", "PayPal", "現金", "送金", "ビットコイン", "小切手", "Apple Pay", "Google Pay", "WeChat Pay", "Alipay", "Visaチェックアウト"]
subscription_terms: ["毎日", "毎週", "毎月", "毎年", "隔年", "3年毎", "5年毎", "終身"]
payment_terms: ["前払い", "月払い", "年払い", "フルサブスクリプション"]

university:
prefix: ["北海道", "東北", "関東", "中部", "近畿", "中国", "四国", "九州"]
suffix: ["大学", "医科大学", "芸術大学", "音楽大学", "工業大学"]
Expand Down
13 changes: 13 additions & 0 deletions test/test_ja_locale.rb
Expand Up @@ -159,6 +159,19 @@ def test_ja_space_methods
assert Faker::Space.galaxy.is_a? String
end

def test_it_subscription_methods
assert Faker::Subscription.plan.is_a? String
assert_not_english(Faker::Subscription.plan)
assert Faker::Subscription.status.is_a? String
assert_not_english(Faker::Subscription.status)
assert Faker::Subscription.payment_method.is_a? String
assert Array.new(10) { Faker::Subscription.payment_method }.any? { |word| !word.match?(/[a-zA-Z]/) }
assert Faker::Subscription.subscription_term.is_a? String
assert_not_english(Faker::Subscription.subscription_term)
assert Faker::Subscription.payment_term.is_a? String
assert_not_english(Faker::Subscription.payment_term)
end

def test_ja_university_methods
assert Faker::University.prefix.is_a? String
assert_not_english(Faker::University.prefix)
Expand Down

0 comments on commit 548a23c

Please sign in to comment.