1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-22 16:10:18 +01:00

MT5 translaton for homedecor_books

Separate translation of colors because it depends of context for some
languages (eg. french); improved translation of colors in french.
This commit is contained in:
Louis Royer 2020-08-04 20:27:11 +02:00
parent c6e35a4e5c
commit fc28c4385a
13 changed files with 161 additions and 36 deletions

View File

@ -1,5 +0,0 @@
homedecor_common
default
unifieddyes
creative

View File

@ -1,16 +1,24 @@
local S = homedecor.gettext
local function N_(x) return x end
local S = minetest.get_translator("homedecor_books")
local bookcolors = {
{ N_("red"), 0xffd26466 },
{ N_("green"), 0xff62aa66 },
{ N_("blue"), 0xff8686d7 },
{ N_("violet"), 0xff9c65a7 },
{ N_("grey"), 0xff757579 },
{ N_("brown"), 0xff896958 }
{ "red", 0xffd26466 },
{ "green", 0xff62aa66 },
{ "blue", 0xff8686d7 },
{ "violet", 0xff9c65a7 },
{ "grey", 0xff757579 },
{ "brown", 0xff896958 }
}
local color_locale = {
red = S("red") ,
green = S("green"),
blue = S("blue"),
violet = S("violet"),
grey = S("grey"),
brown = S("brown"),
}
local BOOK_FORMNAME = "homedecor:book_form"
local player_current_book = { }
@ -39,7 +47,7 @@ for _, c in ipairs(bookcolors) do
end
homedecor.register("book_"..color, {
description = S("Writable Book (@1)", S(color)),
description = S("Writable Book (@1)", color_locale[color]),
mesh = "homedecor_book.obj",
tiles = {
{ name = "homedecor_book_cover.png", color = hue },
@ -153,6 +161,16 @@ for _, c in ipairs(bookcolors) do
}
})
-- crafting
minetest.register_craft({
type = "shapeless",
output = "homedecor:book_"..color,
recipe = {
"dye:"..color,
"default:book"
},
})
end
minetest.register_on_player_receive_fields(function(player, form_name, fields)
@ -183,29 +201,8 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
return true
end)
-- crafting
local bookcolors = {
"red",
"green",
"blue",
"violet",
"grey",
"brown"
}
for _, color in ipairs(bookcolors) do
minetest.register_craft({
type = "shapeless",
output = "homedecor:book_"..color,
recipe = {
"dye:"..color,
"default:book"
},
})
end
-- aliases
minetest.register_alias("homedecor:book", "homedecor:book_grey")

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 hat in ein Buch geschrieben (Titel: „@2”): „@3” am Ort @4
Writable Book (@1)=Schreibbares Buch (@1)
blue=blau
brown=braun
green=grün
grey=grau
red=rot
violet=violett

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 ha escrito en un libro (título: "@2"): "@3" en la ubicación @4
Writable Book (@1)=Libro (@1)
blue=azul
brown=marrón
green=verde
grey=gris
red=roja
violet=violeta

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 a écrit dans un livre (titre: "@2"): "@3" à l'emplacement @4
Writable Book (@1)=Livre inscriptible (@1)
blue=bleu
brown=marron
green=vert
grey=vert
red=rouge
violet=violet

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=
Writable Book (@1)=Gambe in ottone del tavolo (@1)
blue=blu
brown=
green=verde
grey=verde scuro
red=rosso
violet=viola

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 telah menulis dalam buku (tajuk: "@2"): "@3" di lokasi @4
Writable Book (@1)=Buku Boleh Ditulis (@1)
blue=Biru
brown=Perang
green=Hijau
grey=Kelabu
red=Merah
violet=Ungu

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 escreveu um livro (título: "@2"): "@3" na localização @4
Writable Book (@1)=Livro que pode ser escrito (@1)
blue=azul
brown=marrom
green=verde
grey=cinza
red=vermelho
violet=violeta

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 escreveu um livro (título: "@2"): "@3" na localização @4
Writable Book (@1)=Livro que pode ser escrito (@1)
blue=azul
brown=marrom
green=verde
grey=cinza
red=vermelho
violet=violeta

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@1 написал в книге (заголовок: "@2"): "@3" в позиции @4
Writable Book (@1)=Записная книга (@1)
blue=
brown=
green=зелёный
grey=
red=красный
violet=

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=@我在一本书中写过(书名:\@2\\@3\,地点@4
Writable Book (@1)=可写书(@1
blue=蓝色
brown=棕色的
green=绿色
grey=灰色
red=红色
violet=紫罗兰

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_books
### init.lua ###
@1 has written in a book (title: "@2"): "@3" at location @4=
Writable Book (@1)=
blue=
brown=
green=
grey=
red=
violet=

3
homedecor_books/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = homedecor_books
description = Homedecor mod: books
depends = homedecor_common, default, unifieddyes, creative