Added localization support

This commit is contained in:
Diego Martínez
2013-03-05 05:18:56 -02:00
parent d6c8e075a4
commit 6133234771
15 changed files with 781 additions and 245 deletions

View File

@ -1,10 +1,19 @@
-- This file supplies glowlights
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
-- Yellow
minetest.register_node('homedecor:glowlight_thick_yellow', {
description = "Yellow Glowlight (thick)",
description = S("Yellow Glowlight (thick)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_yellow_tb.png',
@ -32,7 +41,7 @@ minetest.register_node('homedecor:glowlight_thick_yellow', {
})
minetest.register_node('homedecor:glowlight_thick_yellow_wall', {
description = "Yellow Glowlight (thick, on wall)",
description = S("Yellow Glowlight (thick, on wall)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_thick_yellow_sides.png',
@ -60,7 +69,7 @@ minetest.register_node('homedecor:glowlight_thick_yellow_wall', {
})
minetest.register_node('homedecor:glowlight_thin_yellow', {
description = "Yellow Glowlight (thin)",
description = S("Yellow Glowlight (thin)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_yellow_tb.png',
@ -88,7 +97,7 @@ minetest.register_node('homedecor:glowlight_thin_yellow', {
})
minetest.register_node('homedecor:glowlight_thin_yellow_wall', {
description = "Yellow Glowlight (thin, on wall)",
description = S("Yellow Glowlight (thin, on wall)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_thin_yellow_sides.png',
@ -116,7 +125,7 @@ minetest.register_node('homedecor:glowlight_thin_yellow_wall', {
})
minetest.register_node('homedecor:glowlight_small_cube_yellow', {
description = "Yellow Glowlight (small cube)",
description = S("Yellow Glowlight (small cube)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_cube_yellow_tb.png',
@ -144,7 +153,7 @@ minetest.register_node('homedecor:glowlight_small_cube_yellow', {
})
minetest.register_node('homedecor:glowlight_small_cube_yellow_ceiling', {
description = "Yellow Glowlight (small cube, on ceiling)",
description = S("Yellow Glowlight (small cube, on ceiling)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_cube_yellow_tb.png',
@ -174,7 +183,7 @@ minetest.register_node('homedecor:glowlight_small_cube_yellow_ceiling', {
-- White
minetest.register_node('homedecor:glowlight_thick_white', {
description = "White Glowlight (thick)",
description = S("White Glowlight (thick)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_white_tb.png',
@ -202,7 +211,7 @@ minetest.register_node('homedecor:glowlight_thick_white', {
})
minetest.register_node('homedecor:glowlight_thick_white_wall', {
description = "White Glowlight (thick, on wall)",
description = S("White Glowlight (thick, on wall)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_thick_white_sides.png',
@ -230,7 +239,7 @@ minetest.register_node('homedecor:glowlight_thick_white_wall', {
})
minetest.register_node('homedecor:glowlight_thin_white', {
description = "White Glowlight (thin)",
description = S("White Glowlight (thin)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_white_tb.png',
@ -258,7 +267,7 @@ minetest.register_node('homedecor:glowlight_thin_white', {
})
minetest.register_node('homedecor:glowlight_thin_white_wall', {
description = "White Glowlight (thin, on wall)",
description = S("White Glowlight (thin, on wall)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_thin_white_sides.png',
@ -286,7 +295,7 @@ minetest.register_node('homedecor:glowlight_thin_white_wall', {
})
minetest.register_node('homedecor:glowlight_small_cube_white', {
description = "White Glowlight (small cube)",
description = S("White Glowlight (small cube)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_cube_white_tb.png',
@ -314,7 +323,7 @@ minetest.register_node('homedecor:glowlight_small_cube_white', {
})
minetest.register_node('homedecor:glowlight_small_cube_white_ceiling', {
description = "White Glowlight (small cube, on ceiling)",
description = S("White Glowlight (small cube, on ceiling)"),
drawtype = "nodebox",
tiles = {
'homedecor_glowlight_cube_white_tb.png',