[icinga-checkins] icinga.org: icingaweb2/feature/translation-catalog-object-13012: Introduce class GettextCatalogParser

git at icinga.org git at icinga.org
Mon Nov 14 16:03:20 CET 2016


Module: icingaweb2
Branch: feature/translation-catalog-object-13012
Commit: 4b5b7681214baa644c5813360fe2744ef81e4e51
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=4b5b7681214baa644c5813360fe2744ef81e4e51

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Mon Oct 31 14:24:48 2016 +0100

Introduce class GettextCatalogParser

refs #13011

---

 .../Translation/Util/GettextCatalogParser.php      |   46 ++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/modules/translation/library/Translation/Util/GettextCatalogParser.php b/modules/translation/library/Translation/Util/GettextCatalogParser.php
new file mode 100644
index 0000000..9127319
--- /dev/null
+++ b/modules/translation/library/Translation/Util/GettextCatalogParser.php
@@ -0,0 +1,46 @@
+<?php
+/* Icinga Web 2 | (c) 2016 Icinga Development Team | GPLv2+ */
+
+namespace Icinga\Module\Translation\Util;
+
+
+/**
+ * Class GettextCatalogParser
+ *
+ * Reads gettext PO files and outputs the contained entries.
+ *
+ * @package Icinga\Module\Translation\Util
+ */
+class GettextCatalogParser
+{
+    /**
+     * Create a new GettextCatalogParser
+     *
+     * @param   string  $catalogPath    The path to the catalog file to parse
+     */
+    public function __construct($catalogPath)
+    {
+
+    }
+
+    /**
+     * Parse the given catalog file and return its entries
+     *
+     * @param   string  $catalogPath    The path to the catalog file to parse
+     */
+    public static function parsePath($catalogPath)
+    {
+        $parser = new static($catalogPath);
+        return $parser->parse();
+    }
+
+    /**
+     * Parse the catalog file and return its entries
+     *
+     * @return  array
+     */
+    public function parse()
+    {
+
+    }
+}



More information about the icinga-checkins mailing list