epic: i18n-url-scheme 🌋#696
Draft
mcdurdin wants to merge 107 commits into
Draft
Conversation
feat: new url scheme for i18n
User Test ResultsTest specification and instructions
Results Template |
fix: paths for contributors script 🌋
Co-authored-by: Marc Durdin <marc@durdin.net>
Co-authored-by: Marc Durdin <marc@durdin.net>
2 tasks
…/merge-master-i18n-url-scheme--a19s28-1
…heme--a19s28-1 chore: merge master to epic/i18n-url-scheme mid Sprint A19S28 🌋
Remove the `/` from a path if it refers to a file, and add a `/` if the path refers to a folder (implicit index.md/index.php). Clean up keyboard search which had some assumptions about not including the `/` but that doesn't make sense with this pattern. Test-bot: skip
fix: handle redirects for paths and files with terminating slashes 🌋
Co-authored-by: Marc Durdin <marc@durdin.net>
…/merge-master-epic-i18n-url-a19s28-2
…rl-a19s28-2 chore: merge master to epic/i18n-url-scheme for Sprint A19S28 (part 2) 🌋
refactor: Update globe button to modify `lang` in URL paths 🌋
feat: localize JS keyboard search 🌋
* also remove stray blc_mjs file
* Use first component of URL path to determine current locale * Add PHP `Locale::pageLocale()` to retrieve the current locale * Add JS `I18n.pageLocale()` to retrieve the current locale * Redirect to /en/... if an unsupported locale is found (in head.php) * Remove `lang` parameter from embedded keyboard search * Remove `lang` parameter from rewrite rules * Rename `Locale::definePageLocale()` to `Locale::definePageScope()` to clarify purpose of the function * Remove lang property from session; we may want to track lang in the future so we remember for top-level redirects * And fix the embed access in search.mjs (#720) TODO: Once this change lands, we'll need to rebuild the lang parameter into the `/go/<platform>/download-keyboards` rewrite rules and redirect to the correct locale that way. Fixes: #720 Test-bot: skip
test: cleanup skip of downloads/releases/ 🌋
feat: use page URL path to find current locale 🌋
chore: tidy up language check in menu globe button 🌋
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redesign keyman.com URLs to include locale as first component. e.g. keyman.com/keyboards --> keyman.com/de/keyboards.
User Testing
Setup - Using Docker Desktop, start the following sites locally:
You should be able to access
http://keyman.com.localhost/from a desktop browser tab.TODO: # More User Testing We'll want some tests here!