Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Japanese translation for Faker::Subscription #2313

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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: ["フリートライアル", "ベーシック", "スターター", "エッセンシャル", "学生", "ブロンズ", "スタンダード", "シルバー", "ゴールド", "プラチナ", "プロフェッショナル", "ビジネス", "ダイヤモンド", "プレミアム"]
yujideveloper marked this conversation as resolved.
Show resolved Hide resolved
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