summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/gettext.py
diff options
context:
space:
mode:
authorptomulik <ptomulik@meil.pw.edu.pl>2012-06-06 20:14:26 (GMT)
committerptomulik <ptomulik@meil.pw.edu.pl>2012-06-06 20:14:26 (GMT)
commit045bb7d4cfc3e1a4c0c41619248211c7c3b9ca5a (patch)
treece81b8f9455c354c8a85e77134b0ece9b5903c66 /src/engine/SCons/Tool/gettext.py
parent69ec58de81fae315449b1f6f425526977a7a2699 (diff)
downloadSCons-045bb7d4cfc3e1a4c0c41619248211c7c3b9ca5a.zip
SCons-045bb7d4cfc3e1a4c0c41619248211c7c3b9ca5a.tar.gz
SCons-045bb7d4cfc3e1a4c0c41619248211c7c3b9ca5a.tar.bz2
Added gettext tools
Diffstat (limited to 'src/engine/SCons/Tool/gettext.py')
-rw-r--r--src/engine/SCons/Tool/gettext.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/gettext.py b/src/engine/SCons/Tool/gettext.py
new file mode 100644
index 0000000..1055087
--- /dev/null
+++ b/src/engine/SCons/Tool/gettext.py
@@ -0,0 +1,47 @@
+"""gettext tool
+"""
+
+
+# __TOOL_COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+#############################################################################
+def generate(env,**kw):
+ import SCons.Tool
+ from SConsToolGettext.GettextCommon \
+ import _translate, _install_mo_files, tool_list
+ for t in tool_list(env['PLATFORM'], env):
+ env.Tool(t)
+ env.AddMethod(_translate, 'Translate')
+ # This is not ready yet
+ # env.AddMethod(_install_mo_files, 'InstallMOFiles')
+#############################################################################
+
+#############################################################################
+def exists(env):
+ from SConsToolGettext.GettextCommon \
+ import _xgettext_exists, _msginit_exists, \
+ _msgmerge_exists, _msgfmt_exists
+ return _xgettext_exists(env) and _msginit_exists(env) \
+ and _msgmerge_exists(env) and _msgfmt_exists(env)
+#############################################################################