mirror of
https://github.com/t-affeldt/regional_weather.git
synced 2024-11-18 00:18:21 +01:00
Implement i18n support
This commit is contained in:
parent
920f80e044
commit
0fd6942225
@ -5,7 +5,10 @@ then return end
|
||||
|
||||
local BLOCK_NAME = "regional_weather:ice"
|
||||
|
||||
local S = regional_weather.i18n
|
||||
|
||||
minetest.register_node(BLOCK_NAME, {
|
||||
description = S("Thin Ice"),
|
||||
tiles = {"(default_ice.png^[colorize:#ffffff:50)^[opacity:200"},
|
||||
paramtype = "light",
|
||||
groups = {
|
||||
|
@ -13,6 +13,8 @@ local GROUND_COVERS = {
|
||||
"default:permafrost_with_stones"
|
||||
}
|
||||
|
||||
local S = regional_weather.i18n
|
||||
|
||||
-- clean up puddles if disabled
|
||||
if not regional_weather.settings.puddles then
|
||||
-- set all puddle nodes to air
|
||||
@ -57,6 +59,7 @@ for i = 1, VARIANT_COUNT do
|
||||
texture = texture .. "^[transformFX"
|
||||
end
|
||||
minetest.register_node(name, {
|
||||
description = S("Puddle"),
|
||||
tiles = { texture },
|
||||
drawtype = "nodebox",
|
||||
pointable = false,
|
||||
|
@ -2,6 +2,8 @@ local BLOCK_PREFIX = "regional_weather:snow_cover_"
|
||||
local CHECK_DISTANCE = 3
|
||||
local MAX_AMOUNT = 20
|
||||
|
||||
local S = regional_weather.i18n
|
||||
|
||||
if not minetest.get_modpath("default")
|
||||
or default.node_sound_snow_defaults == nil
|
||||
or not regional_weather.settings.snow then
|
||||
@ -25,6 +27,7 @@ for i = 1,5 do
|
||||
}
|
||||
|
||||
minetest.register_node(BLOCK_PREFIX .. i, {
|
||||
description = S("Snow Cover"),
|
||||
tiles = { "default_snow.png" },
|
||||
drawtype = "nodebox",
|
||||
buildable_to = i < 3,
|
||||
|
4
init.lua
4
init.lua
@ -33,11 +33,13 @@ regional_weather.settings.min_height = get_setting_number("min_height", -50)
|
||||
regional_weather.settings.cloud_height = get_setting_number("cloud_height", 120)
|
||||
regional_weather.settings.cloud_scale = get_setting_number("cloud_scale", 40)
|
||||
|
||||
regional_weather.i18n = minetest.get_translator("regional_weather")
|
||||
|
||||
-- warn about clouds being overriden by MTG weather
|
||||
if climate_mod.settings.skybox
|
||||
and minetest.get_modpath("weather")
|
||||
and get_setting_bool("enable_weather", true, true) then
|
||||
minetest.log("warning", "[Regional Weather] Disable MTG weather for the best experience")
|
||||
minetest.log("warning", "[Regional Weather] " .. S("Disable MTG weather for the best experience"))
|
||||
end
|
||||
|
||||
-- import individual weather types
|
||||
|
5
locale/regional_weather.de.tr
Normal file
5
locale/regional_weather.de.tr
Normal file
@ -0,0 +1,5 @@
|
||||
# textdomain:regional_weather
|
||||
Disable MTG weather for the best experience=Deaktiviere MTG weather für die beste Spielerfahrung
|
||||
Thin Ice=Dünnes Eis
|
||||
Puddle=Pfütze
|
||||
Snow Cover=Schnee
|
5
locale/template.txt
Normal file
5
locale/template.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# textdomain:regional_weather
|
||||
Disable MTG weather for the best experience=
|
||||
Thin Ice=
|
||||
Puddle=
|
||||
Snow Cover=
|
Loading…
Reference in New Issue
Block a user