-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Fix: Update Indian state and UT list per official standards. Closes #60264 #60266
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
base: trunk
Are you sure you want to change the base?
Fix: Update Indian state and UT list per official standards. Closes #60264 #60266
Conversation
📝 WalkthroughWalkthroughThe updates modify the WooCommerce localization data for Indian states and union territories, reflecting recent administrative changes and naming conventions. The changelog documents these adjustments as a patch-level fix, while the primary change updates the state array in the localization file without altering any exported functions or classes. Changes
Sequence Diagram(s)sequenceDiagram
participant Admin as WooCommerce Maintainer
participant Changelog as Changelog File
participant States as states.php
Admin->>Changelog: Add patch-level changelog entry for Indian states update
Admin->>States: Update Indian states and union territories array
States-->>WooCommerce: Provide updated states list for localization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5-10 minutes Possibly related PRs
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: .coderabbit.yml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! We follow the CLDR standard, so any changes must not contradict it. See review comments for more details.
plugins/woocommerce/i18n/states.php
Outdated
'DN' => __( 'Dadra and Nagar Haveli', 'woocommerce' ), | ||
'DD' => __( 'Daman and Diu', 'woocommerce' ), | ||
'DH' => __( 'Dadra and Nagar Haveli and Daman and Diu', 'woocommerce' ), // New merged UT with code DH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLDR standard (release 47) seems to have multiple entries for these states that we should mirror.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification! I've updated the code to keep the territories separate to align with the CLDR standard. The new commit has been pushed.
'JK' => __( 'Jammu and Kashmir', 'woocommerce' ), | ||
'LA' => __( 'Ladakh', 'woocommerce' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, why did you change the order of these two entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. There was no specific reason for the order I chose. I am happy to reorder them alphabetically by code (JK before LA) or by name if that aligns better with the project's standards. Just let me know what you prefer! Thank You.
…khilanandateja/woocommerce into fix/60264-update-indian-states
Testing GuidelinesHi , Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
Submission Review Guidelines:
Changes proposed in this Pull Request:
This pull request updates the list of Indian states and union territories to align with current official standards, addressing outdated names and administrative divisions.
Closes #60264.
Screenshots or screen recordings:
How to test the changes in this Pull Request:
Testing that has already taken place:
I have tested these changes on a local WordPress environment (v6.5) with WooCommerce (trunk) and the Storefront theme. I followed the testing steps above and confirmed that the state dropdown on the checkout page displays the updated and correct list of Indian states and union territories.
Changelog entry
Changelog Entry Details
Significance
Type
Message
Update the list of Indian states and union territories to align with current official standards.