Modify

Opened 5 months ago

Closed 5 months ago

Last modified 4 months ago

#24031 closed defect (fixed)

Strange naming in Mapillary source

Reported by: stoecker Owned by: taylor.smock
Priority: normal Milestone:
Component: Plugin mapillary Version:
Keywords: Cc:

Description

Hello,

I did some cleanup of the DevelopersGuide/ShortcutsList and found some issues in Mapillary. I fixed them, but the remaining one is strange:

    public WebLinkAction(final String name, final URI uri) {
        super(tr(name), "link", tr("Open in browser"),
            Shortcut.registerShortcut("mapillary:open_in_browser_" + name.replace(' ', '_'),
                tr("Mapillary: Open {0} in browser", tr(name)), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
            false, "mapillary:open_in_browser_" + name.replace(' ', '_'), false);


        imgLinkAction = new WebLinkAction(marktr("View in browser"), null);

results in
/* SHORTCUT(Mapillary: Open View in browser in browser, mapillary:open_in_browser_View_in_browser, CHAR_UNDEFINED, NONE) */

That's a bit strange. I thus left it as is. As it is used only once my proposal would be to move the name "View in browser" entirely into the WebLinkAction and don't pass it any arguments. Cleans up the Shortcut parsing and also the names.

P.S. There is another parsing issue in MapRoulette ;-)

Attachments (0)

Change History (5)

comment:1 by stoecker, 5 months ago

Summary: Strange nameing in Mapillary sourceStrange naming in Mapillary source

comment:2 by stoecker, 5 months ago

Looking at
https://github.com/JOSM/Mapillary/commit/98a36ea67393aa4e0d336049233ad3d82db71084

        super(tr("View in browser"), "link", tr("Open in browser"),
            Shortcut.registerShortcut("mapillary:open_in_browser_View_in_browser",
                tr("Mapillary: Open {0} in browser", tr("View in browser")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
            false, "mapillary:open_in_browser_View_in_browser", false);

you only changed the code, but not the result. Should the name of the shortcut really be "Mapillary: Open View in browser in browser"?

comment:3 by taylor.smock, 5 months ago

Mapillary should be fixed now. See https://github.com/JOSM/Mapillary/commit/edc125eb0ff756e132d0b6d3d5cd3c59738a76aa .

For some reason, I the problem as shortcut parsing, not wording.

comment:4 by taylor.smock, 5 months ago

Resolution: fixed
Status: newclosed

comment:5 by stoecker, 4 months ago

Ah, sorry for unclear description.

For the parsing issues there are the comments which allow to specify what's really happening when the parser fails (that's easier than making the parser still more complex). But direct parsing is nevertheless a better solution, as comments can get out of sync.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain taylor.smock.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.