Coder Social home page Coder Social logo

f2ex / mdc-web-cn Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 2.0 49.44 MB

Modular and customizable Material Design UI components for the web (MDC-Web) 中文文档

Home Page: http://mdcui.com/

License: Apache License 2.0

TypeScript 29.80% HTML 7.01% JavaScript 35.61% CSS 3.26% Vue 24.31%

mdc-web-cn's People

Contributors

acdvorak avatar addyosmani avatar amsheehan avatar anton-kachurin avatar bbosman avatar f2ex avatar garbee avatar greenkeeper[bot] avatar jasonmayes avatar lynnmercier avatar mco-gh avatar mikemitterer avatar nicolasgarnier avatar oddui avatar passy avatar paulkinlan avatar rahul-sagore avatar robzenn92 avatar samccone avatar samthor avatar seanbannister avatar sgomes avatar sindresorhus avatar skaree avatar surma avatar touficbatache avatar traviskaufman avatar trimox avatar x1ddos avatar yeelan0319 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mdc-web-cn's Issues

技术文章翻译规范

翻译规范就像代码规范一样,没有绝对的理由,下面有的规定你可能不喜欢不赞同,不过如果大家都遵守的话,最终出来的译文将比较统一。翻译规范同样地可以粗略分为两大部分:

  • 书写规范。这个是技术层面,实行起来简单,是硬规范,必须遵守。
  • 内容规范。这个跟个人的翻译水平相关,是软规范,只是指导,但是直接关乎翻译质量,不能忽视。

书写规范

标点符号

中文使用中文标点符号。有时,直接在原文上修改,可能不修改标点符号,特别是逗号,小括号。这是不对的。

对于引号,如果是英文使用英文引号。

空格

中文与英文、数字之间加空格。

斜体

中文不推荐用斜体,可酌情改为粗体。

缩略词

缩略词或名牌名,与官方的书写统一,比如:HTML, CSS,JavaScript,MDC-Web。

参考

内容规范

翻译三难:“信、达、雅”。对于技术文章来说,主要追求 “信、达”。

专有名词

专有名词,如果没有约定俗成的翻译,可以不译,如果翻译请附注英文。

有的专有名词不需要翻译,比如 HTML。

翻译组织者应当给出一份术语对照表。

代码

只翻译注释。语句部分,包括变量名等,不翻译。

人称代词

英文的句子通常不能缺少主语,而中文经常省略主语。文档中的 "you" 基本上可以省略。必须翻译 “you“ 时,如果原文环境是敬称,那么翻译用敬称,否则不要用敬称。通常不必用敬称,毕竟不是用户协议这样的文章,需要表示对顾客的尊重。

数量词

英文通常不能省略量词,名词有单复数的区别。而中文的名词没有单复数的区别,可以省略量词。

翻译准确,不引入翻译错误。对于技术文章,准确非常重要。

遇到拿捏不准的语句,或者请教他人,或者请教原作者。有的原作者本来会中文,这时更好交流。

尽量发现原文的错误——即使是规范文档也可能出错。对于拼写错误这样简单的错误,如果是开源文档,可以直接提交修改给原项目。其它错误可以联系原作者,请他修改。

译者自己添加的说明,需要以“译注” 或 “译者注” 开始。Word 可以放在脚注里,Markdown 或用括号插在原文中,或独立一个段落。

提醒:翻译,特别是时间较长的翻译,请做好笔记,记录跳过的地方,发现的错误等等,为后面的校正节省时间。

句子通顺,这是基本要求。

不要逐字逐句地翻译。英文从句很多,一个句子会很长。而中文多是短句,要把长句转换为短句。

翻译完成之后,自己先通读一遍,改正错别字,调整句子等。


参考自:hongfanqie/discussion#1

译:packages/animation.md


title: Animation
type: catalog
order: 1

Animation

Material in motion is responsive and natural. Use these easing curves and duration patterns to create smooth and consistent motion.
译:物质的运动是灵活自然的。使用这些舒缓的曲线和持续的模式去创造连续一致的运动。

Design & API Documentation

Installation

npm install --save @material/animation

Usage

CSS Classes

Some components already use a set curve for their animation. For example, MDC Checkbox uses deceleration curve for its checkmark animation.
译:某些元素已经采用一些曲线描述了对应的运动。例如: MDC Checkbox元素为检查标记采用了减速曲线。
If you want to animate an element that is not a Material Design component, you can apply the following CSS classes.
译:如果你想为不属于材料设计语言的元素赋予生命的活力,可以用下面的CSS样式类。

CSS Class Description
mdc-animation-deceleration-curve Sets the animation-timing-function to deceleration curve
mdc-animation-standard-curve Sets the animation-timing-function to standard curve, a.k.a quickly accelerate and slowly decelerate
mdc-animation-acceleration-curve Sets the animation-timing-function to acceleration curve
mdc-animation-sharp-curve Sets the animation-timing-function to sharp curve, a.k.a quickly accelerate and decelerate

Sass Variables and Mixins

Instead of setting CSS classes on elements, you can use the Sass mixins to achieve the same goal.
译:除了设置CSS样式类,还可以使用 Sass mixins实现一样的效果

@import "@material/animation/mixins";

.my-element--animating {
  @include mdc-animation-acceleration-curve;
}
Mixin Description
mdc-animation-deceleration-curve Sets the animation-timing-function to deceleration curve
mdc-animation-standard-curve Sets the animation-timing-function to standard curve, a.k.a quickly accelerate and slowly decelerate
mdc-animation-acceleration-curve Sets the animation-timing-function to acceleration curve
mdc-animation-sharp-curve Sets the animation-timing-function to sharp curve, a.k.a quickly accelerate and decelerate

We also provide the timing functions used by these mixins, which you can use with the animation or transition CSS properties
译:我们也可以使用由mixins提供的时间模块,同时和 animation or transition CSS属性一起使用

@import "@material/animation/variables";

.my-element--animating {
  animation: foo-keyframe 175ms $mdc-animation-standard-curve-timing-function;
}
Variable Description
mdc-animation-deceleration-curve-timing-function Timing function to decelerate
mdc-animation-standard-curve-timing-function Timing function to quickly accelerate and slowly decelerate
mdc-animation-acceleration-curve-timing-function Timing function to accelerate
mdc-animation-sharp-curve-timing-function Timing function to quickly accelerate and decelerate

The following functions create transitions given $name and the $duration. You can also specify $delay, but the default is 0ms. $name can either refer to the keyframe, or to CSS property used in transition.
译:下面的功能为$name and the $duration实现了过渡的效果。你也可以指定$delay(延迟),默认为0ms(毫秒)。 $name适用于关键帧或者作为CSS属性用于transition

@import "@material/animation/functions";

.my-element {
  transition: mdc-animation-exit-permanent(/* $name: */ opacity, /* $duration: */ 175ms, /* $delay: */ 150ms);
  opacity: 0;
  will-change: opacity;

  &--animating {
    transition: mdc-animation-enter(/* $name: */ opacity, /* $duration: */ 175ms);
    opacity: 1;
  }
}
@import "@material/animation/functions";

@keyframes fade-in {
  from {
    transform: translateY(-80px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.my-element {
  animation: mdc-animation-enter(/* $name: */ fade-in, /* $duration: */ 350ms);
}
Function Description
mdc-animation-enter($name, $duration, $delay) Defines transition for entering the frame
mdc-animation-exit-permanent($name, $duration, $delay) Defines transition for exiting the frame permanently
mdc-animation-exit-temporary($name, $duration, $delay) Defines transition for exiting the frame temporarily

JavaScript

These functions handle prefixing across various browsers
译:这些功能在不同的浏览器中处理前缀

import {getCorrectEventName} from '@material/animation';

const eventToListenFor = getCorrectEventName(window, 'animationstart');
Method Signature Description
getCorrectEventName(windowObj, eventType) Returns a JavaScript event name, prefixed if necessary
getCorrectPropertyName(windowObj, eventType) Returns a CSS property name, prefixed if necessary

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.