complete traditional chinese translation

This commit is contained in:
JIYE YU
2020-02-10 11:31:37 +09:00
parent a05589c5a6
commit 389cbf4900
41 changed files with 2013 additions and 246 deletions

View File

@@ -0,0 +1,19 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="tls-config">
<p>TLS連接的配置選項</p>
</script>

View File

@@ -0,0 +1,22 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="http proxy">
<p>HTTP代理的配置選項</p>
<h3>詳細</h3>
<p>訪問代理例外列表中的主機時將不使用任何代理</p>
</script>

View File

@@ -0,0 +1,70 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="mqtt in">
<p>連接到MQTT代理並訂閱來自指定主題的消息</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
<dd>如果不是二進制buffer的話就是字符串</dd>
<dt>topic <span class="property-type">字符串</span></dt>
<dd>MQTT主題使用<code>/</code></dd>
<dt>qos <span class="property-type">數值</span> </dt>
<dd>QoS服務質量0, 最多一次 1, 最少一次 2, 只一次</dd>
<dt>retain <span class="property-type">布爾值</span></dt>
<dd>值爲true時表示消息已保留且可能是舊的</dd>
</dl>
<h3>詳細</h3>
<p>訂閱主題可以包括MQTT通配符+一個級別多個級別</p>
<p>使用該節點您首先需要建立與MQTT代理的連接通過單擊鉛筆圖標來進行配置</p>
<p>如有需要幾個MQTT節點輸入或輸出可以共享相同的代理連接</p>
</script>
<script type="text/x-red" data-help-name="mqtt out">
<p>連接到MQTT代理並發布消息</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
<dd>要發布的有效負載如果未設置此屬性則不會發送任何消息要發送空白消息請將此屬性設置爲空字符串</dd>
<dt class="optional">topic <span class="property-type">字符串</span></dt>
<dd>要發布的MQTT主題</dd>
<dt class="optional">qos <span class="property-type">number</span></dt>
<dd>QoS服務質量0, 最多一次 1, 最少一次 2, 只一次默認值爲0</dd>
<dt class="optional">retain <span class="property-type">布爾值</span></dt>
<dd>設置爲<code>true</code><code>false</code></dd>
</dl>
<h3>詳細</h3>
<p><code>msg.payload</code>ObjectJSONbuffer</p>
<p>可以在節點中配置所使用的主題或者如果留爲空白則可以通過<code>msg.topic</code></p>
<p>同樣可以在節點中配置QoS和保留值或者如果保留空白則分別由<code>msg.qos</code><code>msg.retain</code></p>
<p>該節點需要與要配置的MQTT代理的連接通過單擊鉛筆圖標進行配置</p>
<p>如果需要幾個MQTT節點輸入或輸出可以共享相同的代理連接</p>
</script>
<script type="text/x-red" data-help-name="mqtt-broker">
<p>與MQTT代理的連接設置</p>
<p>創建與代理的連接設置可以在<code>MQTT In</code><code>MQTT Out</code></p>
<p>如果未爲該節點設置客戶端ID並且設置了會話初始化則將生成一個隨機客戶端ID設置客戶端ID時請確保它對于連接目標處的代理是唯一的</p>
<h4>Birth Message</h4>
<p>建立連接後發布在以配置主題中的消息</p>
<h4>Close Message</h4>
<p>在連接正常結束之前重新部署或者關閉了節點時發布在以配置主題中的消息</p>
<h4>Will Message</h4>
<p>當節點意外丟失連接時由代理發布的消息</p>
<h4>WebSockets</h4>
<p>可以將節點配置成使用WebSocket連接使用WebSocket時請在服務器字段中以完整格式描述連接目標的URI 例如</p>
<pre>ws://example.com:4000/mqtt</pre>
</script>

View File

@@ -0,0 +1,81 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="http in">
<p>創建用于創建Web服務的HTTP端點</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload</dt>
<dd>GET請求包含任何查詢字符串參數的對象或者包含HTTP請求正文</dd>
<dt>req<span class="property-type">object</span></dt>
<dd>HTTP請求對象該對象包含有關請求信息的多個屬性
<ul>
<li><code>body</code> - </li>
<li><code>headers</code> - HTTP</li>
<li><code>query</code> - </li>
<li><code>params</code> - </li>
<li><code>cookies</code> - cookie</li>
<li><code>files</code> - </li>
</ul>
</dd>
<dt>res<span class="property-type">object</span></dt>
<dd>HTTP響應對象此屬性不應直接使用<code>HTTP Response</code></dd>
</dl>
<h3>詳細</h3>
<p>節點將在配置的路徑上監聽特定類型的請求路徑可以完全指定例如<code>/user</code><code>/user/:name</code> 使<code>msg.req.params</code></p>
<p>對于包含正文的請求例如POST或PUT請求的內容將作爲<code>msg.payload</code></p>
<p>如果可以確定請求的內容類型則正文將被解析爲任何適當的類型例如<code>application/json</code>JavaScript</p>
<p><b>注意</b>HTTP</p>
</script>
<script type="text/x-red" data-help-name="http response">
<p>將響應發送回從HTTP輸入節點接收的請求</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>響應的正文</dd>
<dt class="optional">statusCode <span class="property-type">數值</span></dt>
<dd>如果設置則用作響應狀態代碼默認值200</dd>
<dt class="optional">headers <span class="property-type">object</span></dt>
<dd>如果設置則提供HTTP頭以包含在響應中</dd>
<dt class="optional">cookies <span class="property-type">object</span></dt>
<dd>如果設置則可用于設置或刪除cookie</dd>
</dl>
<h3>詳細</h3>
<p>還可以在節點本身內設置<code>statusCode</code><code>headers</code>message</p>
<h4>Cookie處理</h4>
<p><code>cookies</code>/使cookieoptions<p>
<p>下面的示例設置兩個cookie-一個名爲<code>name</code><code>nick</code><code>session</code><code>1234</code>15</p>
<pre>
msg.cookies = {
name: 'nick',
session: {
value: '1234',
maxAge: 900000
}
}</pre>
<p>有效選項包括</p>
<ul>
<li><code>domain</code> - () Cookie</li>
<li><code>expires</code> - () GMT0cookie</li>
<li><code>maxAge</code> - () </li>
<li><code>path</code> - (字符串) Cookie的路徑。默認爲/</li>
<li><code>value</code> - () Cookie使</li>
</ul>
<p>要刪除Cookie請將其<code>value</code><code>null</code></p>
</script>

View File

@@ -0,0 +1,78 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="http request">
<p>發送HTTP請求並返回響應</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">url <span class="property-type">字符串</span></dt>
<dd>如果未在節點中配置則此可選屬性設置請求的url</dd>
<dt class="optional">method <span class="property-type">字符串</span></dt>
<dd>如果未在節點中配置則此可選屬性設置請求的HTTP方法必須是<code>GET</code>,<code>PUT</code>,<code>POST</code>,<code>PATCH</code><code>DELETE</code></dd>
<dt class="optional">headers <span class="property-type">object</span></dt>
<dd>設置請求的HTTP頭</dd>
<dt class="optional">cookies <span class="property-type">object</span></dt>
<dd>如果設置則可用于發送帶有請求的cookie</dd>
<dt class="optional">payload</dt>
<dd>發送爲請求的正文</dd>
<dt class="optional">rejectUnauthorized</dt>
<dd>如果設置爲<code>false</code>使https</dd>
<dt class="optional">followRedirects</dt>
<dd>如果設置爲<code>false</code>HTTP 301<code>true</code></dd>
<dt class="optional">requestTimeout</dt>
<dd>如果設置爲正數毫秒將覆蓋全局設置的<code>httpRequestTimeout</code></dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | object | buffer</span></dt>
<dd>響應的正文可以將節點配置爲以字符串形式返回主體嘗試將其解析爲JSON字符串或將其保留爲二進制buffer</dd>
<dt>statusCode <span class="property-type">數值</span></dt>
<dd>響應的狀態碼如果請求無法完成則返回錯誤碼</dd>
<dt>headers <span class="property-type">object</span></dt>
<dd>包含響應頭的對象</dd>
<dt>responseUrl <span class="property-type">字符串</span></dt>
<dd>如果在處理請求時發生任何重定向則此屬性爲最終重定向的URL否則則爲原始請求的URL</dd>
<dt>responseCookies <span class="property-type">object</span></dt>
<dd>如果響應包含cookie則此屬性是每個cookie的名稱/鍵值對的對象</dd>
<dt>redirectList <span class="property-type">數組</span></dt>
<dd>如果請求被重定向了一次或多次則累積的信息將被添加到此屬性location是下一個重定向目標cookie是從重定向源返回的cookie</dd>
</dl>
<h3>詳細</h3>
<p>在節點內配置後URL屬性可以包含<a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache樣式</a>標簽。 這些標簽允許使用傳入消息的值來構造url。例如如果url設置爲<code>example.com/{{{{topic}}}</code><code>msg.topic</code>使{{{...}}}mustache/ &</p>
<p>節點可以選擇自動將<code>msg.payload</code>GET<code>msg.payload</code></p>
<p><b>注意</b>使<code>http_proxy=...</code>Node-RED使</p>
<h4>使用多個HTTP請求節點</h4>
<p>爲了在一個流程中多次使用該節點必須要注意<code>msg.headers</code>使<code>msg.headers</code><code>msg.headers</code><code>{}</code></p>
<h4>Cookie處理</h4>
<p>傳遞給節點的<code>cookies</code>/cookie<code>value</code></p>
<p>請求返回的所有cookie都將在<code>responseCookies</code></p>
<h4>內容類型處理</h4>
<p>如果<code>msg.payload</code><code>application/json</code></p>
<p>要將請求編碼爲表單數據應將<code>msg.headers[content-type]</code><code>application/x-www-form-urlencoded</code></p>
<h4>文件上傳</h4>
<p>要執行文件上傳應將<code>msg.headers["content-type"]</code><code>multipart/form-data</code><code>msg.payload</code></p>
<pre><code>{
"KEY": {
"value": FILE_CONTENTS,
"options": {
"filename": "FILENAME"
}
}
}</code></pre>
<p><code>KEY</code>,<code>FILE_CONTENTS</code><code>FILENAME</code></p>
</script>

View File

@@ -0,0 +1,35 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="websocket in">
<p>WebSocket輸入節點</p>
<p>默認情況下從WebSocket接收的數據將位于<code>msg.payload</code>JSONJSON</p>
</script>
<script type="text/x-red" data-help-name="websocket out">
<p>WebSocket輸出節點</p>
<p>默認情況下<code>msg.payload</code>WebSocket<code>msg</code>JSONWebSocket</p>
<p>如果到達此節點的消息是從WebSocket In節點開始的則該消息將發送回觸發流程的客戶端否則消息將廣播給所有連接的客戶端</p>
<p>如果要廣播從WebSocket輸入節點開始的消息則可以應該刪除流中的<code>msg._session</code></p>
</script>
<script type="text/x-red" data-help-name="websocket-listener">
<p>此配置節點使用指定的路徑創建WebSocket服務器端點</p>
</script>
<script type="text/x-red" data-help-name="websocket-client">
<p>此配置節點將WebSocket客戶端連接到指定的URL</p>
</script>

View File

@@ -0,0 +1,35 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="tcp in">
<p>提供TCP輸入選擇可以連接到遠程TCP端口或接受傳入連接</p>
<p><b>注意</b>root1024</p>
</script>
<script type="text/x-red" data-help-name="tcp out">
<p>提供TCP輸出的選擇可以連接到遠程TCP端口接受傳入的連接或回複從TCP In節點收到的消息</p>
<p>僅發送<code>msg.payload</code></p>
<p>如果<code>msg.payload</code>Base64Base64</p>
<p>如果不存在<code>msg._session</code><b></b></p>
<p><b>注意</b>root1024</p>
</script>
<script type="text/x-red" data-help-name="tcp request">
<p>一個簡單的TCP請求節點<code>msg.payload</code>tcp</p>
<p>連接到服務器發送請求並接收響應 可以從固定數量的字符與指定字符匹配的字符中選擇操作從第一個答複到達起等待指定的時間等待數據到達發送數據並立即取消連接而無需等待答複等操作中進行選擇</p>
<p>響應將在<code>msg.payload</code>buffer<code>.toString()</code></p>
<p>如果將tcp主機或端口留空則必須使用<code>msg.host</code><code>msg.port</code></p>
</script>

View File

@@ -0,0 +1,28 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="udp in">
<p>UDP輸入節點<code>msg.payload</code>BufferBase64</p>
<p><code>msg.ip</code><code>msg.port</code>IP</p>
<p><b>注意</b>root使1024</p>
</script>
<script type="text/x-red" data-help-name="udp out">
<p>該節點將<code>msg.payload</code>UDP</p>
<p>您也可以使用<code>msg.ip</code><code>msg.port</code></p>
<p>如果選擇廣播則將地址設置爲本地廣播IP地址或者也可以嘗試使用全局廣播地址255.255.255.255</p>
<p><b>注意</b>root使1024</p>
</script>