-
Notifications
You must be signed in to change notification settings - Fork 5
Jm/translate startlight docs2 #160
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
Open
JonathanMatthey
wants to merge
70
commits into
main
Choose a base branch
from
jm/translate-startlight-docs2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 34 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
eec9f84
chore: added Astro's built i18n routing
JoblersTune 8c8f582
TMP
JoblersTune 79a5267
TMP
JoblersTune 4dd0b43
feat: added Starlight's built in internationalization
JoblersTune 95828bd
TMP
JoblersTune d05598c
TMP
JoblersTune b906491
chore: undo Starlight locale conflict. Can't be supported
JoblersTune 58da964
TMP
JoblersTune 8e9d88b
TMP
JoblersTune 1803b84
TMP experiment
JoblersTune cebe4e1
TMP undo experiment
JoblersTune c807f04
chore: removed defaultLocale
JoblersTune 16eac9a
chore: filtering blogs and building pages
JoblersTune 130d33a
chore: added a lang attribute for filtering and all slugs must be unique
JoblersTune 4f7f9eb
work in progress, dynamic routing to make language for all blog posts…
JoblersTune c8925d4
chore: add translation for nav items
Anca2022 e7e08d8
chore: add language switcher to navigation menu
Anca2022 2ab6b21
chore: set color for links in language switcher
Anca2022 992e7d6
chore: add translations for blog article paths
Anca2022 a2e4eb7
Merge pull request #141 from interledger/am/language-switcher
Anca2022 6c626f8
fix social icons
JonathanMatthey e5bc889
feat: add language switch to Startlight docs headers
JonathanMatthey 32363e2
feat: add i18n translation for interledgerprotocol page
JonathanMatthey cb542cf
fix: update nav to reflect main site
JonathanMatthey 497ba0d
fix: improve menu ES
JonathanMatthey d147194
add footer translation
JonathanMatthey 74280d0
feat: add hreflang tags for multilingual SEO
JonathanMatthey 4294c80
add couple of dummy ES posts
JonathanMatthey a0f95f1
add 1 more dummy ES blog post
JonathanMatthey aa7aff1
fix breadcrumps translation + links
JonathanMatthey e05a08c
temp - rm github social
JonathanMatthey a07be77
rm: dummy posts
JonathanMatthey 4d0f3bb
rm: translated doc page
JonathanMatthey 14914a2
fix: translation cumbre
JonathanMatthey 2ba7623
Update astro.config.mjs
JonathanMatthey 87e909d
Fix: use web font
JonathanMatthey 9d9df1d
Update src/i18n/ui.ts
JonathanMatthey 05e93b3
Update src/i18n/ui.ts
JonathanMatthey 46a3670
Update src/i18n/ui.ts
JonathanMatthey 9aef01e
Update src/i18n/ui.ts
JonathanMatthey e2b90d2
Update src/i18n/ui.ts
JonathanMatthey 6764952
update footer text
JonathanMatthey 8919aa3
update tech blog description
JonathanMatthey fe04415
fix: responsive languagepicker
JonathanMatthey 3f2beb8
fix: translate tech blog title /desc
JonathanMatthey 814c40d
fix: hreflang tags in head
JonathanMatthey 33b86d8
Update src/pages/blog/[...page].astro
JonathanMatthey bb6e359
Update src/i18n/ui.ts
JonathanMatthey 81c8341
fix lang
JonathanMatthey 05730bc
add translation t
JonathanMatthey 7a267dd
translatepath
JonathanMatthey 1b0e263
Update src/i18n/ui.ts
JonathanMatthey 2dff34f
1159 not 1160
JonathanMatthey 44b7ef9
hided language picker on dev page
JonathanMatthey 3d7104c
add /es path to Spanish landing page links
Anca2022 f5813b6
change ui Spanish translations to match those on the foundation website
Anca2022 f88d2cf
Merge branch 'main' into jm/translate-startlight-docs2
Anca2022 9bdefc5
format files
Anca2022 8bb218c
remove duplicate optional "lang" field from blog collection schema
Anca2022 a99f5a2
add lang to blog frontmatter where missing
Anca2022 47ef701
change font name to match the one on foundation
Anca2022 68f56a5
Add Spanish article “El Universo Interledger” to translation system
Anca2022 d1f1086
integrate tag filter component into Spanish blog page
Anca2022 e920a38
fix translating twice ES paths
Anca2022 bec8b2b
fix routing priority for es/blog/tag/[tag]
Anca2022 57b1f95
format and check if build problem is fixed
Anca2022 51b5fce
make LanguagePicker on FoundationHeader match the one on foundation w…
Anca2022 499e920
use SVG Astro components instead of ::after for better color control
Anca2022 9a5a524
limit allowed article tags via schema; remove workarounds
Anca2022 bf04f2a
format
Anca2022 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| --- | ||
| import { defaultLang } from "../i18n/ui"; | ||
| import { useTranslatedPath } from "../i18n/utils"; | ||
| const { lang } = Astro.props; | ||
| const path = Astro.url.pathname; | ||
| const translatePath = useTranslatedPath(defaultLang, lang); | ||
| --- | ||
|
|
||
| <div class="language-switcher-language-url" role="navigation"> | ||
| <ul class="links"> | ||
| <li | ||
| class:list={[lang === "en" && "is-active"]} | ||
| aria-current={lang === "en" ? "page" : undefined} | ||
| > | ||
| <a | ||
| href={translatePath(path, "en")} | ||
| class:list={["language-link", lang === "en" && "is-active"]} | ||
| hreflang="en-gb" | ||
| aria-current={lang === "en" ? "page" : undefined} | ||
| > | ||
| EN | ||
| </a> | ||
| </li> | ||
| <li | ||
| class:list={[lang === "es" && "is-active"]} | ||
| aria-current={lang === "es" ? "page" : undefined} | ||
| > | ||
| <a | ||
| href={translatePath(path, "es")} | ||
| class:list={["language-link", lang === "es" && "is-active"]} | ||
| hreflang="es" | ||
| aria-current={lang === "es" ? "page" : undefined} | ||
| > | ||
| ES | ||
| </a> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
|
|
||
| <style> | ||
| a { | ||
| text-decoration-color: transparent; | ||
| transition: text-decoration-color ease-in-out 200ms; | ||
| } | ||
|
|
||
| .language-switcher-language-url { | ||
| flex: none; | ||
| } | ||
|
|
||
| .language-switcher-language-url .links { | ||
| display: flex; | ||
| list-style: none; | ||
| padding: 0; | ||
| margin-inline-start: var(--space-2xs); | ||
| } | ||
|
|
||
| .language-switcher-language-url .links li:first-child::after { | ||
| display: inline-flex; | ||
| content: "|"; | ||
| } | ||
|
|
||
| .language-switcher-language-url .links a { | ||
| margin: var(--space-3xs); | ||
| padding: var(--space-xs) var(--space-2xs); | ||
| text-underline-offset: 8px; | ||
| text-decoration: underline 1.5px transparent; | ||
| color: var(--color-primary-fallback); | ||
| color: var(--color-primary); | ||
| } | ||
|
|
||
| .language-switcher-language-url .links a.is-active { | ||
| text-decoration-color: currentColor; | ||
| } | ||
|
|
||
| .language-switcher-language-url .links a:hover { | ||
| background-color: var(--color-nav-hover); | ||
| border-radius: var(--border-radius); | ||
| } | ||
|
|
||
| @media screen and (max-width: 1159px) { | ||
| .language-switcher-language-url { | ||
| position: absolute; | ||
| top: 25px; | ||
| right: calc(var(--space-m) + var(--space-xs) + 24px); | ||
| } | ||
| } | ||
| </style> |
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
Oops, something went wrong.
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.

Uh oh!
There was an error while loading. Please reload this page.