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(ja): Add publish-to-npm.mdx #11048

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

t0yohei
Copy link
Contributor

@t0yohei t0yohei commented Feb 24, 2025

Description (required)

Add publish-to-npm.mdx in Japanese.

Related issues & labels (optional)

  • Suggested label: i18n
  • My Astro Discord username: t0yohei

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Feb 24, 2025
Copy link

netlify bot commented Feb 24, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 34282cf
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/67bda7ab1400ad00085954dc
😎 Deploy Preview https://deploy-preview-11048--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 site configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Feb 24, 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/reference/publish-to-npm.mdx Localization added, 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.

@t0yohei t0yohei force-pushed the i18n-ja-reference-publish-to-npm branch from e2b8b42 to 34282cf Compare February 25, 2025 11:21
## パッケージの作成

:::note[必要知識]
この章に入る前に、以下の基本的なことを理解しておくとよいでしょう:
Copy link
Contributor

Choose a reason for hiding this comment

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

細かいですが、句読点にしてください。

この章に入る前に、以下の基本的なことをしっかりとしておいてください:

この章に入る前に、以下の基本的なことをしっかりとしておいてください。


この例では、`my-project`という名前のプロジェクトに、`my-component`という単一のパッケージと、コンポーネントのテストとデモ用の`demo/`ディレクトリを作成します。

これはプロジェクトルートの`package.json`ファイルで設定されます:
Copy link
Contributor

Choose a reason for hiding this comment

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

細かいですが、句読点にしてください。

これはプロジェクトルートの package.jsonファイルで設定されます:

これはプロジェクトルートの package.jsonファイルで設定されます。


Astroは現在、テストランナーを提供していません。_(この機能の開発に協力していただける方は、[Discordに参加してください!](https://astro.build/chat))_

当面のテストに関する推奨事項は以下の通りです:
Copy link
Contributor

Choose a reason for hiding this comment

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

細かいですが、句読点にしてください。

当面のテストに関する推奨事項は以下の通りです:

当面のテストに関する推奨事項は以下の通りです。


コンポーネントに関連するキーワードの配列で、他のユーザーが[npmでコンポーネントを見つける](https://www.npmjs.com/search?q=keywords:astro-component,withastro)のに役立ち、その他の検索カタログでも使用されます。

Astroエコシステムでの発見可能性を最大限に高めるために、特別なキーワードとして`astro-component`または`withastro`を追加してください。
Copy link
Contributor

Choose a reason for hiding this comment

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

発見可能性 に違和感を感じたので 発見性 にしました。

Astroエコシステムでの発見可能性を最大限に高めるために、特別なキーワードとしてastro-componentまたはwithastroを追加してください。

Astroエコシステムでの発見性を最大限に高めるために、特別なキーワードとしてastro-componentまたはwithastroを追加してください。


## パッケージの開発

Astroには開発専用の「パッケージモード」はありません。代わりに、プロジェクト内でパッケージを開発およびテストするためのデモプロジェクトを使用する必要があります。これは開発専用のプライベートウェブサイトでも、パッケージのための公開デモ/ドキュメントウェブサイトでも構いません。
Copy link
Contributor

@n-tong009 n-tong009 Feb 28, 2025

Choose a reason for hiding this comment

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

細かいですが ウェブweb の方がいいのかなと感じました。

Astroには開発専用の「パッケージモード」はありません。代わりに、プロジェクト内でパッケージを開発およびテストするためのデモプロジェクトを使用する必要があります。これは開発専用のプライベートウェブサイトでも、パッケージのための公開デモ/ドキュメントウェブサイトでも構いません。

Astroには開発専用の「パッケージモード」はありません。代わりに、プロジェクト内でパッケージを開発およびテストするためのデモプロジェクトを使用する必要があります。これは開発専用のプライベートwebサイトでも、パッケージのための公開デモ/ドキュメントwebサイトでも構いません。

Copy link
Contributor

@n-tong009 n-tong009 left a comment

Choose a reason for hiding this comment

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

@t0yohei
確認いたしました。
細かいですが諸々コメントを記載しましたのでご確認お願いいたします。


3. 各ページには、テストしたいコンポーネントの使用例を含めます。

4. `astro build`を実行してfixturesをビルドし、`dist/__fixtures__/`ディレクトリの出力を期待する結果と比較します。
Copy link
Contributor

Choose a reason for hiding this comment

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

細かいですが、下記の方が読みやすく感じました。

  1. astro buildを実行してfixturesをビルドし、dist/__fixtures__/ディレクトリの出力を期待する結果と比較します。
  2. astro buildを実行してfixturesをビルドし、dist/__fixtures__/ディレクトリの出力を期待する結果と比較します。


パッケージの準備ができたら、`npm publish`コマンドを使用してnpmに公開できます。失敗した場合は、`npm login`でログインしているか、`package.json`が正しいかを確認してください。成功すれば完了です!

Astroパッケージには`build`ステップが不要であることに注目してください。`.astro``.ts``.jsx``.css`などのAstroがネイティブにサポートするファイルタイプは、ビルドステップなしで直接公開できます。
Copy link
Contributor

Choose a reason for hiding this comment

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

変なところで改行してしまっているので、いっその事先に改行させていいのかなと思いました。

Astroパッケージにはbuildステップが不要であることに注目してください。.astro.ts.jsx.cssなどのAstroがネイティブにサポートするファイルタイプは、ビルドステップなしで直接公開できます。

Astroパッケージにはbuildステップが不要であることに注目してください。
.astro.ts.jsx.cssなどのAstroがネイティブにサポートするファイルタイプは、ビルドステップなしで直接公開できます。

あなたの成果を[インテグレーションライブラリ](https://astro.build/integrations/)に追加して、共有しましょう!

:::tip
インテグレーションの構築に助けが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?[Discordサーバー](https://astro.build/chat)に専用の`#integrations`チャンネルがあります。ぜひ挨拶に来てください!
Copy link
Contributor

Choose a reason for hiding this comment

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

違和感を感じたので微調整させていただきました。

インテグレーションの構築に助けが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?Discordサーバーに専用の#integrationsチャンネルがあります。ぜひ挨拶に来てください!

インテグレーションの構築にサポートが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?Discordサーバーに専用の#integrationsチャンネルがあります。ぜひお越しください!

Copy link
Contributor

Choose a reason for hiding this comment

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

この修正を簡単に承認できるように変更点を追加しておきました。


インテグレーションライブラリは、`package.json`から`name``description``repository``homepage`のデータを読み取ります。

アバターはライブラリであなたのブランドを際立たせる素晴らしい方法です!パッケージを公開したら、アバターを添付して[GitHubのイシューを作成](/~https://github.com/withastro/astro.build/issues/new/choose)してください。リストに追加します。
Copy link
Contributor

Choose a reason for hiding this comment

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

調整しました。

アバターはライブラリであなたのブランドを際立たせる素晴らしい方法です!パッケージを公開したら、アバターを添付してGitHubのイシューを作成してください。リストに追加します。

アバターは、ライブラリ内でブランドをアピールするのに最適です!パッケージを公開したら、アバターを添付GitHubのイシューを作成してください。リストに追加します。

Copy link
Contributor

@SnowDingo SnowDingo left a comment

Choose a reason for hiding this comment

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

@t0yohei さん、翻訳ありがとうございます。

変更点は既に @n-tong009 さんがほぼ出していたのであまりないのですが、いくつか細かい所があるのでそこは確認していただけると幸いです。

よろしくお願いします。


## クイックスタート

コンポーネントの開発をすぐに始めるには、すでにセットアップされたテンプレートを使用できます。
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
コンポーネントの開発をすぐに始めるには、すでにセットアップされたテンプレートを使用できます
すでにセットアップされたテンプレートを使用することでコンポーネントの開発をすぐに始められます

あなたの成果を[インテグレーションライブラリ](https://astro.build/integrations/)に追加して、共有しましょう!

:::tip
インテグレーションの構築に助けが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?[Discordサーバー](https://astro.build/chat)に専用の`#integrations`チャンネルがあります。ぜひ挨拶に来てください!
Copy link
Contributor

Choose a reason for hiding this comment

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

この修正を簡単に承認できるように変更点を追加しておきました。

あなたの成果を[インテグレーションライブラリ](https://astro.build/integrations/)に追加して、共有しましょう!

:::tip
インテグレーションの構築に助けが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?[Discordサーバー](https://astro.build/chat)に専用の`#integrations`チャンネルがあります。ぜひ挨拶に来てください!
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
インテグレーションの構築に助けが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?[Discordサーバー](https://astro.build/chat)に専用の`#integrations`チャンネルがあります。ぜひ挨拶に来てください!
インテグレーションの構築にサポートが必要ですか?あるいは他のインテグレーション開発者と交流したいですか?Discordサーバーに専用の#integrationsチャンネルがあります。ぜひお越しください

アバターはライブラリであなたのブランドを際立たせる素晴らしい方法です!パッケージを公開したら、アバターを添付して[GitHubのイシューを作成](/~https://github.com/withastro/astro.build/issues/new/choose)してください。リストに追加します。

:::tip
NPMから読み取った情報を上書きする必要がありますか?問題ありません!更新された情報を添えて[イシューを作成](/~https://github.com/withastro/astro.build/issues/new/choose)してください。カスタムの`name``description``homepage`が使用されるようにします。
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
NPMから読み取った情報を上書きする必要がありますか?問題ありません!更新された情報を添えて[イシューを作成](/~https://github.com/withastro/astro.build/issues/new/choose)してください。カスタムの`name``description``homepage`が使用されるようにします
NPMから取得した情報を上書きする必要がありますか?問題ありません!更新後の情報を添えて[イシューを作成](/~https://github.com/withastro/astro.build/issues/new/choose)してください。カスタムの`name``description``homepage`が適応されるようにします

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.

4 participants