Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Перевод ментор и админ тикетов #1156

Merged
merged 15 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions code/controllers/subsystem/tickets/mentor_tickets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
name = "Mentor Tickets"
offline_implications = "Mentor tickets will no longer be marked as stale. No immediate action is needed."
ticket_system_name = "Mentor Tickets"
ticket_name = "Mentor Ticket"
ticket_name = "Ментор тикет"
span_class = "mentorhelp"
anchor_link_extra = ";is_mhelp=1"
ticket_help_type = "Mentorhelp"
ticket_help_span = "mentorhelp"
other_ticket_name = "Admin"
other_ticket_name = "Админ"
other_ticket_permission = R_ADMIN
close_rights = R_MENTOR | R_ADMIN
rights_needed = R_MENTOR | R_ADMIN | R_MOD
db_save_id = "MENTOR"

/datum/controller/subsystem/tickets/mentor_tickets/Initialize()
..()
close_messages = list("<font color='red' size='3'><b>- [ticket_name] Closed -</b></font>",
"<span class='boldmessage'>Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.</span>",
"<span class='[span_class]'>Your [ticket_name] has now been closed.</span>")
close_messages = list("<font color='red' size='3'><b>- [ticket_name] Закрыт -</b></font>",
"<span class='boldmessage'>Пожалуйста, старайтесь как можно более подробно описывать информацию в ментор-хелпе. Менторы не знают всю ситуацию в которой вы находитесь, и им необходимо больше информации для предоставления вам помощи.</span>",
AyIong marked this conversation as resolved.
Show resolved Hide resolved
"<span class='[span_class]'>Ваш [ticket_name] был закрыт.</span>")

response_phrases = list("Known Bug" = "Unfortunately, that's a known bug. Hopefully it gets fixed soon.",
"TM Bug" = "Unfortunately, that's a bug with a current test merge. It should go away when the test merge is removed or fixed.",
"Clear Cache" = "To fix a blank screen, go to the 'Special Verbs' tab and press 'Reload UI Resources'. If that fails, clear your BYOND cache (instructions provided with 'Reload UI Resources'). If that still fails, please ask for help again, stating you have already done these steps.",
"Experiment!" = "Experiment! Part of the joy of this game is trying out various things, and dealing with the consequences if/when they go horribly wrong.",
"How to Objectives" = "There are lots of ways to accomplish your objectives as an antagonist. A direct frontal assault may work, provided you can get in and out before backup arrives. Sneaking in can work, too, as long as you're quick and avoid prying eyes. But don't forget roleplaying methods! Tricking your target into a maze of bear traps is much more interesting than just shooting them with a gun. Even if it fails, you and your target (or its guardians) are likely to have more fun this way, and that's the most important part.",
"MHelp was in Russian" = "Привет! Ты попал на английский Paradise сервер. Возможно, ты ошибся. Русский имеет такое название: SS220\[RU]."
response_phrases = list("Известный баг" = "К сожалению, это известный баг. К счастью, он скоро будет пофикшен.",
AyIong marked this conversation as resolved.
Show resolved Hide resolved
"Баг ТМа" = "К сожалению, это ошибка текущего тестового обновления (ТМ - TestMerge). Она должна исчезнуть после того как ТМ снимут или пофиксят.",
AyIong marked this conversation as resolved.
Show resolved Hide resolved
"Почисти Кэш" = "Чтобы исправить пустой экран, перейдите во вкладку 'Special Verbs' и нажмите 'Reload UI Resources'. Если это не поможет, очистите Кэш Byond, для этого закройте все процессы 'Dream Maker', перейдите в Byond, нажмите шестерёнку и выберите 'Preferences', во вкладке 'Games' будет кнопка 'Clear Cache'. Если ни один из этих способов не помог, советуем обратиться в 'paradise-help' чат на дискорд сервере.",
"Эксперементируй!" = "Эксперементируй! Большая часть удовольствия от этой игры, состоит в том, чтобы пробовать различные штуки и бороться с последствиями, если что-то пошло не так.",
AyIong marked this conversation as resolved.
Show resolved Hide resolved
"Как выполнить цель" = "Есть множество способов выполнить цель на антаге. Если вы собрались действовать на пролом, постарайтесь убедиться в том, что успеете войти и выйти до прибытия подкрепления. Стелс тоже может сработать, если вы будете действовать быстро и избегать лишнего внимания. Но не забывайте об РП способах! Заманить цель в ловушку гораздо интереснее разрядить в неё барабан с револьвера. Даже если вы обосрётесь, таким образом все стороны явно получат больше удовольствия. Не бойтесь обосраться!",
AyIong marked this conversation as resolved.
Show resolved Hide resolved
"Английский тикет" = "Hello! You've reached the Russian Paradise server. Perhaps you mistaken. The English one has this name: \[Paradise Station]."
AyIong marked this conversation as resolved.
Show resolved Hide resolved
)

if(GLOB.configuration.url.github_url)
response_phrases["New Bug"] = "That sounds like a bug! To report it, please go to our <a href='[GLOB.configuration.url.github_url]'>Github page</a>. Then go to 'Issues', click 'New Issue', and fill out the report form. If the report would reveal current-round information, file it after the round ends."
response_phrases["Новый баг"] = "Звучит как баг! Чтобы сообщить о нём, пожалуйста, перейдите на наш <a href='[GLOB.configuration.url.github_url]'>Github</a>. После чего перейдите в 'Issues', нажмите 'New Issue' и заполните форму. Если в репорте будет информация с текущего раунда - отправьте его по окончании. В качестве альтернативы, вы можете написать в канал 'ss13-трекер', однако репорты с Github обрабатываются быстрее!"
AyIong marked this conversation as resolved.
Show resolved Hide resolved

var/unsorted_responses = list()
for(var/key in response_phrases) //build a new list based on the short descriptive keys of the master list so we can send this as the input instead of the full paragraphs to the admin choosing which autoresponse
Expand All @@ -56,19 +56,19 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
var/datum/ticket/T = allTickets[N]
var/client/C = usr.client
if((T.staffAssigned && T.staffAssigned != C) || (T.lastStaffResponse && T.lastStaffResponse != C) || ((T.ticketState != TICKET_OPEN) && (T.ticketState != TICKET_STALE))) //if someone took this ticket, is it the same mentor who is autoresponding? if so, then skip the warning
if(alert(usr, "[T.ticketState == TICKET_OPEN ? "Another mentor appears to already be handling this." : "This ticket is already marked as closed or resolved"] Are you sure you want to continue?", "Confirmation", "Yes", "No") != "Yes")
if(alert(usr, "[T.ticketState == TICKET_OPEN ? "Другой ментор уже занимается вопросом." : "Этот тикет уже помечен как решённый или закрытый."] Вы уверены что хотите продолжить?", "Подтверждение", "Да", "Нет") != "Да")
return
T.assignStaff(C)

var/message_key = input("Select an autoresponse. This will mark the ticket as resolved.", "Autoresponse") as null|anything in sortTim(sorted_responses, GLOBAL_PROC_REF(cmp_text_asc)) //use sortTim and cmp_text_asc to sort alphabetically
var/message_key = input("Выберите автоответ. Это пометит тикет как решённый.", "Автоответ") as null|anything in sortTim(sorted_responses, GLOBAL_PROC_REF(cmp_text_asc)) //use sortTim and cmp_text_asc to sort alphabetically
var/client/ticket_owner = get_client_by_ckey(T.client_ckey)
if(message_key == null)
T.staffAssigned = null //if they cancel we dont need to hold this ticket anymore
return

SEND_SOUND(returnClient(N), sound('sound/effects/adminhelp.ogg'))
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] is autoresponding with:</span> <span class='adminticketalt'>[response_phrases[message_key]]</span>") //for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [ticket_owner]\'s mentorhelp with:<span class='adminticketalt'> [message_key]</span>") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
T.lastStaffResponse = "Autoresponse: [message_key]"
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] использует автоответ:</span> <span class='adminticketalt'>[response_phrases[message_key]]</span>") //for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] ипользовал автоответ в ментор-тикете [ticket_owner]:<span class='adminticketalt'> [message_key]</span>") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
T.lastStaffResponse = "Автоответ: [message_key]"
resolveTicket(N)
log_game("[C] has auto responded to [ticket_owner]\'s mentorhelp with: [response_phrases[message_key]]")
log_game("[C] ипользовал автоответ в ментор-тикете [ticket_owner]: [response_phrases[message_key]]")
Loading
Loading