mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-06-28 14:36:20 +02:00
switch over to native translation system
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
|
||||
local ice_sprite_desc
|
||||
local ice_sprite_usage
|
||||
|
@ -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
|
@ -1,50 +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: 2018-12-24 16:51-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"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ice_sprites\init.lua:11
|
||||
msgid ""
|
||||
"Ice sprites are mysterious glowing insect-like creatures that appear to be "
|
||||
"made partly of crystalized water."
|
||||
msgstr ""
|
||||
|
||||
#: ice_sprites\init.lua:14
|
||||
msgid ""
|
||||
"Ice sprites can be caught with nets and placed in bottles as sources of "
|
||||
"light and freezing cold."
|
||||
msgstr ""
|
||||
|
||||
#: ice_sprites\init.lua:16
|
||||
msgid "A bottle containing a captured ice sprite."
|
||||
msgstr ""
|
||||
|
||||
#: ice_sprites\init.lua:17
|
||||
msgid "Ice sprites radiate both light and freezing cold."
|
||||
msgstr ""
|
||||
|
||||
#: ice_sprites\init.lua:22
|
||||
msgid "Ice Sprite"
|
||||
msgstr ""
|
||||
|
||||
#: ice_sprites\init.lua:71
|
||||
msgid "Hidden Ice Sprite"
|
||||
msgstr ""
|
||||
|
||||
#: ice_sprites\init.lua:109
|
||||
msgid "Ice Sprite in a Bottle"
|
||||
msgstr ""
|
7
ice_sprites/locale/template.txt
Normal file
7
ice_sprites/locale/template.txt
Normal file
@ -0,0 +1,7 @@
|
||||
A bottle containing a captured ice sprite.=
|
||||
Hidden Ice Sprite=
|
||||
Ice Sprite=
|
||||
Ice Sprite in a Bottle=
|
||||
Ice sprites are mysterious glowing insect-like creatures that appear to be made partly of crystalized water.=
|
||||
Ice sprites can be caught with nets and placed in bottles as sources of light and freezing cold.=
|
||||
Ice sprites radiate both light and freezing cold.=
|
@ -1,6 +0,0 @@
|
||||
@echo off
|
||||
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
cd ..
|
||||
set LIST=
|
||||
for /r %%X in (*.lua) do set LIST=!LIST! %%X
|
||||
..\..\intllib\tools\xgettext.bat %LIST%
|
@ -1,4 +1,4 @@
|
||||
name = ice_sprites
|
||||
description = Glowing blue firefly-like nodes
|
||||
depends =
|
||||
optional_depends = fireflies, vessels, doc, intllib
|
||||
optional_depends = fireflies, vessels, doc
|
Reference in New Issue
Block a user