Skip to content

feat(locale): add mr_IN person, address, and phone_number providers#2367

Merged
fcurella merged 3 commits into
joke2k:masterfrom
RedZapdos123:fix/issue-2355-mr-in-locale
Jun 8, 2026
Merged

feat(locale): add mr_IN person, address, and phone_number providers#2367
fcurella merged 3 commits into
joke2k:masterfrom
RedZapdos123:fix/issue-2355-mr-in-locale

Conversation

@RedZapdos123

@RedZapdos123 RedZapdos123 commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Changes done:

Adds Marathi locale support under mr_IN with these providers:

  • person
  • address
  • phone_number
  • date_time

It also adds tests in existing suites:

  • tests/providers/test_person.py (TestMrIN)
  • tests/providers/test_address.py (TestMrIn)
  • tests/providers/test_phone_number.py (TestMrIn)
  • tests/providers/test_date_time.py (TestMrIN)

The problem:

mr_IN was missing as a dedicated locale.

The solution:

  • Adds faker/providers/person/mr_IN/__init__.py with Marathi first names, last names, prefixes, and suffixes.
  • Adds faker/providers/address/mr_IN/__init__.py with Marathi city/state/country datasets and India-style address formats.
  • Adds faker/providers/phone_number/mr_IN/__init__.py with Indian style +91 and local variants.
  • Adds faker/providers/date_time/mr_IN/__init__.py with Marathi DAY_NAMES, MONTH_NAMES, day_of_week(), and month_name().
  • Extends tests to validate provider datasets and locale behavior, including prefix/suffix, and day/month checks.

Fixes #2355

Validation:

  • make lint.
  • pytest tests/providers/test_person.py -k MrIN -q
  • pytest tests/providers/test_address.py -k MrIn -q
  • pytest tests/providers/test_phone_number.py -k MrIn -q
  • pytest tests/providers/test_date_time.py -k MrIN -q
  • pytest tests/providers/test_person.py tests/providers/test_date_time.py tests/providers/test_address.py tests/providers/test_phone_number.py -q

Result: 785 passed, 3 skipped.

AI Assistance Disclosure (REQUIRED):

  • No AI tools were used in preparing this PR.
  • If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.

Disclosure: GitHub Copilot (GPT-5.3-Codex) was used to help draft and implement code/test changes and PR text. All outputs were manually reviewed, edited, and validated through linting and test execution.

Checklist:

  • I have read the documentation about CONTRIBUTING
  • I have read the documentation about Coding style
  • I have run make lint.

The validation screenshots of the tests run, locally on WSL:

image image

Add a new mr_IN locale with core localized providers for person, address, and phone_number.\n\nIncludes provider tests for the new locale in existing test suites.

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
@RedZapdos123

RedZapdos123 commented Apr 18, 2026

Copy link
Copy Markdown
Contributor Author

Data sources:

(Since I have Marathi friends, and have lived in the Maharashtra State, I have confirmed the quality of the data.)

Add Marathi day/month datasets with day_of_week() and month_name() in date_time/mr_IN, and add suffixes support in person/mr_IN with suffix-aware tests.

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>

@fcurella fcurella left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@fcurella fcurella merged commit 77896ac into joke2k:master Jun 8, 2026
28 checks passed
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.

Add mr_IN locale with core providers

3 participants