mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add Russian Locale (#2531)
This commit is contained in:
63
packages/node_modules/@node-red/nodes/locales/ru/function/80-template.html
vendored
Normal file
63
packages/node_modules/@node-red/nodes/locales/ru/function/80-template.html
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<!--
|
||||
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/html" data-help-name="template">
|
||||
<p>
|
||||
Устанавливает свойство на основе предоставленного шаблона.
|
||||
</p>
|
||||
|
||||
<h3>Принимает</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>msg <span class="property-type">объект</span></dt>
|
||||
<dd>Объект сообщения msg, содержащий информацию для заполнения шаблона.</dd>
|
||||
<dt class="optional">шаблон <span class="property-type">строка</span></dt>
|
||||
<dd>Шаблон для заполнения данными из сообщения msg. Если шаблон не настроен на панели редактирования, тогда он может быть установлен через свойство msg.template.</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Выводит</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>msg <span class="property-type">объект</span></dt>
|
||||
<dd>Сообщение msg, у которого выбранному свойству присвоено значение, сформированное заполнением шаблона свойствами из входящего сообщения.</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Подробности</h3>
|
||||
<p>
|
||||
По умолчанию используется формат <i><a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache</a></i>, но это может быть выключено при необходимости.
|
||||
</p>
|
||||
<p>
|
||||
Например, когда шаблон:
|
||||
</p>
|
||||
<pre>Привет, {{payload.name}}. Сегодня {{date}}</pre>
|
||||
<p>
|
||||
получает сообщение msg, содержащее:
|
||||
</p>
|
||||
<pre>{
|
||||
date: "понедельник",
|
||||
payload: {
|
||||
name: "Иван"
|
||||
}
|
||||
}</pre>
|
||||
<p>
|
||||
Результирующее свойство будет:
|
||||
</p>
|
||||
<pre>Привет, Иван. Сегодня понедельник</pre>
|
||||
<p>
|
||||
Можно использовать свойство из контекста потока или глобального контекста. Просто используйте <code>{{flow.name}}</code> или <code>{{global.name}}</code>, или для постоянного хранилища <code>store</code> используйте <code>{{flow[store].name}}</code> или <code>{{global[store].name}}</code>.
|
||||
</p>
|
||||
<p>
|
||||
<b>Примечание:</b> по умолчанию <i>mustache</i> кодирует любые не алфавитно-цифровых или HTML-сущности в значениях, которые он подставляет, для безопасного использования в HTML. Чтобы предотвратить это, используйте тройные фигурные скобки <code>{{{triple}}}</code>.
|
||||
</p>
|
||||
</script>
|
Reference in New Issue
Block a user