Skip to content

Commit

Permalink
switch to built-in translator
Browse files Browse the repository at this point in the history
  • Loading branch information
FaceDeer committed Feb 17, 2020
1 parent 26b6488 commit 58b656f
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 318 deletions.
3 changes: 1 addition & 2 deletions admin_commands.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- internationalization boilerplate
local S, NS = settlements.S, settlements.NS
local S = settlements.S

local visual_range = tonumber(minetest.settings:get("settlements_visibility_range")) or 600

Expand Down
3 changes: 1 addition & 2 deletions admin_tools.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- internationalization boilerplate
local S, NS = settlements.S, settlements.NS
local S = settlements.S

-----------------------------------------------------------------------------
-- Admin tools
Expand Down
3 changes: 1 addition & 2 deletions bookgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ if not (minetest.settings:get_bool("settlements_generate_books", true) and modpa
return
end

-- internationalization boilerplate
local S, NS = settlements.S, settlements.NS
local S = settlements.S

-- values taken from default's craftitems.lua
local max_text_size = 10000
Expand Down
4 changes: 0 additions & 4 deletions depends.txt

This file was deleted.

6 changes: 3 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
settlements = {}

local modpath = minetest.get_modpath(minetest.get_current_modname())
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)

-- internationalization boilerplate
settlements.S, settlements.NS = dofile(modpath.."/intllib.lua")
settlements.S = minetest.get_translator(modname)

settlements.half_map_chunk_size = tonumber(minetest.get_mapgen_setting("chunksize")) * 16 / 2

Expand Down
45 changes: 0 additions & 45 deletions intllib.lua

This file was deleted.

253 changes: 0 additions & 253 deletions locale/template.pot

This file was deleted.

56 changes: 56 additions & 0 deletions locale/template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@1 Ledger on Day @2=
@1 by @2=
@1's market clerk=
A non-empty settlement type parameter is required=
A travel guide to @1=
Built @1=
Change the name of the nearest settlement you can see=
Create a new settlement centered in your current mapchunk=
Created new settlement at @1=
In the @1 @2 kilometers to the @3 of @4 lies the @5 of @6.=
Marked settlement @1 at @2=
Missing settlement definition for @1=
No known settlements within @1m found.=
On day @1 @2 sold @3 @4 to @5 at @6@7 each for a total of @6@8.=
Regenerate the names for all settments of a particular type=
Remove the nearest settlement within a certain range (default 40)=
Renamed @1 to @2=
Renamed @1 to @2.=
Settlement @1 successfully removed.=
Settlement already exists in this mapchunk=
Settlements build tool=
Settlements tool for building: @1=
Settlements tool for marking: @1=
The new name for this settlement, or nothing to generate a new random name=
The settlement type=
There's already a settlement at @1=
Unable to create new settlement at @1=
Unrecognized settlement type=
Unset=
You need the server privilege to use this tool.=
a resident of @1=
a settlement=
east=
east-northeast=
east-southeast=
highlands=
lowlands=
midlands=
north=
north-northeast=
north-northwest=
northeast=
northwest=
range=
settlement=
someone=
south=
south-southeast=
south-southwest=
southeast=
southwest=
themself=
waters=
west=
west-northwest=
west-southwest=
Loading

0 comments on commit 58b656f

Please sign in to comment.