1
0
mirror of https://github.com/minetest-mods/intllib.git synced 2024-11-16 23:40:30 +01:00

Update intltest mod for use SS and SNS methods

This commit is contained in:
BrunoMine 2017-07-16 12:59:05 -03:00
parent 4e848b03a9
commit 43ca3f2c90
5 changed files with 151 additions and 4 deletions

View File

@ -1,7 +1,7 @@
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S, NS, SS, SNS = dofile(MP.."/intllib.lua")
local use_count = 0
@ -26,3 +26,18 @@ minetest.register_craftitem("intltest:test", {
minetest.chat_send_player(user:get_player_name(), message)
end,
})
minetest.log("action", "Testing SS method")
for _,lang in ipairs({nil, "es", "pt", "de"}) do
minetest.log("action", "("..dump(lang)..")"..SS(lang, "Test: @1 @2", SS(lang, "Green"), SS(lang, "Car")))
end
minetest.log("action", "Testing SNS method")
for n=1, 2 do
minetest.log("action", "(nil)"..SNS(nil, "Hello, @1 world!", "Hello, @1 worlds!", n, n))
end
for _,lang in ipairs({"es", "pt", "de"}) do
for n=1, 2 do
minetest.log("action", "("..lang..")"..SNS(lang, "Hello, @1 world!", "Hello, @1 worlds!", n, n))
end
end

55
intltest/locale/de.po Normal file
View File

@ -0,0 +1,55 @@
# I18N Test Mod.
# Copyright (C) 2013-2017 Diego Martínez <kaeza@users.sf.net>
# This file is distributed under the same license as the intllib mod.
# Diego Martínez <kaeza@users.sf.net>, 2013-2017.
# Diego Martnez <kaeza@users.sf.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: I18N Test Mod 0.1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-16 11:41-0300\n"
"PO-Revision-Date: 2017-07-16 11:45-0300\n"
"Last-Translator: Diego Martnez <kaeza@users.sf.net>\n"
"Language-Team: Spanish\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
#: init.lua
msgid "Hello, world!"
msgstr "Hallo Welt!"
#. Translators: @1 is color, @2 is object.
#: init.lua
msgid "Blue"
msgstr "Blau"
#: init.lua
msgid "Car"
msgstr "Auto"
#. Translators: @1 is color, @2 is object.
#: init.lua
msgid "Test: @1 @2"
msgstr "Test: @2 @1"
#. Translators: @1 is use count.
#: init.lua
msgid "Item has been used @1 time."
msgid_plural "Item has been used @1 times."
msgstr[0] ""
msgstr[1] ""
#: init.lua
msgid "Green"
msgstr "Grün"
#: init.lua
msgid "Hello, @1 world!"
msgid_plural "Hello, @1 worlds!"
msgstr[0] "Hallo Welt!"
msgstr[1] "Hallo @1 Welten!"

View File

@ -2,13 +2,14 @@
# Copyright (C) 2013-2017 Diego Martínez <kaeza@users.sf.net>
# This file is distributed under the same license as the intllib mod.
# Diego Martínez <kaeza@users.sf.net>, 2013-2017.
# Diego Martnez <kaeza@users.sf.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: I18N Test Mod 0.1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-25 20:40-0300\n"
"PO-Revision-Date: 2017-01-23 17:36-0300\n"
"POT-Creation-Date: 2017-07-16 11:41-0300\n"
"PO-Revision-Date: 2017-07-16 11:45-0300\n"
"Last-Translator: Diego Martnez <kaeza@users.sf.net>\n"
"Language-Team: Spanish\n"
"Language: es\n"
@ -16,6 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
#: init.lua
msgid "Hello, world!"
@ -41,3 +43,13 @@ msgid "Item has been used @1 time."
msgid_plural "Item has been used @1 times."
msgstr[0] "El objeto ha sido usado @1 vez."
msgstr[1] "El objeto ha sido usado @1 veces."
#: init.lua
msgid "Green"
msgstr "Verde"
#: init.lua
msgid "Hello, @1 world!"
msgid_plural "Hello, @1 worlds!"
msgstr[0] "¡Hola, mundo!"
msgstr[1] "¡Hola, @1 mundos!"

55
intltest/locale/pt.po Normal file
View File

@ -0,0 +1,55 @@
# I18N Test Mod.
# Copyright (C) 2013-2017 Diego Martínez <kaeza@users.sf.net>
# This file is distributed under the same license as the intllib mod.
# Diego Martínez <kaeza@users.sf.net>, 2013-2017.
# Diego Martnez <kaeza@users.sf.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: I18N Test Mod 0.1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-16 11:41-0300\n"
"PO-Revision-Date: 2017-07-16 11:45-0300\n"
"Last-Translator: Diego Martnez <kaeza@users.sf.net>\n"
"Language-Team: Spanish\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
#: init.lua
msgid "Hello, world!"
msgstr "Ola, mundo!"
#. Translators: @1 is color, @2 is object.
#: init.lua
msgid "Blue"
msgstr "Azul"
#: init.lua
msgid "Car"
msgstr "Carro"
#. Translators: @1 is color, @2 is object.
#: init.lua
msgid "Test: @1 @2"
msgstr "Teste: @2 @1"
#. Translators: @1 is use count.
#: init.lua
msgid "Item has been used @1 time."
msgid_plural "Item has been used @1 times."
msgstr[0] "Esse objeto foi usado @1 vez."
msgstr[1] "Esse objeto foi usado @2 vezes."
#: init.lua
msgid "Green"
msgstr "Verde"
#: init.lua
msgid "Hello, @1 world!"
msgid_plural "Hello, @1 worlds!"
msgstr[0] "Ola, mundo!"
msgstr[1] "Ola, @1 mundos!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-25 20:40-0300\n"
"POT-Creation-Date: 2017-07-16 11:41-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -42,3 +42,13 @@ msgid "Item has been used @1 time."
msgid_plural "Item has been used @1 times."
msgstr[0] ""
msgstr[1] ""
#: init.lua
msgid "Green"
msgstr ""
#: init.lua
msgid "Hello, @1 world!"
msgid_plural "Hello, @1 worlds!"
msgstr[0] ""
msgstr[1] ""