Adicição de sistema se segurança e novos idiomas
parent
2bbd8ce894
commit
9b5c7d13d7
21
idioma.lua
21
idioma.lua
|
@ -15,11 +15,15 @@ local S, NS, SS, SNS = dofile(minetest.get_modpath("mymenu").."/lib/intllib.lua"
|
|||
-- Algoritimo para pegar idioma com "mylang"
|
||||
local getlang, setlang = dofile(minetest.get_modpath(minetest.get_current_modname()).."/lib/mylang.lua")
|
||||
|
||||
-- Tabela de idiomas selecionaveis
|
||||
-- Tabela de idiomas selecionaveis ISO 639
|
||||
local tb_idiomas = {
|
||||
["English"] = "en",
|
||||
["Portugues"] = "pt",
|
||||
["Espanol"] = "es",
|
||||
["Italiano"] = "it",
|
||||
["Deutsch"] = "de",
|
||||
["Nederlands"] = "nl",
|
||||
["Français"] = "fr",
|
||||
}
|
||||
-- Tabela de codigos com o numero
|
||||
tb_idiomas_code = {}
|
||||
|
@ -43,18 +47,25 @@ local acessar_menu_idiomas = function(player)
|
|||
local name = player:get_player_name()
|
||||
local lang = getlang(name) or "en" -- não pode ser nulo
|
||||
|
||||
-- Idioma salvo
|
||||
local idioma_st = ""
|
||||
|
||||
-- Idioma selecionado
|
||||
local idioma_sel = "1"
|
||||
if lang and tb_idiomas_code[lang] then
|
||||
idioma_sel = tonumber(tb_idiomas_code[lang])
|
||||
if lang then
|
||||
if tb_idiomas_code[lang] then
|
||||
idioma_sel = tonumber(tb_idiomas_code[lang])
|
||||
else
|
||||
-- mostra idioma salvo
|
||||
idioma_st = lang..","
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local formspec = "size[5,5]"
|
||||
..default.gui_bg
|
||||
..default.gui_bg_img
|
||||
.."label[0,0;"..SS(lang, "Escolha seu idioma").."]"
|
||||
.."dropdown[0.125,1;5,5;idioma;"..st_idiomas..";"..(idioma_sel).."]"
|
||||
.."dropdown[0.125,1;5,5;idioma;"..idioma_st..st_idiomas..";"..(idioma_sel).."]"
|
||||
.."button_exit[0,4.3;3,1;voltar;"..SS(lang, "Voltar").."]"
|
||||
|
||||
minetest.show_formspec(name, "mymenu:idiomas", formspec)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-12 11:57-0300\n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: German\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Escolha seu idioma"
|
||||
msgstr "Wahlen Sie Ihre Sprache"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Voltar"
|
||||
msgstr "Zuruck"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Idioma"
|
||||
msgstr "Sprache"
|
23
locale/en.po
23
locale/en.po
|
@ -1,20 +1,19 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# FULL NAME <EMAIL@ADDRESS>, 2017.
|
||||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-11 14:39-0300\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"PO-Revision-Date: 2017-08-12 11:56-0300\n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: English\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
|
@ -24,7 +23,7 @@ msgstr "Choose your language"
|
|||
|
||||
#: idioma.lua
|
||||
msgid "Voltar"
|
||||
msgstr "Return"
|
||||
msgstr "Back"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Idioma"
|
||||
|
|
20
locale/es.po
20
locale/es.po
|
@ -1,20 +1,20 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# FULL NAME <EMAIL@ADDRESS>, 2017.
|
||||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-11 14:39-0300\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: Spanish\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-12 11:59-0300\n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: French\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Escolha seu idioma"
|
||||
msgstr "Choisissez votre langue"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Voltar"
|
||||
msgstr "Retour"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Idioma"
|
||||
msgstr "Langue"
|
|
@ -0,0 +1,31 @@
|
|||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-11 14:39-0300\n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: Italian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Escolha seu idioma"
|
||||
msgstr "Scegli la lingua"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Voltar"
|
||||
msgstr "Indietro"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Idioma"
|
||||
msgstr "Lingua"
|
|
@ -0,0 +1,30 @@
|
|||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-12 11:55-0300\n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: Dutch\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Escolha seu idioma"
|
||||
msgstr "Kies uw taal"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Voltar"
|
||||
msgstr "Back"
|
||||
|
||||
#: idioma.lua
|
||||
msgid "Idioma"
|
||||
msgstr "Taal"
|
22
locale/pt.po
22
locale/pt.po
|
@ -1,20 +1,20 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# FULL NAME <EMAIL@ADDRESS>, 2017.
|
||||
# Translation for MyMenu Mod
|
||||
# Copyright (C) LGPL v3.0
|
||||
# This file is distributed under the same license as the MyMenu package.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
# BrunoMine <borgesdossantosbruno@gmail.com>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Project-Id-Version: v1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-11 14:38-0300\n"
|
||||
"PO-Revision-Date: 2017-08-11 14:38-0300\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"PO-Revision-Date: 2017-08-11 14:39-0300\n"
|
||||
"Last-Translator: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language-Team: BrunoMine <borgesdossantosbruno@gmail.com>\n"
|
||||
"Language: Portuguese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
|
|
Loading…
Reference in New Issue