Skip to content

docs: fix t.exists() documentation + example#3287

Merged
HiDeoo merged 3 commits intowithastro:mainfrom
HiDeoo:hd-docs-fix-t-exists
Jul 11, 2025
Merged

docs: fix t.exists() documentation + example#3287
HiDeoo merged 3 commits intowithastro:mainfrom
HiDeoo:hd-docs-fix-t-exists

Conversation

@HiDeoo
Copy link
Copy Markdown
Member

@HiDeoo HiDeoo commented Jul 10, 2025

Description

This PR updates the documentation for the t.exists() function in the i18n guide. It clarifies (and fixes) the usage of the function, including how to check if a translation key exists in a specific locale without considering fallback logic (which would be the behavior when using the lng option).

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 10, 2025

⚠️ No Changeset found

Latest commit: 1f6403b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Jul 10, 2025

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 1f6403b
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/68711b9c9783fb0008a318ed
😎 Deploy Preview https://deploy-preview-3287--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the 📚 docs Documentation website changes label Jul 10, 2025
@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Jul 10, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en guides/i18n.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this based on your experiences! Just left one small suggestion.

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

t.exists('better.docs') === true // 🥳

trueberryless added a commit to trueberryless/withastro-starlight that referenced this pull request Jul 10, 2025
@HiDeoo HiDeoo merged commit 60e39e2 into withastro:main Jul 11, 2025
15 checks passed
ArmandPhilippot added a commit to ArmandPhilippot/starlight that referenced this pull request Jul 12, 2025
HiDeoo added a commit to shubham-padia/starlight that referenced this pull request Jul 15, 2025
* main: (26 commits)
  [ci] release (withastro#3296)
  Fix slug override with `/` value (withastro#3293)
  i18n(fr): update `guides/i18n.mdx` (withastro#3294)
  i18n(ko-KR): update `i18n.mdx` (withastro#3292)
  [ci] release (withastro#3286)
  Revert withastro#3281 (withastro#3291)
  i18n(de): update `guides/i18n.mdx` (withastro#3289)
  Fix Astro i18n config default locale issue (withastro#3288)
  docs: fix `t.exists()` documentation + example (withastro#3287)
  Make targeting sidebar links with CSS a little easier (withastro#3281)
  i18n(fr): update `resources/plugins.mdx` (withastro#3284)
  Extract main padding to CSS custom property  (withastro#3282)
  i18n(de): update plugins translation (withastro#3285)
  i18n(ko-KR): update `plugins.mdx` (withastro#3283)
  Add link to the codeblock-fullscreen plugin (withastro#3279)
  Fix TabItem typo in zh-cn authoring-content.mdx (withastro#3268) (withastro#3269)
  [ci] format
  i18n(ru): update translations (withastro#3270)
  Update `sharp` in docs & examples to latest (withastro#3261)
  Add missing danish UI translations (withastro#3252)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 docs Documentation website changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants