feat: centralize supported locales and rebuild .htaccess with @locale#738
Conversation
Add locales.json with the list of available locales and language names, update Locale.php to read that, and build a preprocess stage for .htaccess to leverage that single source of truth for supported locales. Test-bot: skip
User Test ResultsTest specification and instructions User tests are not required |
| builder_run_action start do_start | ||
|
|
||
| builder_run_action test test_docker_container | ||
| builder_run_action htaccess preprocess_htaccess |
There was a problem hiding this comment.
Does it matter that there's 3 builder actions that preprocess_htaccess?
- configure
- start
- htaccess
There was a problem hiding this comment.
It's deliberate -- it's safe to rerun. configure is needed for live sites; start is to ensure it happens when we start the site without a rebuild; htaccess is a convenience to rebuild without having to stop/start the site.
| # [NC] for case-insensitive | ||
| # Long regex for "BCP-47" codes = $1, rest of URL $2 onward | ||
| # | ||
| # @locales for BCP-47" codes = $1, rest of URL $2 onward |
There was a problem hiding this comment.
Will this @locales get replaced in the regex? It's just a comment...
There was a problem hiding this comment.
Yep, but it doesn't hurt!
|
We could prepend a |
Sounds good. I tacked that on in cbe5a71 |
|
I'm gonna go ahead and merge this to continue testing my other PRs |
Add locales.json with the list of available locales and language names, update Locale.php to read that, and build a preprocess stage for .htaccess to leverage that single source of truth for supported locales.
Test-bot: skip