Skip to content

fix(locale): remove offensive and inappropriate words from ja locale#3661

Merged
xDivisionByZerox merged 2 commits intofaker-js:nextfrom
nulltask:fix/ja-locale-remove-offensive-words
Nov 26, 2025
Merged

fix(locale): remove offensive and inappropriate words from ja locale#3661
xDivisionByZerox merged 2 commits intofaker-js:nextfrom
nulltask:fix/ja-locale-remove-offensive-words

Conversation

@nulltask
Copy link
Contributor

Summary

This PR removes 17 inappropriate words from the Japanese word list in src/locales/ja/lorem/word.ts to improve the quality and appropriateness of generated fake data.

Words Removed

Violent/Offensive Terms (15 words)

  • 奴ら (yatsura) - derogatory/insulting term for "those people"
  • 殺人者 (satsujinsha) - murderer
  • ころす (korosu) - to kill
  • せっぷく (seppuku) - ritual suicide
  • 斬殺 (zansatsu) - killing by sword
  • ぶき (buki) - weapon
  • 鈍器 (donki) - blunt weapon
  • 暴力 (bōryoku) - violence (appeared twice: as 暴力 and ぼうりょく)
  • 暴走 (bōsō) - rampage/running amok
  • (teki) - enemy
  • 撃つ (utsu) - to shoot
  • 死ぬ (shinu) - to die
  • (haka) - grave/tomb
  • 泥棒 (dorobō) - thief
  • 悪霊 (akuryō) - evil spirit (appeared twice: as あくれい and 悪霊)

Discriminatory Term (1 word)

  • 色盲 (shikimō) - outdated and discriminatory term for color blindness (modern terms: 色覚異常 or 色覚多様性)

Politically Sensitive Terms (2 words)

  • 右翼 (uyoku) - right-wing (political term with strong connotations)
  • 靖国神社 (Yasukuni Jinja) - politically controversial Shinto shrine

Potentially Offensive Medical Term (1 word)

  • 性病 (seibyō) - venereal disease (can be used in an offensive/derogatory context)

Motivation

These words could be:

  • Offensive or inappropriate in various contexts
  • Discriminatory or insensitive
  • Politically controversial
  • Used to generate inappropriate or harmful content

Removing them helps ensure that Faker generates appropriate, non-offensive placeholder data that can be used safely in all contexts.

Testing

  • No functional changes to the codebase
  • Word list still contains 984 words (reduced from 1001)
  • All other locale files remain unchanged

Remove 17 inappropriate words from the Japanese word list:

**Violent/offensive terms:**
- 奴ら (yatsura) - derogatory term for "those people"
- 殺人者 (satsujinsha) - murderer
- ころす (korosu) - to kill
- せっぷく (seppuku) - ritual suicide
- 斬殺 (zansatsu) - killing by sword
- ぶき (buki) - weapon
- 鈍器 (donki) - blunt weapon
- 暴力 (bōryoku) - violence (appeared twice)
- 暴走 (bōsō) - rampage
- 敵 (teki) - enemy
- 撃つ (utsu) - to shoot
- 死ぬ (shinu) - to die
- 墓 (haka) - grave
- 泥棒 (dorobō) - thief
- 悪霊 (akuryō) - evil spirit (appeared twice as あくれい and 悪霊)

**Discriminatory term:**
- 色盲 (shikimō) - outdated/discriminatory term for color blindness

**Politically sensitive:**
- 右翼 (uyoku) - right-wing (political connotation)
- 靖国神社 (Yasukuni Jinja) - politically controversial shrine

**Potentially offensive medical term:**
- 性病 (seibyō) - venereal disease (can be used offensively)

These words could be offensive or inappropriate in various contexts.
This change improves the quality and appropriateness of the generated
fake data for Japanese locale.
@nulltask nulltask requested a review from a team as a code owner November 25, 2025 05:18
@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 567f5f8
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/69268d0dbd930c0008fa4a03
😎 Deploy Preview https://deploy-preview-3661.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@matthewmayer
Copy link
Contributor

Looks good to me. Per previous discussion at #1631 we are removing this kind of vocabulary where possible.

@matthewmayer
Copy link
Contributor

Note you'll need to run

pnpm run preflight

to update the snapshot tests.

@nulltask
Copy link
Contributor Author

Thank you @matthewmayer for the review and feedback! I've updated the snapshot tests as suggested. I appreciate the pointer to the previous discussion #1631 - it's helpful to see the project's approach to this kind of vocabulary cleanup.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (4cda07f) to head (567f5f8).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3661   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files        2994     2994           
  Lines      236305   236284   -21     
  Branches      939      939           
=======================================
- Hits       236248   236227   -21     
  Misses         57       57           
Files with missing lines Coverage Δ
src/locales/ja/lorem/word.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xDivisionByZerox xDivisionByZerox added c: locale Permutes locale definitions m: lorem Something is referring to the lorem module labels Nov 26, 2025
@xDivisionByZerox xDivisionByZerox added this to the v10.x milestone Nov 26, 2025
@xDivisionByZerox xDivisionByZerox added this pull request to the merge queue Nov 26, 2025
Merged via the queue into faker-js:next with commit 8310c8c Nov 26, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions m: lorem Something is referring to the lorem module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants