Skip to content

epic: i18n-url-scheme 🌋#696

Draft
mcdurdin wants to merge 107 commits into
masterfrom
epic/i18n-url-scheme
Draft

epic: i18n-url-scheme 🌋#696
mcdurdin wants to merge 107 commits into
masterfrom
epic/i18n-url-scheme

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented Mar 25, 2026

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:

  • api.keyman.com (master branch)
  • website-local-proxy (master branch)
  • keyman.com (this PR branch)
    You should be able to access http://keyman.com.localhost/ from a desktop browser tab.

  • TEST_GLOBE_KEY_SWITCHING - Verifies locale (first component in path) can be changed from menu globe key
  1. From a browser, browse to http://keyman.com.localhost
  2. Verify site defaults to English locale
  3. Verify globe button appears in top right of the menu bar
  4. Hover on the globe button and verify the link changes by language:
  • TEST_KEYBOARDS_SEARCH - Verifies keyboard search functions and can be localized
  1. Browse to http://keyman.com.localhost/keyboards
  2. Verify site defaults to English locale: http://keyman.com.localhost/en/keyboards
  3. In the search box, type "khmer_angkor"
  4. Verify several search result for "khmer_angkor" appear (in English)
  5. Verify the URL is http://keyman.com.localhost/en/keyboards/?q=khmer_angkor
  6. From the globe key, change the UI to Khmer locale
  7. Verify some of the keyboard results appear in Khmer locale
  8. From the search result, click "Khmer Angkor"
  9. Verify "Khmer Angkor" keyboard details appear in Khmer locale
  10. From the globe key, select Espanol
  11. Verify "Khmer Angkor" keyboard details appear in Spanish locale

TODO: # More User Testing We'll want some tests here!

@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot Bot commented Mar 25, 2026

User Test Results

Test specification and instructions

  • TEST_GLOBE_KEY_SWITCHING (OPEN)
  • TEST_KEYBOARDS_SEARCH (OPEN)
Results Template
# Test Results

* **TEST_GLOBE_KEY_SWITCHING (OPEN):** notes
* **TEST_KEYBOARDS_SEARCH (OPEN):** notes

@darcywong00 darcywong00 linked an issue Apr 29, 2026 that may be closed by this pull request
2 tasks
darcywong00 and others added 16 commits April 30, 2026 11:38
…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>
…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 🌋
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

feat: Localize keyboard search page

4 participants