Skip to content

Add locale resources for location disambiguation and date phrasing#186

Merged
JarbasAl merged 1 commit into
devfrom
feat/datetime-locale-resources
Mar 29, 2026
Merged

Add locale resources for location disambiguation and date phrasing#186
JarbasAl merged 1 commit into
devfrom
feat/datetime-locale-resources

Conversation

@goldyfruit

@goldyfruit goldyfruit commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add locale list resources for ambiguous locations
  • add locale list resources for false-positive non-location phrases
  • add locale list resources to disambiguate current weekend wording

Notes

This PR intentionally contains only locale resource files.

It depends on the runtime loader added in #185, which consumes these .list resources from __init__.py.

Expected merge order:

@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds locale-specific data resource files across three locales (English US, French France, Turkish Turkey) containing static lists of ambiguous location identifiers, current weekend phrases, and non-location time phrases for localization support.

Changes

Cohort / File(s) Summary
English (US) Locale
locale/en-us/ambiguous_locations.list, locale/en-us/current_weekend_phrases.list, locale/en-us/non_location_phrases.list
Adds 15 ambiguous location variants (US synonyms), 1 weekend phrase entry ("this weekend"), and 5 time-related phrases for English (US) locale.
French (France) Locale
locale/fr-fr/ambiguous_locations.list, locale/fr-fr/current_weekend_phrases.list, locale/fr-fr/non_location_phrases.list
Adds 19 French ambiguous location terms, 3 weekend phrase variants, and 4 French time-related phrases for French (France) locale.
Turkish (Turkey) Locale
locale/tr-tr/current_weekend_phrases.list
Adds 1 Turkish weekend phrase entry ("bu hafta sonu").

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Across the globe, our phrases grow,
From Turkish shores to français flow,
Ambiguous lands and weekend cheer,
New locales welcome us here!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly summarizes the main change: adding locale resource files for location disambiguation and date phrasing across multiple locales (en-us, fr-fr, tr-tr).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/datetime-locale-resources

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@goldyfruit

Copy link
Copy Markdown
Collaborator Author

This PR contains only the locale resource files split out of #185.\n\n#185 now stays focused on the generic runtime changes in __init__.py.

@goldyfruit goldyfruit self-assigned this Mar 9, 2026
@goldyfruit goldyfruit added the translation Localization and translation changes label Mar 9, 2026
@goldyfruit

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@locale/en-us/non_location_phrases.list`:
- Around line 1-5: The new .list files (non_location_phrases.list,
ambiguous_locations.list, current_weekend_phrases.list) are not being loaded at
runtime because the resource loader in __init__.py only calls find_resource()
for location.rx; update the resource initialization in __init__.py (around the
find_resource()/resource loading block) to call find_resource() (or the same
loading helper) for each of these three filenames so they are
registered/consumed at runtime, or explicitly document that this PR depends on
the runtime patch from PR `#185` and ensure merge order is noted.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c1e591b9-1a8c-43be-802f-4eb433fbcab2

📥 Commits

Reviewing files that changed from the base of the PR and between 4463a09 and fd9a24e.

📒 Files selected for processing (7)
  • locale/en-us/ambiguous_locations.list
  • locale/en-us/current_weekend_phrases.list
  • locale/en-us/non_location_phrases.list
  • locale/fr-fr/ambiguous_locations.list
  • locale/fr-fr/current_weekend_phrases.list
  • locale/fr-fr/non_location_phrases.list
  • locale/tr-tr/current_weekend_phrases.list

Comment thread locale/en-us/non_location_phrases.list
@goldyfruit

Copy link
Copy Markdown
Collaborator Author

Documented the dependency and merge order in the PR description. This branch stays resource-only by design; the runtime loader lives in #185.

@goldyfruit goldyfruit changed the title Add locale resources for datetime timezone exceptions Add locale resources for location disambiguation and date phrasing Mar 9, 2026
@JarbasAl JarbasAl merged commit 26c6916 into dev Mar 29, 2026
7 of 10 checks passed
@JarbasAl JarbasAl deleted the feat/datetime-locale-resources branch March 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

translation Localization and translation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants