[josm-dev] Plugin help - change topbar toolbar josm...

Minh Quang chumkhungbo2003 at yahoo.com
Mon Jan 11 13:01:05 GMT 2010


Hi there,
Sorry for disturbing you. We're developping a plugin for our project - geolocalization inside buildings. Our plugin consist of creating different buttons which will allow drawing different indoor objects and auto-taging them by our indoor personnalized tags.

I read project's code source several times. I discovered some interesting classes which I will override in my plugin. We defined our "Indoor" group tags (presets) and we modified your presets.xml. Apparently, this added another group "Indoor" presets on the main menu. Now I woud like to do is to create a top icon button on the topbar toolbar as a shortcut to this tag presets (Indoor)  "tagginggroup_Highways/Waypoints". After, I would like to create a button to draw room and then, add our "room" tag inside that.

My questions are :
ToolbarPreference is the class implementing the JOSM's toolbar.?How you fill your two maps for the button actions?     private Map<String, Action> actions ;    private Map<String, Action> regactions;What is the link between TaggingPresetPreference extracting all predefined tags and your ToolbarPreferences class?How you can create a button pointing just to a group of tag (our group)?
I would like to thank you in advance.







--- On Mon, 1/11/10, Minh Quang <chumkhungbo2003 at yahoo.com> wrote:

From: Minh Quang <chumkhungbo2003 at yahoo.com>
Subject: Re: [josm-dev] Localisation policy for quotes etc.
To: josm-dev at openstreetmap.org
Date: Monday, January 11, 2010, 1:22 PM

Hi there,
Sorry for disturbing you

--- On Sun, 1/10/10, Ævar Arnfjörð Bjarmason <avarab at gmail.com> wrote:

From: Ævar Arnfjörð Bjarmason <avarab at gmail.com>
Subject: Re: [josm-dev] Localisation policy for quotes etc.
To: "Andre Hinrichs" <andre.hinrichs at gmx.de>
Cc: josm-dev at openstreetmap.org
Date: Sunday, January 10, 2010, 4:13 PM

On Sun, Jan 10, 2010 at 15:00, Andre Hinrichs <andre.hinrichs at gmx.de> wrote:
> Hi List!
>
> Since I currently check all translatable texts I found that sometimes
> quotes are single and sometimes
 double. E.g. "isn't" is sometimes simply
> "isn't" and sometimes "isn''t".
>
> Which is the correct way?

It's always a single quite in English, but perhaps they're double
quotes in the JOSM source to work around something?:

aoeu josm (r2766) $ ack "tr\(.*isn''t" src
src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
219:                setErrorMessage(tfLatValue,tr("The string ''{0}''
isn''t a valid double value.", tfLatValue.getText()));
251:                setErrorMessage(tfLonValue,tr("The string ''{0}''
isn''t a valid double value.", tfLonValue.getText()));

src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
160:                feedbackInvalid(tr("The string ''{0}'' isn''t a
valid double value.", getComponent().getText()));
200: 
               feedbackInvalid(tr("The string ''{0}'' isn''t a
valid double value.", getComponent().getText()));

src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
533:                    throw new IllegalStateException(tr("Current
value ''{0}'' for user ID isn''t valid", tfUid.getText()));

> Forthermore I find sometimes american english (e.g. 'initialize').
> Wasn't the overall policy to use british english?

I thought the source default was en_US since if it was en_GB the
existing en_GB translation would be pointless (and we'd need a en_US
one).

> And finally sometimes I find XHTML style end tags in translated texts
> (e.g. '<br />' instead of '<br>'). By now I haven't found any in the
> source. Is it ok to use them or should these be fixed?

The
 HTML is rendered by some internal Java stuff, both of those tags
work just as well when fed to it so I don't think it needs to be fixed
either way.

_______________________________________________
josm-dev mailing list
josm-dev at openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev



      


More information about the josm-dev mailing list