Skip to content

Translate responsive-web-design-principles #7

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

Closed
wants to merge 24 commits into from
Closed

Translate responsive-web-design-principles #7

wants to merge 24 commits into from

Conversation

rainpure
Copy link
Contributor

@rainpure rainpure commented Jul 20, 2018

翻译章节

《响应式网页设计——设计原则》

变更文件

  • responsive-web-design-principles.json

  • responsive-web-design-principles.md

翻译进度

  • 100%

  • 100%

@S1ngS1ng S1ngS1ng added the ready for review Use when a translation (?) PR is ready for review label Jul 20, 2018
Copy link
Contributor

@S1ngS1ng S1ngS1ng left a comment

Choose a reason for hiding this comment

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

注意标点,整体上问题不大 👍

想问你下,对于原文:“Here's an example of a media query that returns the content when the device's width is less than or equal to 100px:” 这句话的 rerturns the content,你是如何理解的?你认为它里面的 content 是代表什么?

"localPath": "",
"disable": false,
"private_key": "~/.ssh/id_rsa"
}]
Copy link
Contributor

Choose a reason for hiding this comment

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

请把这个文件删掉。不需要提交。可以使用命令 git rm .vscode-upload.json,然后 commit push

Copy link
Contributor Author

Choose a reason for hiding this comment

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

content 我的理解是 “网页内容”

Copy link
Contributor

Choose a reason for hiding this comment

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

@rainpure 那天没想明白,现在想明白了,意思应该是“css 的内容”,就是后面大括号里定义的 css 规则。
当设备宽度小于或等于 100px 时,返回(括号里定义的 CSS )内容。

你考虑下,如何翻译合适吧 😄

"Here's an example of a media query that returns the content when the device's width is less than or equal to 100px:",
"媒体查询是 CSS3 中针对不同可视窗口大小定义不同样式的新技术,可视窗口是用户在网页上的可见区域,根据访问网站的设备不同而不同。",
"媒体查询由媒体类型组成,如果媒体类型与展示文档的设备类型匹配,则应用对应的样式。你可以在你的媒体查询中用上你想用的选择器和样式。",
"下面是一个媒体查询的例子:当设备宽度小于或等于 100px 时返回内容",
Copy link
Contributor

Choose a reason for hiding this comment

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

下面是一个媒体查询的例子:当设备宽度小于或等于 100px 时返回内容 =>

下面是一个媒体查询的例子,当设备宽度小于或等于 100px 时返回内容:

翻译的意思是对的,注意标点的使用

"<code>@media (max-width: 100px) { /* CSS Rules */ }</code>",
"and the following media query returns the content when the device's height is more than or equal to 350px:",
"以下媒体查询当设备高度大于或等于 350px 时返回内容:",
Copy link
Contributor

Choose a reason for hiding this comment

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

以下媒体查询当设备高度大于或等于 350px 时返回内容: =>
以下定义的媒体查询,是当设备高度大于或等于 350px 时返回内容:

注意通顺性,和标点

"Media Queries consist of a media type, and if that media type matches the type of device the document is displayed on, the styles are applied. You can have as many selectors and styles inside your media query as you want.",
"Here's an example of a media query that returns the content when the device's width is less than or equal to 100px:",
"媒体查询是 CSS3 中针对不同可视窗口大小定义不同样式的新技术,可视窗口是用户在网页上的可见区域,根据访问网站的设备不同而不同。",
"媒体查询由媒体类型组成,如果媒体类型与展示文档的设备类型匹配,则应用对应的样式。你可以在你的媒体查询中用上你想用的选择器和样式。",
Copy link
Contributor

Choose a reason for hiding this comment

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

文档 建议 => 网页

"text": "Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.",
"testString": "assert(code.match(/@media\\s?\\(max-height:\\s*?800px\\)/g), 'Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.');"
"text": "<code>height</code> 小于或等于 800px 的设备声明一个 <code>@media</code> 查询",
"testString": "assert(code.match(/@media\\s?\\(max-height:\\s*?800px\\)/g), '<code>height</code> 小于或等于 800px 的设备声明一个 <code>@media</code> 查询');"
Copy link
Contributor

Choose a reason for hiding this comment

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

给 <code>height</code> 小于或等于 800px 的设备声明一个 <code>@media</code> 查询 =>

使用 <code>@media</code> 为 <code>height</code> 小于或等于 800px 的设备添加一个媒体查询。

注意句号。
两行同步更新

"<blockquote>&lt;style&gt;<br>&nbsp;&nbsp;img { height: 250px; width: 250px; }<br>&lt;/style&gt;<br>&lt;img src=&quot;coolPic500x500&quot; alt=&quot;A most excellent picture&quot;&gt;</blockquote>",
"使图片出现 \"retina\" (优化在高分辨率设备下的展示)最简单的方式是定义它们的 <code>width</code> <code>height</code> 值为源文件宽高的一半。",
"这是一个图片宽高设置为源文件宽高一半的例子:",
"<blockquote>&lt;style&gt;<br>&nbsp;&nbsp;img { height: 250px; width: 250px; }<br>&lt;/style&gt;<br>&lt;img src=&quot;coolPic500x500&quot; alt=&quot;一个更高质的图片&quot;&gt;</blockquote>",
Copy link
Contributor

Choose a reason for hiding this comment

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

一个更高质的图片 => 一张高质量的图片

],
"tests": [
{
"text": "Your <code>img</code> tag should have a <code>width</code> of 100 pixels.",
"testString": "assert($('img').css('width') == '100px', 'Your <code>img</code> tag should have a <code>width</code> of 100 pixels.');"
"text": "你的 <code>img</code> 标签应含有 100 像素的 <code>width</code>。",
Copy link
Contributor

Choose a reason for hiding this comment

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

你的 <code>img</code> 标签应含有 100 像素的 <code>width</code>。 建议 =>

你的 <code>img</code> 标签的 <code>width</code> 应为 100 像素。

或:

你的 <code>img</code> 标签的 <code>width</code> 值应为 100px。

考虑到原文,应该采用第一种,不过为了整体统一,个人推荐第二种。

你来决定吧。下同

"Instead of using <code>em</code> or <code>px</code> to size text, you can use viewport units for responsive typography. Viewport units, like percentages, are relative units, but they are based off different items. Viewport units are relative to the viewport dimensions (width or height) of a device, and percentages are relative to the size of the parent container element.",
"The four different viewport units are:",
"<ul><li><code>vw: 10vw</code> would be 10% of the viewport's width.</li><li><code>vh: 3vh</code> would be 3% of the viewport's height.</li><li><code>vmin: 70vmin</code> would be 70% of the viewport's smaller dimension (height vs. width).</li><li><code>vmax: 100vmax</code> would be 100% of the viewport's bigger dimension (height vs. width).</li></ul>",
"除了用 <code>em</code> 或 <code>px</code> 去设置文本大小, 你还可以用视窗单位来控制排版。视窗单位,如百分比,是相对单位,但它们基于不同的元素。视口单元相对于设备的视口尺寸 (宽度或高度) ,百分比是相对于父级元素的大小。",
Copy link
Contributor

Choose a reason for hiding this comment

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

应改使用全角括号


https://developer.mozilla.org/zh-CN/docs/Web/CSS/length

image

统一成“视口”吧。(哎我觉得这个名字好奇怪 🤦‍♂️

下同

Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得在这点上,不能遵从 MDN 的翻译。

viewport => 视口(视图 + 端口 = 视口,这纯粹是字面翻译)
viewport => 视窗(视图 + 窗口 = 视窗,指可以看到的窗口)

我稍后会把常用名字翻译总结出来。

"<ul><li><code>vw: 10vw</code> would be 10% of the viewport's width.</li><li><code>vh: 3vh</code> would be 3% of the viewport's height.</li><li><code>vmin: 70vmin</code> would be 70% of the viewport's smaller dimension (height vs. width).</li><li><code>vmax: 100vmax</code> would be 100% of the viewport's bigger dimension (height vs. width).</li></ul>",
"除了用 <code>em</code> <code>px</code> 去设置文本大小, 你还可以用视窗单位来控制排版。视窗单位,如百分比,是相对单位,但它们基于不同的元素。视口单元相对于设备的视口尺寸 (宽度或高度) ,百分比是相对于父级元素的大小。",
"四个不同的视窗单位分别是:",
"<ul><li><code>vw: 10vw</code> 视窗宽度的 10%</li><li><code>vh: 3vh</code> 视窗高度的 3%。</li><li><code>vmin: 70vmin</code> 视窗中较小纬度的 70% (高度 vs. 宽度).</li><li><code>vmax: 100vmax</code> 视窗中较大纬度的 100% (高度 vs. 宽度)。</li></ul>",
Copy link
Contributor

Choose a reason for hiding this comment

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

<li><code>vw: 10vw</code> 视窗宽度的 10%。</li> 建议 =>
<li><code>vw</code>:如 <code>10vw</code> 的意思是视窗宽度的 10%。</li>

建议每个 li 都这样修改下

Before:
image

After:

image


视窗中较小纬度的 70% (高度 vs. 宽度) =>
视窗高度/宽度较小值的 70%。

视窗高度和宽度中较小值的 70%。

顺便,较大 那个也改下。“纬度” 不是很 make sense。“维度” 好像也不太对。
符号也要注意,结尾是句号,括号应该是全角

"<hr>",
"Set the <code>width</code> of the <code>h2</code> tag to 80% of the viewport's width and the <code>width</code> of the paragraph as 75% of the viewport's smaller dimension."
"设置 <code>h2</code> 标签 <code>width</code> 为视窗宽度的 80%,并且段落 <code>width</code> 为小尺寸视窗的 75%"
Copy link
Contributor

Choose a reason for hiding this comment

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

小尺寸视窗的 75%。 => 视窗高度和宽度中较小值的 70%

@S1ngS1ng S1ngS1ng added need update Use when a translation (?) PR has been reviewed and needs to address comments and removed ready for review Use when a translation (?) PR is ready for review labels Jul 22, 2018
@S1ngS1ng S1ngS1ng added ready for review Use when a translation (?) PR is ready for review comments addressed Use when a translation (?) PR has addressed all comments and removed need update Use when a translation (?) PR has been reviewed and needs to address comments labels Jul 23, 2018
],
"tests": [
{
"text": "Your <code>h2</code> tag should have a <code>width</code> of 80vw.",
"testString": "assert(code.match(/h2\\s*?{\\s*?width:\\s*?80vw;\\s*?}/g), 'Your <code>h2</code> tag should have a <code>width</code> of 80vw.');"
"text": "你的 <code>h2</code> 标签 <code>width</code> 应为 80vw。",
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的你的,是代词,可以省略,其他地方同理。

"Instead of using <code>em</code> or <code>px</code> to size text, you can use viewport units for responsive typography. Viewport units, like percentages, are relative units, but they are based off different items. Viewport units are relative to the viewport dimensions (width or height) of a device, and percentages are relative to the size of the parent container element.",
"The four different viewport units are:",
"<ul><li><code>vw: 10vw</code> would be 10% of the viewport's width.</li><li><code>vh: 3vh</code> would be 3% of the viewport's height.</li><li><code>vmin: 70vmin</code> would be 70% of the viewport's smaller dimension (height vs. width).</li><li><code>vmax: 100vmax</code> would be 100% of the viewport's bigger dimension (height vs. width).</li></ul>",
"除了用 <code>em</code> 或 <code>px</code> 去设置文本大小, 你还可以用视窗单位来控制排版。视窗单位,如百分比,是相对单位,但它们基于不同的元素。视口单元相对于设备的视口尺寸 (宽度或高度) ,百分比是相对于父级元素的大小。",
Copy link
Contributor

Choose a reason for hiding this comment

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

Viewport units 的翻译前面是视窗单位,后面是视口单元,不一致,以前者为准。

"<blockquote>img {<br>&nbsp;&nbsp;max-width: 100%;<br>&nbsp;&nbsp;display: block;<br>&nbsp;&nbsp;height: auto;<br>}</blockquote>",
"The <code>max-width</code> property of 100% scales the image to fit the width of its container, but the image won't stretch wider than its original width. Setting the <code>display</code> property to block changes the image from an inline element (its default), to a block element on its own line. The <code>height</code> property of auto keeps the original aspect ratio of the image.",
"<code>max-width</code> 属性能让图片以 100% 的最大宽度适应其父容器的宽度,但图片不会拉伸得比原始宽度还宽。将 <code>display</code> 属性设置为 block image 标签从内联元素(默认值)更改为行内块级元素。设置 <code>height</code> 属性为 auto 保持图片的原始宽高比",
Copy link
Contributor

Choose a reason for hiding this comment

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

display:block 对应的是块级元素
display:inline-block 对应的才是行内块级元素

"Media Queries are a new technique introduced in CSS3 that change the presentation of content based on different viewport sizes. The viewport is a user's visible area of a web page, and is different depending on the device used to access the site.",
"Media Queries consist of a media type, and if that media type matches the type of device the document is displayed on, the styles are applied. You can have as many selectors and styles inside your media query as you want.",
"Here's an example of a media query that returns the content when the device's width is less than or equal to 100px:",
"媒体查询是 CSS3 中针对不同可视窗口大小定义不同样式的新技术,可视窗口是用户在网页上的可见区域,根据访问网站的设备不同而不同。",
Copy link
Contributor

Choose a reason for hiding this comment

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

媒体查询是 CSS3 中引入的一项新技术,它可以根据不同的可视窗口大小显示不同的布局。

"<ul><li><code>vw: 10vw</code> would be 10% of the viewport's width.</li><li><code>vh: 3vh</code> would be 3% of the viewport's height.</li><li><code>vmin: 70vmin</code> would be 70% of the viewport's smaller dimension (height vs. width).</li><li><code>vmax: 100vmax</code> would be 100% of the viewport's bigger dimension (height vs. width).</li></ul>",
"除了用 <code>em</code> <code>px</code> 去设置文本大小, 你还可以用视窗单位来控制排版。视窗单位,如百分比,是相对单位,但它们基于不同的元素。视口单元相对于设备的视口尺寸 (宽度或高度) ,百分比是相对于父级元素的大小。",
"四个不同的视窗单位分别是:",
"<ul><li><code>vw: 10vw</code> 视窗宽度的 10%</li><li><code>vh: 3vh</code> 视窗高度的 3%。</li><li><code>vmin: 70vmin</code> 视窗中较小纬度的 70% (高度 vs. 宽度).</li><li><code>vmax: 100vmax</code> 视窗中较大纬度的 100% (高度 vs. 宽度)。</li></ul>",
Copy link
Contributor

Choose a reason for hiding this comment

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

dimension 在此处是尺寸的意思,和维度无关。

  • vmin: 70vmin 视窗中较小尺寸的 70% (高度 VS 宽度)。
  • vmax: 100vmax 视窗中较大尺寸的 100% (高度 VS 宽度)。
  • height vs. width 的正确翻译应该是:高度 VS 宽度,英文的 vs 要变成大写:VS,便于文字高度保持统一。

    "<blockquote>img {<br>&nbsp;&nbsp;max-width: 100%;<br>&nbsp;&nbsp;display: block;<br>&nbsp;&nbsp;height: auto;<br>}</blockquote>",
    "The <code>max-width</code> property of 100% scales the image to fit the width of its container, but the image won't stretch wider than its original width. Setting the <code>display</code> property to block changes the image from an inline element (its default), to a block element on its own line. The <code>height</code> property of auto keeps the original aspect ratio of the image.",
    "<code>max-width</code> 属性能让图片以 100% 的最大宽度适应其父容器的宽度,但图片不会拉伸得比原始宽度还宽。将 <code>display</code> 属性设置为 block image 标签从内联元素(默认值)更改为行内块级元素。设置 <code>height</code> 属性为 auto 保持图片的原始宽高比",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    这个地方的翻译不对,应统一为:
    将 <code>display</code> 属性设置为 <code>block</code> 可以让 image 标签从内联元素(默认值)更改为块级元素。

    "Instead of using <code>em</code> or <code>px</code> to size text, you can use viewport units for responsive typography. Viewport units, like percentages, are relative units, but they are based off different items. Viewport units are relative to the viewport dimensions (width or height) of a device, and percentages are relative to the size of the parent container element.",
    "The four different viewport units are:",
    "<ul><li><code>vw: 10vw</code> would be 10% of the viewport's width.</li><li><code>vh: 3vh</code> would be 3% of the viewport's height.</li><li><code>vmin: 70vmin</code> would be 70% of the viewport's smaller dimension (height vs. width).</li><li><code>vmax: 100vmax</code> would be 100% of the viewport's bigger dimension (height vs. width).</li></ul>",
    "除了用 <code>em</code> 或 <code>px</code> 去设置文本大小, 你还可以用视窗单位来控制排版。视窗单位,如百分比,是相对单位,但它们基于不同的元素。视口单元相对于设备的视口尺寸 (宽度或高度) ,百分比是相对于父级元素的大小。",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    我觉得在这点上,不能遵从 MDN 的翻译。

    viewport => 视口(视图 + 端口 = 视口,这纯粹是字面翻译)
    viewport => 视窗(视图 + 窗口 = 视窗,指可以看到的窗口)

    我稍后会把常用名字翻译总结出来。

    Copy link
    Contributor

    @S1ngS1ng S1ngS1ng left a comment

    Choose a reason for hiding this comment

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

    其他部分没问题了。那句话你考虑下吧,通顺就 OK 哈

    "<blockquote>img {<br>&nbsp;&nbsp;max-width: 100%;<br>&nbsp;&nbsp;display: block;<br>&nbsp;&nbsp;height: auto;<br>}</blockquote>",
    "The <code>max-width</code> property of 100% scales the image to fit the width of its container, but the image won't stretch wider than its original width. Setting the <code>display</code> property to block changes the image from an inline element (its default), to a block element on its own line. The <code>height</code> property of auto keeps the original aspect ratio of the image.",
    "<code>max-width</code> 属性能让图片以 100% 的最大宽度适应其父容器的宽度,但图片不会拉伸得比原始宽度还宽。将 <code>display</code> 属性设置为 <code>block</code> 可以让 image 标签从内联元素(默认值)更改为行内块级元素。设置 <code>height</code> 属性为 auto 保持图片的原始宽高比",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    结尾句号

    @S1ngS1ng S1ngS1ng added need update Use when a translation (?) PR has been reviewed and needs to address comments and removed comments addressed Use when a translation (?) PR has addressed all comments labels Jul 24, 2018
    @huluoyang huluoyang changed the title translate Responsive Web Design Principles -100% Translate Responsive Web Design Principles Jul 24, 2018
    @huluoyang huluoyang removed the ready for review Use when a translation (?) PR is ready for review label Jul 24, 2018
    @huluoyang huluoyang changed the title Translate Responsive Web Design Principles Translate responsive-web-design-principles Jul 24, 2018
    设置字体自适应
    Copy link
    Contributor

    @huluoyang huluoyang Jul 25, 2018

    Choose a reason for hiding this comment

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

    Typography => 排版
    对应第四小节的内容


    Today, there are many types of devices that can access the web. They range from large desktop computers to small mobile phones. These devices have different screen sizes, resolutions, and processing power. Responsive Web Design is an approach to designing web content that responds to the constraints of different devices. The page structure and CSS rules should be flexible to accommodate these differences. In general, design the page's CSS to your target audience. If you expect most of your traffic to be from mobile users, take a 'mobile-first' approach. Then add conditional rules for larger screen sizes. If your visitors are desktop users, then design for larger screens with conditional rules for smaller sizes. CSS gives you the tools to write different style rules, then apply them depending on the device displaying the page. This section will cover the basic ways to use CSS for Responsive Web Design.
    如今,从大屏的台式电脑到小屏的手机,我们有各式各样的设备可以上网。这些设备有着不同的屏幕尺寸、分辨率和处理能力。响应式网页设计是一种对内容应用不同约束条件的设计方法,能使页面结构和 CSS 规则能够灵活应用于不同设备之间的差异。一般来说,页面的 CSS 是设计给目标用户看的。如果你希望大部分流量来自移动端用户,采取“移动端优先”的设计方法,然后再为大屏幕添加展示规则。如果你的访客来自桌面用户,则为小尺寸屏幕设置额外规则。CSS 提供了书写不同样式规则的工具,然后根据显示网页的设备应用它们。本节将介绍使用 CSS 来响应 Web 设计的基本方法。
    Copy link
    Contributor

    @huluoyang huluoyang Jul 25, 2018

    Choose a reason for hiding this comment

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

    Responsive Web Design => 响应式 Web 设计
    Responsive Web Design is an approach to designing web content that responds to the constraints of different devices.
    响应式 Web 设计是一种能自如响应不同尺寸设备的设计方法。(不要按字面意思翻译)
    If you expect most of your traffic to be from mobile users, take a 'mobile-first' approach. Then add conditional rules for larger screen sizes.
    expect => 预计、期望
    hope => 希望
    如果你预计网站的大部分流量来自移动端,那么应该采取“移动端优先”的策略,再为 PC 端做兼容。
    如果你预计网站的大部分流量来自 PC 端,那么应该采取“PC 端优先”的策略,再为移动端做兼容。

    @@ -58,26 +58,26 @@
    "id": "587d78b1367417b2b2512b09",
    "title": "Make an Image Responsive",
    "description": [
    "Making images responsive with CSS is actually very simple. Instead of applying an absolute width to an element:",
    "CSS 来做图片自适应其实很简单。除了在元素上使用绝对宽度外:",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    用 CSS 来让图片自适应其实很简单。不要使用绝对单位:

    "<code>img { width: 720px; }</code>",
    "You can use:",
    "你还可以这样用:",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    你应该使用:

    "Here is an example of an image that is only using half of the original height and width:",
    "<blockquote>&lt;style&gt;<br>&nbsp;&nbsp;img { height: 250px; width: 250px; }<br>&lt;/style&gt;<br>&lt;img src=&quot;coolPic500x500&quot; alt=&quot;A most excellent picture&quot;&gt;</blockquote>",
    "为优化图片在高分辨率设备下的显示效果,最简单的方式是定义它们的 <code>width</code> 和 <code>height</code> 值为源文件宽高的一半。",
    "这是一个图片宽高设置为源文件宽高一半的例子:",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    这是一个图片宽高设置为源文件一半的例子:

    "<hr>",
    "Set the <code>width</code> of the <code>h2</code> tag to 80% of the viewport's width and the <code>width</code> of the paragraph as 75% of the viewport's smaller dimension."
    "设置 <code>h2</code> 标签 <code>width</code> 为视口宽度的 80%,并且段落 <code>width</code> 为视口高度和宽度中较小值的 70%。"
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    viewport 统一翻译为视窗,而不是视口,此处要全局修改。
    vmin和 vmax 对应的翻译中都丢掉了视窗,应该是视窗高度/宽度。

    "Instead of using <code>em</code> or <code>px</code> to size text, you can use viewport units for responsive typography. Viewport units, like percentages, are relative units, but they are based off different items. Viewport units are relative to the viewport dimensions (width or height) of a device, and percentages are relative to the size of the parent container element.",
    "The four different viewport units are:",
    "<ul><li><code>vw: 10vw</code> would be 10% of the viewport's width.</li><li><code>vh: 3vh</code> would be 3% of the viewport's height.</li><li><code>vmin: 70vmin</code> would be 70% of the viewport's smaller dimension (height vs. width).</li><li><code>vmax: 100vmax</code> would be 100% of the viewport's bigger dimension (height vs. width).</li></ul>",
    "除了用 <code>em</code> 或 <code>px</code> 去设置文本大小, 你还可以用视口单位来控制排版。视口单位,如百分比,是相对单位,但它们基于不同的元素。视口单元相对于设备的视口尺寸 (宽度或高度) ,百分比是相对于父级元素的大小。",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    responsive typography 响应式排版
    Viewport units, like percentages, are relative units, but they are based off different items.
    视窗单位还有百分比,它们都是相对单位,但却基于不同的参照物。

    在你的翻译中对于 Viewport units 的翻译不统一,一会是视窗单位,一会是视窗单元,请修正。

    "<blockquote>img {<br>&nbsp;&nbsp;max-width: 100%;<br>&nbsp;&nbsp;display: block;<br>&nbsp;&nbsp;height: auto;<br>}</blockquote>",
    "The <code>max-width</code> property of 100% scales the image to fit the width of its container, but the image won't stretch wider than its original width. Setting the <code>display</code> property to block changes the image from an inline element (its default), to a block element on its own line. The <code>height</code> property of auto keeps the original aspect ratio of the image.",
    "<code>max-width</code> 属性能让图片以 100% 的最大宽度适应其父容器的宽度,但图片不会拉伸得比原始宽度还宽。将 <code>display</code> 属性设置为 <code>block</code> 可以让 image 标签从内联元素(默认值)更改为块级元素。。设置 <code>height</code> 属性为 auto 保持图片的原始宽高比。",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    更改为块级元素。。设置

    这里多了个句号。。

    "text": "Your <code>img</code> tag should have a <code>height</code> of 100 pixels.",
    "testString": "assert($('img').css('height') == '100px', 'Your <code>img</code> tag should have a <code>height</code> of 100 pixels.');"
    "text": "<code>img</code> 标签应含有 100 像素的 <code>height</code>",
    "testString": "assert($('img').css('height') == '100px', '<code>img</code> 标签应含有 100 像素的 <code>height</code>');"
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    顺便,这里也改下吧,100px

    @S1ngS1ng S1ngS1ng added the :shipit: ship it Use when a translation (?) PR is ready for shipping label Jul 26, 2018
    @S1ngS1ng
    Copy link
    Contributor

    @rainpure 先 approve 了。记得改下,小问题

    @S1ngS1ng S1ngS1ng removed the need update Use when a translation (?) PR has been reviewed and needs to address comments label Jul 26, 2018
    @S1ngS1ng
    Copy link
    Contributor

    Perfect :shipit:

    @S1ngS1ng S1ngS1ng mentioned this pull request Jul 27, 2018
    S1ngS1ng added a commit that referenced this pull request Jul 27, 2018
    Add a pattern that captures .vscode.*\.json, as provided by #7
    @S1ngS1ng S1ngS1ng added need update Use when a translation (?) PR has been reviewed and needs to address comments and removed :shipit: ship it Use when a translation (?) PR is ready for shipping labels Jul 27, 2018
    @S1ngS1ng S1ngS1ng self-assigned this Jul 27, 2018
    @huluoyang
    Copy link
    Contributor

    huluoyang commented Jul 28, 2018

    #35 的 PR 中已成功 merge,所以此 PR 应 close。

    @huluoyang huluoyang closed this Jul 28, 2018
    demongodYY pushed a commit to demongodYY/challenges that referenced this pull request Jul 30, 2018
    Add a pattern that captures .vscode.*\.json, as provided by FreeCodeCampChina#7
    LynnLian pushed a commit to LynnLian/challenges that referenced this pull request Jul 30, 2018
    Add a pattern that captures .vscode.*\.json, as provided by FreeCodeCampChina#7
    SSShooter pushed a commit to SSShooter/challenges that referenced this pull request Sep 7, 2018
    Add a pattern that captures .vscode.*\.json, as provided by FreeCodeCampChina#7
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    need update Use when a translation (?) PR has been reviewed and needs to address comments
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants