Update to mt5 translation system (#12)

This commit is contained in:
Louis Royer 2022-10-29 21:41:24 +02:00 committed by GitHub
parent 72ec06fff6
commit b61d3a9398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 62 additions and 283 deletions

View File

@ -12,7 +12,6 @@ License: MIT (see LICENSE.txt)
Dependencies:
default (found in minetest_game)
stairs (found in minetest_game)
intllib (optional, for translations)
moreblocks or stairsplus (optional, for stairsplus support)
Please report bugs at the GitHub issue tracker:

View File

@ -1,5 +0,0 @@
default
stairs
intllib?
moreblocks?
stairsplus?

View File

@ -1 +0,0 @@
Adds quartz ore and some decorative quartz blocks.

View File

@ -1,8 +1,6 @@
local settings = Settings(minetest.get_modpath("quartz").."/settings.txt")
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = minetest.get_translator("quartz")
--
-- Item Registration

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -1,59 +0,0 @@
# Spanish translations for PACKAGE package
# Traducciones al español para el paquete PACKAGE.
# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Diego Martínez <kaeza@users.noreply.github.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-19 21:50-0700\n"
"PO-Revision-Date: 2017-02-20 15:03-0300\n"
"Last-Translator: Diego Martínez <kaeza@users.noreply.github.com>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr "Cristal de cuarzo"
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr "Trozo de cristal de cuarzo"
#: init.lua:27
msgid "Quartz Ore"
msgstr "Mineral de cuarzo"
#: init.lua:47
msgid "Quartz Block"
msgstr "Bloque de cuarzo"
#: init.lua:55
msgid "Chiseled Quartz"
msgstr "Cuarzo cincelado"
#: init.lua:63
msgid "Quartz Pillar"
msgstr "Pilar de cuarzo"
#: init.lua:75
msgid "Quartz stair"
msgstr "Escaleras de cuarzo"
#: init.lua:76
msgid "Quartz slab"
msgstr "Losa de cuarzo"
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr "Escaleras de pilar de cuarzo"
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr "Losa de pilar de cuarzo"

View File

@ -1,54 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-04 07:46+0100\n"
"PO-Revision-Date: 2017-03-04 07:48+0100\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.9\n"
"Last-Translator: Peppy <peppy@twang-factory.com>\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr "Cristal de quartz"
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr "Morceau de cristal de quartz"
#: init.lua:27
msgid "Quartz Ore"
msgstr "Minerai de quartz"
#: init.lua:47
msgid "Quartz Block"
msgstr "Bloc de quartz"
#: init.lua:55
msgid "Chiseled Quartz"
msgstr "Quartz ciselé"
#: init.lua:63
msgid "Quartz Pillar"
msgstr "Pilier en quartz"
#: init.lua:75
msgid "Quartz stair"
msgstr "Escalier en quartz"
#: init.lua:76
msgid "Quartz slab"
msgstr "Dalle en quartz"
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr "Escalier en pilier en quartz"
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr "Dalle en pilier en quartz"

View File

@ -1,57 +0,0 @@
# 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.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-19 21:50-0700\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr "Cristal de Quartzo"
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr "Pedaço de Cristal de Quartzo"
#: init.lua:27
msgid "Quartz Ore"
msgstr "Minério de Quartzo"
#: init.lua:47
msgid "Quartz Block"
msgstr "Bloco de Quartzo"
#: init.lua:55
msgid "Chiseled Quartz"
msgstr "Quartzo Cinzelado"
#: init.lua:63
msgid "Quartz Pillar"
msgstr "Pilar de Quartzo"
#: init.lua:75
msgid "Quartz stair"
msgstr "Escada de quartzo"
#: init.lua:76
msgid "Quartz slab"
msgstr "Laje de quartzo"
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr "Escada de Pilar de Quartzo"
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr "Laje de Pilar de Quartzo"

15
locale/quartz.es.tr Normal file
View File

@ -0,0 +1,15 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=Cuarzo cincelado
Quartz Block=Bloque de cuarzo
Quartz Crystal=Cristal de cuarzo
Quartz Crystal Piece=Trozo de cristal de cuarzo
Quartz Ore=Mineral de cuarzo
Quartz Pillar=Pilar de cuarzo
Quartz Pillar slab=Losa de pilar de cuarzo
Quartz Pillar stair=Escaleras de pilar de cuarzo
Quartz slab=Losa de cuarzo
Quartz stair=Escaleras de cuarzo

15
locale/quartz.fr.tr Normal file
View File

@ -0,0 +1,15 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=Quartz ciselé
Quartz Block=Bloc de quartz
Quartz Crystal=Cristal de quartz
Quartz Crystal Piece=Morceau de cristal de quartz
Quartz Ore=Minerai de quartz
Quartz Pillar=Pilier en quartz
Quartz Pillar slab=Dalle en pilier en quartz
Quartz Pillar stair=Escalier en pilier en quartz
Quartz slab=Dalle en quartz
Quartz stair=Escalier en quartz

15
locale/quartz.pt_BR.tr Normal file
View File

@ -0,0 +1,15 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=Quartzo Cinzelado
Quartz Block=Bloco de Quartzo
Quartz Crystal=Cristal de Quartzo
Quartz Crystal Piece=Pedaço de Cristal de Quartzo
Quartz Ore=Minério de Quartzo
Quartz Pillar=Pilar de Quartzo
Quartz Pillar slab=Laje de Pilar de Quartzo
Quartz Pillar stair=Escada de Pilar de Quartzo
Quartz slab=Laje de quartzo
Quartz stair=Escada de quartzo

View File

@ -1,57 +0,0 @@
# 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.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-19 21:50-0700\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr ""
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr ""
#: init.lua:27
msgid "Quartz Ore"
msgstr ""
#: init.lua:47
msgid "Quartz Block"
msgstr ""
#: init.lua:55
msgid "Chiseled Quartz"
msgstr ""
#: init.lua:63
msgid "Quartz Pillar"
msgstr ""
#: init.lua:75
msgid "Quartz stair"
msgstr ""
#: init.lua:76
msgid "Quartz slab"
msgstr ""
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr ""
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr ""

15
locale/template.txt Normal file
View File

@ -0,0 +1,15 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=
Quartz Block=
Quartz Crystal=
Quartz Crystal Piece=
Quartz Ore=
Quartz Pillar=
Quartz Pillar slab=
Quartz Pillar stair=
Quartz slab=
Quartz stair=

View File

@ -1,4 +1,4 @@
name = quartz
description = Adds quartz ore and some decorative quartz blocks.
depends = default,stairs
optional_depends = intllib,moreblocks,stairsplus
optional_depends = moreblocks,stairsplus