[GRASS-dev] [GRASS GIS] #296: d.barscale: can't use "none" for background color

#296: d.barscale: can't use "none" for background color
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------
According to d.barscale manual, bcolor can be 'a standard GRASS color,
R:G:B triplet, or "none"'. wxGUI dialog of the command doesn't allow for
"none".

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

#296: d.barscale: can't use "none" for background color
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => martinl
* cc: grass-dev@lists.osgeo.org (added)

Comment:

It's should be possible, see attached screenshot

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

#296: d.barscale: can't use "none" for background color
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):

Replying to [comment:1 martinl]:
> It's should be possible, see attached screenshot

The bug has to do with translations.

d.barscale dialog is missing that "Transparent" checkbox when I run GRASS
built --with-nls in Polish locale.

If on GRASS terminal I do:

{{{
$ export LC_ALL=C
$ d.barscale
}}}

the dialog has the checkbox in place.

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

#296: d.barscale: can't use "none" for background color
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:2 msieczka]:
> The bug has to do with translations.
>
> d.barscale dialog is missing that "Transparent" checkbox when I run
GRASS built --with-nls in Polish locale.
>
> If on GRASS terminal I do:
>
> {{{
> $ export LC_ALL=C
> $ d.barscale
> }}}
>
> the dialog has the checkbox in place.

Fix Polish translation to contain "none". This word shouldn't be
translated, it's keyword for option. Module cannot understand, e.g. in
Czech

{{{
d.barscale bcolor=průhledný
}}}

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

#296: wrong translations brake wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by msieczka):

  * component: wxGUI => default
  * summary: d.barscale: can't use "none" for background color => wrong
              translations brake wxGUI

Comment:

Replying to [comment:3 martinl]:

> Fix Polish translation to contain "none". This word shouldn't be
translated, it's keyword for option. Module cannot understand, e.g. in
Czech
>
> {{{
> d.barscale bcolor=průhledný
> }}}

I see. I'm not going to get involved into translations any time soon. I'll
just change the subject and component. Thanks for looking into this.

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

#296: wrong translations brake wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: assigned => new
  * owner: martinl => grass-dev@lists.osgeo.org
* cc: grass-dev@lists.osgeo.org (removed)

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

#296: wrong translations break wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by neteler):

  * summary: wrong translations brake wxGUI => wrong translations break
              wxGUI

Comment:

I have fixed the broken translation both in 6.4.svn and 7.0.trunk: r33313
and r33314.

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

#296: wrong translations break wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:4 msieczka]:

> > Fix Polish translation to contain "none". This word shouldn't be
translated, it's keyword for option.

Let me guess: the GUI looks for the string "none" in the description? I
think that there should be a separate gisprompt setting for this case.

Even so, the description string shouldn't translate "none".

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

#296: wrong translations break wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:7 glynn]:
> Let me guess: the GUI looks for the string "none" in the description? I
think that there should be a separate gisprompt setting for this case.

Yes it looks at label or description.

Currently is used

{{{
GISPROMPT_COLOR
}}}

i.e

{{{
"old,color,color"
}}}

Maybe we could use for enabling transparency

{{{
"old,color,none"
}}}

?

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

#296: wrong translations break wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

In 7.x, GRASS itself (i.e. libgis) only cares that there are three parts
(i.e. two commas), and whether or not the first part is "new" (which
affects whether an overwrite check is performed, and whether the
--overwrite option is shown).

In earlier versions, it's also used for terminal-based prompting, and must
have the form age,element,prompt. The age must be one of old, new, mapset,
any, old_file, new_file or color, and affects which G_ask_* function is
used to obtain input interactively from the terminal. The element part is
used to check whether the user's answer is valid, and to list available
options; it should be a valid element type.

IOW, GISPROMPT_COLOR should really be of the form color,?,?.

Beyond that, we need to give some thought to re-designing the type system.
The type, gisprompt, multiple, key_desc and options fields should all be
merged into a more flexible type system.

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

#296: wrong translations break wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:9 glynn]:

> Beyond that, we need to give some thought to re-designing the type
system. The type, gisprompt, multiple, key_desc and options fields should
all be merged into a more flexible type system.

I agree, see also #156.

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

#296: wrong translations break wxGUI
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by martinl):

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

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