aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/intl
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:02:49 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commit01b0e12ba27b5069248fd09235e9a7143915ee30 (patch)
tree0e9edf538dc3fa3331e1dbb79239b58186765f86 /files/zh-cn/web/javascript/reference/global_objects/intl
parent6ca84f1794af830ada9736d7289ce29aabb04ca3 (diff)
downloadtranslated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.gz
translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.tar.bz2
translated-content-01b0e12ba27b5069248fd09235e9a7143915ee30.zip
remove `notranslate` class in zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/intl')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/intl/locale/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/intl/relativetimeformat/index.html8
2 files changed, 6 insertions, 6 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/intl/locale/index.html b/files/zh-cn/web/javascript/reference/global_objects/intl/locale/index.html
index 181d9dc0bf..08af53d8fa 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/intl/locale/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/intl/locale/index.html
@@ -64,13 +64,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Intl/Locale
<p>很简单,就是需要给{{jsxref("Locale/Locale", "Intl.Locale")}} 构造函数传入一个 locale 标识字符串作为参数:</p>
-<pre class="brush: js notranslate">let us = new Intl.Locale('zh-Hans-CN');</pre>
+<pre class="brush: js">let us = new Intl.Locale('zh-Hans-CN');</pre>
<h3 id="使用配置实例化">使用配置实例化</h3>
<p>构造函数支持传入 object 作为配置,object 中可包含多个配置属性。例如,设置 <code><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle">hourCycle</a></code> 属性,用于设置您所需要的小时周期类型:</p>
-<pre class="brush: js notranslate">let zh12hour = new Intl.Locale("zh-Hans-CN", {hourCycle: "h12"});
+<pre class="brush: js">let zh12hour = new Intl.Locale("zh-Hans-CN", {hourCycle: "h12"});
console.log(zh12hour.hourCycle); // Prints "h12"</pre>
<h2 id="规范">规范</h2>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/intl/relativetimeformat/index.html b/files/zh-cn/web/javascript/reference/global_objects/intl/relativetimeformat/index.html
index 561af8a1fe..a05c3385dd 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/intl/relativetimeformat/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/intl/relativetimeformat/index.html
@@ -14,7 +14,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat
<h2 id="句法">句法</h2>
-<pre class="notranslate"><code>new Intl.RelativeTimeFormat([<var>locales</var>[, <var>options</var>]])
+<pre><code>new Intl.RelativeTimeFormat([<var>locales</var>[, <var>options</var>]])
</code></pre>
<h3 id="参数">参数</h3>
@@ -84,7 +84,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat
<p>以下示例显示如何使用英语创建相对时间格式化程序。</p>
-<pre class="brush: js notranslate">//在语言环境中创建相对时间格式化程序
+<pre class="brush: js">//在语言环境中创建相对时间格式化程序
//显式传入默认值。
const rtf = new Intl.RelativeTimeFormat("en",{
localeMatcher: "bestfit",//其他值:"lookup"
@@ -104,7 +104,7 @@ rtf.format(1,"day");
<p>如果<code>numeric:auto</code>选项被传递,它将生成字符串<code>yesterday</code>或<code>tomorrow</code>代替<code>1 day ago</code>或<code>in 1 day</code>。这允许不必总是在输出中使用数值。</p>
-<pre class="brush: js notranslate">//在语言环境中创建相对时间格式化程序
+<pre class="brush: js">//在语言环境中创建相对时间格式化程序
//使用数字:传入"auto"选项值。
const rtf = new Intl.RelativeTimeFormat("en",{numeric: "auto"});
@@ -121,7 +121,7 @@ rtf.format(1,"day");
<p>以下示例显示如何创建返回格式化部件的相对时间格式器</p>
-<pre class="brush: js notranslate">const rtf = new Intl.RelativeTimeFormat("en",{numeric: "auto"});
+<pre class="brush: js">const rtf = new Intl.RelativeTimeFormat("en",{numeric: "auto"});
//使用日期单位格式化相对时间。
rtf.formatToParts(-1,"day");