diff --git a/categories.lua b/categories.lua index 6d00614..3cc13ea 100644 --- a/categories.lua +++ b/categories.lua @@ -1,3 +1,6 @@ +-- Load support for intllib. +S = poi.get_translator + --[[ ************************** ** Categories for PoI ** @@ -5,12 +8,12 @@ --]] poi_categories = { - "General", - "Buildings", - "Markets", - "Landscapes", - "Caves", - "Museums", - "Education", - "Recreation" + S("General"), + S("Buildings"), + S("Markets"), + S("Landscapes"), + S("Caves"), + S("Museums"), + S("Education"), + S("Recreation") } diff --git a/init.lua b/init.lua index ba15489..7818602 100644 --- a/init.lua +++ b/init.lua @@ -1,22 +1,34 @@ poi_namefilter = {} poi_categories = {} --- Load support for intllib. -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") - -dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/namefilter.lua") -- avoid servercrash loop if someone decided to rename the modfolder ! -dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/categories.lua") - local storage = minetest.get_mod_storage() -- initalize storage file of this mod. This can only happen here and should be always local -local poi = { +poi = { points = {}, filter = {}, categories = {}, modpath = minetest.get_modpath(minetest.get_current_modname()), + modname = minetest.get_current_modname() } +-- Load support for intllib. +local S + +if(minetest.get_modpath("intllib")) then + S = dofile(poi.modpath .."/intllib.lua") + print("[MOD] " .. poi.modname .. ": translating in intllib-mode.") + +else + S = minetest.get_translator("cucina_vegana") + print("[MOD] " .. poi.modname .. ": translating in minetest-mode.") + +end -- if(minetest.get_modpath( + +poi.get_translator = S + +dofile(poi.modpath .. "/namefilter.lua") -- avoid servercrash loop if someone decided to rename the modfolder ! +dofile(poi.modpath .. "/categories.lua") + -- Options for Print_Message local log = 0 local green = '#00FF00' diff --git a/locale/de_DE.pot b/locale/de_DE.pot index 1b3d94d..3251328 100644 --- a/locale/de_DE.pot +++ b/locale/de_DE.pot @@ -1,21 +1,53 @@ -# 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 , YEAR. # -#, fuzzy +# acm , 2019. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-12-24 03:51+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"PO-Revision-Date: 2019-11-21 17:59+0100\n" +"Last-Translator: acm \n" +"Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 19.08.3\n" + +#: categories.lua +msgid "General" +msgstr "Allgemein" + +#: categories.lua +msgid "Buildings" +msgstr "Gebäude" + +#: categories.lua +msgid "Markets" +msgstr "Märkte" + +#: categories.lua +msgid "Landscapes" +msgstr "Landschaften" + +#: categories.lua +msgid "Caves" +msgstr "Höhlen" + +#: categories.lua +msgid "Museums" +msgstr "Museen" + +#: categories.lua +msgid "Education" +msgstr "Schulen" + +#: categories.lua +msgid "Recreation" +msgstr "Freizeit" #: init.lua msgid "Player may set and manage Points of Interest." @@ -183,7 +215,9 @@ msgstr "Zurück" #: init.lua msgid " >>> Sorry this button is for admin only, please use /poi_delete " -msgstr " >>> Tut mir leid, dieser Knopf ist nur für Admin, verwende stattdessen bitte /poi_delete " +msgstr "" +" >>> Tut mir leid, dieser Knopf ist nur für Admin, verwende stattdessen bitte" +" /poi_delete " #: init.lua msgid "Unknown PoI <" @@ -257,7 +291,8 @@ msgstr "" msgid "" "Set's a Point of Interest or changes the Categorie of an existing Point." msgstr "" -"Erstellt eine Sehenswürdigkeit oder verändert die Kategorie einer existierenden Sehenswürdigkeit." +"Erstellt eine Sehenswürdigkeit oder verändert die Kategorie einer" +" existierenden Sehenswürdigkeit." #: init.lua msgid "Shows PoIs in a GUI." @@ -317,7 +352,7 @@ msgstr "Überprüft die Liste der PoI's." #: init.lua msgid "Show Points of Interest" -msgstr "Zeit Sehenswürdigkeiten" +msgstr "Zeige Sehenswürdigkeiten" #: init.lua msgid "You need the" diff --git a/locale/poi.de.tr b/locale/poi.de.tr new file mode 100644 index 0000000..7caa0e1 --- /dev/null +++ b/locale/poi.de.tr @@ -0,0 +1,84 @@ +# textdomain: poi +General=Allgemein +Buildings=Gebäude +Markets=Märkte +Landscapes=Landschaften +Caves=Höhlen +Museums=Museen +Education=Schulen +Recreation=Freizeit +Player may set and manage Points of Interest.=Spieler dürfen Sehenswürdigkeiten setzen und verwalten. + Filter in List.= Filter in Liste. + Categories in List. = Kategorien in Liste. +Point's of Interest in Categorie =Sehenswürdigkeiten in Kategorie + are:= sind: + Point's of Interest are:= Sehenswürdigkeiten sind: + Categorie: = Kategorie: +Given Categorie don't exists.=Gegebene Kategorie gibt es nicht. + has changed the POI: = veränderte den POI: + at = bei + to Categorie: = zur Kategorie: + in Categorie: = in der Kategorie: + changed to Categorie: = verändert zur Kategorie: +> in Categorie <=> in Kategorie < +> already exists.=> gibts es bereits. +Invalid or Forbidden Name <= Ungültiger oder verbotener Name < +> for PoI.=> für PoI. +Warning: Unkown Categorie, set to Categorie 1.=Warnung: Unbekannte Kategorie, auf Kategorie 1 gesetzt. + has set the POI: = hat den POI gesetzt: + stored.= gespeichert. +Name of the PoI needed.=Namen der Sehenswürdigkeit benötigt. +> unknown to delete.=> unbekannt um zu löschen. + has deleted POI-Name: = löschte POI-Name: + deleted.= gelöscht. +POI-List reloaded.=POI-Liste neu geladen. +Unknown Point of Interest: =Unbekannte Sehenswürdigkeit: +You are moved to POI: =Du wurdest verschoben zur Sehenswürdigkeit: +Manage_PoI]=Verwalte PoI + Points in List]= Punkte in Liste] +Categories ]= Kategorien ] +Go]=Los] +ShowAll]=ZeigeAlles] +Quit]=Ende] +Doubleclick on destination to teleport=Doppelklick auf Ziel zum Teleportieren +Reload=Neu laden +Validate=Überprüfen +Set Point or change Categorie=Erstelle Punkt oder ändere die Kategorie +Rename=Umbenennen +Move=Verschieben +Quit=Ende +Back=Zurück + >>> Sorry this button is for admin only, please use /poi_delete = >>> Tut mir leid, dieser Knopf ist nur für Admin, verwende stattdessen bitte /poi_delete +Unknown PoI <=Unbekannter PoI < + has moved the POI: = verschob den POI: + to Position: = auf Position: + moved to Position: = verschoben zu Position: +/poi_rename: No new Name for Point given.=/poi_rename: Keinen neuen Namen für Punkt angegeben. +Point to rename not found.=Punkt zum Umbenennen nicht gefunden. +Invalid new Pointname.=Ungültiger neuer Punktnamen. +New Pointname already exists.=Neuen Punktnamen gibt es bereits. + has renamed POI-Name: =hat POI-Name umbenannt: + to: = zu: + - Position: = - Position: +PoI-Name: =PoI-Name: + renamed to= umbenannt zu + invalid PoI's found and deleted.= ungültige PoI's gefunden und gelöscht. + PoI's with an invalid Categorie found and set to 1.= PoI's mit ungültiger Kategorie gefunden und auf 1 gesetzt. +No invalid PoI found.=Keinen ungültigen PoI gefunden. += +Shows PoIs in a GUI.=Zeigt PoIs in einer GUI +<-a> <-c> <-f> <-i [Categorie[Number]]>=<-a> <-c> <-f> <-i [Kategorie[Nummer]]> += +Deletes a Point of Interest.=Löscht eine Sehenswürdigkeit. +Loads the List of POI's new.=Lädt die Liste der POI's neu. +Jumps to the Position of the Point of Interest.=Springt zur Position der Sehenswürdigkeit. +Changes the Position of the Point of Interest.=Verändert die Position der Sehenswürdigkeit. +,=, +Changes the Name of the Point of Interest.=Verändert den Namen der Sehenswürdigkeit. +Validates the List of PoI's.=Überprüft die Liste der PoI's. +Show Points of Interest=Zeige Sehenswürdigkeiten +You need the=Du brauchst + interact= interact + priv, please type= priv, bitte gib + /rules= /rules + and search for the keyword= und suche nach dem Schlüsselwort diff --git a/locale/template.pot b/locale/template.pot index fe6099f..528bc68 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-12-24 04:05+0100\n" +"POT-Creation-Date: 2019-11-21 17:48+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,38 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#: categories.lua +msgid "General" +msgstr "" + +#: categories.lua +msgid "Buildings" +msgstr "" + +#: categories.lua +msgid "Markets" +msgstr "" + +#: categories.lua +msgid "Landscapes" +msgstr "" + +#: categories.lua +msgid "Caves" +msgstr "" + +#: categories.lua +msgid "Museums" +msgstr "" + +#: categories.lua +msgid "Education" +msgstr "" + +#: categories.lua +msgid "Recreation" +msgstr "" + #: init.lua msgid "Player may set and manage Points of Interest." msgstr "" @@ -130,11 +162,11 @@ msgid "Manage_PoI]" msgstr "" #: init.lua -msgid "Doubleclick on destination to teleport" +msgid "Double-click on destination to teleport" msgstr "" #: init.lua -msgid " Points in List]" +msgid " points in list]" msgstr "" #: init.lua diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..2ad0032 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,84 @@ +# textdomain: poi +General= +Buildings= +Markets= +Landscapes= +Caves= +Museums= +Education= +Recreation= +Player may set and manage Points of Interest.= + Filter in List.= + Categories in List.= +Point's of Interest in Categorie = + are:= + Point's of Interest are:= + Categorie: = +Given Categorie don't exists.= + has changed the POI: = + at = + to Categorie: = + in Categorie: = + changed to Categorie: = +> in Categorie <= +> already exists.= +Invalid or Forbidden Name <= +> for PoI.= +Warning: Unkown Categorie, set to Categorie 1.= + has set the POI: = + stored.= +Name of the PoI needed.= +> unknown to delete.= + has deleted POI-Name: = + deleted.= +POI-List reloaded.= +Unknown Point of Interest: = +You are moved to POI: = +Manage_PoI]= +Doubleclick on destination to teleport= + Points in List]= +Categories ]= +Go]= +ShowAll]= +Quit]= +Reload= +Validate= +Set Point or change Categorie= +Rename= +Move= +Quit= +Back= + >>> Sorry this button is for admin only, please use /poi_delete = +Unknown PoI <= + has moved the POI: = + to Position: = + moved to Position: = +/poi_rename: No new Name for Point given.= +Point to rename not found.= +Invalid new Pointname.= +New Pointname already exists.= + has renamed POI-Name: = + to: = + - Position: = +PoI-Name: = + renamed to= + invalid PoI's found and deleted.= + PoI's with an invalid Categorie found and set to 1.= +No invalid PoI found.= += +Shows PoIs in a GUI.= +<-a> <-c> <-f> <-i [Categorie[Number]]>= += +Deletes a Point of Interest.= +Loads the List of POI's new.= +Jumps to the Position of the Point of Interest.= +Changes the Position of the Point of Interest.= +,= +Changes the Name of the Point of Interest.= +Validates the List of PoI's.= +Show Points of Interest= +You need the= + interact= + priv, please type= + /rules= + and search for the keyword=