Skip to content
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

i18n overhaul #365

Merged
merged 50 commits into from
Apr 26, 2022
Merged

i18n overhaul #365

merged 50 commits into from
Apr 26, 2022

Commits on Apr 20, 2022

  1. Configuration menu
    Copy the full SHA
    91a0a7b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    962bf01 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2022

  1. Configuration menu
    Copy the full SHA
    5136a75 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    591a10b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fd1999c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0670922 View commit details
    Browse the repository at this point in the history
  5. Re-org German navbar as POC

    delucis committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    d893e32 View commit details
    Browse the repository at this point in the history
  6. Comments

    delucis committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    0aa6346 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    09e3ad8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    28592d5 View commit details
    Browse the repository at this point in the history
  9. Tweak German sidebar labels

    delucis committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    ae276e4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ebc9bdd View commit details
    Browse the repository at this point in the history
  11. Revert whitespace change

    delucis committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    796d1f8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1e6c968 View commit details
    Browse the repository at this point in the history
  13. Rename UI translation files

    delucis committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    9f18ca4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5112864 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3898be3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f1de5c0 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2022

  1. Configuration menu
    Copy the full SHA
    7ff1691 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffd5819 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    803dd6a View commit details
    Browse the repository at this point in the history
  4. Stop supporting localized slugs

    Decision made based on this high tech, large sample size polling data: https://discord.com/channels/830184174198718474/867764597838184478/966981090831126559
    delucis committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    d1b474d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4fc604d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d7741a4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    424033a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    139b8e7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d6f1510 View commit details
    Browse the repository at this point in the history
  10. Refactor fallback content generation

    Relies only on the existence of `.md` files to decide how to generate fallback pages rather than relying on the navigation contents as previously.
    
    This is possible now that slugs are consistent across locales and helps for cases where a nav link isn’t for an actual page (“Installation” currently hits a redirect route for example).
    delucis committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    b21eb10 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f1ddc87 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2022

  1. Configuration menu
    Copy the full SHA
    db7377a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dc79ee1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4edca6d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    31507db View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d5fb3a8 View commit details
    Browse the repository at this point in the history
  6. Upgrade Astro to 1.0.0-beta.17

    Brings in some fixes for Markdown Content component
    delucis committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    6512da9 View commit details
    Browse the repository at this point in the history
  7. Don’t pass Content component through props

    Something about how components are rendered goes wrong on build (not during dev) if we pass `Content` out of `getStaticProps` via props. Explicitly globbing the content again inside the page itself seems to fix this 🤷
    delucis committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    98ed9e2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5f11662 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    485a178 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    80b2e28 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2022

  1. Rename file for clarity

    delucis committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    3f0eb01 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b1f595d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c1e05c2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6e92683 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3d495ed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bc93d1b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1283d89 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bcac7b6 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2022

  1. perf: Avoid globbing all Markdown files

    We tag navigation sidebar entries as “fallback” content based on if the slug exists for a given language. Previously I did this using Vite’s `import.meta.glob('../pages/**/*.md)` to grab the URLs of all pages. Although this shouldn’t load content (you need `globEager` for that), this still seemed to trigger Astro processing *all* Markdown pages. Unsurprisingly, this was slow — HMR of ~10s for a single page edit 😬
    
    I’ve replaced the glob by recursively reading the pages directory when needed using `fs.readdir`. Avoiding globbing also means we can target *only* the relevant language instead of all pages. That brings reloads back down to 100–200ms in dev.
    
    There is a disadvantage: if new pages are added while running `dev`, the navbar may be cached for previously visited pages and because we’re not using `glob`, Vite/Astro don’t know we’re depending on files, so won’t invalidate that cache. Not sure if there’s a workaround? But still, this solution seems preferable to waiting 10 seconds each time you make an edit.
    delucis committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    adb545d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b9f60bb View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. Configuration menu
    Copy the full SHA
    ff252d9 View commit details
    Browse the repository at this point in the history