mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
complete traditional chinese translation
This commit is contained in:
59
packages/node_modules/@node-red/nodes/locales/zh-TW/storage/10-file.html
vendored
Normal file
59
packages/node_modules/@node-red/nodes/locales/zh-TW/storage/10-file.html
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<!--
|
||||
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="file">
|
||||
<p>將<code>msg.payload</code>寫入文件,添加到末尾或替換現有內容。或者,它也可以刪除文件。</p>
|
||||
<h3>輸入</h3>
|
||||
<dl class="message-properties">
|
||||
<dt class="optional">filename<span class="property-type">字符串</span></dt>
|
||||
<dd>如果未在節點中配置,則此可選屬性可以設置文件名。</dd>
|
||||
</dl>
|
||||
<h3>輸出</h3>
|
||||
<p>寫入完成後,輸入消息將發送到輸出端口。</p>
|
||||
<h3>詳細</h3>
|
||||
<p>每個消息的有效荷載將添加到文件的末尾,可以選擇在每個消息之間添加一個換行符(\n)。</p>
|
||||
<p>如果使用<code>msg.filename</code>,則每次寫入後文件都會關閉。爲了獲得最佳體驗,請使用固定的文件名。</p>
|
||||
<p>可以將其配置爲覆蓋整個文件,而不是在文件後添加段落。例如,在將二進制數據寫入文件(例如圖像)時,應使用此選項,並且應禁用添加換行符的選項。</p>
|
||||
<p>可以從編碼列表中指定寫入文件的數據的編碼。</p>
|
||||
<p>您可以將此節點配置爲刪除文件。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="file in">
|
||||
<p>以字符串或二進制緩衝區的形式讀取文件的內容。</p>
|
||||
<h3>輸入</h3>
|
||||
<dl class="message-properties">
|
||||
<dt class="optional">filename<span class="property-type">字符串</span></dt>
|
||||
<dd>如果未在節點配置中設置,該屬性可以選擇要讀取的文件名。</dd>
|
||||
</dl>
|
||||
<h3>輸出</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
|
||||
<dd>文件的內容可以是字符串,也可以是二進制的buffer。</dd>
|
||||
<dt class="optional">filename <span class="property-type">字符串</span></dt>
|
||||
<dd>如果未在節點配置中設置,該屬性可以選擇要讀取的文件名。</dd>
|
||||
<dt class="optional">error <span class="property-type">object</span></dt>
|
||||
<dd><i>已不推薦使用</i>: 如果在節點中啓用,則當節點在讀取文件時遇到錯誤時,它將發送一條沒有<code>有效荷載</code>的消息,且將消息的<code>error</code>屬性設置爲錯誤的詳細信息。在默認情況下,此行爲模式已棄用且未啓用。 請參閱下面的詳細信息。</dd>
|
||||
</dl>
|
||||
<h3>詳細</h3>
|
||||
<p>文件名應該是絕對路徑,否則將相對于Node-RED進程的工作目錄。</p>
|
||||
<p>在Windows上,可能需要使用轉義路徑分隔符,例如:<code>\\Users\\myUser</code>。</p>
|
||||
<p>可以選擇將文本文件拆分爲幾行,每行輸出一條消息,或者將二進制文件拆分爲較小的buffer塊-塊大小取決于操作系統,但通常爲64k(Linux/Mac)或41k(Windows)。</p>
|
||||
<p>當拆分爲多條消息時,每條消息將具有<code>parts</code>屬性集,從而形成完整的消息序列。</p>
|
||||
<p>如果輸出格式爲字符串,則可以從編碼列表中指定輸入數據的編碼。</p>
|
||||
<h4>舊版的錯誤處理</h4>
|
||||
<p>在Node-RED 0.17之前,如果此節點在讀取文件時遇到錯誤,它將發送一條不包含<code>msg.payload</code>,但包含<code>msg.error</code>的消息。在<code>msg.error</code>中記錄詳細的錯誤內容。但這是模式已被棄用,默認未啓用。如有需要,您可以在節點配置中重新啓用該模式。</p>
|
||||
<p>應該使用Catch節點來捕獲並處理錯誤。</p>
|
||||
</script>
|
||||
25
packages/node_modules/@node-red/nodes/locales/zh-TW/storage/23-watch.html
vendored
Normal file
25
packages/node_modules/@node-red/nodes/locales/zh-TW/storage/23-watch.html
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
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="watch">
|
||||
<p>監視目錄或文件中的更改。</p>
|
||||
<p>您可以輸入用逗號分隔的目錄和/或文件的列表。您需要在所有帶有空格的地方加上引號“...”。</p>
|
||||
<p>在Windows上,必須在任何目錄名稱中使用雙反斜杠<code>\\</code>。</p>
|
||||
<p>實際更改的文件的完整文件名將放入<code>msg.payload</code>和<code>msg.filename</code>中,而監視列表的字符串化版本將在<code>msg.topic</code>中返回。</p>
|
||||
<p><code>msg.file</code>僅包含已更改文件的短文件名。<code>msg.type</code>更改了事物的類型,通常是<i>file</i>或<i>directory</i>,而<code>msg.size</code>保留了文件的大小(以字節爲單位)。</p>
|
||||
<p>當然,在Linux中,<i>everything</i>也是一個文件,因此可以監視</p>
|
||||
<p><b>注意:</b>該目錄或文件必須存在才能被監視。如果文件或目錄被刪除,即使重新創建它也可能不再被監視。</p>
|
||||
</script>
|
||||
Reference in New Issue
Block a user