Paweł Tomulik avatar Paweł Tomulik committed 9105540

Corrections corrections corrections ..

Comments (0)

Files changed (30)

src/engine/SCons/Tool/GettextCommon.py

   """ A factory of `PO` target files.
   
   Factory defaults differ from these of `SCons.Node.FS.FS`.  We set `precious`
-  (this is required by builders and actions in `SConsToolGettext`) and
-  `noclean` flags by default for all produced nodes.
+  (this is required by builders and actions gettext) and `noclean` flags by
+  default for all produced nodes.
   """
   def __init__( self, env, nodefault = True, alias = None, precious = True
               , noclean = True ):
 
   It seems like `SCons.Node.FS.Base.get_path()` returns absolute paths
   for nodes that are outside of current working directory (`env.fs.getcwd()`).
-  In `SConsToolGettext` way we often have `SConscript`, `POT` and `PO` files
-  within `po/` directory and source files (e.g. `*.c`) outside of it. When
-  generating `POT` template file, references to source files are written to
-  `POT` template, so a translator may later quickly jump to appropriate source
-  file and line from its `PO` editor (e.g. `poedit`).  Relative paths in  
-  `PO` file are usually interpreted by `PO` editor as paths relative to the
-  place, where `PO` file lives. The absolute paths would make resultant `POT`
-  file nonportable, as the references would be correct only on the machine,
-  where `POT` file was recently re-created. For such reason, we need a
-  function, which always returns relative paths. This is the purpose of
-  `RPaths` callable object.
+  Here, we often have `SConscript`, `POT` and `PO` files within `po/`
+  directory and source files (e.g. `*.c`) outside of it. When generating `POT`
+  template file, references to source files are written to `POT` template, so
+  a translator may later quickly jump to appropriate source file and line from
+  its `PO` editor (e.g. `poedit`).  Relative paths in  `PO` file are usually
+  interpreted by `PO` editor as paths relative to the place, where `PO` file
+  lives. The absolute paths would make resultant `POT` file nonportable, as
+  the references would be correct only on the machine, where `POT` file was
+  recently re-created. For such reason, we need a function, which always
+  returns relative paths. This is the purpose of `RPaths` callable object.
 
   The `__call__` method returns paths relative to current woking directory, but
   we assume, that *xgettext(1)* is run from the directory, where target file is

src/engine/SCons/Tool/gettext.py

 #############################################################################
 def generate(env,**kw):
   import SCons.Tool
-  from SConsToolGettext.GettextCommon \
+  from SCons.Tool.GettextCommon \
     import  _translate, _install_mo_files, tool_list
   for t in tool_list(env['PLATFORM'], env):
     env.Tool(t)
 
 #############################################################################
 def exists(env):
-  from SConsToolGettext.GettextCommon \
+  from SCons.Tool.GettextCommon \
   import _xgettext_exists, _msginit_exists, \
          _msgmerge_exists, _msgfmt_exists
   return _xgettext_exists(env) and _msginit_exists(env) \

src/engine/SCons/Tool/gettext.xml

 may be however interested in <emphasis>top-level</emphasis> builders
 &b-Translate; and &b-InstallMOFiles; described few paragraphs later.
 
-To use &t-gettext; tools, copy <filename>SConsToolGettext</filename>
-folder to your <filename>site_scons/</filename> and simply add
-<literal>'gettext'</literal> tool to your environment:
+To use &t-gettext; tools add <literal>'gettext'</literal> tool to your
+environment:
 <example>
   env = Environment( tools = ['default', 'gettext'] )
 </example>
 <cvar name="POAUTOINIT">
 <summary>
 The &cv-POAUTOINIT; variable, if set to <literal>True</literal> (on non-zero
-numeric value), let the SConsToolGettext to automatically initialize
+numeric value), let the &t-link-msginit; tool to automatically initialize
 <emphasis>missing</emphasis> <literal>PO</literal> files with
 <command>msginit(1)</command>.  This applies to both,
 &b-link-POInit; and &b-link-POUpdate; builders (and others that use any of

src/engine/SCons/Tool/msgfmt.py

   """ The builder class for `MO` files.
   
   The reason for this builder to exists and its purpose is quite simillar 
-  as for `SConsToolGettext._POFileBuilder`. This time, we extend list of
-  sources, not targets, and call `BuilderBase._execute()` only once (as we
-  assume single-target here).
+  as for `_POFileBuilder`. This time, we extend list of sources, not targets,
+  and call `BuilderBase._execute()` only once (as we assume single-target
+  here).
   """
 
   def _execute(self, env, target, source, *args, **kw):

test/GETTEXT/Translate_doc_user_examples1.py

 import TestSCons
 import os
 
-# NOTE: When integrating into upstream SCons development tree, remove the next
-#       line, and the "toolpath = ..." line 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()
 test.subdir('po/')
 test.write('po/SConstruct',
 """
-env = Environment(
-  toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
 env['POAUTOINIT'] = 1
 env.Translate(['en','pl'], ['../a.cpp','../b.cpp']) 
 """)

test/GETTEXT/Translate_doc_user_examples2.py

 import TestSCons
 import os
 
-# NOTE: When integrating into upstream SCons development tree, remove the next
-#       line, and the "toolpath = ..." line 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()
 test.subdir('po/')
 test.write('po/SConstruct',
 """
-env = Environment(
-  toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
 env['POAUTOINIT'] = 1
 env['XGETTEXTPATH'] = ['../']
 env.Translate(LINGUAS_FILE = 1, XGETTEXTFROM = 'POTFILES.in') 

test/GETTEXT/Translate_doc_user_examples3.py

 import TestSCons
 import os
 
-# NOTE: When integrating into upstream SCons development tree, remove the next
-#       line, and the "toolpath = ..." line 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()
 test.subdir('src', ['src', 'po'], 'build')
 test.write('SConstruct',
 """
-env = Environment(
-  toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
 VariantDir('build', 'src', duplicate = 0)
 env['POAUTOINIT'] = 1
 SConscript('src/po/SConscript.i18n', exports = 'env')

test/GETTEXT/doc_user_examples1.py

 import TestSCons
 import os
 
-# NOTE: When integrating into upstream SCons development tree, remove the next
-#       line, and the "toolpath = ..." line 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()
 
 test.write('SConstruct',
 """
-env = Environment(
-  toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
 """)
 test.run(arguments = '.')
 

test/MSGFMT/MOFile_doc_user_examples1.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGFMT/MOFile_doc_user_examples2.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGFMT/MOFile_doc_user_examples3.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGFMT/MOFile_doc_user_examples4.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGINIT/POinit_doc_user_examples1.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGINIT/POinit_doc_user_examples2.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGINIT/POinit_doc_user_examples3.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGINIT/POinit_doc_user_examples4.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGINIT/POinit_doc_user_examples5.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGINIT/POinit_doc_user_examples6.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples1.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples2.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples3.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples4.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples5.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples6.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/MSGMERGE/POUpdate_doc_user_examples8.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 # Trivial example. Just load the tool.
 test = TestSCons.TestSCons()

test/XGETTEXT/POTUpdate_doc_user_examples1.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 test = TestSCons.TestSCons()
 

test/XGETTEXT/POTUpdate_doc_user_examples2.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 test = TestSCons.TestSCons()
 
 test.write('SConstruct',

test/XGETTEXT/POTUpdate_doc_user_examples3.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 test = TestSCons.TestSCons()
 

test/XGETTEXT/POTUpdate_doc_user_examples4.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 test = TestSCons.TestSCons()
 

test/XGETTEXT/POTUpdate_doc_user_examples5.py

 import TestSCons
 import os
 
-site_scons =  os.environ['SCONS_TOOL_LIB_DIR'] 
-
 ###############################################################################
 test = TestSCons.TestSCons()
 
 test.write('0/1/po/SConstruct',
 """
 # SConstruct file in '0/1/po/' subdirectory
-env = Environment(
-  toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ['default', 'xgettext']
-)
+env = Environment( tools = ['default', 'xgettext'] )
 env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH=['../../', '../'])
 """)
 test.run(arguments = 'pot-update', chdir = '0/1/po')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.