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

Translate basic-css #49

Open
wants to merge 13 commits into
base: translate
Choose a base branch
from

Conversation

silentsvv
Copy link
Contributor

进度10/43。

}
"text": "<code>h2</code> 元素 <code>style</code> 属性的值应该以 <code>;</code> 结束。",
"testString": "assert(code.match(/<h2\\s+style\\s*=\\s*(\\'|\")\\s*color\\s*:\\s*(?:rgb\\(\\s*255\\s*,\\s*0\\s*,\\s*0\\s*\\)|rgb\\(\\s*100%\\s*,\\s*0%\\s*,\\s*0%\\s*\\)|red|#ff0000|#f00|hsl\\(\\s*0\\s*,\\s*100%\\s*,\\s*50%\\s*\\))\\s*\\;(\\'|\")>\\s*CatPhotoApp\\s*<\\/h2>/),'<code>h2</code> 元素 <code>style</code> 属性的值应该以 <code>;</code> 结束。');"

Copy link
Contributor

Choose a reason for hiding this comment

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

这个地方误删了 }

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.

@silentsvv 这个 PR 里好像包含了之前 merge 过的 PR 的改动?你再确认下吧。可能是你没有 rebase

@S1ngS1ng S1ngS1ng added the need update Use when a translation (?) PR has been reviewed and needs to address comments label Aug 5, 2018
@silentsvv
Copy link
Contributor Author

我先提交后面翻译的,我看看是啥问题。

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.

整体上不错。

注意,tests 里面的内容,翻译的时候尽量不要翻译成动作(行为),而应该是一种结果

给你的<code>div</code>元素添加<code>silver-background</code>class。

VS

<code>div</code>元素背景颜色应设置为<code>silver</code>。

后者稍好。不必逐字逐句翻译

"So, let's go ahead and import and apply a Google font (note that if Google is blocked in your country, you will need to skip this challenge).",
"To import a Google Font, you can copy the font(s) URL from the Google Fonts library and then paste it in your HTML. For this challenge, we'll import the <code>Lobster</code> font. To do this, copy the following code snippet and paste it into the top of your code editor(before the opening <code>style</code> element):",
"除了大多数系统提供的默认字体以外,我们也可以在我们的网站上使用自定义的字体。网络上有各种各样的字体,不过在这个例子中,我们将会尝试使用<code>Google</code>字体库。",
"<a href='https://fonts.google.com/' target='_blank'>Google 字体</a> 是一个免费的字体库,可以通过在 CSS 里面设置字体的 URL 来引用。",
Copy link
Contributor

Choose a reason for hiding this comment

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

这个 a 之后不需要空格

"除了大多数系统提供的默认字体以外,我们也可以在我们的网站上使用自定义的字体。网络上有各种各样的字体,不过在这个例子中,我们将会尝试使用<code>Google</code>字体库。",
"<a href='https://fonts.google.com/' target='_blank'>Google 字体</a> 是一个免费的字体库,可以通过在 CSS 里面设置字体的 URL 来引用。",
"因此,下一步,我们将引入和使用<code>Google</code>字体(注意:如果你所在国家禁止使用<code>Google</code>,则可以跳过这个挑战)。",
"引入<code>Google</code>字体,你需要复制<code>Google</code>字体的 URL,并粘贴到你的 HTML 里面。在这个挑战中,我们需要引入<code>Lobster</code>字体。因此,请复制以下代码段,并粘贴到你的代码编辑器顶部。(在<code>style</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>style</code>标签之前)。 =>
并粘贴到你的代码编辑器顶部(<code>style</code>标签之前)。

并粘贴到你的代码编辑器顶部,即放到<code>style</code>标签之前。

推荐后者

"<hr>",
"Create a <code>font-family</code> CSS rule that uses the <code>Lobster</code> font, and ensure that it will be applied to your <code>h2</code> element."
"创建一个CSS规则,<code>font-family</code>属性里设置为<code>Lobster</code>字体,并确保适用于你所有的<code>h2</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>h2</code>元素。 =>
并把这个字体应用到所有的<code>h2</code>元素。

"There are several default fonts that are available in all browsers. These generic font families include <code>monospace</code>, <code>serif</code> and <code>sans-serif</code>",
"When one font isn't available, you can tell the browser to \"degrade\" to another font.",
"For example, if you wanted an element to use the <code>Helvetica</code> font, but degrade to the <code>sans-serif</code> font when <code>Helvetica</code> wasn't available, you will specify it as follows:",
"所有浏览器都有几种默认字体。这些通用字体包括<code>monospace</code>,<code>serif</code>和<code>sans-serif</code>",
Copy link
Contributor

Choose a reason for hiding this comment

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

句号

"For example, if you wanted an element to use the <code>Helvetica</code> font, but degrade to the <code>sans-serif</code> font when <code>Helvetica</code> wasn't available, you will specify it as follows:",
"所有浏览器都有几种默认字体。这些通用字体包括<code>monospace</code><code>serif</code><code>sans-serif</code>",
"当字体不可用,你可以告诉浏览器通过 “降级” 去使用其他字体。",
"例如,如果你想将一个元素的字体设置成<code>Helvetica</code>,当<code>Helvetica</code>不可用时,降级使用<code>sans-serif</code>字体,可使用以下方法:",
Copy link
Contributor

Choose a reason for hiding this comment

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

可使用以下方法: =>
那么可以这样写:

},
{
"text": "The border around your <code>img</code> element should be green.",
"testString": "assert($(\"img\").css(\"border-left-color\") === \"rgb(0, 128, 0)\", 'The border around your <code>img</code> element should be green.');"
"text": "你<code>img</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>",
"You can specify a <code>border-radius</code> with pixels. Give your cat photo a <code>border-radius</code> of <code>10px</code>.",
"Note: this challenge allows for multiple possible solutions. For example, you may add <code>border-radius</code> to either the <code>.thick-green-border</code> class or the <code>.smaller-image</code> class."
"<code>border-radius</code>可以用<code>px</code>像素单位来赋值。 给你的猫咪图片设置 10px 的<code>border-radius</code>。",
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": "Give your <code>div</code> element the class <code>silver-background</code>.",
"testString": "assert($(\"div\").hasClass(\"silver-background\"), 'Give your <code>div</code> element the class <code>silver-background</code>.');"
"text": "给你的<code>div</code>元素添加<code>silver-background</code>class。",
Copy link
Contributor

Choose a reason for hiding this comment

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

你的<code>div</code>元素应有<code>silver-background</code>class。

"However, an <code>id</code> is not reusable and should only be applied to one element. An <code>id</code> also has a higher specificity (importance) than a class so if both are applied to the same element and have conflicting styles, the styles of the <code>id</code> will be applied.",
"Here's an example of how you can take your element with the <code>id</code> attribute of <code>cat-photo-element</code> and give it the background color of green. In your <code>style</code> element:",
"通过<code>id</code>属性,你可以做一些很酷的事情,例如,就像 class 一样,你可以使用CSS来设置他们的样式",
"可是,<code>id</code>不可以重用,只应用于一个元素上。同时,在 CSS 里,<code>id</code>的优先级要高于 <code>class</code>,如果一个元素同时应用了 <code>class</code> 和 <code>id</code>,并设置样式有冲突,会优先应用 <code>id</code> 的样式。",
Copy link
Contributor

Choose a reason for hiding this comment

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

空格有问题

@@ -1559,27 +1559,28 @@
"id": "bad87fee1248bd9aedf08824",
"title": "Add Different Margins to Each Side of an Element",
"description": [
"有时候,你会想给一个元素每个方向的<code>margin</code>都设置成一个特定的值。",
Copy link
Contributor

Choose a reason for hiding this comment

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

底下的原文要删掉

@silentsvv
Copy link
Contributor Author

已经处理好了~ @S1ngS1ng 辛苦了!

@silentsvv silentsvv closed this Aug 8, 2018
@silentsvv silentsvv reopened this Aug 8, 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.

Thanks 👍

@S1ngS1ng S1ngS1ng added :shipit: ship it Use when a translation (?) PR is ready for shipping and removed need update Use when a translation (?) PR has been reviewed and needs to address comments labels Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:shipit: ship it Use when a translation (?) PR is ready for shipping
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants