Translation

Click on the *Save* or *Save and finish* button.
21/480
Context English Chinese (Simplified) State
:doc:`hide-show-dynamic-fields` :doc:`hide-show-dynamic-fields`
:doc:`ticket-forms` :doc:`ticket-forms`
This package has no dedicated administrator interface, only extends the existing screens. 此软件包没有专用的管理员界面,只扩展了现有的屏幕。
Create New Templates 创建新的模板
This feature enables logical if-else conditions as well as loops and much more. 此功能启用逻辑 if-else 条件以及循环等等。
To insert code snippets: 若要插入代码片段:
Open *Templates*, *Signatures* or *Salutations* modules in the administrator interface. 在管理员界面中打开 *模板*、*签名* 或 *问候语* 模块。
Add or modify a resource in these screens. 在这些屏幕中添加或修改资源。
Find the new icon in the Rich Text editor toolbar (the last one). 在富文本编辑器工具栏中查找新的图标(最后一个)。
Insert Code Snippet Icon 插入代码片段图标
Click on the new icon to open a new window. 单击新建图标以打开一个新窗口。
Select *TemplateToolkit* from the *Language* drop-down. 从 *语言* 下拉列表中选择 *TemplateToolkit*。
Write the following lines into the text box. 在文本框中写入以下行。
Click on the *OK* button to save the code snippet. 单击 *确定* 按钮以保存代码段。
Rich Text Editor Code Snippet 富文本编辑器代码片段
Click on the *Save* or *Save and finish* button. 点击 *保存* 或 *保存并完成* 按钮。
Add the template, signature or salutation to the queue you want to use it. 将该模板、签名或称呼添加到要使用它的队列中。
Create a new ticket, choose a customer user (for this example we will call him John Doe), then choose the queue you have configured your template for. 创建一个新的工单,选择一个客户用户(在本例中,我们称他为John Doe),然后选择为其配置模板的队列。
If the customer user language is German, it should print *Sehr geehrte(r) John Doe,*. If it is set to Hungarian, you should see *Tisztelt Doe John!*. If your customer user has no language set or it is set to English, you will see *Dear John Doe,*. 如果客户的用户语言是德语,则应打印 *Sehr geehrte(r)John Doe,*。如果是匈牙利语的话,你会看到 *Tisztelt Doe John!*。 如果您的客户用户没有设置语言或设置为英语,您将看到 *Dear John Doe,*。
As you can see, conditions in templates can be very useful, but be careful to write correct Template Toolkit syntax. If you make mistakes there, you will get an error during choosing a template. 如您所见,模板中的条件非常有用,但要小心编写正确的 Template Toolkit 语法。 如果条件出错,那么在选择模板时就会出错。
For detailed instructions on how to write Template Toolkit code, refer to the `Template Toolkit User Manual <http://www.template-toolkit.org/docs/manual/index.html>`__. 有关如何编写 Template Toolkit 代码的详细说明,请参阅 `Template Toolkit 用户手册 <http://www.template-toolkit.org/docs/manual/index.html>`__。
Debugging Templates 调试模板
Writing Template Toolkit code is not too difficult compared to other languages. Nevertheless errors can occur as we are all just humans. To validate your template, open the ticket create or answer screen, where you have your templates configured to be used and choose a template. 与其他语言相比,编写 Template Toolkit 代码并不难。然而,错误也会发生,因为我们都是人。要验证您的模板,请打开工单创建或响应屏幕(您在其中配置了要使用的模板)并选择一个模板。
If you have mistakes in your Template Toolkit syntax, choosing a template will bring up an error screen that tell you about what went wrong and where to find the error. 如果您的代码有 Template Toolkit 语法错误,选择一个模板后会弹出一个错误屏幕,告诉您哪里出了问题以及在哪里找到错误。
Error Reason in Error Screen 错误屏幕中的错误原因
In this example the **OTRS** system informed us, that there was an unexpected token ``[`` in the line ``[% IF Data.OTRSTagData.TypeID == 1 [% %]``. A second opening bracket was entered inside the same Template Toolkit tag, which for sure is forbidden. 在本例中,**OTRS** 系统通知我们,在 ``[`` in the line ``[% IF Data.OTRSTagData.TypeID == 1 [% %]`` 行中有一个意外的标记 ``[``。在同一个Template Toolkit 标签中输入了第二个左括号,这肯定是禁止的。
To fix the error: 若要修复该错误:
Go back to the template editing screen. 返回模板编辑屏幕。
Edit the template and save it. 编辑模板并保存。
Start debugging the template again by creating or answering a ticket, till no more errors are found and your template comes up as desired. 通过创建或答复工单,再次开始调试模板,直到不再发现错误,并且您的模板按需要出现为止。
This package has no agent interface. 本软件包没有服务人员界面。
ComponentTranslation
This translation Translated OTRS 7/Feature Add-ons Manual 点击 *保存* 或 *保存并完成* 按钮。
The following strings have the same context and source.
Translated OTRS 7/OTRS::ITSM Manual 点击 *保存* 或 *保存并完成* 按钮。
Translated OTRS 7/User Manual 点击 *保存* 或 *保存并完成* 按钮。
Translated OTRS 7/Administration Manual 点击 *保存* 或 *保存并完成* 按钮。

Loading…

No matching activity found.

Browse all component changes

Glossary

English Chinese (Simplified)
No related strings found in the glossary.

Source information

Source string location
../../content/advanced-editor/admin.rst:44 ../../content/advanced-escalations/admin/ticket-settings/escalation-type-bundle.rst:37 ../../content/advanced-escalations/admin/ticket-settings/escalation-types.rst:33 ../../content/calendar-resource-planning/agent/calendar/manage-team-agents.rst:23 ../../content/calendar-resource-planning/agent/calendar/manage-team-agents.rst:34 ../../content/calendar-resource-planning/agent/calendar/manage-teams.rst:38 ../../content/categories-for-text-modules/admin/ticket-settings/categories.rst:34 ../../content/categories-for-text-modules/admin/ticket-settings/templates-categories.rst:19 ../../content/categories-for-text-modules/admin/ticket-settings/templates-categories.rst:30 ../../content/customer-specific-services/admin/users-groups-roles/customers-services.rst:31 ../../content/customer-specific-services/admin/users-groups-roles/customers-services.rst:42 ../../content/customer-specific-services/admin/users-groups-roles/customers-services.rst:77 ../../content/dashboard-news-widget/admin/communication-notifications/dashboard-news.rst:30 ../../content/dynamic-sender-addresses/admin/communication-notifications/sender-address-mapping.rst:34 ../../content/restrict-customer-data-view/admin/users-groups-roles/partnerid-customerid.rst:58 ../../content/service-based-queue-routing/admin/ticket-settings/services-queues.rst:19 ../../content/service-based-queue-routing/admin/ticket-settings/services-queues.rst:30 ../../content/service-categories/admin/ticket-settings/types-services.rst:19 ../../content/service-categories/admin/ticket-settings/types-services.rst:30 ../../content/specific-ticket-notifications/admin/communication-notifications/ticket-notifications.rst:29 ../../content/specific-ticket-notifications/agent/avatar/personal-preferences.rst:40 ../../content/state-preselection-response-templates/admin/ticket-settings/state-pre-selection-for-templates.rst:19 ../../content/ticket-forms/admin/ticket-settings/dynamic-ticket-templates.rst:34 ../../content/ticket-forms/admin/users-groups-roles/dynamic-ticket-templates-groups.rst:19 ../../content/ticket-forms/admin/users-groups-roles/dynamic-ticket-templates-groups.rst:30 ../../content/ticket-workflow/admin/ticket-settings/ticket-workflows.rst:44 ../../content/ticket-workflow/admin/ticket-settings/ticket-workflows.rst:56 ../../content/ticket-workflow/admin/ticket-settings/ticket-workflows.rst:91
String age
a year ago
Source string age
a year ago
Translation file
locale/zh_CN/LC_MESSAGES/content.po, string 94