Skip to content

Conversation

tkskto
Copy link
Contributor

@tkskto tkskto commented Sep 27, 2025

Description (required)

This PR adds japanese translations about import.meta.glob.

Related issues & labels (optional)

For Astro version: 6.0. See astro PR #14421.

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Sep 27, 2025
@astrobot-houston
Copy link
Contributor

astrobot-houston commented Sep 27, 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

File Note
ja/guides/imports.mdx Localization changed, will be marked as complete.
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

netlify bot commented Sep 27, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fc6ab42
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/68d7e417ac06a80008c0070b
😎 Deploy Preview https://deploy-preview-12449--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Contributor

@jp-knj jp-knj left a comment

Choose a reason for hiding this comment

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

Thanks so much for the PR and for keeping the ja docs up to date.

this is a great improvement overall 👍🏿
I left a few small suggestions. If you can address these, I’m happy to approve.


`import.meta.glob()`を使用する場合、引数として指定するglobパターンは文字列リテラルである必要があり、変数を含むことはできません。

また、グロブパターンは、以下のいずれかで始まる必要があります。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
また、グロブパターンは、以下のいずれかで始まる必要があります。
また、globパターンは、以下のいずれかで始まる必要があります。

rawContent(): string;
/** (Markdownのみ)レイアウトHTMLを除いたHTMLにコンパイル済みのMarkdown */
compiledContent(): string;
/* ファイル内の h1...h6 要素の配列を返す関数 */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/* ファイル内の h1...h6 要素の配列を返す関数 */
/* ファイル内の h1h6 要素の配列を返す関数 */

和文では「h1~h6」の方が自然ですね!


Viteの[`import.meta.glob()`](https://vite.dev/guide/features.html#glob-import)は、globパターンで多数のファイルを一度にインポートする方法です。

`import.meta.glob()`は、インポートしたいローカルファイルを示す相対的な[globパターン](#globパターン)を引数として受け取ります。戻り値はマッチしたファイルのエクスポートの配列です。モジュールを同期的に読み込むには、第2引数に`{ eager: true }`を渡します。
Copy link
Contributor

@jp-knj jp-knj Oct 4, 2025

Choose a reason for hiding this comment

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

感想です。

日本語のドキュメントしか、確認できてないんですが
import.meta.glob() の戻り値は配列ではなくオブジェクト(連想配列)なのかなと考えていました。配列で扱いたいなら Object.values() を使ってから処理することになりそうです。

https://vite.dev/guide/features.html#glob-import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants