Skip to content

Commit

Permalink
zh_TW Translations (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emojigit committed Aug 13, 2022
1 parent f03cd02 commit d35f7f1
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 9 deletions.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

digilines = {}
digilines.S = minetest.get_translator("digilines")

-- Backwards compatibility code.
-- We define a proxy table whose methods can be called with the
Expand Down
10 changes: 6 additions & 4 deletions inventory.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local S = digilines.S

local pipeworks_enabled = minetest.get_modpath("pipeworks") ~= nil

-- Sends a message onto the Digilines network.
Expand Down Expand Up @@ -146,7 +148,7 @@ end

minetest.register_alias("digilines_inventory:chest", "digilines:chest")
minetest.register_node("digilines:chest", {
description = "Digiline Chest",
description = S("Digiline Chest"),
tiles = {
"default_chest_top.png"..tubeconn,
"default_chest_top.png"..tubeconn,
Expand All @@ -161,14 +163,14 @@ minetest.register_node("digilines:chest", {
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Digiline Chest")
meta:set_string("infotext", S("Digiline Chest"))
meta:set_string("formspec", "size[8,10]"..
((default and default.gui_bg) or "")..
((default and default.gui_bg_img) or "")..
((default and default.gui_slots) or "")..
"label[0,0;Digiline Chest]"..
"label[0,0;" .. S("Digiline Chest") .. "]" ..
"list[current_name;main;0,1;8,4;]"..
"field[2,5.5;5,1;channel;Channel;${channel}]"..
"field[2,5.5;5,1;channel;" .. S("Channel") .. ";${channel}]"..
((default and default.get_hotbar_bg) and default.get_hotbar_bg(0,6) or "")..
"list[current_player;main;0,6;8,4;]"..
"listring[]")
Expand Down
4 changes: 3 additions & 1 deletion lcd.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local S = digilines.S

--* parts are currently not possible because you cannot set the pitch of an entity from lua

-- Font: 04.jp.org
Expand Down Expand Up @@ -270,7 +272,7 @@ local lcd_box = {
minetest.register_alias("digilines_lcd:lcd", "digilines:lcd")
minetest.register_node("digilines:lcd", {
drawtype = "nodebox",
description = "Digiline LCD",
description = S("Digiline LCD"),
inventory_image = "lcd_lcd.png",
wield_image = "lcd_lcd.png",
tiles = {"lcd_anyside.png"},
Expand Down
4 changes: 3 additions & 1 deletion lightsensor.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local S = digilines.S

local GET_COMMAND = "GET"

local lsensor_nodebox =
Expand Down Expand Up @@ -31,7 +33,7 @@ end

minetest.register_alias("digilines_lightsensor:lightsensor", "digilines:lightsensor")
minetest.register_node("digilines:lightsensor", {
description = "Digiline Lightsensor",
description = S("Digiline Lightsensor"),
drawtype = "nodebox",
tiles = {"digilines_lightsensor.png"},

Expand Down
17 changes: 17 additions & 0 deletions locale/digilines.zh_TW.tr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# textdomain: digilines

### inventory.lua ###
Digiline Chest=訊纜儲物箱
Channel=頻道

### lcd.lua ###
Digiline LCD=訊纜 LCD

### lightsensor.lua ###
Digiline Lightsensor=訊纜光感應器

### rtc.lua ###
Digiline Real Time Clock (RTC)=訊纜實時時鐘

### wire_std.lua ###
Digiline=訊纜
17 changes: 17 additions & 0 deletions locale/template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# textdomain: digilines

### inventory.lua ###
Digiline Chest=
Channel=

### lcd.lua ###
Digiline LCD=

### lightsensor.lua ###
Digiline Lightsensor=

### rtc.lua ###
Digiline Real Time Clock (RTC)=

### wire_std.lua ###
Digiline=
4 changes: 3 additions & 1 deletion rtc.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local S = digilines.S

local GET_COMMAND = "GET"

local rtc_nodebox =
Expand Down Expand Up @@ -26,7 +28,7 @@ end

minetest.register_alias("digilines_rtc:rtc", "digilines:rtc")
minetest.register_node("digilines:rtc", {
description = "Digiline Real Time Clock (RTC)",
description = S("Digiline Real Time Clock (RTC)"),
drawtype = "nodebox",
tiles = {"digilines_rtc.png"},

Expand Down
4 changes: 3 additions & 1 deletion wire_std.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local S = digilines.S

-- naming scheme: wire:(xp)(zp)(xm)(zm)_on/off
-- The conditions in brackets define whether there is a digiline at that place or not
-- 1 = there is one; 0 = there is none
Expand Down Expand Up @@ -36,7 +38,7 @@ for zmy=0, 1 do

if nodeid == "00000000" then
groups = {dig_immediate = 3}
wiredesc = "Digiline"
wiredesc = S("Digiline")
else
groups = {dig_immediate = 3, not_in_creative_inventory = 1}
end
Expand Down

0 comments on commit d35f7f1

Please sign in to comment.