7158928: [macosx] NLS: Please change the mnemonic assignment system
Reviewed-by: rupashka, serb
--- a/jdk/make/com/apple/osxui/Makefile Wed May 16 16:27:12 2012 +0400
+++ b/jdk/make/com/apple/osxui/Makefile Wed May 16 18:11:48 2012 +0400
@@ -65,12 +65,8 @@
com/apple/laf/ScreenMenuPropertyHandler.java \
com/apple/laf/ScreenMenuPropertyListener.java
-#RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
-# com/apple/laf/resources/aqua.properties \
-# com/apple/laf/resources/aqua_de.properties \
-# com/apple/laf/resources/aqua_fr.properties \
-# com/apple/laf/resources/aqua_ja.properties
-
+RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
+ com/apple/laf/resources/aqua.properties
#
# Rules
--- a/jdk/make/common/internal/Resources.gmk Wed May 16 16:27:12 2012 +0400
+++ b/jdk/make/common/internal/Resources.gmk Wed May 16 18:11:48 2012 +0400
@@ -197,6 +197,10 @@
$(add-property-java-file)
$(GENSRCDIR)/%.java: $(GENSRCDIR)/%.properties
$(add-property-java-file)
+ifdef PLATFORM_SRC_MACOS
+$(GENSRCDIR)/%.java: $(PLATFORM_SRC_MACOS)/classes/%.properties
+ $(add-property-java-file)
+endif
ifndef OPENJDK
$(GENSRCDIR)/%.java: $(CLOSED_PLATFORM_SRC)/classes/%.properties
$(add-property-java-file)
--- a/jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java Wed May 16 16:27:12 2012 +0400
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java Wed May 16 18:11:48 2012 +0400
@@ -250,6 +250,7 @@
*/
private void initResourceBundle(final UIDefaults table) {
table.setDefaultLocale(Locale.getDefault());
+ table.addResourceBundle(PKG_PREFIX + "resources.aqua");
try {
final ResourceBundle aquaProperties = MacOSXResourceBundle.getMacResourceBundle(PKG_PREFIX + "resources.aqua");
final Enumeration<String> propertyKeys = aquaProperties.getKeys();
@@ -259,7 +260,6 @@
table.put(key, aquaProperties.getString(key));
}
} catch (final Exception e) {
- table.addResourceBundle(PKG_PREFIX + "resources.aqua");
}
}
--- a/jdk/src/macosx/classes/com/apple/laf/resources/aqua.properties Wed May 16 16:27:12 2012 +0400
+++ b/jdk/src/macosx/classes/com/apple/laf/resources/aqua.properties Wed May 16 18:11:48 2012 +0400
@@ -36,45 +36,45 @@
# support.
############ FILE CHOOSER STRINGS #############
-FileChooser.fileDescriptionText=Generic File
-FileChooser.directoryDescriptionText=Directory
-FileChooser.newFolderErrorText=Error occured during folder creation
+FileChooser.fileDescription.textAndMnemonic=Generic File
+FileChooser.directoryDescription.textAndMnemonic=Directory
+FileChooser.newFolderError.textAndMnemonic=Error occured during folder creation
FileChooser.newFolderErrorSeparator= :
-FileChooser.acceptAllFileFilterText=All Files
-FileChooser.cancelButtonText=Cancel
-FileChooser.saveButtonText=Save
-FileChooser.openButtonText=Open
-FileChooser.saveDialogTitleText=Save
-FileChooser.openDialogTitleText=Open
-FileChooser.updateButtonText=Update
-FileChooser.helpButtonText=Help
-FileChooser.directoryOpenButtonText=Open
+FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
+FileChooser.cancelButton.textAndMnemonic=Cancel
+FileChooser.saveButton.textAndMnemonic=Save
+FileChooser.openButton.textAndMnemonic=Open
+FileChooser.saveDialogTitle.textAndMnemonic=Save
+FileChooser.openDialogTitle.textAndMnemonic=Open
+FileChooser.updateButton.textAndMnemonic=Update
+FileChooser.helpButton.textAndMnemonic=Help
+FileChooser.directoryOpenButton.textAndMnemonic=Open
# File Size Units
FileChooser.fileSizeKiloBytes={0} KB
FileChooser.fileSizeMegaBytes={0} MB
FileChooser.fileSizeGigaBytes={0} GB
-// Mac-specific strings
-FileChooser.saveTitleText=Save
-FileChooser.openTitleText=Open
-FileChooser.newFolderExistsErrorText=That name is already taken
-FileChooser.chooseButtonText=Choose
+# Mac-specific strings
+FileChooser.saveTitle.textAndMnemonic=Save
+FileChooser.openTitle.textAndMnemonic=Open
+FileChooser.newFolderExistsError.textAndMnemonic=That name is already taken
+FileChooser.chooseButton.textAndMnemonic=Choose
-FileChooser.newFolderButtonText=New Folder
-FileChooser.newFolderTitleText=New Folder
-FileChooser.fileNameLabelText=File:
-FileChooser.saveDialogFileNameLabelText=Save As:
-FileChooser.filesOfTypeLabelText=File Format:
+FileChooser.newFolderButton.textAndMnemonic=New Folder
+FileChooser.newFolderTitle.textAndMnemonic=New Folder
+FileChooser.fileNameLabel.textAndMnemonic=File:
+FileChooser.saveDialogFileNameLabel.textAndMnemonic=Save As:
+FileChooser.filesOfTypeLabel.textAndMnemonic=File Format:
FileChooser.desktopName=Desktop
-FileChooser.newFolderPromptText=Name of new folder:
+FileChooser.newFolderPrompt.textAndMnemonic=Name of new folder:
FileChooser.untitledFolderName=untitled folder
FileChooser.untitledFileName=untitled
-FileChooser.createButtonText=Create
+FileChooser.createButton.textAndMnemonic=Create
-FileChooser.byDateText=Date Modified
-FileChooser.byNameText=Name
+FileChooser.byDate.textAndMnemonic=Date Modified
+FileChooser.by.textAndMnemonic=Name
FileChooser.newFolderAccessibleName=New Folder
FileChooser.mac.newFolder=untitled folder
@@ -82,76 +82,54 @@
############ COLOR CHOOSER STRINGS #############
-ColorChooser.previewText=Preview
-ColorChooser.okText=OK
-ColorChooser.cancelText=Cancel
-ColorChooser.resetText=Reset
-# VK_XXX constant for 'ColorChooser.resetText' button to make mnemonic
-ColorChooser.resetMnemonic=82
-ColorChooser.sampleText=Sample Text Sample Text
-ColorChooser.swatchesNameText=Swatches
-ColorChooser.swatchesMnemonic=83
-ColorChooser.swatchesDisplayedMnemonicIndex=0
-ColorChooser.swatchesRecentText=Recent:
-ColorChooser.hsbNameText=HSB
-# Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
-# constant, and an index into the text to render the mnemonic as. The
-# mnemonic is xxxMnemonic and the index of the character to underline is
-# xxxDisplayedMnemonicIndex.
-ColorChooser.hsbMnemonic=72
-ColorChooser.hsbDisplayedMnemonicIndex=0
-ColorChooser.hsbHueText=H
-ColorChooser.hsbSaturationText=S
-ColorChooser.hsbBrightnessText=B
-ColorChooser.hsbRedText=R
-ColorChooser.hsbGreenText=G
-ColorChooser.hsbBlueText=B
-ColorChooser.rgbNameText=RGB
-ColorChooser.rgbMnemonic=71
-ColorChooser.rgbDisplayedMnemonicIndex=1
-ColorChooser.rgbRedText=Red
-ColorChooser.rgbRedMnemonic=68
-ColorChooser.rgbGreenText=Green
-ColorChooser.rgbGreenMnemonic=78
-ColorChooser.rgbBlueText=Blue
-ColorChooser.rgbBlueMnemonic=66
+ColorChooser.preview.textAndMnemonic=Preview
+ColorChooser.ok.textAndMnemonic=OK
+ColorChooser.cancel.textAndMnemonic=Cancel
+ColorChooser.reset.textAndMnemonic=&Reset
+ColorChooser.sample.textAndMnemonic=Sample Text Sample Text
+ColorChooser.swatches.textAndMnemonic=&Swatches
+ColorChooser.swatchesRecent.textAndMnemonic=Recent:
+ColorChooser.hsb.textAndMnemonic=&HSB
+ColorChooser.hsbHue.textAndMnemonic=H
+ColorChooser.hsbSaturation.textAndMnemonic=S
+ColorChooser.hsbBrightness.textAndMnemonic=B
+ColorChooser.hsbRed.textAndMnemonic=R
+ColorChooser.hsbGreen.textAndMnemonic=G
+ColorChooser.hsbBlue.textAndMnemonic=B
+ColorChooser.rgb.textAndMnemonic=R&GB
+ColorChooser.rgbRed.textAndMnemonic=Re&d
+ColorChooser.rgbGreen.textAndMnemonic=Gree&n
+ColorChooser.rgbBlue.textAndMnemonic=&Blue
############ OPTION PANE STRINGS #############
-# Mnemonic keys correspond to KeyEvent.VK_XXX constant
# We only define mnemonics for YES/NO, but for completeness you can
# define mnemonics for any of the buttons.
-OptionPane.yesButtonText=Yes
-OptionPane.yesButtonMnemonic=89
-OptionPane.noButtonText=No
-OptionPane.noButtonMnemonic=78
-OptionPane.okButtonText=OK
-OptionPane.okButtonMnemonic=0
-OptionPane.cancelButtonText=Cancel
-OptionPane.cancelButtonMnemonic=0
-OptionPane.titleText=Select an Option
+OptionPane.yesButton.textAndMnemonic=&Yes
+OptionPane.noButton.textAndMnemonic=&No
+OptionPane.okButton.textAndMnemonic=OK
+OptionPane.cancelButton.textAndMnemonic=Cancel
+OptionPane.title.textAndMnemonic=Select an Option
# Title for the dialog for the showInputDialog methods. Only used if
# the developer uses one of the variants that doesn't take a title.
-OptionPane.inputDialogTitle=Input
+OptionPane.inputDialog.titleAndMnemonic=Input
# Title for the dialog for the showMessageDialog methods. Only used if
# the developer uses one of the variants that doesn't take a title.
-OptionPane.messageDialogTitle=Message
+OptionPane.messageDialog.titleAndMnemonic=Message
############ Printing Dialog Strings ############
-PrintingDialog.titleProgressText=Printing
-PrintingDialog.titleAbortingText=Printing (Aborting)
+PrintingDialog.titleProgress.textAndMnemonic=Printing
+PrintingDialog.titleAborting.textAndMnemonic=Printing (Aborting)
-PrintingDialog.contentInitialText=Printing in progress...
+PrintingDialog.contentInitial.textAndMnemonic=Printing in progress...
# The following string will be formatted by a MessageFormat
# and {0} will be replaced by page number being printed
-PrintingDialog.contentProgressText=Printed page {0}...
-
-PrintingDialog.contentAbortingText=Printing aborting...
+PrintingDialog.contentProgress.textAndMnemonic=Printed page {0}...
-PrintingDialog.abortButtonText=Abort
-PrintingDialog.abortButtonMnemonic=65
-PrintingDialog.abortButtonDisplayedMnemonicIndex=0
-PrintingDialog.abortButtonToolTipText=Abort Printing
+PrintingDialog.contentAborting.textAndMnemonic=Printing aborting...
+
+PrintingDialog.abortButton.textAndMnemonic=&Abort
+PrintingDialog.abortButtonToolTip.textAndMnemonic=Abort Printing
############ Internal Frame Strings ############
InternalFrame.iconButtonToolTip=Minimize
@@ -160,42 +138,42 @@
InternalFrame.closeButtonToolTip=Close
############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButtonText=Restore
-InternalFrameTitlePane.moveButtonText=Move
-InternalFrameTitlePane.sizeButtonText=Size
-InternalFrameTitlePane.minimizeButtonText=Minimize
-InternalFrameTitlePane.maximizeButtonText=Maximize
-InternalFrameTitlePane.closeButtonText=Close
+InternalFrameTitlePane.restoreButton.textAndMnemonic=Restore
+InternalFrameTitlePane.moveButton.textAndMnemonic=Move
+InternalFrameTitlePane.sizeButton.textAndMnemonic=Size
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimize
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximize
+InternalFrameTitlePane.closeButton.textAndMnemonic=Close
############ Text strings #############
# Used for html forms
-FormView.submitButtonText=Submit Query
-FormView.resetButtonText=Reset
-FormView.browseFileButtonText=Browse...
+FormView.submitButton.textAndMnemonic=Submit Query
+FormView.resetButton.textAndMnemonic=Reset
+FormView.browseFileButton.textAndMnemonic=Browse...
############ Abstract Document Strings ############
-AbstractDocument.styleChangeText=style change
-AbstractDocument.additionText=addition
-AbstractDocument.deletionText=deletion
-AbstractDocument.undoText=Undo
-AbstractDocument.redoText=Redo
+AbstractDocument.styleChange.textAndMnemonic=style change
+AbstractDocument.addition.textAndMnemonic=addition
+AbstractDocument.deletion.textAndMnemonic=deletion
+AbstractDocument.undo.textAndMnemonic=Undo
+AbstractDocument.redo.textAndMnemonic=Redo
############ Abstract Button Strings ############
-AbstractButton.clickText=click
+AbstractButton.click.textAndMnemonic=click
############ Abstract Undoable Edit Strings ############
-AbstractUndoableEdit.undoText=Undo
-AbstractUndoableEdit.redoText=Redo
+AbstractUndoableEdit.undo.textAndMnemonic=Undo
+AbstractUndoableEdit.redo.textAndMnemonic=Redo
############ Combo Box Strings ############
-ComboBox.togglePopupText=togglePopup
+ComboBox.togglePopup.textAndMnemonic=togglePopup
############ Progress Monitor Strings ############
-ProgressMonitor.progressText=Progress...
+ProgressMonitor.progress.textAndMnemonic=Progress...
############ Split Pane Strings ############
-SplitPane.leftButtonText=left button
-SplitPane.rightButtonText=right button
+SplitPane.leftButton.textAndMnemonic=left button
+SplitPane.rightButton.textAndMnemonic=right button
# Used for Isindex
IsindexView.prompt=This is a searchable index. Enter search keywords: