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

translation: brig cells and computer #6224

Draft
wants to merge 3 commits into
base: master220
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
58 changes: 33 additions & 25 deletions code/__HELPERS/time.dm
syndicatecat marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,16 @@
/proc/seconds_to_time(var/seconds as num)
var/numSeconds = seconds % 60
var/numMinutes = (seconds - numSeconds) / 60
return "[numMinutes] [numMinutes > 1 ? "minutes" : "minute"] and [numSeconds] seconds"
return "[numMinutes] [declension_ru(numMinutes, "минуту", "минуты", "минут")]"

/proc/seconds_to_time_ru(num, single_name, double_name, multiple_name)
if(!isnum(num) || round(num) != num)
return double_name
if(((num % 10) == 1) && ((num % 100) != 11))
return single_name
if(((num % 10) in 2 to 4) && !((num % 100) in 12 to 14))
return double_name
return multiple_name
Comment on lines +130 to +137
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/proc/seconds_to_time_ru(num, single_name, double_name, multiple_name)
if(!isnum(num) || round(num) != num)
return double_name
if(((num % 10) == 1) && ((num % 100) != 11))
return single_name
if(((num % 10) in 2 to 4) && !((num % 100) in 12 to 14))
return double_name
return multiple_name


//Take a value in seconds and makes it display like a clock
/proc/seconds_to_clock(var/seconds as num)
Expand All @@ -141,8 +150,7 @@
var/hour = null
var/day = null

if(!second)
return "0 seconds"

if(second >= 60)
minute = round_down(second / 60)
second = round(second - (minute * 60), 0.1)
Expand All @@ -151,24 +159,24 @@
second_adjusted = round(second) //used to prevent '1 seconds' being shown
if(day || hour || minute)
if(second_adjusted == 1 && second >= 1)
second = " and 1 second"
second = " и 1 секунду"
else if(second > 1)
second = " and [second_adjusted] seconds"
second = " и [second_adjusted] секунд"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
second = " и [second_adjusted] секунд"
second = " и [second_adjusted] секунд[declension_ru(second_adjusted, "у", "ы", "")]"

Используй прок declension_ru() здесь и ниже, чтобы числовые существительные нормально отображались.

else //shows a fraction if seconds is < 1
if(second_rounded) //no sense rounding again if it's already done
second = " and [second] seconds"
second = " и [second] секунд"
else
second = " and [round(second, 0.1)] seconds"
second = " и [round(second, 0.1)] секунд"
else
if(second_adjusted == 1 && second >= 1)
second = "1 second"
second = "1 секунду"
else if(second > 1)
second = "[second_adjusted] seconds"
second = "[second_adjusted] секунд"
else
if(second_rounded)
second = "[second] seconds"
second = "[second] секунд"
else
second = "[round(second, 0.1)] seconds"
second = "[round(second, 0.1)] секунд"
else
second = null

Expand All @@ -180,18 +188,18 @@
if(minute) //alot simpler from here since you don't have to worry about fractions
if(minute != 1)
if((day || hour) && second)
minute = ", [minute] minutes"
minute = ", [minute] минут"
else if((day || hour) && !second)
minute = " and [minute] minutes"
minute = " и [minute] минут"
else
minute = "[minute] minutes"
minute = "[minute] минут"
else
if((day || hour) && second)
minute = ", 1 minute"
minute = ", 1 минуту"
else if((day || hour) && !second)
minute = " and 1 minute"
minute = " и 1 минуту"
else
minute = "1 minute"
minute = "1 минута"
else
minute = null

Expand All @@ -203,27 +211,27 @@
if(hour)
if(hour != 1)
if(day && (minute || second))
hour = ", [hour] hours"
hour = ", [hour] часов"
else if(day && (!minute || !second))
hour = " and [hour] hours"
hour = " и [hour] часов"
else
hour = "[hour] hours"
hour = "[hour] часов"
else
if(day && (minute || second))
hour = ", 1 hour"
hour = ", 1 час"
else if(day && (!minute || !second))
hour = " and 1 hour"
hour = " и 1 час"
else
hour = "1 hour"
hour = "1 час"
else
hour = null

if(!day)
return "[hour][minute][second]"
if(day > 1)
day = "[day] days"
day = "[day] дня"
else
day = "1 day"
day = "1 день"

return "[day][hour][minute][second]"

Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/computer/brigcells.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/machinery/computer/brigcells
name = "cell management computer"
desc = "Используется для управления тюремными камерами."
desc = "Используется для дистанционного управления камерами заключённых."
icon_keyboard = "security_key"
icon_screen = "cell_monitor"
use_power = IDLE_POWER_USE
Expand Down Expand Up @@ -64,7 +64,7 @@
var/obj/machinery/door_timer/T = locate(ref)
if (T)
T.timer_end()
T.Radio.autosay("Timer stopped manually from a cell management console.", T.name, "Security", list(z))
T.Radio.autosay("Таймер был вручную остановлен через консоль.", T.name, "Security", list(z))
return TRUE

return FALSE
Loading
Loading