mirror of
https://github.com/minetest-mods/airtanks.git
synced 2024-12-26 22:27:29 +01:00
switch to internal translator
This commit is contained in:
parent
70aef29125
commit
fd2d18501e
@ -1,3 +1,2 @@
|
||||
default
|
||||
doc?
|
||||
intllib?
|
4
init.lua
4
init.lua
@ -1,6 +1,4 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local print_settingtypes = false
|
||||
local CONFIG_FILE_PREFIX = "airtanks_"
|
||||
|
45
intllib.lua
45
intllib.lua
@ -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,89 +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-03-27 14:50-0600\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"
|
||||
|
||||
#: init.lua:32
|
||||
msgid "A tank containing compressed air."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:33
|
||||
#, lua-format
|
||||
msgid ""
|
||||
"If you're underwater and you're running out of breath, wield this item and "
|
||||
"use it to replenish 5 bubbles on your breath bar. When fully charged this "
|
||||
"tank has %i uses before it becomes empty."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:35
|
||||
msgid "A compressed air tank, currently empty."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:36
|
||||
#, lua-format
|
||||
msgid ""
|
||||
"This tank can be recharged with compressed air by using it on a compressor "
|
||||
"block. When fully charged this tank has %i uses before it becomes empty."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:38
|
||||
msgid "A machine for filling air tanks with compressed air."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:39
|
||||
msgid ""
|
||||
"Place this machine somewhere that it has access to air (one of its adjacent "
|
||||
"nodes needs to have air in it). When you click on it with an empty or partly-"
|
||||
"empty compressed air tank the tank will be refilled."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:41
|
||||
msgid "A breathing tube to allow automatic hands-free use of air tanks."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:42
|
||||
msgid ""
|
||||
"If this item is present in your quick-use inventory then whenever your "
|
||||
"breath bar goes below 5 it will automatically make use of any air tanks that "
|
||||
"are present in your quick-use inventory to replenish your breath supply. "
|
||||
"Note that it will not use air tanks that are present elsewhere in your "
|
||||
"inventory, only ones in your quick-use bar."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:105
|
||||
msgid "Empty @1"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:152
|
||||
msgid "Steel Air Tank"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:153
|
||||
msgid "Copper Air Tank"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:154
|
||||
msgid "Bronze Air Tank"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:167
|
||||
msgid "Air Compressor"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:203
|
||||
msgid "Breathing Tube"
|
||||
msgstr ""
|
14
locale/template.txt
Normal file
14
locale/template.txt
Normal file
@ -0,0 +1,14 @@
|
||||
A breathing tube to allow automatic hands-free use of air tanks.=
|
||||
A compressed air tank, currently empty.=
|
||||
A machine for filling air tanks with compressed air.=
|
||||
A tank containing compressed air.=
|
||||
Air Compressor=
|
||||
Breathing Tube=
|
||||
Bronze Air Tank=
|
||||
Copper Air Tank=
|
||||
Empty @1=
|
||||
If this item is present in your quick-use inventory then whenever your breath bar goes below 5 it will automatically make use of any air tanks that are present in your quick-use inventory to replenish your breath supply. Note that it will not use air tanks that are present elsewhere in your inventory, only ones in your quick-use bar.=
|
||||
If you're underwater and you're running out of breath, wield this item and use it to replenish 5 bubbles on your breath bar. When fully charged this tank has %i uses before it becomes empty.=
|
||||
Place this machine somewhere that it has access to air (one of its adjacent nodes needs to have air in it). When you click on it with an empty or partly-empty compressed air tank the tank will be refilled.=
|
||||
Steel Air Tank=
|
||||
This tank can be recharged with compressed air by using it on a compressor block. When fully charged this tank has %i uses before it becomes empty.=
|
@ -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%
|
3
mod.conf
3
mod.conf
@ -1 +1,4 @@
|
||||
name = airtanks
|
||||
description = Provides pressurized air tanks for extended underwater excursions
|
||||
depends = default
|
||||
optional_depends = doc
|
Loading…
Reference in New Issue
Block a user