|
From: <caw...@us...> - 2007-01-22 20:17:38
|
Revision: 1844
http://svn.sourceforge.net/rubyeclipse/?rev=1844&view=rev
Author: cawilliams
Date: 2007-01-22 12:17:22 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
try to move us towards using only subclasses of NLS for translations - so we get accurate information on what strings are missing and what are unused.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ToggleCommentAction.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java 2007-01-22 20:11:26 UTC (rev 1843)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java 2007-01-22 20:17:22 UTC (rev 1844)
@@ -11,7 +11,6 @@
package org.rubypeople.rdt.internal.ui.rubyeditor;
import java.text.MessageFormat;
-import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.osgi.util.NLS;
@@ -31,18 +30,19 @@
public static String GotoMatchingBracket_error_bracketOutsideSelectedElement;
public static String GotoMatchingBracket_error_invalidSelection;
public static String GotoMatchingBracket_error_noMatchingBracket;
+ public static String Editor_FoldingMenu_name;
+ public static String ToggleComment_error_title;
+ public static String ToggleComment_error_message;
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);
- public static String Editor_FoldingMenu_name;
-
/**
* Returns the message bundle which contains constructed keys.
*
- * @since 3.1
+ * @since 0.8.0
* @return the message bundle
*/
public static ResourceBundle getBundleForConstructedKeys() {
@@ -53,13 +53,6 @@
private RubyEditorMessages() {
}
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
public static ResourceBundle getResourceBundle() {
return fgResourceBundle;
@@ -69,14 +62,14 @@
* 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);
+ return MessageFormat.format(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});
+ return MessageFormat.format(key, new Object[] { arg});
}
static {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties 2007-01-22 20:11:26 UTC (rev 1843)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties 2007-01-22 20:17:22 UTC (rev 1844)
@@ -1,217 +1,22 @@
###############################################################################
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
+# Copyright (c) 2007 Rubypeople, Inc.
+# Based on JDT's JavaEditorMessages.properties, copyright IBM Corp.
###############################################################################
-RubyScriptEditorActionContributor.ToggleInsertMode.label=Sma&rt Insert Mode
-RubyScriptEditorActionContributor.ToggleInsertMode.tooltip=Toggle Smart Insert Mode
-RubyScriptEditorActionContributor.ToggleInsertMode.image=
-RubyScriptEditorActionContributor.ToggleInsertMode.description= Toggles smart insert mode
-
-RubyScriptEditor.error.saving.message1=File has been deleted.
-RubyScriptEditor.error.saving.message2=Could not save file.
-RubyScriptEditor.error.saving.message3=Could not save file.
-RubyScriptEditor.error.saving.title1=Cannot Save
-RubyScriptEditor.error.saving.title2=Save Problems
-RubyScriptEditor.error.saving.title3=Save Problems
-RubyScriptEditor.warning.save.delete=The original file ''{0}'' has been deleted.
-
-DeleteISourceManipulations.description=Delete the selected element in the editor
-DeleteISourceManipulations.error.deleting.message1=Cannot delete element:
-DeleteISourceManipulations.error.deleting.title1=Problems while deleting element
-DeleteISourceManipulations.label=&Delete
-DeleteISourceManipulations.tooltip=Delete the Selected Element in the Editor
-
-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
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
-Editor_FoldingMenu_name=F&olding
-
-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.label=&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
-
-NextAnnotation.label= Ne&xt Annotation
-NextAnnotation.tooltip= Next Annotation
-NextAnnotation.description= Next Annotation
-
-PreviousAnnotation.label= Pre&vious Annotation
-PreviousAnnotation.tooltip= Previous Annotation
-PreviousAnnotation.description= Previous Annotation
-
-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
-
-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=F&ormat
-Format.tooltip=Format the Selected Text
-Format.description=Format the selected text
-
-ShiftRight.label=Sh&ift 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
-
-AddTask.label=&Task...
-AddTask.tooltip=Add Task
-AddTask.image=
-AddTask.description=Add Task
-AddTask.dialog.title=Add Task
-AddTask.dialog.message=Enter Task description
-AddTask.error.dialog.title=Add Task
-AddTask.error.dialog.message=Problems adding new task
-
-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.FoldingMenu.name=Folding
-
-Editor.Paste.label=&Paste
-Editor.Paste.tooltip=Paste
-Editor.Paste.image=
-Editor.Paste.description=Paste
-
-RubyScriptDocumentProvider.error.createElementInfo=RubyScriptDocumentProvider.createElementInfo
-RubyScriptDocumentProvider.error.resetDocument=RubyScriptDocumentProvider.resetDocument
-RubyScriptDocumentProvider.out_of_sync.message=Compilation unit buffer and document are out of sync
-
-StructureSelect.error.title= Expand Selection To
-StructureSelect.error.message= No source code attached to class file. To perform this operation you will need to attach source.
-
-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
-ExpandSelectionMenu.label=E&xpand Selection To
-
GotoMatchingBracket_label= Matching &Bracket
-GotoMatchingBracket_tooltip=Go to Matching Bracket
-GotoMatchingBracket_description=Go to Matching Bracket
GotoMatchingBracket_error_invalidSelection=No bracket selected
GotoMatchingBracket_error_noMatchingBracket=No matching bracket found
GotoMatchingBracket_error_bracketOutsideSelectedElement=Matching bracket is outside the selected element
-RubySelectAnnotationRulerAction.QuickFix.label= &Quick Fix
-RubySelectAnnotationRulerAction.QuickFix.tooltip= Quick Fix
-RubySelectAnnotationRulerAction.QuickFix.description= Runs Quick Fix on the annotation's line
-RubySelectAnnotationRulerAction.QuickFix.image=
+Editor_FoldingMenu_name=F&olding
-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=
-
-EditorUtility.concatModifierStrings= {0} + {1}
-
-Indent.label=Correct &Indentation
-Indent.tooltip=&Indent Current Line to Correct Indentation
+ToggleComment_error_title=Toggle Comment
+ToggleComment_error_message=An error occurred while toggling comments.
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ToggleCommentAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ToggleCommentAction.java 2007-01-22 20:11:26 UTC (rev 1843)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ToggleCommentAction.java 2007-01-22 20:17:22 UTC (rev 1844)
@@ -88,7 +88,7 @@
Shell shell= editor.getSite().getShell();
if (!fOperationTarget.canDoOperation(operationCode)) {
if (shell != null)
- MessageDialog.openError(shell, RubyEditorMessages.getString("ToggleComment.error.title"), RubyEditorMessages.getString("ToggleComment.error.message")); //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(shell, RubyEditorMessages.ToggleComment_error_title, RubyEditorMessages.ToggleComment_error_message);
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|