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

Faker::Address.postcode (locale=ja) should contains hyphen #2326

Merged
merged 4 commits into from May 30, 2021

Conversation

gongo
Copy link
Contributor

@gongo gongo commented May 18, 2021

Issue#

Description:

1️⃣ Bug 1

Since #2297, Japanese postcode no longer contains hyphens.

$ bundle exec irb
irb(main):001:0> require 'faker'
=> true
irb(main):002:0> Faker::Config.locale = :ja
=> :ja
irb(main):003:0> Faker::Address.postcode
=> "8710704" # Expected "871-0704"

2️⃣ Bug 2

Fix indentation for ja/color.yml.

$ bundle exec irb
irb(main):001:0> require 'faker'
=> true
irb(main):002:0> I18n.t('faker.color.name', locale: :ja)
=> "translation missing: ja.faker.color.name"
irb(main):003:0> I18n.t('faker.name', locale: :ja)
=> ["赤", "緑", "青", "黄", "紫", "ミントグリーン", "ティール", "白", "黒", "オレンジ", "ピンク", "灰色", "栗 色", "バイオレット", "ターコイズブルー", "タン", "空色", "サーモン", "プラム", "オーキッド", "オリーブ", "マゼンタ", "ライム", "アイボリー", "藍色", "金", "フクシア", "シアン", "紺碧", "ラベンダー", "銀"]

Due to this effect, the definition of ja/name.yml was overwritten.

irb(main):007:0> Faker::Config.locale = :ja
=> :ja
irb(main):008:0> Faker::Name.first_name
=> "Brandon" # raise `I18n::MissingTranslationData` 'ja.faker.name.first_name`

test/test_ja_locale.rb Outdated Show resolved Hide resolved
Co-authored-by: Koichi ITO <koic.ito@gmail.com>
Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vbrazo vbrazo merged commit e1bd4a5 into faker-ruby:master May 30, 2021
@gongo gongo deleted the ja_postcode_contains_hyphen branch June 2, 2021 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants