|
From: Christopher W. <caw...@us...> - 2006-02-10 19:57:37
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12583/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditorMessages.java RubyEditorMessages.properties Added Files: ConstructedRubyEditorMessages.properties Log Message: chnage how we do localized strings (use NLS support builtin to Eclipse) Index: RubyEditorMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RubyEditorMessages.java 5 Mar 2005 20:49:48 -0000 1.3 --- RubyEditorMessages.java 10 Feb 2006 19:57:28 -0000 1.4 *************** *** 15,51 **** import java.util.ResourceBundle; ! public class RubyEditorMessages { ! private static final String RESOURCE_BUNDLE= RubyEditorMessages.class.getName(); ! private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); ! private RubyEditorMessages() { ! } ! public static String getString(String key) { ! try { ! return fgResourceBundle.getString(key); ! } catch (MissingResourceException e) { ! return '!' + key + '!'; ! } ! } ! ! public static ResourceBundle getResourceBundle() { ! return fgResourceBundle; ! } - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } - - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg } ); - } } --- 15,80 ---- import java.util.ResourceBundle; ! import org.eclipse.osgi.util.NLS; ! public class RubyEditorMessages extends NLS { ! private static final String BUNDLE_NAME = RubyEditorMessages.class.getName(); ! public static String RubyOutlinePage_Sort_label; ! public static String RubyOutlinePage_Sort_tooltip; ! public static String RubyOutlinePage_Sort_description; ! public static String RubyOutlinePage_GoIntoTopLevelType_label; ! public static String RubyOutlinePage_GoIntoTopLevelType_tooltip; ! public static String RubyOutlinePage_GoIntoTopLevelType_description; ! public static String RubyOutlinePage_error_NoTopLevelType; ! private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME); ! ! private static final String BUNDLE_FOR_CONSTRUCTED_KEYS= "org.rubypeople.rdt.internal.ui.rubyeditor.ConstructedRubyEditorMessages";//$NON-NLS-1$ ! private static ResourceBundle fgBundleForConstructedKeys= ResourceBundle.getBundle(BUNDLE_FOR_CONSTRUCTED_KEYS); ! ! /** ! * Returns the message bundle which contains constructed keys. ! * ! * @since 3.1 ! * @return the message bundle ! */ ! public static ResourceBundle getBundleForConstructedKeys() { ! return fgBundleForConstructedKeys; ! } ! ! ! private RubyEditorMessages() { ! } ! ! public static String getString(String key) { ! try { ! return fgResourceBundle.getString(key); ! } catch (MissingResourceException e) { ! return '!' + key + '!'; ! } ! } ! ! public static ResourceBundle getResourceBundle() { ! return fgResourceBundle; ! } ! ! /** ! * Gets a string from the resource bundle and formats it with arguments ! */ ! public static String getFormattedString(String key, Object[] args) { ! return MessageFormat.format(getString(key), args); ! } ! ! /** ! * Gets a string from the resource bundle and formats it with arguments ! */ ! public static String getFormattedString(String key, Object arg) { ! return MessageFormat.format(getString(key), new Object[] { arg}); ! } ! ! static { ! NLS.initializeMessages(BUNDLE_NAME, RubyEditorMessages.class); ! } } Index: RubyEditorMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubyEditorMessages.properties 12 Mar 2005 16:52:13 -0000 1.4 --- RubyEditorMessages.properties 10 Feb 2006 19:57:28 -0000 1.5 *************** *** 45,57 **** RubyOutlinePage.HideStaticMembers.tooltip.checked=Show Static Members RubyOutlinePage.HideStaticMembers.tooltip.unchecked=Hide Static Members ! RubyOutlinePage.Sort.label=Sort ! RubyOutlinePage.Sort.tooltip=Sort ! RubyOutlinePage.Sort.description=Enable Sorting ! RubyOutlinePage.GoIntoTopLevelType.label=Go Into Top Level Type ! RubyOutlinePage.GoIntoTopLevelType.tooltip=Go Into Top Level Type ! RubyOutlinePage.GoIntoTopLevelType.description=Show children of top level type only RubyOutlinePage.error.ChildrenProvider.getChildren.message1=RubyOutlinePage.ChildrenProvider.getChildren RubyOutlinePage.error.ChildrenProvider.hasChildren.message1=RubyOutlinePage.ChildrenProvider.hasChildren ! RubyOutlinePage.error.NoTopLevelType=Top level type not defined OpenOnSelection.description=Open an editor on the selected element --- 45,57 ---- RubyOutlinePage.HideStaticMembers.tooltip.checked=Show Static Members RubyOutlinePage.HideStaticMembers.tooltip.unchecked=Hide Static Members ! RubyOutlinePage_Sort_label=Sort ! RubyOutlinePage_Sort_tooltip=Sort ! RubyOutlinePage_Sort_description=Enable Sorting ! RubyOutlinePage_GoIntoTopLevelType_label=Go Into Top Level Type ! RubyOutlinePage_GoIntoTopLevelType_tooltip=Go Into Top Level Type ! RubyOutlinePage_GoIntoTopLevelType_description=Show children of top level type only RubyOutlinePage.error.ChildrenProvider.getChildren.message1=RubyOutlinePage.ChildrenProvider.getChildren RubyOutlinePage.error.ChildrenProvider.hasChildren.message1=RubyOutlinePage.ChildrenProvider.hasChildren ! RubyOutlinePage_error_NoTopLevelType=Top level type not defined OpenOnSelection.description=Open an editor on the selected element *************** *** 114,124 **** Uncomment.description=Uncomment the selected Ruby comment lines - ToggleComment.label=Togg&le Comment - ToggleComment.tooltip=Toggle Comment For the Selected Lines - ToggleComment.description=Toggle comment for the selected lines - - ToggleComment.error.title=Toggle Comment - ToggleComment.error.message=An error occurred while toggling comments. - AddBlockComment.label=Add &Block Comment AddBlockComment.tooltip=Enclose the Selection in a Block Comment --- 114,117 ---- --- NEW FILE: ConstructedRubyEditorMessages.properties --- ############################################################################### # Copyright (c) 2000, 2005 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html # # Contributors: # IBM Corporation - initial API and implementation ############################################################################### CompilationUnitEditorActionContributor.ToggleInsertMode.label=Sma&rt Insert Mode CompilationUnitEditorActionContributor.ToggleInsertMode.tooltip=Toggle Smart Insert Mode CompilationUnitEditorActionContributor.ToggleInsertMode.image= CompilationUnitEditorActionContributor.ToggleInsertMode.description= Toggles smart insert mode RubyOutlinePage.ContextMenu.refactoring.label=&Refactor RubyOutlinePage.HideFields.description.checked=Shows Fields RubyOutlinePage.HideFields.description.unchecked=Hides Fields RubyOutlinePage.HideFields.label=Hide Fields RubyOutlinePage.HideFields.tooltip.checked=Show Fields RubyOutlinePage.HideFields.tooltip.unchecked=Hide Fields RubyOutlinePage.HideNonePublicMembers.description.checked=Shows non-public members RubyOutlinePage.HideNonePublicMembers.description.unchecked=Hides non-public members RubyOutlinePage.HideNonePublicMembers.label=Show Public Members Only RubyOutlinePage.HideNonePublicMembers.tooltip.checked=Show Non-Public Members RubyOutlinePage.HideNonePublicMembers.tooltip.unchecked=Hide Non-Public Members RubyOutlinePage.HideStaticMembers.description.checked=Shows static members RubyOutlinePage.HideStaticMembers.description.unchecked=Hides static members RubyOutlinePage.HideStaticMembers.label=Hide Static Members RubyOutlinePage.HideStaticMembers.tooltip.checked=Show Static Members RubyOutlinePage.HideStaticMembers.tooltip.unchecked=Hide Static Members OpenHierarchy.label=Quick Type &Hierarchy OpenHierarchy.dialog.message=&Select the type to open: OpenHierarchy.dialog.title=Open Type Hierarchy OpenHierarchy.tooltip=Show the Quick Type Hierarchy of the Selected Element OpenHierarchy.description=Show the quick type hierarchy of the selected element OpenOnSelection.label=&Open on Selection OpenOnSelection.description=Open an editor on the selected element OpenOnSelection.dialog.message=&Select or enter the element to open: OpenOnSelection.dialog.title=Open On Selection OpenOnSelection.tooltip=Open an Editor on the Selected Element TogglePresentation.label=Show Source of Selected Element Only TogglePresentation.tooltip=Show Source of Selected Element Only ToggleMarkOccurrencesAction.label= Toggle Mark Occurrences ToggleMarkOccurrencesAction.tooltip= Toggle Mark Occurrences ToggleTextHover.label=Show Text Hover ToggleTextHover.tooltip=Show Text Hover ContentAssistProposal.label=Co&ntent Assist ContentAssistProposal.tooltip=Content Assist ContentAssistProposal.description=Content Assist ContentAssistContextInformation.label=Parameter &Hints ContentAssistContextInformation.tooltip=Show Parameter Hints ContentAssistContextInformation.description=Show Method Parameter Hints CorrectionAssistProposal.label=&Quick Fix CorrectionAssistProposal.tooltip=Quick Fix CorrectionAssistProposal.description=Quick Fix ShowRubyDoc.label=Show T&ooltip Description ShowRubyDoc.tooltip=Shows Tooltip Description for Element at Cursor ShowRubyDoc.description=Shows the tooltip description for the element at the cursor ShowOutline.label= Quick Out&line ShowOutline.tooltip= Shows the Quick Outline of Editor Input ShowOutline.description= Shows the quick outline for the editor input OpenStructure.label= Open Stru&cture OpenStructure.tooltip= Opens Structure of Selected Element OpenStructure.description= Opens the structure of the selected element OpenExternalRubydoc.label=Open External Rubydoc OpenExternalRubydoc.tooltip=Opens Rubydoc in an External Browser for the Element at the Cursor Position OpenExternalRubydoc.description=Opens Rubydoc in an external browser for the element at the cursor position Comment.label=Co&mment Comment.tooltip=Comment the Selected Lines Comment.description=Turn the selected lines into Ruby comments Uncomment.label=&Uncomment Uncomment.tooltip=Uncomment the Selected Ruby Comment Lines Uncomment.description=Uncomment the selected Ruby comment lines ToggleComment.label=Togg&le Comment ToggleComment.tooltip=Toggle Comment For the Selected Lines ToggleComment.description=Toggle comment for the selected lines AddBlockComment.label=Add &Block Comment AddBlockComment.tooltip=Enclose the Selection in a Block Comment AddBlockComment.description=Encloses the selection with block comment markers RemoveBlockComment.label=Remove Bloc&k Comment RemoveBlockComment.tooltip=Remove Block Comment Markers Enclosing the Caret RemoveBlockComment.description=Removes any block comment markers enclosing the caret Format.label=&Format Format.tooltip=Format the Selected Text Format.description=Format the selected text ShiftRight.label=&Shift Right ShiftRight.tooltip=Shift Right ShiftRight.description=Shift the selected text to the right ShiftLeft.label=S&hift Left ShiftLeft.tooltip=Shift Left ShiftLeft.description=Shift the selected text to the left Editor.Cut.label=Cu&t Editor.Cut.tooltip=Cut Editor.Cut.image= Editor.Cut.description=Cut Editor.Copy.label=&Copy Editor.Copy.tooltip=Copy Editor.Copy.image= Editor.Copy.description=Copy Editor.Paste.label=&Paste Editor.Paste.tooltip=Paste Editor.Paste.image= Editor.Paste.description=Paste StructureSelectNext.label=&Next Element StructureSelectNext.tooltip=Expand Selection to Include Next Sibling StructureSelectNext.description=Expand selection to include next sibling StructureSelectPrevious.label=&Previous Element StructureSelectPrevious.tooltip=Expand Selection to Include Previous Sibling StructureSelectPrevious.description=Expand selection to include previous sibling StructureSelectEnclosing.label=&Enclosing Element StructureSelectEnclosing.tooltip=Expand Selection to Include Enclosing Element StructureSelectEnclosing.description=Expand selection to include enclosing element StructureSelectHistory.label=&Restore Last Selection StructureSelectHistory.tooltip=Restore Last Selection StructureSelectHistory.description=Restore last selection GotoNextMember.label= N&ext Member GotoNextMember.tooltip=Move the Caret to the Next Member of the Compilation Unit GotoNextMember.description=Move the caret to the next member of the compilation unit GotoPreviousMember.label= Previ&ous Member GotoPreviousMember.tooltip=Move the Caret to the Previous Member of the Compilation Unit GotoPreviousMember.description=Move the caret to the previous member of the compilation unit GotoMatchingBracket.label= Matching &Bracket GotoMatchingBracket.tooltip=Go to Matching Bracket GotoMatchingBracket.description=Go to Matching Bracket SourceAttachmentDialog.title=Attachments For ''{0}'' SourceAttachmentDialog.error.title=Error Attaching Source SourceAttachmentDialog.error.message=An error occurred while associating the source RubySelectAnnotationRulerAction.QuickFix.label= &Quick Fix RubySelectAnnotationRulerAction.QuickFix.tooltip= Quick Fix RubySelectAnnotationRulerAction.QuickFix.description= Runs Quick Fix on the annotation's line RubySelectAnnotationRulerAction.QuickFix.image= RubySelectAnnotationRulerAction.QuickAssist.label= Quick &Assist RubySelectAnnotationRulerAction.QuickAssist.tooltip= Quick Assist RubySelectAnnotationRulerAction.QuickAssist.description= Runs Quick Assist on the annotation's line RubySelectAnnotationRulerAction.QuickAssist.image= RubySelectAnnotationRulerAction.GotoAnnotation.label= &Go to Annotation RubySelectAnnotationRulerAction.GotoAnnotation.tooltip= Go to Annotation RubySelectAnnotationRulerAction.GotoAnnotation.description= Selects the annotation in the editor RubySelectAnnotationRulerAction.GotoAnnotation.image= RubySelectAnnotationRulerAction.OpenSuperImplementation.label= &Open Super Implementation RubySelectAnnotationRulerAction.OpenSuperImplementation.tooltip= Open Super Implementation RubySelectAnnotationRulerAction.OpenSuperImplementation.description= Opens the super implementation RubySelectAnnotationRulerAction.OpenSuperImplementation.image= Editor.ChangeEncodingAction.label= Set Encodin&g... Editor.ChangeEncodingAction.tooltip= Set Encoding Editor.ChangeEncodingAction.image= Editor.ChangeEncodingAction.description= Set Encoding Editor.ChangeEncodingAction.dialog.title= Set Encoding Editor.ConvertLineDelimiters.label=C&onvert Line Delimiters To Editor.ConvertToWindows.label=&Windows Editor.ConvertToWindows.tooltip=Converts Line Delimiters to Windows Editor.ConvertToWindows.image= Editor.ConvertToWindows.description=Converts line delimiters to Windows Editor.ConvertToUNIX.label=&UNIX Editor.ConvertToUNIX.tooltip=Converts Line Delimiters to UNIX Editor.ConvertToUNIX.image= Editor.ConvertToUNIX.description=Converts line delimiters to UNIX Editor.ConvertToMac.label=&Mac Editor.ConvertToMac.tooltip=Converts line delimiters to Mac Editor.ConvertToMac.image= Editor.ConvertToMac.description=Converts line delimiters to Mac Indent.label=Correct &Indentation Indent.tooltip=&Indent Current Line to Correct Indentation Indent.description=&Indents the current line or selection depending on surrounding source code Editor.MoveLinesUp.label=Move Lines Up Editor.MoveLinesUp.tooltip=Move the Selected Lines Up Editor.MoveLinesUp.image= Editor.MoveLinesUp.description=Moves the selected lines up Editor.MoveLinesDown.label=Move Lines Down Editor.MoveLinesDown.tooltip=Move the Selected Lines Down Editor.MoveLinesDown.image= Editor.MoveLinesDown.description=Moves the selected lines down |