#2425: Import translation function instead of using a buildin
-----------------------------------------------------+----------------------
 Reporter:  wenzeslaus                               |       Owner:  
grass-dev@…              
     Type:  task                                     |      Status:  new        
              
 Priority:  normal                                   |   Milestone:  7.1.0      
              
Component:  Translations                             |     Version:  
svn-releasebranch70      
 Keywords:  python, underscore, _, gettext, doctest  |    Platform:  All        
              
      Cpu:  Unspecified                              |  
-----------------------------------------------------+----------------------

Comment(by glynn):

 Replying to [ticket:2425 wenzeslaus]:

 > Basically, it is necessary to remove all occurrences of:
 >
 {{{
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'),
 unicode = True)
 }}}
 >
 > By one code based on this line in some module:
 >
 {{{
 _ = gettext.translation('grasswxpy', os.path.join(os.getenv("GISBASE"),
 'locale')).ugettext
 }}}

 I'd suggest that what's actually "necessary" is to fix whatever can't cope
 with "_" being a built-in function.

 It shouldn't be necessary to explicitly import "_" into each and every
 file. This is why Python has a (mutable) built-in namespace.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2425#comment:1>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to