-
Notifications
You must be signed in to change notification settings - Fork 113
Translate docs/recipes/styling-css #76
Translate docs/recipes/styling-css #76
Conversation
docs/docs/recipes/styling-css.md
Outdated
| - [レイアウトコンポーネントについてもっと詳しく](/tutorial/part-three) | ||
|
|
||
| ## Using Styled Components | ||
| ## Styled コンポーネントを使う |
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.
Styled Componentsは製品名なので訳さなくて大丈夫です。
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.
該当箇所を修正しました🙇
uetchy
left a comment
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.
💪
docs/docs/recipes/styling-css.md
Outdated
| ``` | ||
|
|
||
| > **Note:** You can also make use of `require('./src/styles/global.css')` to import the global CSS file in your `gatsby-config.js` file. | ||
| > **補足:** `gatsby-config.js` の中で `require('./src/styles/global.css')` を使ってグローバル CSS ファイルをインポートすることもできます。 |
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.
他のドキュメントとの文言の統一のため、「ヒント」でお願いします。
| > **補足:** `gatsby-config.js` の中で `require('./src/styles/global.css')` を使ってグローバル CSS ファイルをインポートすることもできます。 | |
| > **ヒント:** `gatsby-config.js` の中で `require('./src/styles/global.css')` を使ってグローバル CSS ファイルをインポートすることもできます。 |
docs/docs/recipes/styling-css.md
Outdated
| ``` | ||
|
|
||
| _Note: You can use Sass/SCSS files as modules too, like mentioned in the previous recipe about CSS modules, with the difference that instead of .css the extensions have to be .scss or .sass_ | ||
| _メモ: .css のかわりに拡張子を .scss または .sass にしなければならないという違いがありますが、前の CSS モジュールのレシピで言及したように Sass/SCSS ファイルをモジュールとして使うこともできます。_ |
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.
文言の統一のため、ヒントでお願いします。
| _メモ: .css のかわりに拡張子を .scss または .sass にしなければならないという違いがありますが、前の CSS モジュールのレシピで言及したように Sass/SCSS ファイルをモジュールとして使うこともできます。_ | |
| _ヒント: .css のかわりに拡張子を .scss または .sass にしなければならないという違いがありますが、前の CSS モジュールのレシピで言及したように Sass/SCSS ファイルをモジュールとして使うこともできます。_ |
| ## Google Fonts を使う | ||
|
|
||
| Hosting your own [Google Fonts](https://fonts.google.com/) locally within a project means they won't have to be fetched over the network when your site loads, increasing your site's speed index by up to ~300 milliseconds on desktop and 1+ seconds on 3G. It's also recommended to limit custom font usage to only the essential for performance. | ||
| 独自の [Google Fonts](https://fonts.google.com/) をプロジェクト内でローカルにホスティングするということは、サイトのロード時にネットワークを越えてフォントを取得してくる必要がないということを意味し、あなたのサイトの Speed Index をデスクトップで ~300 ミリ秒まで、3G で 1+ 秒ほど向上させます。また、パフォーマンスのためにカスタムフォントの使用を本当に必要なものだけに絞ることが推奨されます。 |
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.
[imo] 「向上」だとマイナスであることが伝わりづらいと感じました。「遅延」のほうが伝わりやすいかも。
| 独自の [Google Fonts](https://fonts.google.com/) をプロジェクト内でローカルにホスティングするということは、サイトのロード時にネットワークを越えてフォントを取得してくる必要がないということを意味し、あなたのサイトの Speed Index をデスクトップで ~300 ミリ秒まで、3G で 1+ 秒ほど向上させます。また、パフォーマンスのためにカスタムフォントの使用を本当に必要なものだけに絞ることが推奨されます。 | |
| 独自の [Google Fonts](https://fonts.google.com/) をプロジェクト内でローカルにホスティングするということは、サイトのロード時にネットワークを越えてフォントを取得してくる必要がないということを意味し、あなたのサイトの Speed Index をデスクトップで ~300 ミリ秒まで、3G で 1+ 秒ほどの遅延が発生します。また、パフォーマンスのためにカスタムフォントの使用を本当に必要なものだけに絞ることが推奨されます。 |
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.
@Naturalclar
レビューありがとうございます!
ここの翻訳は結構迷いまして、追加のリソースにあるKyle Mathews' blog による実例を参照したのですが、そちらを読むと Google Fonts を普通に読み込むよりも faster なのかなと思ったのと、かつ原文で increasing にあたりそうなところが improve と書いてあったので向上としたのですが、これって遅くなるんですかね?
Self-hosting is significantly faster. Loading a typeface from Google Fonts or other hosted font service adds an extra (blocking) network request. In my testing, I’ve found replacing Google Fonts with a self-hosted font can improve a site’s speedindex by ~300 miliseconds on desktop and 1+ seconds on 3g. This is a big deal. YMMV on exact numbers but directionally, self-hosting is faster and importantly opens the door for further optimizations.
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.
自分が完全に読み違えてました、すみません!ここは向上で正しいですね:bow:
docs/docs/recipes/styling-css.md
Outdated
| ``` | ||
|
|
||
| _NOTE: So for the above example, the relevant CSS declaration would be `font-family: 'Source Sans Pro';`_ | ||
| _メモ: 上記の例の場合、ふさわしい CSS の宣言は `font-family: 'Source Sans Pro';` のようになります。_ |
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.
| _メモ: 上記の例の場合、ふさわしい CSS の宣言は `font-family: 'Source Sans Pro';` のようになります。_ | |
| _ヒント: 上記の例の場合、ふさわしい CSS の宣言は `font-family: 'Source Sans Pro';` のようになります。_ |
Naturalclar
left a comment
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.
PR ありがとうございます!いくつか Suggest したので確認お願いします。
|
@Naturalclar |
Naturalclar
left a comment
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.
LGTM! ありがとうございます! ヒントと注意に関しては、コンテキストによるかなと考えています。
基本的には「注意」は言葉が強いので重要なとき以外は避けたいです。
このページで言えば、斜体_で書かれてるところは_ヒント、強調されているところは文章の内容てきに注意で良いと思いました。
|
Holy buckets, @huffhuffman — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
概要
docs/recipes/styling-css の翻訳です。
レビューお願いいたします 🙇
チェックリスト
textlintを使って校正を行いました(推奨)Allow edits from maintainersにチェックを入れました。しばらく待ってもレビューが終わらなかったり、必要なレビュー数が足りない状態が続いた場合は、こちらからメンテナーを探して、@を付けてメンションを飛ばしてください。