Opened 11 years ago

Closed 11 years ago

#296 closed defect (fixed)

wrong translations break wxGUI

Reported by: msieczka Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: svn-develbranch6
Keywords: Cc:
CPU: All Platform: All

Description

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".

Attachments (1)

d-barscale-none.png (9.0 KB) - added by martinl 11 years ago.
d.barscale bcolor=none

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by martinl

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

It's should be possible, see attached screenshot

Changed 11 years ago by martinl

Attachment: d-barscale-none.png added

d.barscale bcolor=none

comment:2 in reply to:  1 ; Changed 11 years ago by msieczka

Replying to 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.

comment:3 in reply to:  2 ; Changed 11 years ago by martinl

Replying to 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ý

comment:4 in reply to:  3 ; Changed 11 years ago by msieczka

Component: wxGUIdefault
Summary: d.barscale: can't use "none" for background colorwrong translations brake wxGUI

Replying to 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.

comment:5 Changed 11 years ago by martinl

Cc: grass-dev@… removed
Owner: changed from martinl to grass-dev@…
Status: assignednew

comment:6 Changed 11 years ago by neteler

Summary: wrong translations brake wxGUIwrong translations break wxGUI

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

comment:7 in reply to:  4 ; Changed 11 years ago by glynn

Replying to 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".

comment:8 in reply to:  7 Changed 11 years ago by martinl

Replying to 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"

?

comment:9 Changed 11 years ago 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.

comment:10 in reply to:  9 Changed 11 years ago by martinl

Replying to 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.

comment:11 Changed 11 years ago by martinl

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.