Skip to content

i18n(ja): Update project-structure.mdx#2258

Merged
delucis merged 3 commits into
withastro:mainfrom
morinokami:i18n-ja-project-structure
Dec 31, 2022
Merged

i18n(ja): Update project-structure.mdx#2258
delucis merged 3 commits into
withastro:mainfrom
morinokami:i18n-ja-project-structure

Conversation

@morinokami
Copy link
Copy Markdown
Member

What kind of changes does this PR include?

  • New or updated content
  • Translated content

Description

  • Update project-structure.mdx.
  • Improve some existing translations.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 30, 2022

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5cc221e
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/63ae99752645160009f74fad
😎 Deploy Preview https://deploy-preview-2258--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 settings.

@github-actions github-actions Bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Dec 30, 2022
Comment on lines -8 to +9
CLIウィザードの `create-astro` で生成した新しいAstroプロジェクトには、いくつかのファイルとフォルダが含まれています。その他は自分で作成し、Astroの既存のファイル構成に追加します。
CLIウィザードの`create-astro`で生成した新しいAstroプロジェクトには、いくつかのファイルとフォルダが含まれています。その他は自分で作成し、Astroの既存のファイル構成に追加します。
Copy link
Copy Markdown
Member Author

@morinokami morinokami Dec 30, 2022

Choose a reason for hiding this comment

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

変更行数は意外と少なく、多くはこのような英単語のまわりの空白の削除(#2064 (comment) での話の続き)となります。

Comment on lines -25 to +49
よくあるプロジェクトディレクトリは次のような形です。

```
├── src/
│ ├── components/
│ │ ├── Header.astro
│ │ └-─ Button.jsx
│ ├── layouts/
│ │ └-─ PostLayout.astro
│ └── pages/
│ │ ├── posts/
│ │ │ ├── post1.md
│ │ │ ├── post2.md
│ │ │ └── post3.md
│ │ └── index.astro
│ └── styles/
│ └-─ global.css
├── public/
│ ├── robots.txt
│ ├── favicon.svg
│ └-─ social-image.png
├── astro.config.mjs
├── package.json
└── tsconfig.json

```
よくあるAstroプロジェクトのディレクトリは次のような形です。

<FileTree>
- public/
- robots.txt
- favicon.svg
- social-image.png
- src/
- components/
- Header.astro
- Button.jsx
- layouts/
- PostLayout.astro
- pages/
- posts/
- post1.md
- post2.md
- post3.md
- index.astro
- styles/
- global.css
- astro.config.mjs
- package.json
- tsconfig.json
</FileTree>
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

a11y 向上のために #2178 にて FileTree コンポーネントを使用するように変更されました。また、冒頭の原文は

A common Astro project directory might look like this:

となっており、"Astro" という単語が抜けているのがなんとなく気になったため、そのままでも問題はなかったのですが原文に合わせて追加しました。

## ディレクトリとファイル

Astroは、プロジェクトのために決められたディレクトリ構成を利用します。すべてのAstroプロジェクトのルートには、以下のディレクトリとファイルを含む必要があります。
Astroは、プロジェクトで独自のディレクトリ構成を利用します。すべてのAstroプロジェクトのルートには、以下のディレクトリとファイルを含む必要があります。
Copy link
Copy Markdown
Member Author

@morinokami morinokami Dec 30, 2022

Choose a reason for hiding this comment

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

ここは「プロジェクトのために決められた」というのが意味を取りづらい気がしたため、修正しました。原文は

Astro leverages an opinionated folder layout for your project.

です。opinionated は辞書では「自説を曲げない、意固地な」などと出てくるのですが、自分の感覚では「特定の意見や立場をベースとしている」というような意味だと思っており、ここでは「独自の」として訳出しました。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

opinionated、翻訳迷うんですよね。意見的な、こだわりの。みたいな意味だと認識してます。
ここは「独自の」と訳すmorinokamiさんの案が読みやすくてよさそうです。

Comment on lines -54 to +53
srcディレクトリには、プロジェクトのソースコードのほとんどが格納されています。これには以下が含まれます。
`src/`ディレクトリには、プロジェクトのソースコードのほとんどが格納されます。これには以下が含まれます。
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ここは単に

src

を原文に合わせて

`src/`

へと直しただけです。

Comment on lines -105 to +104
これは、JavaScriptのパッケージマネージャーが依存関係を管理するために使用するファイルです。また、Astroを実行するためによく使われるスクリプトを定義します(ex: `npm start`, `npm run build`)。
これは、JavaScriptのパッケージマネージャーが依存関係を管理するために使用するファイルです。また、Astroを実行するためによく使われるスクリプトを定義します(たとえば`npm start``npm run build`など)。
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

最後のカッコ内に訳し忘れがありました。

Comment on lines -107 to +106
`package.json` に指定できる依存関係には2種類あって `dependencies``devDependencies` があります。多くの場合、同じように動作します。Astroはビルド時に全ての依存関係を必要とし、パッケージマネージャーはどちらともインストールを行います。まずは `dependencies` にすべての依存関係を含め、特に必要な場合のみ `devDependencies` を利用することをおすすめします。
`package.json`には、`dependencies``devDependencies`という[2種類の依存関係](https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file)を指定できます。多くの場合、同じように動作します。Astroはビルド時に全ての依存関係を必要とし、パッケージマネージャーはどちらともインストールを行います。まずは`dependencies`にすべての依存関係を含め、特に必要な場合のみ`devDependencies`を利用することをおすすめします。
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ここはまず、https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file へのリンクが漏れていたため、それを追加しています。

また、もとの訳文は「依存関係には2種類あって、〜があります」というように「ある」が連続しており少しぎこちない感じがしたため、読みやすいように修正してあります。

なお、原文は

There are two kinds of dependencies you can specify in a package.json: dependencies and devDependencies.

となります。

Copy link
Copy Markdown
Contributor

@kyosuke kyosuke left a comment

Choose a reason for hiding this comment

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

@morinokami レビューしました。変更点を確認し、全文を最新の英語版とも比べました。
最新の変更がきちんと反映され、より読みやすくなっていると思います。
LGTM!

## ディレクトリとファイル

Astroは、プロジェクトのために決められたディレクトリ構成を利用します。すべてのAstroプロジェクトのルートには、以下のディレクトリとファイルを含む必要があります。
Astroは、プロジェクトで独自のディレクトリ構成を利用します。すべてのAstroプロジェクトのルートには、以下のディレクトリとファイルを含む必要があります。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

opinionated、翻訳迷うんですよね。意見的な、こだわりの。みたいな意味だと認識してます。
ここは「独自の」と訳すmorinokamiさんの案が読みやすくてよさそうです。

@delucis delucis merged commit b2cba84 into withastro:main Dec 31, 2022
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