5 changed files with 151 additions and 7 deletions
@ -0,0 +1,45 @@
|
||||
|
||||
-- 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 |
@ -0,0 +1,46 @@
|
||||
# German translation of ehlphabet mod |
||||
# Copyright (C) 2018 Sam Hocevar |
||||
# This file is distributed under the same license as the ehlphabet package. |
||||
# CodeXP <codexp@gmx.net>, 2018. |
||||
# |
||||
#, fuzzy |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: ehlphabet\n" |
||||
"Report-Msgid-Bugs-To: \n" |
||||
"POT-Creation-Date: 2018-04-01 00:10+0200\n" |
||||
"PO-Revision-Date: \n" |
||||
"Last-Translator: CodeXP <codexp@gmx.net>\n" |
||||
"Language-Team: \n" |
||||
"Language: de\n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
|
||||
#: init.lua |
||||
msgid "Ehlphabet Block '@1'" |
||||
msgstr "Ehlphabet Block '@1'" |
||||
|
||||
#: init.lua |
||||
msgid "Letter Machine" |
||||
msgstr "Zeichenmaschine" |
||||
|
||||
#: init.lua |
||||
msgid "You cannot dig the @1 with blocks inside" |
||||
msgstr "Du kannst die @1 nicht wegräumen solange sie gefüllt ist" |
||||
|
||||
#: init.lua |
||||
msgid "Letter" |
||||
msgstr "Zeichen" |
||||
|
||||
#: init.lua |
||||
msgid "Blank -> Letter" |
||||
msgstr "Blanko -> Zeichen" |
||||
|
||||
#: init.lua |
||||
msgid "Ehlphabet Block (blank)" |
||||
msgstr "Ehlphabet Block (Blanko)" |
||||
|
||||
#: init.lua |
||||
msgid "[MOD] Elphabet is loaded" |
||||
msgstr "[MOD] Elphabet wurde geladen" |
@ -0,0 +1,46 @@
|
||||
# German translation of ehlphabet mod |
||||
# Copyright (C) 2018 Sam Hocevar |
||||
# This file is distributed under the same license as the ehlphabet package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
#, fuzzy |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: ehlphabet\n" |
||||
"Report-Msgid-Bugs-To: \n" |
||||
"POT-Creation-Date: 2018-04-01 00:10+0200\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" |
||||
"Language: \n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
|
||||
#: init.lua |
||||
msgid "Ehlphabet Block '@1'" |
||||
msgstr "" |
||||
|
||||
#: init.lua |
||||
msgid "Letter Machine" |
||||
msgstr "" |
||||
|
||||
#: init.lua |
||||
msgid "You cannot dig the @1 with blocks inside" |
||||
msgstr "" |
||||
|
||||
#: init.lua |
||||
msgid "Letter" |
||||
msgstr "" |
||||
|
||||
#: init.lua |
||||
msgid "Blank -> Letter" |
||||
msgstr "" |
||||
|
||||
#: init.lua |
||||
msgid "Ehlphabet Block (blank)" |
||||
msgstr "" |
||||
|
||||
#: init.lua |
||||
msgid "[MOD] Elphabet is loaded" |
||||
msgstr "" |
Loading…
Reference in new issue