aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/de.po46
-rw-r--r--locale/ru.po46
-rw-r--r--locale/template.pot46
3 files changed, 138 insertions, 0 deletions
diff --git a/locale/de.po b/locale/de.po
new file mode 100644
index 0000000..8fda8b1
--- /dev/null
+++ b/locale/de.po
@@ -0,0 +1,46 @@
+# German translation of ehlphabet mod
+# Copyright (C) 2018 Sam Hocevar
+# This file is distributed under the same license as the ehlphabet package.
+# CodeXP <codexp@gmx.net>, 2018.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ehlphabet\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-04-01 00:10+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: CodeXP <codexp@gmx.net>\n"
+"Language-Team: \n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: init.lua
+msgid "Ehlphabet Block '@1'"
+msgstr "Ehlphabet Block '@1'"
+
+#: init.lua
+msgid "Letter Machine"
+msgstr "Zeichenmaschine"
+
+#: init.lua
+msgid "You cannot dig the @1 with blocks inside"
+msgstr "Du kannst die @1 nicht wegräumen solange sie gefüllt ist"
+
+#: init.lua
+msgid "Letter"
+msgstr "Zeichen"
+
+#: init.lua
+msgid "Blank -> Letter"
+msgstr "Blanko -> Zeichen"
+
+#: init.lua
+msgid "Ehlphabet Block (blank)"
+msgstr "Ehlphabet Block (Blanko)"
+
+#: init.lua
+msgid "[MOD] Elphabet is loaded"
+msgstr "[MOD] Elphabet wurde geladen"
diff --git a/locale/ru.po b/locale/ru.po
new file mode 100644
index 0000000..40b0537
--- /dev/null
+++ b/locale/ru.po
@@ -0,0 +1,46 @@
+# Russian translation of ehlphabet mod
+# Copyright (C) 2018 Sam Hocevar
+# This file is distributed under the same license as the ehlphabet package.
+# CodeXP <codexp@gmx.net>, 2018.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ehlphabet\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-04-01 00:10+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: CodeXP <codexp@gmx.net>\n"
+"Language-Team: \n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: init.lua
+msgid "Ehlphabet Block '@1'"
+msgstr "Блок эльфавита '@1'"
+
+#: init.lua
+msgid "Letter Machine"
+msgstr "Станок букв"
+
+#: init.lua
+msgid "You cannot dig the @1 with blocks inside"
+msgstr "Ты не можеш убрать @1 пока он наполнен блоками"
+
+#: init.lua
+msgid "Letter"
+msgstr "Буква"
+
+#: init.lua
+msgid "Blank -> Letter"
+msgstr "Бланк -> Буква"
+
+#: init.lua
+msgid "Ehlphabet Block (blank)"
+msgstr "Блок эльфавита (бланк)"
+
+#: init.lua
+msgid "[MOD] Elphabet is loaded"
+msgstr "[MOD] Эльфавит загружен"
diff --git a/locale/template.pot b/locale/template.pot
new file mode 100644
index 0000000..01d083c
--- /dev/null
+++ b/locale/template.pot
@@ -0,0 +1,46 @@
+# German translation of ehlphabet mod
+# Copyright (C) 2018 Sam Hocevar
+# This file is distributed under the same license as the ehlphabet package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ehlphabet\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-04-01 00:10+0200\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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: init.lua
+msgid "Ehlphabet Block '@1'"
+msgstr ""
+
+#: init.lua
+msgid "Letter Machine"
+msgstr ""
+
+#: init.lua
+msgid "You cannot dig the @1 with blocks inside"
+msgstr ""
+
+#: init.lua
+msgid "Letter"
+msgstr ""
+
+#: init.lua
+msgid "Blank -> Letter"
+msgstr ""
+
+#: init.lua
+msgid "Ehlphabet Block (blank)"
+msgstr ""
+
+#: init.lua
+msgid "[MOD] Elphabet is loaded"
+msgstr ""
bal objects extern Settings *g_settings; extern std::string g_settings_path; // Type for a settings changed callback function typedef void (*SettingsChangedCallback)(const std::string &name, void *data); typedef std::vector< std::pair< SettingsChangedCallback, void * > > SettingsCallbackList; typedef std::unordered_map<std::string, SettingsCallbackList> SettingsCallbackMap; enum ValueType { VALUETYPE_STRING, VALUETYPE_FLAG // Doesn't take any arguments }; enum SettingsParseEvent { SPE_NONE, SPE_INVALID, SPE_COMMENT, SPE_KVPAIR, SPE_END, SPE_GROUP, SPE_MULTILINE, }; struct ValueSpec { ValueSpec(ValueType a_type, const char *a_help=NULL) { type = a_type; help = a_help; } ValueType type; const char *help; }; struct SettingsEntry { SettingsEntry() = default; SettingsEntry(const std::string &value_) : value(value_) {} SettingsEntry(Settings *group_) : group(group_), is_group(true) {} std::string value = ""; Settings *group = nullptr; bool is_group = false; }; typedef std::unordered_map<std::string, SettingsEntry> SettingEntries; class Settings { public: Settings() = default; ~Settings(); Settings & operator += (const Settings &other); Settings & operator = (const Settings &other); /*********************** * Reading and writing * ***********************/ // Read configuration file. Returns success. bool readConfigFile(const char *filename); //Updates configuration file. Returns success. bool updateConfigFile(const char *filename); // NOTE: Types of allowed_options are ignored. Returns success. bool parseCommandLine(int argc, char *argv[], std::map<std::string, ValueSpec> &allowed_options); bool parseConfigLines(std::istream &is, const std::string &end = ""); void writeLines(std::ostream &os, u32 tab_depth=0) const; SettingsParseEvent parseConfigObject(const std::string &line, const std::string &end, std::string &name, std::string &value); bool updateConfigObject(std::istream &is, std::ostream &os, const std::string &end, u32 tab_depth=0); static bool checkNameValid(const std::string &name); static bool checkValueValid(const std::string &value); static std::string getMultiline(std::istream &is, size_t *num_lines=NULL); static void printEntry(std::ostream &os, const std::string &name, const SettingsEntry &entry, u32 tab_depth=0); /*********** * Getters * ***********/ const SettingsEntry &getEntry(const std::string &name) const; Settings *getGroup(const std::string &name) const; const std::string &get(const std::string &name) const; bool getBool(const std::string &name) const; u16 getU16(const std::string &name) const; s16 getS16(const std::string &name) const; u32 getU32(const std::string &name) const; s32 getS32(const std::string &name) const; u64 getU64(const std::string &name) const; float getFloat(const std::string &name) const; v2f getV2F(const std::string &name) const; v3f getV3F(const std::string &name) const; u32 getFlagStr(const std::string &name, const FlagDesc *flagdesc, u32 *flagmask) const; // N.B. if getStruct() is used to read a non-POD aggregate type, // the behavior is undefined. bool getStruct(const std::string &name, const std::string &format, void *out, size_t olen) const; bool getNoiseParams(const std::string &name, NoiseParams &np) const; bool getNoiseParamsFromValue(const std::string &name, NoiseParams &np) const; bool getNoiseParamsFromGroup(const std::string &name, NoiseParams &np) const; // return all keys used std::vector<std::string> getNames() const; bool exists(const std::string &name) const; /*************************************** * Getters that don't throw exceptions * ***************************************/ bool getEntryNoEx(const std::string &name, SettingsEntry &val) const; bool getGroupNoEx(const std::string &name, Settings *&val) const; bool getNoEx(const std::string &name, std::string &val) const; bool getFlag(const std::string &name) const; bool getU16NoEx(const std::string &name, u16 &val) const; bool getS16NoEx(const std::string &name, s16 &val) const; bool getS32NoEx(const std::string &name, s32 &val) const; bool getU64NoEx(const std::string &name, u64 &val) const; bool getFloatNoEx(const std::string &name, float &val) const; bool getV2FNoEx(const std::string &name, v2f &val) const; bool getV3FNoEx(const std::string &name, v3f &val) const; // N.B. getFlagStrNoEx() does not set val, but merely modifies it. Thus, // val must be initialized before using getFlagStrNoEx(). The intention of // this is to simplify modifying a flags field from a default value. bool getFlagStrNoEx(const std::string &name, u32 &val, FlagDesc *flagdesc) const; /*********** * Setters * ***********/ // N.B. Groups not allocated with new must be set to NULL in the settings // tree before object destruction. bool setEntry(const std::string &name, const void *entry, bool set_group, bool set_default); bool set(const std::string &name, const std::string &value); bool setDefault(const std::string &name, const std::string &value); bool setGroup(const std::string &name, Settings *group); bool setGroupDefault(const std::string &name, Settings *group); bool setBool(const std::string &name, bool value); bool setS16(const std::string &name, s16 value); bool setU16(const std::string &name, u16 value); bool setS32(const std::string &name, s32 value); bool setU64(const std::string &name, u64 value); bool setFloat(const std::string &name, float value);