diff options
author | ywang <yw05@forksworld.de> | 2021-03-27 14:13:53 +0100 |
---|---|---|
committer | Y. Wang <y5nw@protonmail.com> | 2024-11-04 17:17:08 +0100 |
commit | bed66e0f901ae9f8e21675035f174292120fea4f (patch) | |
tree | 917b29a85c4b7c71d1d12a373df652de00e57afd /advtrains/signals.lua | |
parent | 9ada994d5b3bd874e537b0bc9641b925058bdf51 (diff) | |
download | advtrains-bed66e0f901ae9f8e21675035f174292120fea4f.tar.gz advtrains-bed66e0f901ae9f8e21675035f174292120fea4f.tar.bz2 advtrains-bed66e0f901ae9f8e21675035f174292120fea4f.zip |
Rework translation system to use PO files
The French translations are provided by Tanavit. Unfortunately I was not
able to keep this addition as a separate commit as the translation file
was originally added as a .tr file that I then converted to .po file in
the meantime.
Also note that this commit is created from squashing 20+ commits from
the l10n branch that preceded the transition to PO files. In addition to
changes to the locale files (which were all included in the single
commit for transitioning to PO files), these commits also included code
that has now become obsolete for l10n work. In particular, it included a
GUI program written in Tcl to edit .tr files; this program can now be
found in the following repo: https://codeberg.org/y5nw/mt_tr_editor
Co-authored-by: Tanavit <tanavit@posto.ovh>
Diffstat (limited to 'advtrains/signals.lua')
-rw-r--r-- | advtrains/signals.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua index b26c950..74841d3 100644 --- a/advtrains/signals.lua +++ b/advtrains/signals.lua @@ -60,7 +60,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", tiles = {"advtrains_retrosignal.png"}, inventory_image="advtrains_retrosignal_inv.png", drop="advtrains:retrosignal_off", - description=attrans("Lampless Signal (@1)", attrans(r..rotation)), + description=attrans("Lampless Signal"), sunlight_propagates=true, groups = { cracky=3, @@ -124,7 +124,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", tiles = {"advtrains_signal_"..r..".png"}, inventory_image="advtrains_signal_inv.png", drop="advtrains:signal_off", - description=attrans("Signal (@1)", attrans(r..rotation)), + description=attrans("Signal"), groups = { cracky=3, not_blocking_trains=1, @@ -187,6 +187,11 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", if r=="off" then crea=0 end --tunnel signals. no rotations. + local swdesc = { -- needed for xgettext + l = attrans("Wallmounted Signal (l)"), + r = attrans("Wallmounted Signal (r)"), + t = attrans("Wallmounted Signal (t)"), + } for loc, sbox in pairs({l={-1/2, -1/2, -1/4, 0, 1/2, 1/4}, r={0, -1/2, -1/4, 1/2, 1/2, 1/4}, t={-1/2, 0, -1/4, 1/2, 1/2, 1/4}}) do minetest.register_node("advtrains:signal_wall_"..loc.."_"..r, { drawtype = "mesh", @@ -200,7 +205,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", mesh = "advtrains_signal_wall_"..loc..".b3d", tiles = {"advtrains_signal_wall_"..r..".png"}, drop="advtrains:signal_wall_"..loc.."_off", - description=attrans("Wallmounted Signal ("..loc..")"), + description=swdesc[loc], groups = { cracky=3, not_blocking_trains=1, @@ -314,7 +319,7 @@ minetest.register_node("advtrains:across_on", { mesh = "advtrains_across.obj", tiles = {{name="advtrains_across_anim.png", animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.0}}}, drop="advtrains:across_off", - description=attrans("Andrew's Cross (on) (you hacker you)"), + description=attrans("Andrew's Cross"), groups = { cracky=3, not_blocking_trains=1, |