Skip to content

Commit

Permalink
Merge pull request #2291 from ima1zumi/add-commerce-ja
Browse files Browse the repository at this point in the history
Add Commerce for Japanese
  • Loading branch information
koic committed Mar 29, 2021
2 parents 37f2c8d + 53d1a62 commit cfb382e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/locales/ja.yml
Expand Up @@ -42,6 +42,16 @@ ja:
color:
name: ["赤", "緑", "青", "黄", "紫", "ミントグリーン", "ティール", "白", "黒", "オレンジ", "ピンク", "灰色", "栗色", "バイオレット", "ターコイズブルー", "タン", "空色", "サーモン", "プラム", "オーキッド", "オリーブ", "マゼンタ", "ライム", "アイボリー", "藍色", "金", "フクシア", "シアン", "紺碧", "ラベンダー", "銀"]

commerce:
department: ["書籍", "映画", "音楽", "ゲーム", "電子工学", "コンピュータ", "住まい", "ガーデニング", "工具", "食料品", "健康", "美容", "おもちゃ", "こども用品", "ベビー用品", "衣服", "靴", "ジュエリー", "スポーツ", "アウトドア", "自動車", "工業"]
product_name:
adjective: [小さめ, 大きめ, エルゴノミクス, シンプルな, ゴージャスな, 一生モノの, ワンランク上の, 贅沢な, 光沢のある, 実力派, 軽い, 高機能, 丈夫な, 国産, 多機能]
material: [鋼鉄, 木製, コンクリート, プラスチック, 綿, 花崗岩, ゴム, 革, シルク, ウール, リネン, 大理石, 鉄, ブロンズ, 銅製, アルミニウム, 紙]
product: [椅子, 自動車, コンピュータ, 手袋, パンツ, シャツ, テーブル, 靴, 帽子, 茶碗, フォーク, 水筒, コート, ランプ, キーボード, バッグ, ベンチ, 掛時計, 腕時計, 財布, 万年筆]
promotion_code:
adjective: ['最終処分', '感謝祭', 'メンバー限定', '期間限定', 'プレミアム', 'スペシャル', '出血大サービス', 'お買い得']
noun: ['クーポン', '増量キャンペーン', '割引', '価格', 'プロモーション', 'セール', '特典', 'プライス', 'バーゲン']

company:
suffix: ["株式会社", "有限会社", "合名会社", "合資会社", "合同会社"]
category: ["水産", "農林", "鉱業", "建設", "食品", "印刷", "電気", "ガス", "情報", "通信", "運輸", "銀行", "保険"]
Expand Down
9 changes: 9 additions & 0 deletions test/test_ja_locale.rb
Expand Up @@ -58,6 +58,15 @@ def test_ja_coffee_methods
assert_not_english(Faker::Coffee.country)
end

def test_ja_commerce_methods
assert Faker::Commerce.department.is_a? String
assert_not_english(Faker::Commerce.department)
assert Faker::Commerce.product_name.is_a? String
assert_not_english(Faker::Commerce.product_name)
assert Faker::Commerce.promotion_code.is_a? String
assert_not_english(Faker::Commerce.promotion_code)
end

def test_ja_company_methods
assert Faker::Company.suffix.is_a? String
assert_not_english(Faker::Company.suffix)
Expand Down

0 comments on commit cfb382e

Please sign in to comment.