Changeset 8721 in josm
- Timestamp:
- 2015-09-02T23:27:47+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r8720 r8721 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; … … 329 330 * fileMenu contains I/O actions 330 331 */ 331 public final JMenu fileMenu = addMenu( marktr("File"), KeyEvent.VK_F, 0, ht("/Menu/File"));332 public final JMenu fileMenu = addMenu(/* I18N: mnemonic: F */ marktrc("menu", "File"), KeyEvent.VK_F, 0, ht("/Menu/File")); 332 333 /** 333 334 * sessionMenu is a submenu of File menu containing all session actions … … 337 338 * editMenu contains editing actions 338 339 */ 339 public final JMenu editMenu = addMenu( marktr("Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit"));340 public final JMenu editMenu = addMenu(/* I18N: mnemonic: E */ marktrc("menu", "Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit")); 340 341 /** 341 342 * viewMenu contains display actions (zoom, map styles, etc.) 342 343 */ 343 public final JMenu viewMenu = addMenu( marktr("View"), KeyEvent.VK_V, 2, ht("/Menu/View"));344 public final JMenu viewMenu = addMenu(/* I18N: mnemonic: V */ marktrc("menu", "View"), KeyEvent.VK_V, 2, ht("/Menu/View")); 344 345 /** 345 346 * toolsMenu contains different geometry manipulation actions from JOSM core (most used) 346 347 * The plugins should use other menus 347 348 */ 348 public final JMenu toolsMenu = addMenu( marktr("Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools"));349 public final JMenu toolsMenu = addMenu(/* I18N: mnemonic: T */ marktrc("menu", "Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools")); 349 350 /** 350 351 * moreToolsMenu contains geometry-related actions from all the plugins 351 352 * @since 6082 (moved from Utilsplugin2) 352 353 */ 353 public final JMenu moreToolsMenu = addMenu( marktr("More tools"), KeyEvent.VK_M, 4, ht("/Menu/MoreTools"));354 public final JMenu moreToolsMenu = addMenu(/* I18N: mnemonic: M */ marktrc("menu", "More tools"), KeyEvent.VK_M, 4, ht("/Menu/MoreTools")); 354 355 /** 355 356 * dataMenu contains plugin actions that are related to certain tagging schemes (addressing opening hours), … … 357 358 * @since 6082 358 359 */ 359 public final JMenu dataMenu = addMenu( marktr("Data"), KeyEvent.VK_D, 5, ht("/Menu/Data"));360 public final JMenu dataMenu = addMenu(/* I18N: mnemonic: D */ marktrc("menu", "Data"), KeyEvent.VK_D, 5, ht("/Menu/Data")); 360 361 /** 361 362 * selectionMenu contains all actions related to selecting different objects 362 363 * @since 6082 (moved from Utilsplugin2) 363 364 */ 364 public final JMenu selectionMenu = addMenu( marktr("Selection"), KeyEvent.VK_N, 6, ht("/Menu/Selection"));365 public final JMenu selectionMenu = addMenu(/* I18N: mnemonic: N */ marktrc("menu", "Selection"), KeyEvent.VK_N, 6, ht("/Menu/Selection")); 365 366 /** 366 367 * presetsMenu contains presets actions (search, presets tree) 367 368 */ 368 public final JMenu presetsMenu = addMenu( marktr("Presets"), KeyEvent.VK_P, 7, ht("/Menu/Presets"));369 public final JMenu presetsMenu = addMenu(/* I18N: mnemonic: P */ marktrc("menu", "Presets"), KeyEvent.VK_P, 7, ht("/Menu/Presets")); 369 370 /** 370 371 * submenu in Imagery menu that contains plugin-managed additional imagery layers … … 375 376 * imageryMenu contains all imagery-related actions 376 377 */ 377 public final ImageryMenu imageryMenu = addMenu(new ImageryMenu(imagerySubMenu), marktr("Imagery"), KeyEvent.VK_I, 8, ht("/Menu/Imagery")); 378 // CHECKSTYLE.OFF: LineLength 379 public final ImageryMenu imageryMenu = addMenu(new ImageryMenu(imagerySubMenu), /* I18N: mnemonic: I */ marktrc("menu", "Imagery"), KeyEvent.VK_I, 8, ht("/Menu/Imagery")); 380 // CHECKSTYLE.ON: LineLength 378 381 /** 379 382 * gpsMenu contains all plugin actions that are related … … 381 384 * @since 6082 382 385 */ 383 public final JMenu gpsMenu = addMenu( marktr("GPS"), KeyEvent.VK_G, 9, ht("/Menu/GPS"));386 public final JMenu gpsMenu = addMenu(/* I18N: mnemonic: G */ marktrc("menu", "GPS"), KeyEvent.VK_G, 9, ht("/Menu/GPS")); 384 387 /** the window menu is split into several groups. The first is for windows that can be opened from 385 388 * this menu any time, e.g. the changeset editor. The second group is for toggle dialogs and the third … … 387 390 * to use WINDOW_MENU_GROUP to determine the group integer. 388 391 */ 389 public final JMenu windowMenu = addMenu( marktr("Windows"), KeyEvent.VK_W, 10, ht("/Menu/Windows"));392 public final JMenu windowMenu = addMenu(/* I18N: mnemonic: W */ marktrc("menu", "Windows"), KeyEvent.VK_W, 10, ht("/Menu/Windows")); 390 393 391 394 /** … … 396 399 * helpMenu contains JOSM general actions (Help, About, etc.) 397 400 */ 398 public final JMenu helpMenu = addMenu( marktr("Help"), KeyEvent.VK_H, 11, ht("/Menu/Help"));401 public final JMenu helpMenu = addMenu(/* I18N: mnemonic: H */ marktrc("menu", "Help"), KeyEvent.VK_H, 11, ht("/Menu/Help")); 399 402 400 403 private static final int defaultMenuPos = 11; … … 612 615 613 616 public <T extends JMenu> T addMenu(T menu, String name, int mnemonicKey, int position, String relativeHelpTopic) { 614 Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", tr (name)), mnemonicKey,617 Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", trc("menu", name)), mnemonicKey, 615 618 Shortcut.MNEMONIC).setMnemonic(menu); 616 619 add(menu, position); … … 911 914 protected void showAudioMenu(boolean showMenu) { 912 915 if (showMenu && audioMenu == null) { 913 audioMenu = addMenu( marktr("Audio"), KeyEvent.VK_U, defaultMenuPos, ht("/Menu/Audio"));916 audioMenu = addMenu(/* I18N: mnemonic: U */ marktrc("Audio", "menu"), KeyEvent.VK_U, defaultMenuPos, ht("/Menu/Audio")); 914 917 add(audioMenu, audioPlayPause); 915 918 add(audioMenu, audioNext);
Note:
See TracChangeset
for help on using the changeset viewer.