[GRASS-dev] [GRASS GIS] #2630: startup screen i18n

GRASS GIS trac at osgeo.org
Thu Mar 19 11:26:33 PDT 2015


#2630: startup screen i18n
--------------------------+-------------------------------------------------
  Reporter:  martinl      |       Owner:  grass-dev@…                  
      Type:  defect       |      Status:  closed                       
  Priority:  major        |   Milestone:  7.0.1                        
 Component:  Startup      |     Version:  unspecified                  
Resolution:  invalid      |    Keywords:  i18n, translations, backports
  Platform:  Unspecified  |         Cpu:  Unspecified                  
--------------------------+-------------------------------------------------
Changes (by wenzeslaus):

  * keywords:  i18n => i18n, translations, backports


Comment:

 Replying to [comment:2 marisn]:
 > Not a bug. Everything works as expected. Try to select "de" and you will
 see that it works.

 Are you sure that the error message in the original report is influenced
 by whether the string is translated or not? The ticket might be still
 valid.

 But you are right, it works for me with `de`. However, with `ja` or `ko` I
 get non-translated start up screen (even Quit and Help are not translated,
 not only the new strings). The error message (in command line) is:
 {{{
 Failed to enforce user specified language 'ja' with error: 'unsupported
 locale setting'
 A LANGUAGE environmental variable has been set.
 Part of messages will be displayed in the requested language.
 Cleaning up temporary files...
 Starting GRASS GIS...
 }}}

 The error is coming from source:grass/trunk/lib/init/grass.py#L807:

 {{{
 #!python
                 try:
                     encoding = locale.getpreferredencoding()
                     normalized = locale.normalize('%s.%s' % (language,
 encoding))
                     locale.setlocale(locale.LC_ALL, normalized)
                 except locale.Error as e:
                     # If we got so far, attempts to set up language and
 locale have failed
                     # on this system
                     sys.stderr.write("Failed to enforce user specified
 language '%s' with error: '%s'\n" % (language, e))
                     sys.stderr.write("A LANGUAGE environmental variable
 has been set.\nPart of messages will be displayed in the requested
 language.\n")
                     # Even if setting locale will fail, let's set LANG in
 a hope,
                     # that UI will use it GRASS texts will be in selected
 language,
                     # system messages (i.e. OK, Cancel etc.) - in system
 default
                     # language
                     os.environ['LANGUAGE'] = language
                     return
 }}}

 > The source of problem is - someone (username martinl) decided that
 English language is the only language that matters and backported startup
 screen changes (r64496) that touched a lot of strings. (This would be a
 huge no-no in any large project, like KDE, where breaking strings so close
 before release is considered to be something like a deadly sin.) As a
 result - for most of languages GRASS 7.0.0 was shipped with a untranslated
 welcome screen.

 This makes sense but I think we miss somebody who would check that people
 fulfill this rule when backports are done before release. Also writing it
 down is a good idea. This is the right place to do it:
 wiki:Submitting/General

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



More information about the grass-dev mailing list