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 lorem words to locale #900

Merged
merged 6 commits into from
May 21, 2018
Merged

Add Japanese lorem words to locale #900

merged 6 commits into from
May 21, 2018

Conversation

vietqhoang
Copy link
Contributor

The following changes have been made:

  • Added 500 random Japanese words to the ja.yml locale under Lorem > Words
  • Added 500 random (and different) Japanese words to ja.yml locale under Lorem > Supplemental
  • Adjusted lorem.rb to take into consideration locale specific unicode punctuation when generating sentences, paragraphs, and question.\

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.

Could you please rebase with master, fix the conflicts and fix the Rubocop violations?


def locale_question_mark
translate('faker.lorem.punctuation.question_mark')
end
Copy link
Member

Choose a reason for hiding this comment

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

I loved the private methods 👍

period: "。"
question_mark: "?"
words: ["つぎつぎ", "薬", "当て字", "しょくん", "間隔", "飽くまでも", "あびる", "雇用", "かんどうする", "じじょでん", "超音波", "じゅうどう", "面", "先週", "しょうがっこう", "避ける", "ふそく", "まぎらす", "閉める", "たまご", "こわす", "底", "〜亭", "しゃくや, しゃっか", "ひきざん", "割り箸", "こうぞく", "果てる", "つなひき", "漂う", "漠然", "しょうりゃく", "減俸", "さいぼう, さいほう", "平安", "封筒", "旧姓", "よわよわしい", "味噌", "ぼきん", "くつじょく", "絹糸", "ちきゅう", "かぜ", "半額", "かんそく", "ぶん, ふん", "たれる", "廉価", "ずいぶん", "屈む", "かんりょうてき", "すんか", "殻", "擬装", "うえる", "たいさ", "あつい", "げいひんかん", "洋服", "大丈夫", "察知", "しえんする", "仕方がない", "徳川", "ちらかす", "こくふくする", "ぶそう", "こうつう", "逆", "馬鹿馬鹿しい", "切迫", "不健康", "学院", "都合", "備える", "へいがい", "はじめて", "輸出", "迷路", "母", "ひかくする", "はなぢ, はなじ", "むこう", "ねんじゅう", "自宅", "誘惑", "ちえん", "太る", "ちかく", "奴ら", "堀川", "ちがい", "たいこうする", "運ぶ", "独裁", "はっぽう", "とちょう", "先ず", "はんそう", "せいじょう, しょうじょう", "かんじる", "体重", "上手", "原油", "ざぜん", "既に", "華やか", "仕事", "あらす", "ゆるむ", "きょうどう", "開閉", "悲しみ", "しゃこ", "ねばり", "ようい", "おりめ", "伐採", "牛乳", "秘める", "右翼", "伝統", "きひん", "やさしい", "ほ", "警官", "左手", "全日本", "むぜい", "ごふく", "かいたく", "撃つ", "しあとるし, シアトルし", "ちょさくけん", "じぎする", "譜面", "貫く", "約する", "提案する", "哀れむ", "迷子", "きょうき", "ごうけん", "せんたくする", "しゅしょう", "江戸", "狂う", "助手", "新婚旅行", "検査", "色々", "かぶしきしじょう", "桜色", "普及", "零す", "ししょく", "きゅうりょう", "おんとう", "しょうゆ", "没落", "人性", "けいかん", "電話", "お盆", "きいろ", "やしなう", "鍋", "遮断", "かわかす", "寮生", "面積", "とうき", "ふくへい", "ないしょばなし", "不思議", "この頃", "おかね", "殺人者", "かいぞく", "歯を磨く", "店", "はなはだ", "フランス語", "評価", "九日", "さいばん", "推奨", "出版", "恨み", "気持ちいい", "黙る", "はりい", "凝固", "傑作", "魅力", "ぐん", "右利き", "まほうつかい", "復旧", "かくじっけん", "じきしょうそう", "あれる", "きょうはんしゃ", "たいりく", "げんめつ", "俵", "むらさきいろ", "病床", "米兵", "まつり", "塾生", "親切", "めいがら", "核実験", "なおさら", "魔術", "がいよう", "かんぜん", "せいかん", "果樹", "〜系", "ほにゅうびん", "じょうだん", "賢明", "みなと", "もはん", "こうちょく", "泳ぐ", "重い", "日没", "碁", "かつ", "どうけつ", "近視", "配慮", "のき", "入江", "とめる", "暇", "書き方", "胃", "りょうど", "難しい", "浮世絵", "喜劇", "とうさん", "はんだんする", "こうせい", "大仏", "揺さぶる", "いじん", "機嫌", "黒板", "えきびょう", "妥協する", "つうやく", "乗せる", "けしき", "床", "品詞", "消す", "金縛り", "じゅうらい", "急騰", "十台", "窓", "雑音", "きょだい", "鈍器", "禍根", "かたみち", "山葵", "店舗", "渦巻き", "おととい, いっさくじつ", "救急車", "馬", "ころす", "ぼくし", "せっぷく", "たて", "おどろく", "やさい", "じぞう", "こはん", "いく", "自立", "かっこう", "脱税", "始まる", "学者", "かい", "ひきさく", "長唄", "下着", "よくげつ", "休日", "以下", "廃墟", "部首", "壊す", "むく", "委員", "待合", "頂く", "よぼう", "壮年", "斬殺", "ちゅうもんする", "じっかん", "境", "施行", "つく", "活用", "ぶき", "かいじゅう", "人口", "ぼうず", "そあく", "むぼう", "白菊", "りゃくず", "汚す", "すいせん", "あらそう", "高値", "あう", "せいしん", "指紋", "超〜", "うえる", "つまる", "靖国神社", "とりあえず", "とふ", "たくす", "じょうじゅん", "羊毛", "浅い", "閉じる", "戦没", "あっとうする", "ひがい", "量", "じょうき", "誤用", "ほうせき", "つばさ", "号", "けいむしょ", "電源", "勇気", "ふかさ", "はだか", "たいやく", "きょうしつ", "退く", "さきまわり", "こうおつ", "無糖", "ふさい", "とくに", "めいし", "みつ", "ほんらい", "まもる", "あつかい", "日欧", "天井", "みさき", "おきゃくさん", "にんい", "きょうかい", "いつ頃", "かん", "しきもう", "特殊", "同僚", "血液", "じぶん", "しょうかする", "礎", "みなもと", "軒", "ぶっきょう", "しずむ", "たらす", "憂い", "総括", "もうす", "暴力", "しばふ", "いたずら", "米国", "魔法", "ことばつき", "窒息", "唄う", "金", "きもち", "誓い", "どろ", "話", "奇襲", "巡回", "失う", "隆起", "投資", "芽", "あくれい", "奉仕", "ひんきゃく, ひんかく", "まつ", "せんりゅう", "だいどころ", "いう", "こいぬ", "なんべい", "さくにゅう", "フランス人", "きげんご", "こくみん", "交錯", "好き", "一文字", "ほうげん", "地面", "だくりゅう", "見当たる", "浸す", "あしくび", "弱虫", "送る", "遺失", "あおい", "ちあん", "宜しく", "あらあらしい", "かおつき", "かちゅう", "がんばる", "芸者", "陳列室", "弥生", "明治", "めいしょ", "ごじゅう", "済ます", "無駄", "終点", "ぞくご", "掛ける", "ほうしゅう", "騎兵", "液体", "下さい", "けいじばん", "杏", "合う", "疾走", "りゅうこうご", "出かける", "はちまき", "手作り", "れつあく", "うんがいい", "はちのす, ハチのす", "色盲", "形", "希望する", "こうせい", "いちだい", "春休み", "縛る", "金星", "そんざい", "防犯", "大尉", "老齢", "差し上げる", "犠牲", "にる", "問題", "双", "安泰", "せんじょうざい", "継承", "かんしん", "丼", "ざんぴん", "そだてる", "たつ", "不可欠", "報じる", "抑制", "けいけんしゃ", "きょうふ", "せいぞう", "きんく"]
supplemental: ["おどりば", "料理人", "いち", "やぶれる", "辞儀する", "逮捕", "色彩", "妻", "きづく", "はきだす", "歯", "憶測", "すむ", "墨", "胃腸", "駆け出す", "栞", "ふゆかい", "豪華", "写す", "むちつじょ", "ごらく", "可愛い", "ふじょ", "でんせんびょう", "いちにち, ついたち", "彼女", "ひめさま", "解説", "すいがら", "約", "並", "こっせつ", "あらじお, あらしお", "書架", "勝手", "ぎせい", "こくひん", "嫌", "博物館", "しんし", "帳簿", "初めに", "空き瓶", "ふてい", "見返す", "ほんるいだ", "さわ", "悪気", "ほんそう", "謙虚", "耐火", "ぼうりょく", "潔い", "けす", "締まる", "ちょうりょく", "のうし", "暴走", "華道", "基盤", "廃棄", "かざる", "くら", "氏名", "がぞう", "ふきつ", "こうばん", "かんさい", "ひとごみ", "構える", "たす", "とむ", "すみ", "めいよ", "帝", "かんえん", "たび", "模型", "冬休み", "誇張", "何千", "そうだん", "しっぷう, はやて", "ほどう", "敵", "ひふ", "火", "壁", "弱点", "かいそく", "没頭", "貴賓", "さいげつ", "盛り上がる", "柱", "ひはん", "輪郭", "こづつみ", "扇", "性病", "濃紺", "洗浄剤", "舞踏", "つぎ", "しめる", "延長", "しつ", "ざせき", "もくひょう", "宝くじ", "劣悪", "はなみ", "同音異義語", "たいほう", "慶弔", "疎外", "れいてん", "死ぬ", "さと", "煩い", "携帯", "かいせい", "哺育", "敬語", "とうとい", "とうひょうする", "頑張れ", "れいせい", "蛇", "いしゃりょう", "アメリカ製", "光年", "社員", "もよう", "ぎゃくしゅう", "甲乙", "ふくし", "へいせい", "てんのう", "年次", "二巻", "がくふ", "しどう", "よすみ", "おおごえ", "かつぐ", "地下街", "はくじん", "間接", "せっとく", "つうこん", "びんぼう", "川底", "こうえん", "うごき", "六", "乾燥", "洗濯屋", "なぞ", "ふじん", "対応", "順序", "首", "むれる", "しめる", "移す", "分ける", "しょうげき", "ぎょうし", "あまい", "じょうきゅう", "たんれん", "かけこむ", "素材", "受付", "いままで", "りょこう", "満潮", "もちいる", "あわれ", "賀状", "詰め込む", "数える", "ずいじ", "いっぱく", "聴者", "そうぐう", "とうさく", "思い遣り", "鋭い", "貞操", "原因", "象牙", "歌謡", "会議", "待遇", "なかよし", "おなか", "りりしい", "おおちがい", "賛成", "奔放", "非難", "ようじ", "錯乱", "じこ", "前", "累進", "緊張する", "ぎじゅく", "うち", "悪霊", "枢軸", "子守歌", "りゅうき", "雄犬", "みずいろ", "大間違い", "走り回る", "そんけい", "しっぺい", "てんし", "病院", "残業", "ひんしつ", "けんしゅうせい", "椅子", "いさぎよい", "枕", "墓", "洗剤", "たいがい", "じしょ", "副大統領", "瞬く", "ふじ山", "ふくせん", "漬物", "はんけん", "愛する", "ねんがん", "ねんじ", "いきどおり", "おとこのこ", "仁", "鶴", "施設", "請ける", "拒否", "うみ", "移譲", "溶岩", "性格", "じしん", "裏口", "ふたたび", "猿真似", "しめらせる", "みき", "つぐなう", "しんじゅく", "こせき", "よくあつ", "懇談", "指定する", "専門", "一生", "平壌", "滝", "じどうし", "着く", "泥棒", "構え", "きじゅつ", "しょひょう", "貨幣", "好奇心", "皇太子妃", "かいほうする", "主に", "背広", "ちんみ", "よそく", "なつかしい", "がんい", "ちょうしゃ", "無敵", "所", "だいがくいんせい", "左右", "のむ", "愛国心", "桑原", "どうはんする", "いっかい", "なみだ", "くまもとけん", "主観的", "普段", "こころみる", "ふくぶくろ", "てんぷく", "せいめい", "はなのあな", "みぎて", "親子丼", "反則", "しゅうり", "かくにん", "生える", "けむし", "すける", "のぞいて", "和尚", "えんちょうする", "こうとう", "なげすてる", "なまけもの", "あい", "きとく", "審判", "怖い", "こたえる", "比較", "ゆにゅう", "曲", "ちんもく", "破産", "迫る", "あわ", "辛子", "糸", "早々", "運命", "錠", "のうみん", "夏", "野獣", "試験", "数詞", "毎日", "ぎせいしゃ", "よくし", "せん", "おろし", "ゆれる", "いし", "える", "ごらん", "ばい", "たい", "拘置", "うらぎり", "競艇", "かぐ", "悔しい", "にゅうせき", "ために", "ふうふ", "ちょうせん", "破壊", "困難", "まんえつ", "移動", "しあつ", "あまる", "香り", "いなか", "通す", "ほうき", "栄誉", "ちめいてき", "おとろえる", "いしずえ", "知り合い", "貨物船", "酸っぱい", "めいわくめーる, めいわくメール", "とうほう", "てら", "ぜんにほん", "七つ", "暗い", "てのこう", "しんぞう", "仰々しい", "さんぎょう", "公共", "年額", "かわさき", "日刊", "ちょう", "縮小", "いっこ", "不況", "人柄", "はい", "原潜", "つみ", "かんかつ", "ぞうえん", "雑費", "おくれる", "面倒臭い", "しょうじょう", "たおす", "順番", "天皇", "しゅいん", "動揺", "乙", "さわやか", "とう", "望み", "一人娘", "かく, かど", "ねんがじょう", "ちょくせつ", "せんじょう", "燃やす", "ふかのう", "買い物", "風潮", "沖縄", "いか", "こうくうぼかん", "かくれる", "きぼうする", "媒介", "れいぞうこ", "冷酷", "紛らわしい", "せんげん", "家具", "繁茂", "なさけない", "きずつく", "空き缶", "禅寺", "大文字", "火葬", "雰囲気", "化粧", "忍者", "ふんしゃ", "限る", "ちゅうとはんぱ", "はずかしめる", "何度", "風船", "こうぎょう", "かくしゅう", "しりつ", "こい", "あがる", "教える", "程", "忘れ物", "襲撃", "かいころく", "月刊", "となえる", "せんのう", "営業中", "ながさき", "げんまい", "二つ", "髪の毛", "ろくおん", "匿名", "高瀬", "しききん", "ふかぶん", "怒鳴る", "福祉", "あさねぼう", "りゃくご", "しざい", "運", "力", "ねばる", "つくる", "わかめ", "おうしゅう", "やすい", "え", "かせぎ", "あらかじめ", "かんせつ", "恥ずかしがる", "焦がす", "はいき", "はかる", "図説", "どうめい", "ようじ", "ふねんごみ, ふねんゴミ", "鎮める", "しゅくん"]
Copy link
Member

Choose a reason for hiding this comment

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

wtf are you talking about? @vietqhoang

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are vocabulary pulled from our Japanese kanji learning product. The contents could be replaced with another source if that is desirable.

Copy link
Member

Choose a reason for hiding this comment

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

I know. I was just joking 👍 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😛

Your name looks familiar.... 🤔

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.

Overall looks good. I left a comment. Please take a look and let me know your thoughts.

city_prefix: [North, East, West, South, New, Lake, Port]
city_suffix: [town, ton, land, ville, berg, burgh, borough, bury, view, port, mouth, stad, furt, chester, mouth, fort, haven, side, shire]
country: [Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica (the territory South of 60 deg S), Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Bosnia and Herzegovina, Botswana, Bouvet Island (Bouvetoya), Brazil, British Indian Ocean Territory (Chagos Archipelago), Brunei Darussalam, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands, Colombia, Comoros, Congo, Congo, Cook Islands, Costa Rica, Cote d'Ivoire, Croatia, Cuba, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Faroe Islands, Falkland Islands (Malvinas), Fiji, Finland, France, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Holy See (Vatican City State), Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, Democratic People's Republic of Korea, Republic of Korea, Kuwait, Kyrgyz Republic, Lao People's Democratic Republic, Latvia, Lebanon, Lesotho, Liberia, Libyan Arab Jamahiriya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Moldova, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands Antilles, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palestinian Territory, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn Islands, Poland, Portugal, Puerto Rico, Qatar, Reunion, Romania, Russian Federation, Rwanda, Saint Barthelemy, Saint Helena, Saint Kitts and Nevis, Saint Lucia, Saint Martin, Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Slovakia (Slovak Republic), Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, Spain, Sri Lanka, Sudan, Suriname, Svalbard & Jan Mayen Islands, Swaziland, Sweden, Switzerland, Syrian Arab Republic, Taiwan, Tajikistan, Tanzania, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States of America, United States Minor Outlying Islands, Uruguay, Uzbekistan, Vanuatu, Venezuela, Vietnam, 'Virgin Islands, British', 'Virgin Islands, U.S.', Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe]
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need these locales in this file? Take a look at this file in the master branch. We changed the structure a bit. Take a look at this folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm. Thought these changes were from upstream. I'll revert the commit.

Copy link
Member

Choose a reason for hiding this comment

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

Awesome. Lemme know when it's done. I think we're almost good to go here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted in 114ee63

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.

Thanks for contributing. Looks fine 💯

I'm glad to merge this PR. I love adding new locales to this project 🥇

@vbrazo vbrazo merged commit 2d7fcf5 into faker-ruby:master May 21, 2018
@vbrazo
Copy link
Member

vbrazo commented May 21, 2018

Thanks for the comment.

I've updated the last commit and now we have the accurate information. Unfortunately you forgot to add the standard English locale, that's why one of the tests wasn't passing.

I look forward to seeing your new PRs.
Thanks 👍

@vbrazo vbrazo self-requested a review July 19, 2018 01:29
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
* Added Japanese words to lorem ja locale

* Use punctuation specific to locale

* Added punctuation to en.yml. Remove fallbacks.

* Addressed Rubocop violation

* Partial Revert "Added punctuation to en.yml. Remove fallbacks."

This reverts `en.yml` from commit 02131b4.

* Add punctuation defaults to lorem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants