Coder Social home page Coder Social logo

clreq's Introduction

Requirements for Chinese Text Layout | 中文排版需求

This document is being developed by the Chinese Layout Task Force and the W3C Internationalization Working Group.

本文档由中文布局任务小组和W3C国际化工作组联合编写。

Feedback about the content of this document can be submitted via issues or pull request in the GitHub repo. You are also welcome to send your comments to:

若对本文档有任何建议或反馈,欢迎通过GitHub提交issues或者pull request。同时也欢迎使用:

Editorial guidelines | 编辑指南

Combining the English and Chinese text in one document makes it much easier to develop and maintain content in both languages in parallel. Note that the English version will be the authoritative version, since it is more widely accessible to developers around the world.

同時包含英語及漢語的文檔結構使平行開發與內容維護得以化繁為簡。需要注意的是,W3C以英文版本为权威版本,因其更方便让世界各地的开发者閱讀。

###Creating or modifying content | 添加或修正内容

When creating new content, you should always create markup for both English and Chinese versions.

添加新的内容文本時,请務必同時建立英文与中文的元素標記。

For example:
例如:

<p data-lang="en">The same text in English.</p>
<p data-lang="zh">此為漢語文本。</p>

If you are able to create text in both English and Chinese, please do so. If you are only able to create text in one language, still create the dual structure in markup, but put the same text in both places. Then add class="translateme" to the text that needs translation.

若您可以書寫英、中文二種語言,請同時創建這二種語言的文本;若您只能書寫其中一種语言,请保持英、中文的元素標記结构,將单一语言添加在这两段標記中,並為該段落添加class="translateme"類別来提醒其他志愿者翻译此段落。

For example:
例如:

<p data-lang="en" class="translateme">此為漢語文本。</p>
<p data-lang="zh">此為漢語文本。</p>

If you change existing text, and if that change requires a change in the parallel translation but you are unable to do so, add class="translateme" to the text that needs to be updated.

如果您打算修正現有的内容,并且該内容的另一个语言版本需要同时更新翻译,请您更新翻译或添加class="translateme"類別,提醒其他志愿者翻译此段落。

When text highlighted by the translateme class is updated, and matches the recent changes in the other language, the class should be removed.

当標記為translateme類別的高亮文本已被翻译,并且这段翻译与最新修正內容匹配,请移除它的translateme類別。

Markup tips | 標記小提示

Here are some tips on how to maintain the parallel language structure in markup. The principles in these example approaches should be extended to other markup as needed.

此文檔以元素標記来维护双重语言結構,下面是一些協助您依此原則進行編輯的小提示。在需要時,請自行擴展各原則中的範例標記。

  • The English text should always come before its corresponding Chinese text.

    英文内容永遠置於中文内容前方。

  • List elements need p elements inside them。

    列表元素中,請使用p元素。

    <li>
      <p data-lang="en" class="translateme">这是**的文字。</p>
      <p data-lang="zh">这是**的文字。</p>
    </li>
  • Headings should use spans for zh and en versions, and there should be a line break between spans.

    标题內应以span元素来分別包裹zhen語言,两者间应有一个换行。

    <h2>
      <span data-lang="en">My heading</span>
      <span data-lang="zh">我的标题</span>
    </h2>
  • Attribute ids should go on section elements, not h[1-6] elements.

    屬性id應跟随section元素,而非h[1-6]元素。

    <section id="h_my_heading">
      <h2>
        <span data-lang="en">English heading</span>
        <span data-lang="zh">漢語標題</span>
      </h2>
  • Attribute ids on dfn elements should start with xxdef, where xx is either zh or en.

    dfn元素里的屬性id应该以xxdef开始,xx隨語言的不同作zhen

    <p data-lang="en">The <dfn id="endef_term">term</dfn> is a technical word.</p>
    <p data-lang="zh">这个<dfn id="zhdef_term">词汇</dfn>是一个技术用语。</p>
  • figcaptions should use spans for the different language versions.

    figcaption元素应以span元素来标示不同语言。

    <figure>
      <!-- 圖表內容。 -->
      <!-- Figure content. -->
      <figcaption>
        <span data-lang="en">English caption</span>
        <span data-lang="zh">漢語說明</span>
      </figcaption>
    </figure>
  • Use the following markup for Unicode codepoint names:

    请使用以下標記来表示Unicode碼位名稱:

    <span class="uname">U+3002 IDEOGRAPHIC FULL STOP</span> [。]

For additional ideas about markup and styling in Internationalization Activity documents, especially wrt inline markup conventions, see http://www.w3.org/International/docs/styleguide.

欲了解更多国际化标准计划文档里的標記和样式条约,尤其是wrt行内標記的使用慣例,请查看http://www.w3.org/International/docs/styleguide

Last-minute Pre-publication edits | 发布前的最后改动备忘录

Make the following changes to the respec file before pushing to GitHub:

发布至GitHub前,請对respec文件進行以下改动:

  1. in the SoTD, change the link on "latest dated version in /TR" to the location of the document that is about to be published.

    对SoTD,把「/TR下最新版本」的链接改指向至准备发布的文件路徑。

  2. Change the path in following code to the same location above:

    將下列代碼內的路徑指向上述的链接:

    <link rel="canonical" href="http://www.w3.org/TR/2015/WD-clreq-XXXXXXX/"/>
  3. Change previousPublishDate to reflect the date of the last publication.

    previousPublishDate改为上一次发布的日期。

Make the following edits to the snapshot of the file that will be published to TR.

对准备发布至TR的版本快照進行以下编辑:

  1. Convert the content of the h1 tag to the following:

    h1标签的内容改为:

    Requirements for Chinese Text Layout 
    <span data-lang="zh" lang="zh">中文排版需求</span>
  2. Remove:
    去除:

    <link rel="canonical" href="http://www.w3.org/TR/2015/WD-clreq-XXXXXXXX/"/>

clreq's People

Contributors

bobbytung avatar dret avatar ethantw avatar houkanshan avatar jjgod avatar lianghai avatar r12a avatar ryukeikun avatar siusin avatar

Watchers

 avatar

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.