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

#2630: startup screen i18n
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.1
Component: Startup | Version: unspecified
Keywords: i18n | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Language settings doesn't affect start up screen. When switching e.g. to
'ja' in GUI settings, GRASS starts with non-localized welcome screen

{{{
A language override has been requested. Trying to switch GRASS into
'ko'...
Failed to enforce user specified language 'ko' with error: 'unsupported
locale s
etting'
A LANGUAGE environmental variable has been set.
Part of messages will be displayed in the requested language.
}}}

Afterwards GUI starts localized. I remember that it worked in 7.0.0beta3.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2630&gt;
GRASS GIS <http://grass.osgeo.org>

#2630: startup screen i18n
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.1
Component: Startup | Version: unspecified
Keywords: i18n | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Description changed by martinl:

Old description:

Language settings doesn't affect start up screen. When switching e.g. to
'ja' in GUI settings, GRASS starts with non-localized welcome screen

{{{
A language override has been requested. Trying to switch GRASS into
'ko'...
Failed to enforce user specified language 'ko' with error: 'unsupported
locale s
etting'
A LANGUAGE environmental variable has been set.
Part of messages will be displayed in the requested language.
}}}

Afterwards GUI starts localized. I remember that it worked in 7.0.0beta3.

New description:

Language settings doesn't affect start up screen. When switching e.g. to
'ja' in GUI settings, GRASS starts with non-localized welcome screen

{{{
A language override has been requested. Trying to switch GRASS into
'ko'...
Failed to enforce user specified language 'ja' with error: 'unsupported
locale s
etting'
A LANGUAGE environmental variable has been set.
Part of messages will be displayed in the requested language.
}}}

Afterwards GUI starts localized. I remember that it worked in 7.0.0beta3.

--

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2630#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#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
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by marisn):

  * status: new => closed
  * resolution: => invalid

Comment:

Not a bug. Everything works as expected. Try to select "de" and you will
see that it works.

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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2630#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#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&gt;
GRASS GIS <http://grass.osgeo.org>

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

  * status: closed => reopened
  * resolution: invalid =>

Comment:

Replying to [comment:3 wenzeslaus]:
> 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...
}}}

re-opening...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2630#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

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

Comment(by martinl):

Replying to [comment:2 marisn]:
> 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.

It's still better to ship the new startup screen than the old version.
It's quite simple answer.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2630#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

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

* status: reopened => closed
* resolution: => wontfix

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2630#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>