Commits

Paweł Tomulik committed 7f6d563

Changes in gettext tool - tests refactored, small changes in sources.

Comments (0)

Files changed (35)

src/engine/SCons/Tool/GettextCommon.py

 #############################################################################
 
 #############################################################################
-def _install_mo_files( env, localedir, source, domain, category="LC_MESSAGES"
-                     , *args, **kw):
-  """ Function for `InstallMOFiles` pseudo-builder """
-  import SCons.Util
-  import os
-  nodes = []
-  for src in source:
-    lang = SCons.Util.splitext(os.path.basename(str(src)))[0]
-    tgt = os.path.join(localedir, lang, category, domain + "$MOSUFFIX")
-    nodes.extend(env.InstallAs(tgt, src, *args, **kw))
-  return nodes
-#############################################################################
-
-#############################################################################
 def _detect_xgettext(env):
   """ Detects *xgettext(1)* binary """
   if env.has_key('XGETTEXT'):

src/engine/SCons/Tool/gettext.py

 def generate(env,**kw):
   import SCons.Tool
   from SCons.Tool.GettextCommon \
-    import  _translate, _install_mo_files, tool_list
+    import  _translate, 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')
 #############################################################################
 
 #############################################################################

src/engine/SCons/Tool/gettext.xml

 </summary>
 </builder>
 
-<!--
-<builder name="InstallMOFiles">
-<summary>
-This is not implemented yet.
-Install <literal>MO</literal> catalog files into system directories.
-
-The parameters are:
-- <literal>localedir</literal> - system locale base directory, e.g. <literal>/usr/share/locale</literal>
-- <literal>source</literal> - list of <literal>MO</literal> files to install
-- <literal>domain</literal> - domain, i.e. your package/program name
-- <literal>category</literal> - locale category, e.g. <literal>LC_MESSAGES</literal>
-
-The installation goes in standard way. For example, if
-<literal>localedir="/usr/share/locale"</literal>, <literal>domain="program1"</literal>,
-<literal>category="LC_MESSAGES"</literal>,  <literal>sources=['en.mo', 'fr.mo']</literal>, then the
-installation goes as follows:
-<example>
-en.mo ===&gt; /usr/share/locale/en/LC_MESSAGES/program1.mo
-fr.mo ===&gt; /usr/share/locale/fr/LC_MESSAGES/program1.mo
-</example>
-The <literal>InstallMOFiles</literal> builder uses internaly <literal>InstallAs</literal> builder, so all
-the features of <literal>InstallAs</literal> (e.g. <literal>xxinstall-sandbox</literal>) should work.
-<example>
-TODO: 
-</example>
-</summary>
-</builder>
--->
-
 <cvar name="POTDOMAIN">
 <summary>
 The &cv-POTDOMAIN; defines default domain, used to generate
 
 </summary>
 </cvar>
-
-<scons_function name="Dummy">
-<arguments>
-TODO: Try to remove me.
-</arguments>
-<summary>
-TODO: Try to remove me.
-</summary>
-</scons_function>

src/engine/SCons/Tool/msgfmt.py

     MSGFMTFLAGS = [ SCons.Util.CLVar('-c') ],
     MSGFMTCOM = '$MSGFMT $MSGFMTFLAGS -o $TARGET $SOURCE',
     MSGFMTCOMSTR = '',
-    MOSUFFIX = '.mo'
+    MOSUFFIX = ['.mo'],
+    POSUFFIX = ['.po']
   )
   env.Append( BUILDERS = { 'MOFiles'  : _create_mo_file_builder(env) } )
 #############################################################################

src/engine/SCons/Tool/msgfmt.xml

 MSGFMTCOM
 MSGFMTCOMSTR
 MSGFMTFLAGS
+POSUFFIX
 </sets>
 <uses>
 LINGUAS_FILE

src/engine/SCons/Tool/msginit.py

   env['MSGINIT'] = _detect_msginit(env)
   msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' \
              + ' $MSGINITFLAGS -i $SOURCE -o $TARGET'
+  # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded
+  #       (sometimes we really don't need it)
   env.SetDefault(
-    POSUFFIX = '.po',
+    POSUFFIX = ['.po'],
+    POTSUFFIX = ['.pot'],
     _MSGINITLOCALE = '${TARGET.filebase}',
     _MSGNoTranslator = _optional_no_translator_flag,
     MSGINITCOM = msginitcom,

src/engine/SCons/Tool/msginit.xml

 POAUTOINIT
 POCREATE_ALIAS
 POSUFFIX
+POTSUFFIX
 _MSGINITLOCALE
 </sets>
 <uses>

src/engine/SCons/Tool/msgmerge.py

   from SCons.Tool.GettextCommon import _detect_msgmerge
   env['MSGMERGE'] = _detect_msgmerge(env)
   env.SetDefault(
-    POSUFFIX = '.po',
+    POTSUFFIX = ['.pot'],
+    POSUFFIX = ['.po'],
     MSGMERGECOM = '$MSGMERGE  $MSGMERGEFLAGS --update $TARGET $SOURCE',
     MSGMERGECOMSTR = '',
     MSGMERGEFLAGS = [ ],

src/engine/SCons/Tool/msgmerge.xml

 MSGMERGECOMSTR
 MSGMERGEFLAGS
 POSUFFIX 
+POTSUFFIX
 POUPDATE_ALIAS
 </sets>
 <uses>

test/MSGFMT/MOFile_doc_user_examples1.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.MOFiles(['pl', 'en'])
-""")
-#
-##test.write('LINGUAS',
-##"""
-##en
-##pl
-##""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-test.run(arguments = '.')
-test.must_exist('en.mo', 'pl.mo')
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGFMT/MOFile_doc_user_examples2.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.MOFiles(LINGUAS_FILE = 1)
-""")
-#
-test.write('LINGUAS',
-"""
-en
-pl
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-test.run(arguments = '.')
-test.must_exist('en.mo', 'pl.mo')
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGFMT/MOFile_doc_user_examples3.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.MOFiles(['en', 'pl'], LINGUAS_FILE = 1)
-""")
-test.write('LINGUAS',
-"""
-de
-fr
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-#
-test.write('de.po',"""\
-# German translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: de\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr ""
-""")
-#
-test.write('fr.po',"""\
-# French translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: fr\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr ""
-""")
-
-test.run(arguments = '.')
-test.must_exist('en.mo', 'pl.mo', 'de.mo', 'fr.mo')
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGFMT/MOFile_doc_user_examples4.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['LINGUAS_FILE'] = 1
-env.MOFiles()
-""")
-#
-test.write('LINGUAS',
-"""
-en
-pl
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: dummypkg 1.0\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-test.run(arguments = '.')
-test.must_exist('en.mo', 'pl.mo')
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGINIT/POinit_doc_user_examples1.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['POAUTOINIT'] = 1
-env.POInit(['en','pl']) # messages.pot --&gt; [en.po, pl.po]
-""")
-#
-test.write('messages.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-
-# NOTE: msginit(1) prints all its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-create', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGINIT/POinit_doc_user_examples2.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['POAUTOINIT'] = 1
-env.POInit(['en','pl'], ['foo']) # foo.pot --&gt; [en.po, pl.po]
-""")
-#
-test.write('foo.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-
-# NOTE: msginit(1) prints all its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-create', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGINIT/POinit_doc_user_examples3.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['POAUTOINIT'] = 1
-env.POInit(['en','pl'], POTDOMAIN='foo') # foo.pot --&gt; [en.po, pl.po]
-""")
-#
-test.write('foo.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-
-# NOTE: msginit(1) prints all its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-create', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGINIT/POinit_doc_user_examples4.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['POAUTOINIT'] = 1
-env.POInit(LINGUAS_FILE = 1) # needs 'LINGUAS' file
-""")
-test.write('LINGUAS',"""
-en
-pl
-""")
-#
-test.write('messages.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-
-# NOTE: msginit(1) prints all its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-create', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGINIT/POinit_doc_user_examples5.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['POAUTOINIT'] = 1
-env.POInit(['en', 'pl'], LINGUAS_FILE = 1) # needs 'LINGUAS' file
-""")
-test.write('LINGUAS',"""
-de
-fr
-""")
-#
-test.write('messages.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-
-# NOTE: msginit(1) prints all its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-create', stderr = None)
-test.must_exist('en.po', 'pl.po', 'de.po', 'fr.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-test.must_contain('de.po', "Hello from a.cpp")
-test.must_contain('fr.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGINIT/POinit_doc_user_examples6.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env['POAUTOINIT'] = 1
-env['LINGUAS_FILE'] = 1
-env['POTDOMAIN'] = 'foo'
-env.POInit() 
-""")
-test.write('LINGUAS',"""
-en
-pl
-""")
-#
-test.write('foo.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-
-# NOTE: msginit(1) prints all its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-create', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGMERGE/POUpdate_doc_user_examples1.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.POUpdate(['en','pl']) # messages.pot --&gt; [en.po, pl.po]
-""")
-#
-test.write('messages.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-# NOTE: msgmerge(1) prints its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-update', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGMERGE/POUpdate_doc_user_examples2.py

-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.POUpdate(['en','pl'], ['foo']) # foo.pot --&gt; [en.po, pl.po]
-""")
-#
-test.write('foo.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-# NOTE: msgmerge(1) prints all messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-update', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGMERGE/POUpdate_doc_user_examples3.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.POUpdate(['en','pl'], POTDOMAIN='foo') # foo.pot --&gt; [en.po, pl.po]
-""")
-#
-test.write('foo.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-# NOTE: msgmerge(1) prints its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-update', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGMERGE/POUpdate_doc_user_examples4.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.POUpdate(LINGUAS_FILE = 1) # needs 'LINGUAS' file
-""")
-#
-test.write('LINGUAS',
-"""
-en
-pl
-""")
-#
-test.write('messages.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-# NOTE: msgmerge(1) prints all messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-update', stderr = None)
-test.must_exist('messages.pot', 'en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGMERGE/POUpdate_doc_user_examples5.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.POUpdate(LINGUAS_FILE = 1, source = ['foo']) 
-""")
-test.write('LINGUAS',
-"""
-en
-pl
-""")
-#
-test.write('foo.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Old message from a.cpp"
-""")
-#
-test.write('pl.po',"""\
-# Polish translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:35+0200\\n"
-"Last-Translator: Automatically generated\\n"
-"Language-Team: none\\n"
-"Language: pl\\n"
-"MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=ASCII\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\\n"
-
-#: a.cpp:1
-msgid "Old message from a.cpp"
-msgstr "Stara wiadomosc z a.cpp"
-""")
-
-# NOTE: msgmerge(1) prints its messages to stderr, we must ignore them,
-# So, stderr=None is crucial here. It is no point to match stderr to some
-# specific valuse; the messages are internationalized :) ).
-test.run(arguments = 'po-update', stderr = None)
-test.must_exist('en.po', 'pl.po')
-test.must_contain('en.po', "Hello from a.cpp")
-test.must_contain('pl.po', "Hello from a.cpp")
-
-test.pass_test()
-
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:

test/MSGMERGE/POUpdate_doc_user_examples6.py

-
-#!/usr/bin/env python
-#
-# __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__"
-
-"""
-Make sure, that the examples given in user guide all work.
-"""
-
-import TestSCons
-import os
-
-###############################################################################
-# Trivial example. Just load the tool.
-test = TestSCons.TestSCons()
-
-test.write('SConstruct',
-"""
-env = Environment( tools = ["default", "gettext"] )
-env.POUpdate(['en', 'pl'], LINGUAS_FILE = 1)
-""")
-test.write('LINGUAS',
-"""
-de
-fr
-""")
-test.write('messages.pot',"""\
-# 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 <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+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=CHARSET\\n"
-"Content-Transfer-Encoding: 8bit\\n"
-#
-#: a.cpp:1
-msgid "Hello from a.cpp"
-msgstr ""
-""")
-#
-test.write('en.po',"""\
-# English translations for PACKAGE package.
-# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Pawel Tomulik <ptomulik@meil.pw.edu.pl>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\\n"
-"Report-Msgid-Bugs-To: \\n"
-"POT-Creation-Date: 2012-05-27 00:35+0200\\n"
-"PO-Revision-Date: 2012-05-27 00:37+0200\\n"
-"Last-Translator: Pawel Tomulik <ptomulik@meil.pw.edu.pl>\\n"
-"Language-Team: English\\n"
-"Language: en\\n"
-"MIME-Version: 1.0\\n"