Add Russian translation (#90)

This commit is contained in:
randomei 2024-12-21 21:00:35 +03:00 committed by GitHub
parent 7d4895d5d4
commit caa7ff6677
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 34 additions and 4 deletions

View File

@ -1,13 +1,17 @@
digilines = {}
digilines.S = minetest.get_translator("digilines")
-- formspec escape translation
digilines.FS = function (...)
return minetest.formspec_escape(digilines.S(...))
end
digilines.mcl = minetest.get_modpath("mcl_core")
-- sounds check
if minetest.get_modpath("default") then digilines.sounds = default end
if digilines.mcl then digilines.sounds = mcl_sounds end
-- Backwards compatibility code.
-- We define a proxy table whose methods can be called with the
-- `foo:bar` notation, and it will redirect the call to the

View File

@ -1,4 +1,5 @@
local S = digilines.S
local FS = digilines.FS
--* parts are currently not possible because you cannot set the pitch of an entity from lua
@ -186,7 +187,7 @@ local lcds = {
}
local reset_meta = function(pos)
minetest.get_meta(pos):set_string("formspec", "field[channel;Channel;${channel}]")
minetest.get_meta(pos):set_string("formspec", "field[channel;"..FS("Channel")..";${channel}]")
end
local clearscreen = function(pos)

View File

@ -1,4 +1,5 @@
local S = digilines.S
local FS = digilines.FS
local GET_COMMAND = "GET"
@ -53,7 +54,7 @@ minetest.register_node("digilines:lightsensor", {
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
meta:set_string("formspec", "field[channel;"..FS("Channel")..";${channel}]")
end,
on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name()

23
locale/diglines.ru.tr Normal file
View File

@ -0,0 +1,23 @@
# textdomain: digilines
### inventory.lua ###
Channel=Канал
Digiline Chest=Диджилайн-сундук
### lcd.lua ###
Digiline LCD=Диджилайн LCD
### lightsensor.lua ###
Digiline Lightsensor=Сенсор света диджилайн
### rtc.lua ###
Digiline Real Time Clock (RTC)=Часы реального времени диджилайн (RTC)
### wire_std.lua ###
Digiline=Диджилайн

View File

@ -1,4 +1,5 @@
local S = digilines.S
local FS = digilines.FS
local GET_COMMAND = "GET"
@ -52,7 +53,7 @@ minetest.register_node("digilines:rtc", {
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
meta:set_string("formspec", "field[channel;"..FS("Channel")..";${channel}]")
end,
on_receive_fields = function(pos, _, fields, sender)
local name = sender:get_player_name()