Skip to content

Commit

Permalink
Допереполуперевод
Browse files Browse the repository at this point in the history
  • Loading branch information
AyIong committed Apr 3, 2024
1 parent 6e4c8df commit c2bd002
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
6 changes: 3 additions & 3 deletions code/controllers/subsystem/tickets/mentor_tickets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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 = "Ментор Тикет"
ticket_name = "Ментор тикет"
span_class = "mentorhelp"
anchor_link_extra = ";is_mhelp=1"
ticket_help_type = "Mentorhelp"
Expand All @@ -35,7 +35,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
)

if(GLOB.configuration.url.github_url)
response_phrases["Новый баг"] = "Звучит как баг! Чтобы сообщить о нём, пожалуйста, перейдите на наш <a href='[GLOB.configuration.url.github_url]'>Github/a>. После чего перейдите в 'Issues', нажмите 'New Issue' и заполните форму. Если в репорте будет информация с текущего раунда - отправьте его по окончании. В качестве альтернативы, вы можете написать в канал 'ss13-трекер', однако репорты с Github обрабатываются быстрее!"
response_phrases["Новый баг"] = "Звучит как баг! Чтобы сообщить о нём, пожалуйста, перейдите на наш <a href='[GLOB.configuration.url.github_url]'>Github</a>. После чего перейдите в 'Issues', нажмите 'New Issue' и заполните форму. Если в репорте будет информация с текущего раунда - отправьте его по окончании. В качестве альтернативы, вы можете написать в канал 'ss13-трекер', однако репорты с Github обрабатываются быстрее!"

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 Down Expand Up @@ -67,7 +67,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
return

SEND_SOUND(returnClient(N), sound('sound/effects/adminhelp.ogg'))
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]
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)
Expand Down
70 changes: 35 additions & 35 deletions code/controllers/subsystem/tickets/tickets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SUBSYSTEM_DEF(tickets)

var/span_class = "adminticket"
var/ticket_system_name = "Admin Tickets"
var/ticket_name = "Admin Ticket"
var/ticket_name = "Админ тикет"
var/close_rights = R_ADMIN
var/rights_needed = R_ADMIN | R_MOD

Expand Down Expand Up @@ -63,7 +63,7 @@ SUBSYSTEM_DEF(tickets)
response_phrases["Appeal on the Forums"] = "Appealing a ban must occur on the forums. Privately messaging, or adminhelping about your ban will not resolve it. To appeal your ban, please head to <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>"*/

if(GLOB.configuration.url.github_url)
response_phrases["Новый баг"] = "Звучит как баг! Чтобы сообщить о нём, пожалуйста, перейдите на наш <a href='[GLOB.configuration.url.github_url]'>Github/a>. После чего перейдите в 'Issues', нажмите 'New Issue' и заполните форму. Если в репорте будет информация с текущего раунда - отправьте его по окончании. В качестве альтернативы, вы можете написать в канал 'ss13-трекер', однако репорты с Github обрабатываются быстрее!"
response_phrases["Новый баг"] = "Звучит как баг! Чтобы сообщить о нём, пожалуйста, перейдите на наш <a href='[GLOB.configuration.url.github_url]'>Github</a>. После чего перейдите в 'Issues', нажмите 'New Issue' и заполните форму. Если в репорте будет информация с текущего раунда - отправьте его по окончании. В качестве альтернативы, вы можете написать в канал 'ss13-трекер', однако репорты с Github обрабатываются быстрее!"

/*if(GLOB.configuration.url.exploit_url)
response_phrases["Exploit Report"] = "To report an exploit, please go to our <a href='[GLOB.configuration.url.exploit_url]'>Exploit Report page</a>. Then 'Start New Topic'. Then fill out the topic with as much information about the exploit that you can. If possible, add steps taken to reproduce the exploit. The Development Team will be informed automatically of the post."*/
Expand All @@ -79,10 +79,10 @@ SUBSYSTEM_DEF(tickets)
var/report
for(var/num in stales)
report += "[num], "
message_staff("<span class='[span_class]'>Tickets [report] have been open for over [TICKET_TIMEOUT / 600] minutes. Changing status to stale.</span>")
message_staff("<span class='[span_class]'>Тикеты [report] были открыты более [TICKET_TIMEOUT / 600] минут. Изменения статуса на устаревший.</span>")

/datum/controller/subsystem/tickets/get_stat_details()
return "Tickets: [LAZYLEN(allTickets)]"
return "Тикеты: [LAZYLEN(allTickets)]"

/datum/controller/subsystem/tickets/proc/checkStaleness()
var/stales = list()
Expand Down Expand Up @@ -125,7 +125,7 @@ SUBSYSTEM_DEF(tickets)
ticketNum = T.ticketNum
T.addResponse(C, text)
T.setCooldownPeriod()
to_chat(C.mob, "<span class='[span_class]'>Your [ticket_name] #[ticketNum] remains open! Visit \"My tickets\" under the Admin Tab to view it.</span>")
to_chat(C.mob, "<span class='[span_class]'>Ваш [ticket_name] #[ticketNum] остаётся открытым! Откройте \"My tickets\" во вкладке Admin для просмотра.</span>")
var/url_message = makeUrlMessage(C, text, ticketNum)
message_staff(url_message, NONE, TRUE)
return T
Expand Down Expand Up @@ -157,10 +157,10 @@ SUBSYSTEM_DEF(tickets)
L += "<span class='[ticket_help_span]'>[ticket_help_type]: </span><span class='boldnotice'>[key_and_name] "
if(M)
L += "([ADMIN_QUE(M,"?")]) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_TP(M,"TP")]) ([ADMIN_SM(M,"SM")]) ([admin_jump_link(M)])"
L += "(<a href='?_src_=holder;openticket=[ticketNum][anchor_link_extra]'>TICKET</a>) "
L += "[isAI(M) ? "(<a href='?_src_=holder;adminchecklaws=[M.UID()]'>CL</a>)" : ""] (<a href='?_src_=holder;take_question=[ticketNum][anchor_link_extra]'>TAKE</a>) "
L += "(<a href='?_src_=holder;resolve=[ticketNum][anchor_link_extra]'>RESOLVE</a>) (<a href='?_src_=holder;autorespond=[ticketNum][anchor_link_extra]'>AUTO</a>) "
L += "(<a href='?_src_=holder;convert_ticket=[ticketNum][anchor_link_extra]'>CONVERT</a>) :</span> <span class='[ticket_help_span]'>[msg]</span>"
L += "(<a href='?_src_=holder;openticket=[ticketNum][anchor_link_extra]'>ТИКЕТ</a>) "
L += "[isAI(M) ? "(<a href='?_src_=holder;adminchecklaws=[M.UID()]'>CL</a>)" : ""] (<a href='?_src_=holder;take_question=[ticketNum][anchor_link_extra]'>ВЗЯТЬ</a>) "
L += "(<a href='?_src_=holder;resolve=[ticketNum][anchor_link_extra]'>РЕШИТЬ</a>) (<a href='?_src_=holder;autorespond=[ticketNum][anchor_link_extra]'>АВТО</a>) "
L += "(<a href='?_src_=holder;convert_ticket=[ticketNum][anchor_link_extra]'>КОНВЕРТ</a>) :</span> <span class='[ticket_help_span]'>[msg]</span>"
return L.Join()

//Open a new ticket and populate details then add to the list of open tickets
Expand All @@ -180,7 +180,7 @@ SUBSYSTEM_DEF(tickets)
T.mobControlled = C.mob

//Inform the user that they have opened a ticket
to_chat(C, "<span class='[span_class]'>You have opened [ticket_name] number #[(getTicketCounter() - 1)]! Please be patient and we will help you soon!</span>")
to_chat(C, "<span class='[span_class]'>Вы открыли [ticket_name] номер #[(getTicketCounter() - 1)]! Ожидайте, мы вам поможем!</span>")
SEND_SOUND(C, sound('sound/effects/adminticketopen.ogg'))

message_staff(url_title, NONE, TRUE)
Expand All @@ -190,8 +190,8 @@ SUBSYSTEM_DEF(tickets)
/datum/controller/subsystem/tickets/proc/openTicket(N)
var/datum/ticket/T = allTickets[N]
if(T.ticketState != TICKET_OPEN)
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) re-opened [ticket_name] number [N]</span>")
to_chat_safe(returnClient(N), "<span class='[span_class]'>Your [ticket_name] has been re-opened.</span>")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) переоткрыл [ticket_name] номер [N]</span>")
to_chat_safe(returnClient(N), "<span class='[span_class]'>Ваш [ticket_name] был переоткрыт.</span>")
T.ticketState = TICKET_OPEN
return TRUE

Expand All @@ -200,8 +200,8 @@ SUBSYSTEM_DEF(tickets)
var/datum/ticket/T = allTickets[N]
if(T.ticketState != TICKET_RESOLVED)
T.ticketState = TICKET_RESOLVED
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) resolved [ticket_name] number [N]</span>")
to_chat_safe(returnClient(N), "<span class='[span_class]'>Your [ticket_name] has now been resolved.</span>")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) решил [ticket_name] номер [N]</span>")
to_chat_safe(returnClient(N), "<span class='[span_class]'>Ваш [ticket_name] был решён.</span>")
return TRUE

/datum/controller/subsystem/tickets/proc/addResponse(list/tickets, who, message)
Expand All @@ -213,36 +213,36 @@ SUBSYSTEM_DEF(tickets)
/datum/controller/subsystem/tickets/proc/convert_to_other_ticket(ticketId)
if(!check_rights(rights_needed))
return
if(alert("Are you sure to convert this ticket to an '[other_ticket_name]' ticket?", null,"Yes","No") != "Yes")
if(alert("Вы уверены что хотите конвертировать в '[other_ticket_name]' тикет?", null,"Да","Нет") != "Да")
return
if(!other_ticket_system_staff_check())
return
var/datum/ticket/T = allTickets[ticketId]
if(T.ticket_converted)
to_chat(usr, "<span class='warning'>This ticket has already been converted!</span>")
to_chat(usr, "<span class='warning'>Этот тикет уже конвертирован!</span>")
return
convert_ticket(T)
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) converted [ticket_name] number [ticketId]</span>")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) конвертировал [ticket_name] номер [ticketId]</span>")

/datum/controller/subsystem/tickets/proc/other_ticket_system_staff_check()
var/list/staff = staff_countup(other_ticket_permission)
if(!staff[1])
if(alert("No active staff online to answer the ticket. Are you sure you want to convert the ticket?", null, "No", "Yes") != "Yes")
if(alert("Нет активных администраторов/менторов. Вы уверены что хотите конвертировать?", null, "Нет", "Да") != "Да")
return FALSE
return TRUE

/datum/controller/subsystem/tickets/proc/convert_ticket(datum/ticket/T)
var/client/C = usr.client
var/client/owner = get_client_by_ckey(T.client_ckey)
if(!owner)
to_chat(C, "<span class='notice'>Can't convert the ticket of a disconnected user.")
to_chat(C, "<span class='notice'Невозможно конвертировать тикет отключённого игрока.")
return
T.ticketState = TICKET_CLOSED
T.ticket_converted = TRUE
to_chat_safe(owner, list("<span class='[span_class]'>[key_name_hidden(C)] has converted your ticket to a [other_ticket_name] ticket.</span>",\
"<span class='[span_class]'>Be sure to use the correct type of help next time!</span>"))
message_staff("<span class='[span_class]'>[C] has converted ticket number [T.ticketNum] to a [other_ticket_name] ticket.</span>")
log_game("[C] has converted ticket number [T.ticketNum] to a [other_ticket_name] ticket.")
to_chat_safe(owner, list("<span class='[span_class]'>[key_name_hidden(C)] конвертировал ваш тикет в [other_ticket_name] тикет.</span>",\
"<span class='[span_class]'>Постарайтесь использовать правильный тикет в следующий раз!</span>"))
message_staff("<span class='[span_class]'>[C] конвертировал тикет номер [T.ticketNum] в [other_ticket_name] тикет.</span>")
log_game("[C] конвертировал тикет номер [T.ticketNum] в [other_ticket_name] тикет.")
create_other_system_ticket(T)

/datum/controller/subsystem/tickets/proc/create_other_system_ticket(datum/ticket/T)
Expand All @@ -256,15 +256,15 @@ SUBSYSTEM_DEF(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 admin who is autoresponding? if so, then skip the warning
if(alert(usr, "[T.ticketState == TICKET_OPEN ? "Another admin 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 sorted_responses
var/message_key = input("Выберите автоответ. Это пометит тикет как решённый.", "Автоответ") as null|anything in sorted_responses
var/client/ticket_owner = get_client_by_ckey(T.client_ckey)
if(!ticket_owner)
to_chat(C, "<span class='notice'>Can't respond to the ticket of a disconnected user.")
to_chat(C, "<span class='notice'>Невозможно ответить на тикет отключённого игрока.")
return
switch(message_key)
if(null) //they cancelled
Expand All @@ -275,25 +275,25 @@ SUBSYSTEM_DEF(tickets)
to_chat(C, "Невозможно закрыть тикет")
if("Man Up")
C.man_up(returnClient(N))
T.lastStaffResponse = "Autoresponse: [message_key]"
T.lastStaffResponse = "Автоответ: [message_key]"
resolveTicket(N)
message_staff("[C] has auto responded to [ticket_owner]\'s adminhelp with:<span class='adminticketalt'> [message_key]</span>")
log_game("[C] has auto responded to [T.client_ckey]\'s adminhelp with: [response_phrases[message_key]]")
message_staff("[C] ипользовал автоответ в админ-тикете [ticket_owner]:<span class='adminticketalt'> [message_key]</span>")
log_game("[C] ипользовал автоответ в админ-тикете [T.client_ckey]: [response_phrases[message_key]]")
if("Ментор-хелп")
convert_ticket(T)
else
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 adminhelp 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 adminhelp with: [response_phrases[message_key]]")
log_game("[C] ипользовал автоответ в админ-тикете [ticket_owner]: [response_phrases[message_key]]")

//Set ticket state with key N to closed
/datum/controller/subsystem/tickets/proc/closeTicket(N)
var/datum/ticket/T = allTickets[N]
if(T.ticketState != TICKET_CLOSED)
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) closed [ticket_name] number [N]</span>")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) закрыл [ticket_name] номер [N]</span>")
to_chat_safe(returnClient(N), close_messages)
T.ticketState = TICKET_CLOSED
return TRUE
Expand Down Expand Up @@ -324,7 +324,7 @@ SUBSYSTEM_DEF(tickets)

/datum/controller/subsystem/tickets/proc/assignStaffToTicket(client/C, N)
var/datum/ticket/T = allTickets[N]
if(T.staffAssigned != null && T.staffAssigned != C && alert("Ticket is already assigned to [T.staffAssigned.ckey]. Are you sure you want to take it?", "Take ticket", "Yes", "No") != "Yes")
if(T.staffAssigned != null && T.staffAssigned != C && alert("Тикет уже взял [T.staffAssigned.ckey]. Вы уверены что хотите взять его?", "Взять тикет", "Да", "Нет") != "Да")
return FALSE
T.assignStaff(C)
return TRUE
Expand Down

0 comments on commit c2bd002

Please sign in to comment.