Support: L10n support and rewriting responses

This commit is contained in:
Ilya Prokopenko 2021-11-28 16:44:22 +03:00
parent e7c3d46e83
commit a77c7dea54
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56
8 changed files with 99 additions and 50 deletions

View file

@ -24,11 +24,11 @@ class Ticket extends RowModel
{
if ($this->getRecord()->type === 0)
{
return 'Вопрос находится на рассмотрении.';
return tr("support_status_0");
} elseif ($this->getRecord()->type === 1) {
return 'Есть ответ.';
return tr("support_status_1");
} elseif ($this->getRecord()->type === 2) {
return 'Закрыто.';
return tr("support_status_2");
}
}

View file

@ -1,5 +1,5 @@
{extends "../@layout.xml"}
{block title}Помощь{/block}
{block title}{_menu_help}{/block}
{block header}
{$ticket->getName()}
@ -12,7 +12,7 @@
{$ticket->getName()}
</b>
</a>
<br></b>Автор: <a href="/id{$ticket->getUser()->getId()}">{$ticket->getUser()->getFullName()}</a> | {$ticket->getUser()->getRegistrationIP()} | Статус: {$ticket->getStatus()}
<br></b>{_author}: <a href="/id{$ticket->getUser()->getId()}">{$ticket->getUser()->getFullName()}</a> | {$ticket->getUser()->getRegistrationIP()} | {_status}: {$ticket->getStatus()}.
</div>
<div class="text" style="padding-top: 10px;border-bottom: #ECECEC solid 1px;">
{$ticket->getText()|noescape}
@ -20,7 +20,7 @@
</div>
<div style="padding-top: 5px;">
{$ticket->getTime()}&nbsp;|&nbsp;
<a href="/support/delete/{$id}?hash={$csrfToken}">Удалить</a>
<a href="/support/delete/{$id}?hash={$csrfToken}">{_delete}</a>
</div><br/>
<div>
<form action="/al_comments.pl/create/support/reply/{$id}" method="post" style="margin:0;">
@ -30,16 +30,16 @@
</div>
<input type="hidden" name="hash" value="{$csrfToken}" />
<br>
<input type="submit" value="Ответить" class="button">
<input type="submit" value="{_write}" class="button">
<select name="status" style="width: unset;">
<option value="1">Есть ответ</option>
<option value="2">Закрыто</option>
<option value="0">Вопрос на рассмотрении</option>
<option value="1">{_support_status_1}</option>
<option value="2">{_support_status_2}</option>
<option value="0">{_support_status_0}</option>
</select>
</form>
</div>
<br/>
<p n:if="!$comments">Комментарии отсутствуют</p>
<p n:if="!$comments">{_no_comments}</p>
{var $printedSupportGreeting = false}
<table n:foreach="$comments as $comment" border="0" style="font-size: 11px;" class="post">
<tbody>
@ -60,7 +60,7 @@
<div class="post-author">
<a href="{$comment->getUser()->getURL()}"><b>
{$comment->getUser()->getFullName()}
</b></a> написал<br>
</b></a> {($comment->getUser()->isFemale() ? tr("post_writes_f") : tr("post_writes_m"))}<br>
<a href="#" class="date">{$comment->getTime()}</a>
</div>
{elseif ($comment->getUType() === 1)}
@ -77,7 +77,7 @@
</span>
</a>
{/if}
написал<br>
{_post_writes_m}<br>
<a href="#" class="date">{$comment->getTime()}</a>
</div>
{/if}
@ -85,7 +85,7 @@
<div class="text" id="text{$comment->getId()}">
{if $comment->getUType() === 1 && !$printedSupportGreeting}
{var $printedSupportGreeting = true}
{_support_greeting_hi}, {$ticket->getUser()->getFullName()}!
{tr("support_greeting_hi", $ticket->getUser()->getFullName())}
<br/>
<br/>
@ -93,7 +93,7 @@
<br/>
<br/>
{_support_greeting_regargs} {=OPENVK_ROOT_CONF["openvk"]["appearance"]["name"]}.
{tr("support_greeting_regards", OPENVK_ROOT_CONF["openvk"]["appearance"]["name"])|noescape}
{else}
{$comment->getText()|noescape}
{/if}
@ -101,7 +101,7 @@
{if $comment->getUType() === 0}
<div class="post-menu">
<a href="/support/comment/{$comment->getId()}/delete">Удалить</a>
<a href="/support/comment/{$comment->getId()}/delete">{_delete}</a>
</div>
{/if}
</div>

View file

@ -1,8 +1,8 @@
{extends "../@layout.xml"}
{block title}Помощь{/block}
{block title}{_menu_help}{/block}
{block header}
Помощь
{_menu_help}
{/block}
{block content}
@ -14,13 +14,13 @@
{if $thisUser}
<div class="tabs">
<div n:attr="id => ($isMain ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($isMain ? 'act_tab_a' : 'ki')" href="/support">Часто задаваемые вопросы</a>
<a n:attr="id => ($isMain ? 'act_tab_a' : 'ki')" href="/support">{_support_faq}</a>
</div>
<div n:attr="id => ($isList ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($isList ? 'act_tab_a' : 'ki')" href="/support?act=list">Список обращений</a>
<a n:attr="id => ($isList ? 'act_tab_a' : 'ki')" href="/support?act=list">{_support_list}</a>
</div>
<div n:attr="id => ($isNew ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($isNew ? 'act_tab_a' : 'ki')" href="/support?act=new">Новое обращение</a>
<a n:attr="id => ($isNew ? 'act_tab_a' : 'ki')" href="/support?act=new">{_support_new}</a>
</div>
</div>
<br>
@ -28,19 +28,19 @@
{if $isNew}
<div class="new">
<form action="/support" method="post" style="margin:0;">
<center><input name="name" style="width: 80%;resize: vertical;" placeholder="Введите тему вашего обращения"></center><br>
<center><textarea name="text" style="width: 80%;resize: vertical;" placeholder="Опишите проблему или предложение"></textarea></center><br>
<center><input name="name" style="width: 80%;resize: vertical;" placeholder="{_support_new_title}"></center><br>
<center><textarea name="text" style="width: 80%;resize: vertical;" placeholder="{_support_new_content}"></textarea></center><br>
<input type="hidden" name="hash" value="{$csrfToken}" />
<center><input type="submit" value="Написать" class="button" style="margin-left:70%;"></center><br>
<center><input type="submit" value="{_write}" class="button" style="margin-left:70%;"></center><br>
</form>
</div>
{/if}{/if}
{if $isMain}
<h4>Часто задаваемые вопросы</h4><br>
<h4>{_support_faq}</h4><br>
<div class="faq">
<div id="faqhead">Для кого этот сайт?</div>
<div id="faqcontent">Сайт предназначен для поиска друзей и знакомых, а также просмотр данных пользователя. Это как справочник города, с помощью которого люди могут быстро найти актуальную информацию о человеке. Также этот сайт подойдёт для ностальгираторов и тех, кто решил слезть с трубы "ВКонтакте", которого клон и является.<br></div>
<div id="faqhead">{_support_faq_title}</div>
<div id="faqcontent">{_support_faq_content}</div>
</div>
{/if}
@ -49,7 +49,7 @@
<tbody>
<tr>
<td width="54" valign="top">
<center><img src="/assets/packages/static/openvk/img/note_icon.png" alt="Заметка" style="margin-top: 17px;"></center>
<center><img src="/assets/packages/static/openvk/img/note_icon.png" alt="{_support_ticket}" style="margin-top: 17px;"></center>
</td>
<td width="345" valign="top">
<div class="post-author">
@ -58,7 +58,7 @@
</a>
</div>
<div class="post-content" style="padding: 4px;font-size: 11px;">
Статус: {$ticket->getStatus()}
{_status}: {$ticket->getStatus()}
</div>
</td>
</tr>

View file

@ -5,18 +5,18 @@
{/block}
{block header}
Helpdesk » Тикеты
Helpdesk » {_support_tickets}
{/block}
{block tabs}
<div n:attr="id => ($act === 'open' ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($act === 'open' ? 'act_tab_a' : 'ki')" href="?">Открытые</a>
<a n:attr="id => ($act === 'open' ? 'act_tab_a' : 'ki')" href="?">{_support_opened}</a>
</div>
<div n:attr="id => ($act === 'answered' ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($act === 'answered' ? 'act_tab_a' : 'ki')" href="?act=answered">С ответом</a>
<a n:attr="id => ($act === 'answered' ? 'act_tab_a' : 'ki')" href="?act=answered">{_support_answered}</a>
</div>
<div n:attr="id => ($act === 'closed' ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($act === 'closed' ? 'act_tab_a' : 'ki')" href="?act=closed">Закрытые</a>
<a n:attr="id => ($act === 'closed' ? 'act_tab_a' : 'ki')" href="?act=closed">{_support_closed}</a>
</div>
{/block}
@ -28,7 +28,7 @@
{block preview}
<center>
<img src="/assets/packages/static/openvk/img/note_icon.png" alt="Тикет" style="margin-top: 8px;">
<img src="/assets/packages/static/openvk/img/note_icon.png" alt="{_support_ticket}" style="margin-top: 8px;">
</center>
{/block}
@ -40,5 +40,5 @@
{var author = $x->getUser()}
{ovk_proc_strtr($x->getContext(), 50)}<br/>
<span class="nobold">Автор: </span> <a href="{$author->getURL()}">{$author->getCanonicalName()}</a>
<span class="nobold">{_author}: </span> <a href="{$author->getURL()}">{$author->getCanonicalName()}</a>
{/block}

View file

@ -1,5 +1,5 @@
{extends "../@layout.xml"}
{block title}Помощь{/block}
{block title}{_menu_help}{/block}
{block header}
{$ticket->getName()}
@ -13,7 +13,7 @@
{$ticket->getName()}
</b>
</a>
<br></b>Статус: {$ticket->getStatus()}
<br></b>{_status}: {$ticket->getStatus()}
</div>
<div class="text" style="padding-top: 10px;border-bottom: #ECECEC solid 1px;">
{$ticket->getText()|noescape}
@ -21,7 +21,7 @@
</div>
<div style="padding-top: 5px;">
{$ticket->getTime()}&nbsp;|&nbsp;
<a href="/support/delete/{$id}?hash={$csrfToken}">Удалить</a>
<a href="/support/delete/{$id}?hash={$csrfToken}">{_delete}</a>
</div>
{if $ticket->getType() !== 2}
<br>
@ -33,12 +33,12 @@
</div>
<input type="hidden" name="hash" value="{$csrfToken}" />
<br>
<input type="submit" value="Написать" class="button">
<input type="submit" value="{_write}" class="button">
</form>
</div>
{/if}
</br>
<p n:if="!$comments">Комментарии отсутствуют</p>
<p n:if="!$comments">{_no_comments}</p>
{var $printedSupportGreeting = false}
<table n:foreach="$comments as $comment" border="0" style="font-size: 11px;" class="post">
<tbody>
@ -59,7 +59,7 @@
<div class="post-author">
<a href="{$comment->getUser()->getURL()}"><b>
{$comment->getUser()->getFullName()}
</b></a> написал<br>
</b></a> {($comment->getUser()->isFemale() ? tr("post_writes_f") : tr("post_writes_m"))}<br>
<a href="#" class="date">{$comment->getTime()}</a>
</div>
{elseif ($comment->getUType() === 1)}
@ -69,7 +69,7 @@
{$comment->getAuthorName()}
</b>
</a>
написал<br>
{_post_writes_m}<br>
<a href="#" class="date">{$comment->getTime()}</a>
</div>
{/if}
@ -77,7 +77,7 @@
<div class="text" id="text{$comment->getId()}">
{if $comment->getUType() === 1 && !$printedSupportGreeting}
{var $printedSupportGreeting = true}
{_support_greeting_hi}, {$ticket->getUser()->getFullName()}!
{tr("support_greeting_hi", $ticket->getUser()->getFullName())}
<br/>
<br/>
@ -85,14 +85,14 @@
<br/>
<br/>
{_support_greeting_regargs} {=OPENVK_ROOT_CONF["openvk"]["appearance"]["name"]}.
{tr("support_greeting_regards", OPENVK_ROOT_CONF["openvk"]["appearance"]["name"])|noescape}
{else}
{$comment->getText()|noescape}
{/if}
</div>
{if $comment->getUType() === 0}
<div class="post-menu">
<a href="/support/comment/{$comment->getId()}/delete">Удалить</a>
<a href="/support/comment/{$comment->getId()}/delete">{_delete}</a>
</div>
{/if}
</div>

View file

@ -113,7 +113,6 @@
"pinned" = "pinned";
"comments_tip" = "Be first, who leaves a comment at this post!";
"your_comment" = "Your comment";
"comments" = "Comments";
"shown" = "Shown";
"x_out_of" = "$1 of";
"wall_zero" = "no posts";
@ -123,6 +122,8 @@
"publish_post" = "Add post";
"view_other_comments" = "View other comments";
"no_comments" = "No comments";
"all_news" = "All news";
"posts_per_page" = "Number of posts per page";
@ -134,7 +135,7 @@
"nsfw_warning" = "This post may have NSFW-content";
"report" = "Report";
"attach_photo" = "Attach photo";
"no_posts_abstract" = "Nobody wrote anything here... At least.";
"no_posts_abstract" = "Nobody wrote anything here... So far.";
"attach_no_longer_available" = "This attachment is no longer available.";
"open_post" = "Open post";
"version_incompatibility" = "This attachment could not be displayed. Probably the database is incompatible with the current version of OpenVK.";
@ -460,9 +461,34 @@
"coins_one" = "One voice";
"coins_other" = "$1 voices";
/* Support */
"support_opened" = "Opened";
"support_answered" = "With a response";
"support_closed" = "Closed";
"support_ticket" = "Ticket";
"support_tickets" = "Tickets";
"support_status_0" = "Issue under consideration";
"support_status_1" = "There's a response";
"support_status_2" = "Closed";
"support_greeting_hi" = "Greetings, $1!";
"support_greeting_regards" = "Best regards,<br/>$1 support team.";
"support_faq" = "Frequently Asked Questions";
"support_list" = "List of tickets";
"support_new" = "New ticket";
"support_faq_title" = "Who is this website for?";
"support_faq_content" = "The site is designed to find friends and acquaintances, as well as view user data. It is like a city directory, through which people can quickly find relevant information about a person.";
"support_new_title" = "Enter the topic of your ticket";
"support_new_content" = "Describe the issue or suggestion";
"comment" = "Comment";
"sender" = "Sender";
"author" = "Author";
/* Errors */
"error_1" = "Incorrect query";

View file

@ -116,7 +116,6 @@
"pinned" = "закреплено";
"comments_tip" = "Будьте первым, кто оставит комментарий!";
"your_comment" = "Ваш комментарий";
"comments" = "Комментарии";
"shown" = "Показано";
"x_out_of" = "$1 из";
"wall_zero" = "нет записей";
@ -126,6 +125,8 @@
"wall_other" = "$1 записей";
"view_other_comments" = "Посмотреть остальные комментарии";
"no_comments" = "Комментарии отсутствуют";
"all_news" = "Все новости";
"posts_per_page" = "Количество записей на странице";
@ -534,12 +535,34 @@
"coins_many" = "$1 голосов";
"coins_other" = "$1 голосов";
"support_greeting_hi" = "Здравствуйте";
"support_greeting_regargs" = "С уважением,<br/>команда поддержки";
/* Support */
"support_opened" = "Открытые";
"support_answered" = "С ответом";
"support_closed" = "Закрытые";
"support_ticket" = "Обращение";
"support_tickets" = "Обращения";
"support_status_0" = "Вопрос на рассмотрении";
"support_status_1" = "Есть ответ";
"support_status_2" = "Закрыто";
"support_greeting_hi" = "Здравствуйте, $1!";
"support_greeting_regards" = "С уважением,<br/>команда поддержки $1.";
"support_faq" = "Часто задаваемые вопросы";
"support_list" = "Список обращений";
"support_new" = "Новое обращение";
"support_faq_title" = "Для кого этот сайт?";
"support_faq_content" = "Сайт предназначен для поиска друзей и знакомых, а также просмотр данных пользователя. Это как справочник города, с помощью которого люди могут быстро найти актуальную информацию о человеке.";
"support_new_title" = "Введите тему вашего обращения";
"support_new_content" = "Опишите проблему или предложение";
"comment" = "Комментарий";
"sender" = "Отправитель";
"author" = "Автор";
/* Errors */
"error_1" = "Некорректный запрос";