Решил создать шаблон. Создал файл /opt/otrs/Kernel/Language/ru_Custom.pm со следующим содержанием:
Код: Выделить всё
# --
# Copyright (C) 2001-2018 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
package Kernel::Language::ru_Custom;
use strict;
use warnings;
use utf8;
sub Data {
my $Self = shift;
# $$START$$
# own translations
$Self->{Translation}->{'Lock'} = 'Lala';
$Self->{Translation}->{'Unlock'} = 'Lulu';
$Self->{Translation}->{'Templates'} = 'Шаблоны служебок';
$Self->{Translation}->{'Access_for'} = 'Предоставление доступа';
$Self->{Translation}->{'BodyAcess_for'} = 'Прошу вас предоставить доступ...';
# or a other syntax would be
# $Self->{Translation} = {
# %{$Self->{Translation}},
# # own translations
# 'Lock' => 'Lala',
# 'Unlock' => 'Lulu',
# };
# $$STOP$$
}
1;
Код: Выделить всё
...
# example template for customizations, see hidden form at the end of the file
<label>[% Translate("Templates") | html %]:</label>
<div class="Field">
<button type="button" onclick="$('#Template1').submit()" value="[% Translate("Access_for") | html %]">[% Translate("Access_for") | html %]</button>
</div>
<div class="Clear"></div>
...
# example template form for customizations
<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" id="Template1">
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
<input type="hidden" name="Subaction" value="StoreNew"/>
<input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
<input type="hidden" name="ExpandCustomerName" value="1"/>
# <input type="hidden" name="Dest" value="5||Предоставление доступа"/>
<input type="hidden" name="Subject" value="[% Translate("Access_for") | html %]"/>
<input type="hidden" name="Body" value="[% Translate("BodyAcess_for") | html %]"/>
<input type="hidden" name="TypeID" value="2"/>
</form>
Перевод терминов не применён, а перевод для Templates судя по результату подтянулись из другого места.
тут же есть и другая проблема, закомментированная строка
Код: Выделить всё
<input type="hidden" name="Dest" value="5||Предоставление доступа"/>
Backend ERROR: OTRS-CGI-71 Perl: 5.28.1 OS: linux Time: Wed Jun 10 16:08:58 2020
Message: file error - parse error - AgentTicketPhone.tt line 322: Malformed UTF-8 character (fatal) at /usr/lib/x86_64-linux-gnu/perl5/5.28/Template/Directive.pm line 155.
RemoteAddress: 10.5.2.159
RequestURI: /otrs/index.pl
Traceback (22106):
Module: Kernel::Output::HTML::Layout::Template::Output Line: 205
Module: Kernel::Modules::AgentTicketPhone::_MaskPhoneNew Line: 2722
Module: Kernel::Modules::AgentTicketPhone::Run Line: 1190
Module: Kernel::System::Web::InterfaceAgent::Run Line: 1103
Module: /opt/otrs/bin/cgi-bin/index.pl Line: 40
Может кто сталкивался с похожей ситуацией и сможет подсказать пути решения?