Add french translation (#12)

And remove intllib support since we use minetest api instead.
This commit is contained in:
Louis Royer 2020-02-16 07:55:31 +01:00 committed by GitHub
parent 349b508d8a
commit f5e3ac1ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 127 deletions

View File

@ -1,17 +1,5 @@
-- Used for localization, choose either built-in or intllib.
local MP, S, NS = nil
if (minetest.get_modpath("intllib") == nil) then
S = minetest.get_translator("castle_tapestries")
else
-- internationalization boilerplate
MP = minetest.get_modpath(minetest.get_current_modname())
S, NS = dofile(MP.."/intllib.lua")
end
local S = minetest.get_translator("castle_tapestries")
-- cottages support
local use_cottages = minetest.get_modpath("cottages")

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

@ -0,0 +1,6 @@
# textdomain:castle_tapestries
Tapestry Top=Haut de tapisserie
Tapestry=Tapisserie
Tapestry (Long)=Tapisserie (longue)
Tapestry (Very Long)=Tapisserie (très longue)

View File

@ -1,35 +0,0 @@
# ITALIAN LOCALE FILE FOR THE CASTLE TAPESTRIES MODULE
# Copyright (C) 2017 Philipbenr And DanDuncombe
# This file is distributed under the same license as the CASTLE TAPESTRIES package.
# Hamlet <h4mlet@riseup.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Castle Tapestries\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-25 14:32-0700\n"
"PO-Revision-Date: 2017-09-20 00:41+0100\n"
"Last-Translator: Hamlet <h4mlet@riseup.net>\n"
"Language-Team: \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"
"Language: it\n"
"X-Generator: Poedit 1.6.10\n"
#: init.lua:14
msgid "Tapestry Top"
msgstr "Cima dell'arazzo"
#: init.lua:64
msgid "Tapestry"
msgstr "Arazzo"
#: init.lua:94
msgid "Tapestry (Long)"
msgstr "Arazzo (lungo)"
#: init.lua:124
msgid "Tapestry (Very Long)"
msgstr "Arazzo (molto lungo)"

View File

@ -1,33 +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-25 14:32-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:14
msgid "Tapestry Top"
msgstr ""
#: init.lua:64
msgid "Tapestry"
msgstr ""
#: init.lua:94
msgid "Tapestry (Long)"
msgstr ""
#: init.lua:124
msgid "Tapestry (Very Long)"
msgstr ""

View File

@ -1,4 +1,4 @@
name = castle_tapestries
depends = default, unifieddyes, wool
optional_depends = intllib, cottages
optional_depends = cottages
description = This is a mod for creating medieval tapestries, as found in castles.