intllib updated (thanks BrunoMine)

This commit is contained in:
TenPlus1 2017-08-17 16:34:01 +01:00
parent 1c06bf2628
commit 3e30f7fff4
6 changed files with 566 additions and 212 deletions

View File

@ -19,12 +19,7 @@ local statistics = dofile(farming.path.."/statistics.lua")
-- Intllib
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s) return s end
end
local S = dofile(farming.path.."/intllib.lua")
farming.intllib = S
-- Utility Functions

45
intllib.lua Normal file
View File

@ -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

262
locale/de.po Normal file
View File

@ -0,0 +1,262 @@
# German Translation for farming mod.
# Copyright (C) 2017
# This file is distributed under the same license as the farming package.
# Xanthin.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 1.27\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-31 HO:MI+ZONE\n"
"PO-Revision-Date: 2016-03-31 HO:MI+ZONE\n"
"Last-Translator: Xanthin\n"
"Language-Team: \n"
"Language: German \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: barley.lua
msgid "Barley Seed"
msgstr "Gerstenkörner"
#: barley.lua
msgid "Barley"
msgstr "Gerste"
#: beanpole.lua
msgid "Green Beans"
msgstr "Grüne Bohnen"
#: beanpole.lua
msgid "Bean Pole (place on soil before planting beans)"
msgstr "Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen)"
#: blueberry.lua
msgid "Blueberries"
msgstr "Blaubeeren"
#: blueberry.lua
msgid "Blueberry Muffin"
msgstr "Blaubeermuffin"
#: carrot.lua
msgid "Carrot"
msgstr "Möhre"
#: carrot.lua
msgid "Golden Carrot"
msgstr "Goldene Möhre"
#: cocoa.lua
msgid "Cocoa Beans"
msgstr "Kakaobohne"
#: cocoa.lua
msgid "Cookie"
msgstr "Keks"
#: cocoa.lua
msgid "Bar of Dark Chocolate"
msgstr "Tafel Zartbitterschokolade"
#: coffee.lua
msgid "Coffee Beans"
msgstr "Kaffeebohnen"
#: coffee.lua
msgid "Drinking Cup (empty)"
msgstr "Tasse (leer)"
#: coffee.lua
msgid "Cold Cup of Coffee"
msgstr "Kalte Tasse Kaffee"
#: coffee.lua
msgid "Hot Cup of Coffee"
msgstr "Heiße Tasse Kaffee"
#: corn.lua
msgid "Corn"
msgstr "Mais"
#: corn.lua
msgid "Corn on the Cob"
msgstr "Maiskolben"
#: corn.lua
msgid "Bottle of Ethanol"
msgstr "Flasche Ethanol"
#: cotton.lua
msgid "Cotton Seed"
msgstr "Baumwollsamen"
#: cotton.lua
msgid "Cotton"
msgstr "Baumwolle"
#: cucumber.lua
msgid "Cucumber"
msgstr "Gurke"
#: donut.lua
msgid "Donut"
msgstr "Donut"
#: donut.lua
msgid "Chocolate Donut"
msgstr "Schokodonut"
#: donut.lua
msgid "Apple Donut"
msgstr "Apfeldonut"
#: grapes.lua
msgid "Grapes"
msgstr "Weintrauben"
#: grapes.lua
msgid "Trellis (place on soil before planting grapes)"
msgstr "Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen)"
#: hemp.lua
msgid "Hemp Seed"
msgstr ""
#: hemp.lua
msgid "Hemp Leaf"
msgstr ""
#: hemp.lua
msgid "Bottle of Hemp Oil"
msgstr ""
#: hemp.lua
msgid "Hemp Fibre"
msgstr ""
#: hemp.lua
msgid "Hemp Rope"
msgstr ""
#: ????
msgid "Hoe"
msgstr "Hacke"
#: hoes.lua
msgid "Wooden Hoe"
msgstr "Holzhacke"
#: hoes.lua
msgid "Stone Hoe"
msgstr "Steinhacke"
#: hoes.lua
msgid "Steel Hoe"
msgstr "Stahlhacke"
#: hoes.lua
msgid "Bronze Hoe"
msgstr "Bronzehacke"
#: hoes.lua
msgid "Mese Hoe"
msgstr "Mesehacke"
#: hoes.lua
msgid "Diamond Hoe"
msgstr "Diamanthacke"
#: init.lua
msgid "Seed"
msgstr "Saatgut"
#: melon.lua
msgid "Melon Slice"
msgstr "Melonenscheibe"
#: melon.lua
msgid "Melon"
msgstr "Melone"
#: potato.lua
msgid "Potato"
msgstr "Kartoffel"
#: potato.lua
msgid "Baked Potato"
msgstr "Ofenkartoffel"
#: pumpkin.lua
msgid "Pumpkin"
msgstr "Kürbis"
#: pumpkin.lua
msgid "Pumpkin Slice"
msgstr "Kürbisscheibe"
#: pumpkin.lua
msgid "Jack 'O Lantern (punch to turn on and off)"
msgstr "Kürbislaterne (Punch zum Ein- und Ausschalten)"
#: pumpkin.lua
msgid "Pumpkin Bread"
msgstr "Kürbisbrot"
#: pumpkin.lua
msgid "Pumpkin Dough"
msgstr "Kürbisteig"
#: raspberry.lua
msgid "Raspberries"
msgstr "Himbeeren"
#: raspberry.lua
msgid "Raspberry Smoothie"
msgstr "Himbeersmoothie"
#: rhubarb.lua
msgid "Rhubarb"
msgstr "Rhabarber"
#: rhubarb.lua
msgid "Rhubarb Pie"
msgstr "Rhabarberkuchen"
#: soil.lua
msgid "Soil"
msgstr "Ackerboden"
#: soil.lua
msgid "Wet Soil"
msgstr "Bewässerter Ackerboden"
#: sugar.lua
msgid "Sugar"
msgstr "Zucker"
#: tomato.lua
msgid "Tomato"
msgstr "Tomate"
#: wheat.lua
msgid "Wheat Seed"
msgstr "Weizenkörner"
#: wheat.lua
msgid "Wheat"
msgstr "Weizen"
#: wheat.lua
msgid "Straw"
msgstr "Stroh"
#: wheat.lua
msgid "Flour"
msgstr "Mehl"
#: wheat.lua
msgid "Bread"
msgstr "Brot"

View File

@ -1,104 +0,0 @@
# German Translation for farming mod
# Deutsche Übersetzung der farming Mod
# last update: 2016/March/31
# Author: Xanthin
#init.lua
Seed = Saatgut
#barley.lua
Barley Seed = Gerstenkörner
Barley = Gerste
#beanpole.lua
Green Beans = Grüne Bohnen
Bean Pole (place on soil before planting beans) = Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen)
#blueberry.lua
Blueberries = Blaubeeren
Blueberry Muffin = Blaubeermuffin
#carrot.lua
Carrot = Möhre
Golden Carrot = Goldene Möhre
#cocoa.lua
Cocoa Beans = Kakaobohne
Cookie = Keks
Bar of Dark Chocolate = Tafel Zartbitterschokolade
#coffee.lua
Coffee Beans = Kaffeebohnen
Drinking Cup (empty) = Tasse (leer)
Cold Cup of Coffee = Kalte Tasse Kaffee
Hot Cup of Coffee = Heiße Tasse Kaffee
#corn.lua
Corn = Mais
Corn on the Cob = Maiskolben
Bottle of Ethanol = Flasche Ethanol
#cotton.lua
Cotton Seed = Baumwollsamen
Cotton = Baumwolle
#cucumber.lua
Cucumber = Gurke
#donut.lua
Donut = Donut
Chocolate Donut = Schokodonut
Apple Donut = Apfeldonut
#grapes.lua
Grapes = Weintrauben
Trellis (place on soil before planting grapes) = Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen)
#hoes.lua
Hoe = Hacke
Wooden Hoe = Holzhacke
Stone Hoe = Steinhacke
Steel Hoe = Stahlhacke
Bronze Hoe = Bronzehacke
Mese Hoe = Mesehacke
Diamond Hoe = Diamanthacke
#melon.lua
Melon Slice = Melonenscheibe
Melon = Melone
#potato.lua
Potato = Kartoffel
Baked Potato = Ofenkartoffel
#pumpkin.lua
Pumpkin = Kürbis
Pumpkin Slice = Kürbisscheibe
Jack 'O Lantern (punch to turn on and off) = Kürbislaterne (Punch zum Ein- und Ausschalten)
Pumpkin Bread = Kürbisbrot
Pumpkin Dough = Kürbisteig
#rasperry.lua
Raspberries = Himbeeren
Raspberry Smoothie = Himbeersmoothie
#rhubarb.lua
Rhubarb = Rhabarber
Rhubarb Pie = Rhabarberkuchen
#soil.lua
Soil = Ackerboden
Wet Soil = Bewässerter Ackerboden
#sugar.lua
Sugar = Zucker
#tomato.lua
Tomato = Tomate
#wheat.lua
Wheat Seed = Weizenkörner
Wheat = Weizen
Straw = Stroh
Flour = Mehl
Bread = Brot

258
locale/template.pot Normal file
View File

@ -0,0 +1,258 @@
# 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-08-16 17:38-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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: barley.lua
msgid "Barley Seed"
msgstr ""
#: barley.lua
msgid "Barley"
msgstr ""
#: beanpole.lua
msgid "Green Beans"
msgstr ""
#: beanpole.lua
msgid "Bean Pole (place on soil before planting beans)"
msgstr ""
#: blueberry.lua
msgid "Blueberries"
msgstr ""
#: blueberry.lua
msgid "Blueberry Muffin"
msgstr ""
#: carrot.lua
msgid "Carrot"
msgstr ""
#: carrot.lua
msgid "Golden Carrot"
msgstr ""
#: cocoa.lua
msgid "Cocoa Beans"
msgstr ""
#: cocoa.lua
msgid "Cookie"
msgstr ""
#: cocoa.lua
msgid "Bar of Dark Chocolate"
msgstr ""
#: coffee.lua
msgid "Coffee Beans"
msgstr ""
#: coffee.lua
msgid "Drinking Cup (empty)"
msgstr ""
#: coffee.lua
msgid "Cold Cup of Coffee"
msgstr ""
#: coffee.lua
msgid "Hot Cup of Coffee"
msgstr ""
#: corn.lua
msgid "Corn"
msgstr ""
#: corn.lua
msgid "Corn on the Cob"
msgstr ""
#: corn.lua
msgid "Bottle of Ethanol"
msgstr ""
#: cotton.lua
msgid "Cotton Seed"
msgstr ""
#: cotton.lua
msgid "Cotton"
msgstr ""
#: cucumber.lua
msgid "Cucumber"
msgstr ""
#: donut.lua
msgid "Donut"
msgstr ""
#: donut.lua
msgid "Chocolate Donut"
msgstr ""
#: donut.lua
msgid "Apple Donut"
msgstr ""
#: grapes.lua
msgid "Grapes"
msgstr ""
#: grapes.lua
msgid "Trellis (place on soil before planting grapes)"
msgstr ""
#: hemp.lua
msgid "Hemp Seed"
msgstr ""
#: hemp.lua
msgid "Hemp Leaf"
msgstr ""
#: hemp.lua
msgid "Bottle of Hemp Oil"
msgstr ""
#: hemp.lua
msgid "Hemp Fibre"
msgstr ""
#: hemp.lua
msgid "Hemp Rope"
msgstr ""
#: hoes.lua
msgid "Wooden Hoe"
msgstr ""
#: hoes.lua
msgid "Stone Hoe"
msgstr ""
#: hoes.lua
msgid "Steel Hoe"
msgstr ""
#: hoes.lua
msgid "Bronze Hoe"
msgstr ""
#: hoes.lua
msgid "Mese Hoe"
msgstr ""
#: hoes.lua
msgid "Diamond Hoe"
msgstr ""
#: init.lua
msgid "Seed"
msgstr ""
#: melon.lua
msgid "Melon Slice"
msgstr ""
#: melon.lua
msgid "Melon"
msgstr ""
#: potato.lua
msgid "Potato"
msgstr ""
#: potato.lua
msgid "Baked Potato"
msgstr ""
#: pumpkin.lua
msgid "Pumpkin"
msgstr ""
#: pumpkin.lua
msgid "Pumpkin Slice"
msgstr ""
#: pumpkin.lua
msgid "Jack 'O Lantern (punch to turn on and off)"
msgstr ""
#: pumpkin.lua
msgid "Pumpkin Bread"
msgstr ""
#: pumpkin.lua
msgid "Pumpkin Dough"
msgstr ""
#: raspberry.lua
msgid "Raspberries"
msgstr ""
#: raspberry.lua
msgid "Raspberry Smoothie"
msgstr ""
#: rhubarb.lua
msgid "Rhubarb"
msgstr ""
#: rhubarb.lua
msgid "Rhubarb Pie"
msgstr ""
#: soil.lua
msgid "Soil"
msgstr ""
#: soil.lua
msgid "Wet Soil"
msgstr ""
#: sugar.lua
msgid "Sugar"
msgstr ""
#: tomato.lua
msgid "Tomato"
msgstr ""
#: wheat.lua
msgid "Wheat Seed"
msgstr ""
#: wheat.lua
msgid "Wheat"
msgstr ""
#: wheat.lua
msgid "Straw"
msgstr ""
#: wheat.lua
msgid "Flour"
msgstr ""
#: wheat.lua
msgid "Bread"
msgstr ""

View File

@ -1,102 +0,0 @@
# Template for translations of farming mod
# last update: 2016/March/31
#init.lua
Seed =
#barley.lua
Barley Seed =
Barley =
#beanpole.lua
Green Beans =
Bean Pole (place on soil before planting beans) =
#blueberry.lua
Blueberries =
Blueberry Muffin =
#carrot.lua
Carrot =
Golden Carrot =
#cocoa.lua
Cocoa Beans =
Cookie =
Bar of Dark Chocolate =
#coffee.lua
Coffee Beans =
Drinking Cup (empty) =
Cold Cup of Coffee =
Hot Cup of Coffee =
#corn.lua
Corn =
Corn on the Cob =
Bottle of Ethanol =
#cotton.lua
Cotton Seed =
Cotton =
#cucumber.lua
Cucumber =
#donut.lua
Donut =
Chocolate Donut =
Apple Donut =
#grapes.lua
Grapes =
Trellis (place on soil before planting grapes) =
#hoes.lua
Hoe =
Wooden Hoe =
Stone Hoe =
Steel Hoe =
Bronze Hoe =
Mese Hoe =
Diamond Hoe =
#melon.lua
Melon Slice =
Melon =
#potato.lua
Potato =
Baked Potato =
#pumpkin.lua
Pumpkin =
Pumpkin Slice =
Jack 'O Lantern (punch to turn on and off) =
Pumpkin Bread =
Pumpkin Dough =
#rasperry.lua
Raspberries =
Raspberry Smoothie =
#rhubarb.lua
Rhubarb =
Rhubarb Pie =
#soil.lua
Soil =
Wet Soil =
#sugar.lua
Sugar =
#tomato.lua
Tomato =
#wheat.lua
Wheat Seed =
Wheat =
Straw =
Flour =
Bread =