-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
i18n(ja): update guides/imports.mdx
#12449
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
base: v6
Are you sure you want to change the base?
Conversation
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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パターンは文字列リテラルである必要があり、変数を含むことはできません。 | ||
|
||
また、グロブパターンは、以下のいずれかで始まる必要があります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
また、グロブパターンは、以下のいずれかで始まる必要があります。 | |
また、globパターンは、以下のいずれかで始まる必要があります。 |
rawContent(): string; | ||
/** (Markdownのみ)レイアウトHTMLを除いたHTMLにコンパイル済みのMarkdown */ | ||
compiledContent(): string; | ||
/* ファイル内の h1...h6 要素の配列を返す関数 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* ファイル内の h1...h6 要素の配列を返す関数 */ | |
/* ファイル内の h1〜h6 要素の配列を返す関数 */ |
和文では「h1~h6」の方が自然ですね!
|
||
Viteの[`import.meta.glob()`](https://vite.dev/guide/features.html#glob-import)は、globパターンで多数のファイルを一度にインポートする方法です。 | ||
|
||
`import.meta.glob()`は、インポートしたいローカルファイルを示す相対的な[globパターン](#globパターン)を引数として受け取ります。戻り値はマッチしたファイルのエクスポートの配列です。モジュールを同期的に読み込むには、第2引数に`{ eager: true }`を渡します。 |
There was a problem hiding this comment.
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()
を使ってから処理することになりそうです。
Description (required)
This PR adds japanese translations about
import.meta.glob
.Related issues & labels (optional)
For Astro version:
6.0
. See astro PR #14421.