diff --git a/src/org/openstreetmap/josm/gui/MainMenu.java b/src/org/openstreetmap/josm/gui/MainMenu.java
index 0b484f1..8deba84 100644
|
a
|
b
|
|
| 2 | 2 | package org.openstreetmap.josm.gui; |
| 3 | 3 | |
| 4 | 4 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht; |
| 5 | | import static org.openstreetmap.josm.tools.I18n.marktr; |
| | 5 | import static org.openstreetmap.josm.tools.I18n.marktrc; |
| 6 | 6 | import static org.openstreetmap.josm.tools.I18n.tr; |
| | 7 | import static org.openstreetmap.josm.tools.I18n.trc; |
| 7 | 8 | |
| 8 | 9 | import java.awt.Component; |
| 9 | 10 | import java.awt.DefaultFocusTraversalPolicy; |
| … |
… |
|
| 325 | 326 | /** |
| 326 | 327 | * fileMenu contains I/O actions |
| 327 | 328 | */ |
| 328 | | public final JMenu fileMenu = addMenu(marktr("File"), KeyEvent.VK_F, 0, ht("/Menu/File")); |
| | 329 | public final JMenu fileMenu = addMenu(marktrc("menu", "File"), KeyEvent.VK_F, 0, ht("/Menu/File")); |
| 329 | 330 | /** |
| 330 | 331 | * sessionMenu is a submenu of File menu containing all session actions |
| 331 | 332 | */ |
| … |
… |
|
| 333 | 334 | /** |
| 334 | 335 | * editMenu contains editing actions |
| 335 | 336 | */ |
| 336 | | public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit")); |
| | 337 | public final JMenu editMenu = addMenu(marktrc("menu", "Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit")); |
| 337 | 338 | /** |
| 338 | 339 | * viewMenu contains display actions (zoom, map styles, etc.) |
| 339 | 340 | */ |
| 340 | | public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2, ht("/Menu/View")); |
| | 341 | public final JMenu viewMenu = addMenu(marktrc("menu", "View"), KeyEvent.VK_V, 2, ht("/Menu/View")); |
| 341 | 342 | /** |
| 342 | 343 | * toolsMenu contains different geometry manipulation actions from JOSM core (most used) |
| 343 | 344 | * The plugins should use other menus |
| 344 | 345 | */ |
| 345 | | public final JMenu toolsMenu = addMenu(marktr("Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools")); |
| | 346 | public final JMenu toolsMenu = addMenu(marktrc("menu", "Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools")); |
| 346 | 347 | /** |
| 347 | 348 | * moreToolsMenu contains geometry-related actions from all the plugins |
| 348 | 349 | * @since 6082 (moved from Utilsplugin2) |
| 349 | 350 | */ |
| 350 | | public final JMenu moreToolsMenu = addMenu(marktr("More tools"), KeyEvent.VK_M, 4, ht("/Menu/MoreTools")); |
| | 351 | public final JMenu moreToolsMenu = addMenu(marktrc("menu", "More tools"), KeyEvent.VK_M, 4, ht("/Menu/MoreTools")); |
| 351 | 352 | /** |
| 352 | 353 | * dataMenu contains plugin actions that are related to certain tagging schemes (addressing opening hours), |
| 353 | 354 | * importing external data and using external web APIs |
| 354 | 355 | * @since 6082 |
| 355 | 356 | */ |
| 356 | | public final JMenu dataMenu = addMenu(marktr("Data"), KeyEvent.VK_D, 5, ht("/Menu/Data")); |
| | 357 | public final JMenu dataMenu = addMenu(marktrc("menu", "Data"), KeyEvent.VK_D, 5, ht("/Menu/Data")); |
| 357 | 358 | /** |
| 358 | 359 | * selectionMenu contains all actions related to selecting different objects |
| 359 | 360 | * @since 6082 (moved from Utilsplugin2) |
| 360 | 361 | */ |
| 361 | | public final JMenu selectionMenu = addMenu(marktr("Selection"), KeyEvent.VK_N, 6, ht("/Menu/Selection")); |
| | 362 | public final JMenu selectionMenu = addMenu(marktrc("menu", "Selection"), KeyEvent.VK_N, 6, ht("/Menu/Selection")); |
| 362 | 363 | /** |
| 363 | 364 | * presetsMenu contains presets actions (search, presets tree) |
| 364 | 365 | */ |
| 365 | | public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 7, ht("/Menu/Presets")); |
| | 366 | public final JMenu presetsMenu = addMenu(marktrc("menu", "Presets"), KeyEvent.VK_P, 7, ht("/Menu/Presets")); |
| 366 | 367 | /** |
| 367 | 368 | * submenu in Imagery menu that contains plugin-managed additional imagery layers |
| 368 | 369 | * @since 6097 |
| … |
… |
|
| 371 | 372 | /** |
| 372 | 373 | * imageryMenu contains all imagery-related actions |
| 373 | 374 | */ |
| 374 | | public final ImageryMenu imageryMenu = addMenu(new ImageryMenu(imagerySubMenu), marktr("Imagery"), KeyEvent.VK_I, 8, ht("/Menu/Imagery")); |
| | 375 | public final ImageryMenu imageryMenu = addMenu(new ImageryMenu(imagerySubMenu), marktrc("menu", "Imagery"), KeyEvent.VK_I, 8, ht("/Menu/Imagery")); |
| 375 | 376 | /** |
| 376 | 377 | * gpsMenu contains all plugin actions that are related |
| 377 | 378 | * to using GPS data, including opening, uploading and real-time tracking |
| 378 | 379 | * @since 6082 |
| 379 | 380 | */ |
| 380 | | public final JMenu gpsMenu = addMenu(marktr("GPS"), KeyEvent.VK_G, 9, ht("/Menu/GPS")); |
| | 381 | public final JMenu gpsMenu = addMenu(marktrc("menu", "GPS"), KeyEvent.VK_G, 9, ht("/Menu/GPS")); |
| 381 | 382 | /** the window menu is split into several groups. The first is for windows that can be opened from |
| 382 | 383 | * this menu any time, e.g. the changeset editor. The second group is for toggle dialogs and the third |
| 383 | 384 | * group is for currently open windows that cannot be toggled, e.g. relation editors. It's recommended |
| 384 | 385 | * to use WINDOW_MENU_GROUP to determine the group integer. |
| 385 | 386 | */ |
| 386 | | public final JMenu windowMenu = addMenu(marktr("Windows"), KeyEvent.VK_W, 10, ht("/Menu/Windows")); |
| | 387 | public final JMenu windowMenu = addMenu(marktrc("menu", "Windows"), KeyEvent.VK_W, 10, ht("/Menu/Windows")); |
| 387 | 388 | |
| 388 | 389 | /** |
| 389 | 390 | * audioMenu contains all audio-related actions. Be careful, this menu is not guaranteed to be displayed at all |
| … |
… |
|
| 392 | 393 | /** |
| 393 | 394 | * helpMenu contains JOSM general actions (Help, About, etc.) |
| 394 | 395 | */ |
| 395 | | public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 11, ht("/Menu/Help")); |
| | 396 | public final JMenu helpMenu = addMenu(marktrc("menu", "Help"), KeyEvent.VK_H, 11, ht("/Menu/Help")); |
| 396 | 397 | |
| 397 | 398 | private static final int defaultMenuPos = 11; |
| 398 | 399 | |
| … |
… |
public JMenu addMenu(String name, int mnemonicKey, int position, String relative
|
| 608 | 609 | } |
| 609 | 610 | |
| 610 | 611 | public <T extends JMenu> T addMenu(T menu, String name, int mnemonicKey, int position, String relativeHelpTopic) { |
| 611 | | Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", tr(name)), mnemonicKey, |
| | 612 | Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", trc("menu", name)), mnemonicKey, |
| 612 | 613 | Shortcut.MNEMONIC).setMnemonic(menu); |
| 613 | 614 | add(menu, position); |
| 614 | 615 | menu.putClientProperty("help", relativeHelpTopic); |
| … |
… |
private void findMenuItems(final JMenu menu, final String textToFind, final List
|
| 904 | 905 | |
| 905 | 906 | protected void showAudioMenu(boolean showMenu) { |
| 906 | 907 | if (showMenu && audioMenu == null) { |
| 907 | | audioMenu = addMenu(marktr("Audio"), KeyEvent.VK_U, defaultMenuPos, ht("/Menu/Audio")); |
| | 908 | audioMenu = addMenu(marktrc("Audio", "menu"), KeyEvent.VK_U, defaultMenuPos, ht("/Menu/Audio")); |
| 908 | 909 | add(audioMenu, audioPlayPause); |
| 909 | 910 | add(audioMenu, audioNext); |
| 910 | 911 | add(audioMenu, audioPrev); |