From commits-return-20988-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Sat Feb 07 18:27:35 2009 Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 49113 invoked from network); 7 Feb 2009 18:27:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2009 18:27:35 -0000 Received: (qmail 92754 invoked by uid 500); 7 Feb 2009 18:27:35 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 92688 invoked by uid 500); 7 Feb 2009 18:27:34 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 92679 invoked by uid 99); 7 Feb 2009 18:27:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Feb 2009 10:27:34 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Feb 2009 18:27:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B22B72388C14; Sat, 7 Feb 2009 18:26:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r741930 [6/6] - in /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio: ldapbrowser/common/ ldapbrowser/common/actions/ ldapbrowser/common/dialogs/ ldapbrowser/common/dialogs/preferences/ ldapbrowser/common/... Date: Sat, 07 Feb 2009 18:26:31 -0000 To: commits@directory.apache.org From: seelmann@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090207182636.B22B72388C14@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeOptionsWizardPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeOptionsWizardPage.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeOptionsWizardPage.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeOptionsWizardPage.java Sat Feb 7 18:26:27 2009 @@ -109,8 +109,8 @@ public AttributeOptionsWizardPage( String pageName, String initialAttributeDescription, AttributeWizard wizard ) { super( pageName ); - super.setTitle( "Options" ); - super.setDescription( "Optionally you may specify options (e.g. language tags)." ); + super.setTitle( Messages.getString("AttributeOptionsWizardPage.Options") ); //$NON-NLS-1$ + super.setDescription( Messages.getString("AttributeOptionsWizardPage.OptionsDescription") ); //$NON-NLS-1$ // super.setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD)); super.setPageComplete( false ); @@ -144,19 +144,19 @@ // parse options if ( initialAttributeDescription == null ) { - initialAttributeDescription = ""; + initialAttributeDescription = ""; //$NON-NLS-1$ } - String[] attributeDescriptionComponents = initialAttributeDescription.split( ";" ); + String[] attributeDescriptionComponents = initialAttributeDescription.split( ";" ); //$NON-NLS-1$ parsedLangList = new ArrayList(); parsedOptionList = new ArrayList(); parsedBinary = false; for ( int i = 1; i < attributeDescriptionComponents.length; i++ ) { - if ( attributeDescriptionComponents[i].startsWith( "lang-" ) ) + if ( attributeDescriptionComponents[i].startsWith( "lang-" ) ) //$NON-NLS-1$ { parsedLangList.add( attributeDescriptionComponents[i] ); } - else if ( attributeDescriptionComponents[i].equals( "binary" ) ) + else if ( attributeDescriptionComponents[i].equals( "binary" ) ) //$NON-NLS-1$ { parsedBinary = true; } @@ -204,7 +204,7 @@ composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); // Lang group - langGroup = BaseWidgetUtils.createGroup( composite, "Language tags", 2 ); + langGroup = BaseWidgetUtils.createGroup( composite, Messages.getString("AttributeOptionsWizardPage.LanguageTags"), 2 ); //$NON-NLS-1$ GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; langGroup.setLayoutData( gd ); @@ -214,14 +214,14 @@ BaseWidgetUtils.createSpacer( composite, 2 ); // Options group with binary option - optionsGroup = BaseWidgetUtils.createGroup( composite, "Other options", 2 ); + optionsGroup = BaseWidgetUtils.createGroup( composite, Messages.getString("AttributeOptionsWizardPage.OtherOptions"), 2 ); //$NON-NLS-1$ gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; optionsGroup.setLayoutData( gd ); Composite optionsComposite = BaseWidgetUtils.createColumnContainer( optionsGroup, 3, 1 ); optionLineList = new ArrayList(); Composite binaryComposite = BaseWidgetUtils.createColumnContainer( optionsGroup, 1, 1 ); - binaryOptionButton = BaseWidgetUtils.createCheckbox( binaryComposite, "binary option", 1 ); + binaryOptionButton = BaseWidgetUtils.createCheckbox( binaryComposite, Messages.getString("AttributeOptionsWizardPage.BinaryOption"), 1 ); //$NON-NLS-1$ binaryOptionButton.setSelection( parsedBinary ); Label la = new Label( composite, SWT.NONE ); @@ -230,8 +230,8 @@ la.setLayoutData( gd ); // Preview text - BaseWidgetUtils.createLabel( composite, "Preview:", 1 ); - previewText = BaseWidgetUtils.createReadonlyText( composite, "", 1 ); + BaseWidgetUtils.createLabel( composite, Messages.getString("AttributeOptionsWizardPage.Preview"), 1 ); //$NON-NLS-1$ + previewText = BaseWidgetUtils.createReadonlyText( composite, "", 1 ); //$NON-NLS-1$ // fill lang if ( parsedLangList.isEmpty() ) @@ -244,7 +244,7 @@ { addLangLine( langComposite, i ); String l = parsedLangList.get( i ); - String[] ls = l.split( "-", 3 ); + String[] ls = l.split( "-", 3 ); //$NON-NLS-1$ if ( ls.length > 1 ) { langLineList.get( i ).languageCombo.setText( ls[1] ); @@ -295,7 +295,7 @@ if ( binaryOptionButton == null || binaryOptionButton.isDisposed() ) { - return ""; + return ""; //$NON-NLS-1$ } // attribute type @@ -309,7 +309,7 @@ { if ( s1 == null || s2 == null ) { - throw new ClassCastException( "Must not be null" ); + throw new ClassCastException( Messages.getString("AttributeOptionsWizardPage.MustNotBeNull") ); //$NON-NLS-1$ } return s1.compareToIgnoreCase( s2 ); } @@ -317,12 +317,12 @@ SortedSet options = new TreeSet( comparator ); if ( binaryOptionButton.getSelection() ) { - options.add( "binary" ); + options.add( "binary" ); //$NON-NLS-1$ } for ( int i = 0; i < optionLineList.size(); i++ ) { OptionLine optionLine = optionLineList.get( i ); - if ( !"".equals( optionLine.optionText.getText() ) ) + if ( !"".equals( optionLine.optionText.getText() ) ) //$NON-NLS-1$ { options.add( optionLine.optionText.getText() ); } @@ -342,12 +342,12 @@ String l = langLine.languageCombo.getText(); String c = langLine.countryCombo.getText(); - if ( !"".equals( l ) ) + if ( !"".equals( l ) ) //$NON-NLS-1$ { - String s = "lang-" + l; - if ( !"".equals( c ) ) + String s = "lang-" + l; //$NON-NLS-1$ + if ( !"".equals( c ) ) //$NON-NLS-1$ { - s += "-" + c; + s += "-" + c; //$NON-NLS-1$ } options.add( s ); } @@ -440,7 +440,7 @@ optionLine.optionText.setLayoutData( gd ); optionLine.optionAddButton = new Button( optionComposite, SWT.PUSH ); - optionLine.optionAddButton.setText( " + " ); + optionLine.optionAddButton.setText( " + " ); //$NON-NLS-1$ optionLine.optionAddButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) @@ -462,7 +462,7 @@ } ); optionLine.optionDeleteButton = new Button( optionComposite, SWT.PUSH ); - optionLine.optionDeleteButton.setText( " \u2212 " ); // \u2013 + optionLine.optionDeleteButton.setText( " \u2212 " ); //$NON-NLS-1$ optionLine.optionDeleteButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) @@ -602,17 +602,17 @@ { final LangLine langLine = new LangLine(); - langLine.langLabel = BaseWidgetUtils.createLabel( langComposite, "lang-", 1 ); + langLine.langLabel = BaseWidgetUtils.createLabel( langComposite, "lang-", 1 ); //$NON-NLS-1$ langLine.languageCombo = BaseWidgetUtils.createCombo( langComposite, possibleLanguages, -1, 1 ); - langLine.minusLabel = BaseWidgetUtils.createLabel( langComposite, "-", 1 ); + langLine.minusLabel = BaseWidgetUtils.createLabel( langComposite, "-", 1 ); //$NON-NLS-1$ langLine.countryCombo = BaseWidgetUtils.createCombo( langComposite, new String[0], -1, 1 ); langLine.countryCombo.setEnabled( false ); langLine.addButton = new Button( langComposite, SWT.PUSH ); - langLine.addButton.setText( " + " ); + langLine.addButton.setText( " + " ); //$NON-NLS-1$ langLine.addButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) @@ -634,7 +634,7 @@ } ); langLine.deleteButton = new Button( langComposite, SWT.PUSH ); - langLine.deleteButton.setText( " \u2212 " ); // \u2013 + langLine.deleteButton.setText( " \u2212 " ); //$NON-NLS-1$ langLine.deleteButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) @@ -659,7 +659,7 @@ { public void modifyText( ModifyEvent e ) { - if ( "".equals( langLine.languageCombo.getText() ) ) + if ( "".equals( langLine.languageCombo.getText() ) ) //$NON-NLS-1$ { langLine.countryCombo.setEnabled( false ); } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java Sat Feb 7 18:26:27 2009 @@ -107,8 +107,8 @@ boolean initialShowSubschemaAttributesOnly, boolean initialHideExistingAttributes, AttributeWizard wizard ) { super( pageName ); - super.setTitle( "Attribute Type" ); - super.setDescription( "Please enter or select the attribute type." ); + super.setTitle( Messages.getString("AttributeTypeWizardPage.AttributeType") ); //$NON-NLS-1$ + super.setDescription( Messages.getString("AttributeTypeWizardPage.AttributeTypeDescription") ); //$NON-NLS-1$ // super.setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD)); super.setPageComplete( false ); @@ -136,9 +136,9 @@ String attributeDescription = initialAttributeDescription; if ( attributeDescription == null ) { - attributeDescription = ""; + attributeDescription = ""; //$NON-NLS-1$ } - String[] attributeDescriptionComponents = attributeDescription.split( ";" ); + String[] attributeDescriptionComponents = attributeDescription.split( ";" ); //$NON-NLS-1$ parsedAttributeType = attributeDescriptionComponents[0]; } @@ -149,7 +149,7 @@ private void validate() { previewText.setText( wizard.getAttributeDescription() ); - setPageComplete( !"".equals( attributeTypeCombo.getText() ) ); + setPageComplete( !"".equals( attributeTypeCombo.getText() ) ); //$NON-NLS-1$ } @@ -176,7 +176,7 @@ composite.setLayout( gl ); composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); - BaseWidgetUtils.createLabel( composite, "Attribute type:", 1 ); + BaseWidgetUtils.createLabel( composite, Messages.getString("AttributeTypeWizardPage.AttributeTypeLabel"), 1 ); //$NON-NLS-1$ // attribute combo with field decoration and content proposal attributeTypeCombo = BaseWidgetUtils.createCombo( composite, possibleAttributeTypes, -1, 1 ); @@ -185,12 +185,12 @@ new ListContentProposalProvider( possibleAttributeTypes ), null, null, true ); BaseWidgetUtils.createSpacer( composite, 1 ); - showSubschemAttributesOnlyButton = BaseWidgetUtils.createCheckbox( composite, "Show subschema attributes only", + showSubschemAttributesOnlyButton = BaseWidgetUtils.createCheckbox( composite, Messages.getString("AttributeTypeWizardPage.ShowSubschemaAttributesOnly"), //$NON-NLS-1$ 1 ); showSubschemAttributesOnlyButton.setSelection( initialShowSubschemaAttributesOnly ); BaseWidgetUtils.createSpacer( composite, 1 ); - hideExistingAttributesButton = BaseWidgetUtils.createCheckbox( composite, "Hide existing attributes", 1 ); + hideExistingAttributesButton = BaseWidgetUtils.createCheckbox( composite, Messages.getString("AttributeTypeWizardPage.HideExistingAttributes"), 1 ); //$NON-NLS-1$ hideExistingAttributesButton.setSelection( initialHideExistingAttributes ); Label l = new Label( composite, SWT.NONE ); @@ -198,8 +198,8 @@ gd.horizontalSpan = 2; l.setLayoutData( gd ); - BaseWidgetUtils.createLabel( composite, "Preview:", 1 ); - previewText = BaseWidgetUtils.createReadonlyText( composite, "", 1 ); + BaseWidgetUtils.createLabel( composite, Messages.getString("AttributeTypeWizardPage.PreviewLabel"), 1 ); //$NON-NLS-1$ + previewText = BaseWidgetUtils.createReadonlyText( composite, "", 1 ); //$NON-NLS-1$ // attribute type listener attributeTypeCombo.addModifyListener( new ModifyListener() @@ -278,7 +278,7 @@ { if ( attributeTypeCombo == null | attributeTypeCombo.isDisposed() ) { - return ""; + return ""; //$NON-NLS-1$ } return attributeTypeCombo.getText(); Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeWizard.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeWizard.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeWizard.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeWizard.java Sat Feb 7 18:26:27 2009 @@ -74,11 +74,11 @@ */ public AttributeWizard() { - super.setWindowTitle( "New Attribute" ); + super.setWindowTitle( Messages.getString("AttributeWizard.NewAttribute") ); //$NON-NLS-1$ super.setNeedsProgressMonitor( false ); this.initialShowSubschemaAttributesOnly = true; this.initialHideExistingAttributes = true; - this.initialAttributeDescription = ""; + this.initialAttributeDescription = ""; //$NON-NLS-1$ this.initialEntry = null; } @@ -155,9 +155,9 @@ // set help context ID PlatformUI.getWorkbench().getHelpSystem().setHelp( typePage.getControl(), - BrowserCommonConstants.PLUGIN_ID + "." + "tools_attribute_wizard" ); + BrowserCommonConstants.PLUGIN_ID + "." + "tools_attribute_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$ PlatformUI.getWorkbench().getHelpSystem().setHelp( optionsPage.getControl(), - BrowserCommonConstants.PLUGIN_ID + "." + "tools_attribute_wizard" ); + BrowserCommonConstants.PLUGIN_ID + "." + "tools_attribute_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -174,9 +174,9 @@ */ protected DummyWizardPage() { - super( "" ); - super.setTitle( "No entry selected" ); - super.setDescription( "In order to use the attribute creation wizard please select an entry." ); + super( "" ); //$NON-NLS-1$ + super.setTitle( Messages.getString("AttributeWizard.NoEntrySelected") ); //$NON-NLS-1$ + super.setDescription( Messages.getString("AttributeWizard.NoeEntrySelectedDescription") ); //$NON-NLS-1$ // super.setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD)); super.setPageComplete( true ); } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java Sat Feb 7 18:26:27 2009 @@ -56,7 +56,7 @@ */ public EditEntryWizard( IEntry entry ) { - setWindowTitle( "Edit Entry" ); + setWindowTitle( Messages.getString("EditEntryWizard.EditEntry") ); //$NON-NLS-1$ setNeedsProgressMonitor( true ); selectedEntry = entry; Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/Messages.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/Messages.java?rev=741930&view=auto ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/Messages.java (added) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/Messages.java Sat Feb 7 18:26:27 2009 @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.studio.ldapbrowser.common.wizards; + + +import java.util.MissingResourceException; +import java.util.ResourceBundle; + + +public class Messages +{ + private static final String BUNDLE_NAME = "org.apache.directory.studio.ldapbrowser.common.wizards.messages"; //$NON-NLS-1$ + + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME ); + + + private Messages() + { + } + + + public static String getString( String key ) + { + try + { + return RESOURCE_BUNDLE.getString( key ); + } + catch ( MissingResourceException e ) + { + return '!' + key + '!'; + } + } +} Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java Sat Feb 7 18:26:27 2009 @@ -85,8 +85,8 @@ public NewEntryAttributesWizardPage( String pageName, NewEntryWizard wizard ) { super( pageName ); - setTitle( "Attributes" ); - setDescription( "Please enter the attributes for the entry. Enter at least the MUST attributes." ); + setTitle( Messages.getString("NewEntryAttributesWizardPage.Attributes") ); //$NON-NLS-1$ + setDescription( Messages.getString("NewEntryAttributesWizardPage.PleaseEnterAttributesForEntry") ); //$NON-NLS-1$ setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_ENTRY_WIZARD ) ); setPageComplete( false ); @@ -211,7 +211,7 @@ } else { - mainWidget.getViewer().setInput( "" ); + mainWidget.getViewer().setInput( "" ); //$NON-NLS-1$ mainWidget.getViewer().refresh(); setPageComplete( false ); } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java Sat Feb 7 18:26:27 2009 @@ -54,6 +54,7 @@ import org.eclipse.jface.fieldassist.ContentProposalAdapter; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Combo; @@ -92,14 +93,14 @@ public NewEntryDnWizardPage( String pageName, NewEntryWizard wizard ) { super( pageName ); - setTitle( "Distinguished Name" ); + setTitle( Messages.getString("NewEntryDnWizardPage.DistinguishedName") ); //$NON-NLS-1$ if ( wizard.isNewContextEntry() ) { - setDescription( "Please enter the DN of the context entry." ); + setDescription( Messages.getString("NewEntryDnWizardPage.EnterDN") ); //$NON-NLS-1$ } else { - setDescription( "Please select the parent of the new entry and enter the RDN." ); + setDescription( Messages.getString("NewEntryDnWizardPage.SelectParent") ); //$NON-NLS-1$ } setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_ENTRY_WIZARD ) ); @@ -129,7 +130,7 @@ */ private void validate() { - if ( wizard.isNewContextEntry() && !"".equals( contextEntryDnCombo.getText() ) + if ( wizard.isNewContextEntry() && !"".equals( contextEntryDnCombo.getText() ) //$NON-NLS-1$ && LdapDN.isValid( contextEntryDnCombo.getText() ) ) { setPageComplete( true ); @@ -357,8 +358,8 @@ { public void run() { - MessageDialog.openError( getShell(), "Error", "Parent " - + dnBuilderWidget.getParentDn().toString() + " doesn't exists" ); + MessageDialog.openError( getShell(), Messages.getString("NewEntryDnWizardPage.Error"), //$NON-NLS-1$ + NLS.bind( Messages.getString("NewEntryDnWizardPage.ParentDoesNotExist"), dnBuilderWidget.getParentDn().toString() ) ); //$NON-NLS-1$ } } ); return null; @@ -374,7 +375,7 @@ { public void run() { - MessageDialog.openError( getShell(), "Error", "Entry " + dn.toString() + " already exists" ); + MessageDialog.openError( getShell(), Messages.getString("NewEntryDnWizardPage.Error"), NLS.bind( Messages.getString("NewEntryDnWizardPage.EntryAlreadyExists"), dn.toString() ) ); //$NON-NLS-1$ //$NON-NLS-2$ } } ); return null; @@ -396,7 +397,7 @@ { public void run() { - MessageDialog.openError( getShell(), "Error", "Entry " + dn.toString() + " already exists" ); + MessageDialog.openError( getShell(), Messages.getString("NewEntryDnWizardPage.Error"), NLS.bind( Messages.getString("NewEntryDnWizardPage.EntryAlreadyExists"), dn.toString() ) ); //$NON-NLS-1$ //$NON-NLS-2$ } } ); return null; Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java Sat Feb 7 18:26:27 2009 @@ -162,8 +162,8 @@ public NewEntryObjectclassWizardPage( String pageName, NewEntryWizard wizard ) { super( pageName ); - setTitle( "Object Classes" ); - setDescription( "Please select object classes of the entry. Select at least one structural object class." ); + setTitle( Messages.getString("NewEntryObjectclassWizardPage.ObjectClasses") ); //$NON-NLS-1$ + setDescription( Messages.getString("NewEntryObjectclassWizardPage.ObjectClassesDescription") ); //$NON-NLS-1$ setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_ENTRY_WIZARD ) ); setPageComplete( false ); @@ -192,7 +192,7 @@ } if ( !hasOneStructuralOC ) { - setMessage( "Please select at least one structural object class.", WizardPage.WARNING ); + setMessage( Messages.getString("NewEntryObjectclassWizardPage.SelectStructuralObjectClass"), WizardPage.WARNING ); //$NON-NLS-1$ } else { @@ -311,15 +311,15 @@ composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); Label availableLabel = new Label( composite, SWT.NONE ); - availableLabel.setText( "Available object classes" ); + availableLabel.setText( Messages.getString("NewEntryObjectclassWizardPage.AvailableObjectClasses") ); //$NON-NLS-1$ Label buttonLabel = new Label( composite, SWT.NONE ); - buttonLabel.setText( "" ); + buttonLabel.setText( "" ); //$NON-NLS-1$ Label selectedLabel = new Label( composite, SWT.NONE ); - selectedLabel.setText( "Selected object classes" ); + selectedLabel.setText( Messages.getString("NewEntryObjectclassWizardPage.SelectedObjectClasses") ); //$NON-NLS-1$ Composite availableObjectClassesComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 ); - availableObjectClassesInstantSearch = BaseWidgetUtils.createText( availableObjectClassesComposite, "", 1 ); + availableObjectClassesInstantSearch = BaseWidgetUtils.createText( availableObjectClassesComposite, "", 1 ); //$NON-NLS-1$ availableObjectClassesInstantSearch.addModifyListener( new ModifyListener() { public void modifyText( ModifyEvent e ) @@ -349,7 +349,7 @@ ControlDecoration availableObjectClassesInstantSearchDecoration = new ControlDecoration( availableObjectClassesInstantSearch, SWT.TOP | SWT.LEFT, composite ); availableObjectClassesInstantSearchDecoration - .setDescriptionText( "You may enter a filter to restrict the list below" ); + .setDescriptionText( Messages.getString("NewEntryObjectclassWizardPage.FilterDescription") ); //$NON-NLS-1$ availableObjectClassesInstantSearchDecoration.setImage( FieldDecorationRegistry.getDefault() .getFieldDecoration( FieldDecorationRegistry.DEC_CONTENT_PROPOSAL ).getImage() ); @@ -397,8 +397,8 @@ data.grabExcessHorizontalSpace = true; data.grabExcessVerticalSpace = true; label0.setLayoutData( data ); - addButton = BaseWidgetUtils.createButton( buttonComposite, "&Add", 1 ); - removeButton = BaseWidgetUtils.createButton( buttonComposite, "&Remove", 1 ); + addButton = BaseWidgetUtils.createButton( buttonComposite, Messages.getString("NewEntryObjectclassWizardPage.AddButton"), 1 ); //$NON-NLS-1$ + removeButton = BaseWidgetUtils.createButton( buttonComposite, Messages.getString("NewEntryObjectclassWizardPage.RemoveButton"), 1 ); //$NON-NLS-1$ Label label3 = new Label( buttonComposite, SWT.NONE ); data = new GridData(); data.grabExcessHorizontalSpace = true; @@ -475,9 +475,9 @@ selectedObjectClassesViewer.refresh(); validate(); - if ( !"".equals( availableObjectClassesInstantSearch.getText() ) ) + if ( !"".equals( availableObjectClassesInstantSearch.getText() ) ) //$NON-NLS-1$ { - availableObjectClassesInstantSearch.setText( "" ); + availableObjectClassesInstantSearch.setText( "" ); //$NON-NLS-1$ availableObjectClassesInstantSearch.setFocus(); } } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java Sat Feb 7 18:26:27 2009 @@ -42,6 +42,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; @@ -63,7 +64,7 @@ /** The Constant PREFERRED_ENTRY_CREATION_METHOD_DIALOGSETTING_KEY. */ public static final String PREFERRED_ENTRY_CREATION_METHOD_DIALOGSETTING_KEY = NewEntryTypeWizardPage.class .getName() - + ".preferredEntryCreationMethod"; + + ".preferredEntryCreationMethod"; //$NON-NLS-1$ /** The wizard. */ private NewEntryWizard wizard; @@ -87,8 +88,8 @@ public NewEntryTypeWizardPage( String pageName, NewEntryWizard wizard ) { super( pageName ); - setTitle( "Entry Creation Method" ); - setDescription( "Please select the entry creation method." ); + setTitle( Messages.getString("NewEntryTypeWizardPage.EntryCreationMethod") ); //$NON-NLS-1$ + setDescription( Messages.getString("NewEntryTypeWizardPage.EntryCreationMethodDescription") ); //$NON-NLS-1$ setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_ENTRY_WIZARD ) ); setPageComplete( false ); @@ -150,7 +151,7 @@ { public void run() { - MessageDialog.openError( getShell(), "Error", "No connection" ); + MessageDialog.openError( getShell(), Messages.getString("NewEntryTypeWizardPage.Error"), Messages.getString("NewEntryTypeWizardPage.NoConnection") ); //$NON-NLS-1$ //$NON-NLS-2$ } } ); return null; @@ -161,7 +162,7 @@ { public void run() { - MessageDialog.openError( getShell(), "Error", "No dn" ); + MessageDialog.openError( getShell(), Messages.getString("NewEntryTypeWizardPage.Error"), Messages.getString("NewEntryTypeWizardPage.NoDN") ); //$NON-NLS-1$ //$NON-NLS-2$ } } ); return null; @@ -177,7 +178,7 @@ { public void run() { - MessageDialog.openError( getShell(), "Error", "Entry " + dn.toString() + " doesn't exists" ); + MessageDialog.openError( getShell(), Messages.getString("NewEntryTypeWizardPage.Error"), NLS.bind(Messages.getString("NewEntryTypeWizardPage.EntryDoesNotExist"), dn.toString() ) ); //$NON-NLS-1$ //$NON-NLS-2$ } } ); return null; @@ -236,9 +237,9 @@ composite.setLayout( gl ); composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); - schemaButton = BaseWidgetUtils.createRadiobutton( composite, "Create entry from scratch", 1 ); + schemaButton = BaseWidgetUtils.createRadiobutton( composite, Messages.getString("NewEntryTypeWizardPage.CreateEntryFromScratch"), 1 ); //$NON-NLS-1$ schemaButton.addSelectionListener( this ); - templateButton = BaseWidgetUtils.createRadiobutton( composite, "Use existing entry as template", 1 ); + templateButton = BaseWidgetUtils.createRadiobutton( composite, Messages.getString("NewEntryTypeWizardPage.UseExistingEntryAsTemplate"), 1 ); //$NON-NLS-1$ templateButton.addSelectionListener( this ); Composite entryComposite = BaseWidgetUtils.createColumnContainer( composite, 3, 1 ); Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java Sat Feb 7 18:26:27 2009 @@ -123,11 +123,11 @@ isNewContextEntry = isNewContextEntry( selection ); if ( isNewContextEntry ) { - setWindowTitle( "New Context Entry" ); + setWindowTitle( Messages.getString("NewEntryWizard.NewContextEntry") ); //$NON-NLS-1$ } else { - setWindowTitle( "New Entry" ); + setWindowTitle( Messages.getString("NewEntryWizard.NewEntry") ); //$NON-NLS-1$ } if ( o instanceof IEntry ) @@ -238,22 +238,22 @@ if ( typePage != null ) { PlatformUI.getWorkbench().getHelpSystem().setHelp( typePage.getControl(), - BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); + BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$ } if ( ocPage != null ) { PlatformUI.getWorkbench().getHelpSystem().setHelp( ocPage.getControl(), - BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); + BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$ } if ( dnPage != null ) { PlatformUI.getWorkbench().getHelpSystem().setHelp( dnPage.getControl(), - BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); + BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$ } if ( attributePage != null ) { PlatformUI.getWorkbench().getHelpSystem().setHelp( attributePage.getControl(), - BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); + BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$ } } } @@ -272,9 +272,9 @@ */ protected DummyWizardPage() { - super( "" ); - setTitle( "No connection selected or connection is closed" ); - setDescription( "In order to use the entry creation wizard please select an entry or connection." ); + super( "" ); //$NON-NLS-1$ + setTitle( Messages.getString("NewEntryWizard.NoConnectonSelected") ); //$NON-NLS-1$ + setDescription( Messages.getString("NewEntryWizard.NoConnectonSelectedDescription") ); //$NON-NLS-1$ setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_ENTRY_WIZARD ) ); setPageComplete( true ); Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages.properties URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages.properties?rev=741930&view=auto ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages.properties (added) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages.properties Sat Feb 7 18:26:27 2009 @@ -0,0 +1,61 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +AttributeOptionsWizardPage.BinaryOption=binary option +AttributeOptionsWizardPage.LanguageTags=Language tags +AttributeOptionsWizardPage.MustNotBeNull=Must not be null +AttributeOptionsWizardPage.Options=Options +AttributeOptionsWizardPage.OptionsDescription=Optionally you may specify options (e.g. language tags). +AttributeOptionsWizardPage.OtherOptions=Other options +AttributeOptionsWizardPage.Preview=Preview: +AttributeTypeWizardPage.AttributeType=Attribute Type +AttributeTypeWizardPage.AttributeTypeDescription=Please enter or select the attribute type. +AttributeTypeWizardPage.AttributeTypeLabel=Attribute type: +AttributeTypeWizardPage.HideExistingAttributes=Hide existing attributes +AttributeTypeWizardPage.PreviewLabel=Preview: +AttributeTypeWizardPage.ShowSubschemaAttributesOnly=Show subschema attributes only +AttributeWizard.NewAttribute=New Attribute +AttributeWizard.NoeEntrySelectedDescription=In order to use the attribute creation wizard please select an entry. +AttributeWizard.NoEntrySelected=No entry selected +EditEntryWizard.EditEntry=Edit Entry +NewEntryAttributesWizardPage.Attributes=Attributes +NewEntryAttributesWizardPage.PleaseEnterAttributesForEntry=Please enter the attributes for the entry. Enter at least the MUST attributes. +NewEntryDnWizardPage.DistinguishedName=Distinguished Name +NewEntryDnWizardPage.EnterDN=Please enter the DN of the context entry. +NewEntryDnWizardPage.EntryAlreadyExists=Entry {0} already exists +NewEntryDnWizardPage.Error=Error +NewEntryDnWizardPage.ParentDoesNotExist=Parent {0} doesn't exist +NewEntryDnWizardPage.SelectParent=Please select the parent of the new entry and enter the RDN. +NewEntryObjectclassWizardPage.AddButton=&Add +NewEntryObjectclassWizardPage.AvailableObjectClasses=Available object classes +NewEntryObjectclassWizardPage.FilterDescription=You may enter a filter to restrict the list below +NewEntryObjectclassWizardPage.ObjectClasses=Object Classes +NewEntryObjectclassWizardPage.ObjectClassesDescription=Please select object classes of the entry. Select at least one structural object class. +NewEntryObjectclassWizardPage.RemoveButton=&Remove +NewEntryObjectclassWizardPage.SelectedObjectClasses=Selected object classes +NewEntryObjectclassWizardPage.SelectStructuralObjectClass=Please select at least one structural object class. +NewEntryTypeWizardPage.CreateEntryFromScratch=Create entry from scratch +NewEntryTypeWizardPage.EntryCreationMethod=Entry Creation Method +NewEntryTypeWizardPage.EntryCreationMethodDescription=Please select the entry creation method. +NewEntryTypeWizardPage.EntryDoesNotExist=Entry {0} doesn't exist +NewEntryTypeWizardPage.Error=Error +NewEntryTypeWizardPage.NoConnection=No connection +NewEntryTypeWizardPage.NoDN=No Distinguished Name +NewEntryTypeWizardPage.UseExistingEntryAsTemplate=Use existing entry as template +NewEntryWizard.NewContextEntry=New Context Entry +NewEntryWizard.NewEntry=New Entry +NewEntryWizard.NoConnectonSelected=No connection selected or connection is closed +NewEntryWizard.NoConnectonSelectedDescription=In order to use the entry creation wizard please select an entry or connection. Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages_de.properties URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages_de.properties?rev=741930&view=auto ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages_de.properties (added) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/messages_de.properties Sat Feb 7 18:26:27 2009 @@ -0,0 +1,61 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +AttributeOptionsWizardPage.BinaryOption=Binäre Option +AttributeOptionsWizardPage.LanguageTags=Sprachoptionen +AttributeOptionsWizardPage.MustNotBeNull=Darf nicht null sein +AttributeOptionsWizardPage.Options=Optionen +AttributeOptionsWizardPage.OptionsDescription=Es können zusätzliche Optionen angegeben werden +AttributeOptionsWizardPage.OtherOptions=Andere Optionen +AttributeOptionsWizardPage.Preview=Vorschau: +AttributeTypeWizardPage.AttributeType=Attribut Typ +AttributeTypeWizardPage.AttributeTypeDescription=Bitte Attribut Typ eingeben oder auswählen +AttributeTypeWizardPage.AttributeTypeLabel=Attribut Typ: +AttributeTypeWizardPage.HideExistingAttributes=Existierende Attribute verbergen +AttributeTypeWizardPage.PreviewLabel=Vorschau: +AttributeTypeWizardPage.ShowSubschemaAttributesOnly=Nur Subschema Attribute anzeigen +AttributeWizard.NewAttribute=Neues Attribut +AttributeWizard.NoeEntrySelectedDescription=Um ein neues Attribute anzulegen bitte den entsprechenden Eintrag auswählen +AttributeWizard.NoEntrySelected=Kein Eintrag ausgewählt +EditEntryWizard.EditEntry=Eintrage bearbeiten +NewEntryAttributesWizardPage.Attributes=Attribute +NewEntryAttributesWizardPage.PleaseEnterAttributesForEntry=Bitte die Attribute für den Eintrag eingeben. Mindestens die Pflichtattribute müssen angegeben werden. +NewEntryDnWizardPage.DistinguishedName=Distinguished Name +NewEntryDnWizardPage.EnterDN=Bitte den DN des Basis-Eintrags eingeben. +NewEntryDnWizardPage.EntryAlreadyExists=Eintrag {0} existiert bereits +NewEntryDnWizardPage.Error=Fehler +NewEntryDnWizardPage.ParentDoesNotExist=Eltern-Eintrag {0} existiert nicht +NewEntryDnWizardPage.SelectParent=Bitte den Eltern-Eintrag des neuen Eintrags auswählen und den RDN eingeben. +NewEntryObjectclassWizardPage.AddButton=&Hinzufügen +NewEntryObjectclassWizardPage.AvailableObjectClasses=Verfügbare Objektklassen +NewEntryObjectclassWizardPage.FilterDescription=Filter eingeben, um die Liste der angezeigten Obljektklassen zu verkleinern +NewEntryObjectclassWizardPage.ObjectClasses=Objekt Klassen +NewEntryObjectclassWizardPage.ObjectClassesDescription=Bitte die Objektklassen des Eintrags auswählen. Mindestens eine strukturelle Objektklasse auswählen. +NewEntryObjectclassWizardPage.RemoveButton=&Entfernen +NewEntryObjectclassWizardPage.SelectedObjectClasses=Ausgewählte Objektklassen +NewEntryObjectclassWizardPage.SelectStructuralObjectClass=Bitte mindestens eine strukturelle Objektklasse auswählen. +NewEntryTypeWizardPage.CreateEntryFromScratch=Eintrag von Grund auf neu erstellen +NewEntryTypeWizardPage.EntryCreationMethod=Wie möchten Sie den Eintrag erstellen? +NewEntryTypeWizardPage.EntryCreationMethodDescription=Bitte auswählen, wie Sie den Eintrag erstellen möchten. +NewEntryTypeWizardPage.EntryDoesNotExist=Eintrag {0} existiert nicht +NewEntryTypeWizardPage.Error=Fehler +NewEntryTypeWizardPage.NoConnection=Keine Verbindung +NewEntryTypeWizardPage.NoDN=Kein Distinguished Name +NewEntryTypeWizardPage.UseExistingEntryAsTemplate=Existierenden Eintrag als Vorlage verwenden +NewEntryWizard.NewContextEntry=Neuer Basis-Eintrag +NewEntryWizard.NewEntry=Neuer Eintrag +NewEntryWizard.NoConnectonSelected=Keine Verbindung ausgewählt oder Verbindung ist geschlossen +NewEntryWizard.NoConnectonSelectedDescription=Um einen neuen Eintrag anzulegen bitte einen Eintrag oder Verbindung auswählen. Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogBinaryValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogBinaryValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogBinaryValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogBinaryValueEditor.java Sat Feb 7 18:26:27 2009 @@ -23,6 +23,7 @@ import org.apache.directory.studio.ldapbrowser.core.model.IAttribute; import org.apache.directory.studio.ldapbrowser.core.model.IValue; +import org.eclipse.osgi.util.NLS; /** @@ -60,16 +61,16 @@ { if ( value == null ) { - return "NULL"; + return "NULL"; //$NON-NLS-1$ } else if ( value.isBinary() ) { byte[] data = value.getBinaryValue(); - return "Binary Data (" + data.length + " Bytes)"; + return NLS.bind( Messages.getString("AbstractDialogBinaryValueEditor.BinaryDateNBytes"), data.length ); //$NON-NLS-1$ } else { - return "Invalid Data"; + return Messages.getString("AbstractDialogBinaryValueEditor.InvalidData"); //$NON-NLS-1$ } } } @@ -87,7 +88,7 @@ { if ( value == null ) { - return "NULL"; + return "NULL"; //$NON-NLS-1$ } else if ( value.isBinary() ) { @@ -108,7 +109,7 @@ } else { - return "NULL"; + return "NULL"; //$NON-NLS-1$ } } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogStringValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogStringValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogStringValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogStringValueEditor.java Sat Feb 7 18:26:27 2009 @@ -53,7 +53,7 @@ public String getDisplayValue( IValue value ) { Object obj = this.getRawValue( value ); - return obj == null ? "NULL" : obj.toString(); + return obj == null ? "NULL" : obj.toString(); //$NON-NLS-1$ } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java Sat Feb 7 18:26:27 2009 @@ -202,7 +202,7 @@ { if ( attributeHierarchy == null ) { - return "NULL"; + return "NULL"; //$NON-NLS-1$ } List valueList = new ArrayList(); @@ -218,7 +218,7 @@ IValue value = it.next(); sb.append( getDisplayValue( value ) ); if ( it.hasNext() ) - sb.append( ", " ); + sb.append( ", " ); //$NON-NLS-1$ } return sb.toString(); } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java Sat Feb 7 18:26:27 2009 @@ -87,7 +87,7 @@ { if ( attributeHierarchy == null ) { - return "NULL"; + return "NULL"; //$NON-NLS-1$ } List valueList = new ArrayList(); @@ -103,7 +103,7 @@ IValue value = it.next(); sb.append( getDisplayValue( value ) ); if ( it.hasNext() ) - sb.append( ", " ); + sb.append( ", " ); //$NON-NLS-1$ } return sb.toString(); } @@ -117,7 +117,7 @@ public String getDisplayValue( IValue value ) { Object obj = this.getRawValue( value ); - return obj == null ? "NULL" : obj.toString(); + return obj == null ? "NULL" : obj.toString(); //$NON-NLS-1$ } @@ -242,7 +242,7 @@ */ protected Object doGetValue() { - return "".equals( text.getText() ) ? null : text.getText(); + return "".equals( text.getText() ) ? null : text.getText(); //$NON-NLS-1$ } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/EntryValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/EntryValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/EntryValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/EntryValueEditor.java Sat Feb 7 18:26:27 2009 @@ -34,6 +34,7 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -174,7 +175,7 @@ StringBuffer sb = new StringBuffer(); if ( valueList.size() > 1 ) { - sb.append( valueList.size() + " values: " ); + sb.append( NLS.bind( Messages.getString("EntryValueEditor.n_values"), valueList.size() ) ); //$NON-NLS-1$ } for ( Iterator it = valueList.iterator(); it.hasNext(); ) { @@ -182,7 +183,9 @@ IValueEditor vp = getValueEditor( value ); sb.append( vp.getDisplayValue( value ) ); if ( it.hasNext() ) - sb.append( ", " ); + { + sb.append( ", " ); //$NON-NLS-1$ + } } return sb.toString(); } Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/Messages.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/Messages.java?rev=741930&view=auto ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/Messages.java (added) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/Messages.java Sat Feb 7 18:26:27 2009 @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.studio.valueeditors; + + +import java.util.MissingResourceException; +import java.util.ResourceBundle; + + +public class Messages +{ + private static final String BUNDLE_NAME = "org.apache.directory.studio.valueeditors.messages"; //$NON-NLS-1$ + + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME ); + + + private Messages() + { + } + + + public static String getString( String key ) + { + try + { + return RESOURCE_BUNDLE.getString( key ); + } + catch ( MissingResourceException e ) + { + return '!' + key + '!'; + } + } +} Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/MultivaluedValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/MultivaluedValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/MultivaluedValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/MultivaluedValueEditor.java Sat Feb 7 18:26:27 2009 @@ -32,6 +32,7 @@ import org.apache.directory.studio.ldapbrowser.core.model.IValue; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -169,7 +170,7 @@ StringBuffer sb = new StringBuffer(); if ( valueList.size() > 1 ) { - sb.append( valueList.size() + " values: " ); + sb.append( NLS.bind( Messages.getString("EntryValueEditor.n_values"), valueList.size() ) ); //$NON-NLS-1$ } for ( Iterator it = valueList.iterator(); it.hasNext(); ) { @@ -179,7 +180,7 @@ sb.append( vp.getDisplayValue( value ) ); if ( it.hasNext() ) { - sb.append( ", " ); + sb.append( ", " ); //$NON-NLS-1$ } } return sb.toString(); @@ -194,7 +195,7 @@ */ public String getDisplayValue( IValue value ) { - return ""; + return ""; //$NON-NLS-1$ } Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/TextValueEditor.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/TextValueEditor.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/TextValueEditor.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/TextValueEditor.java Sat Feb 7 18:26:27 2009 @@ -45,7 +45,7 @@ if ( value != null && value instanceof String ) { TextDialog dialog = new TextDialog( shell, ( String ) value ); - if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getText() ) ) + if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getText() ) ) //$NON-NLS-1$ { setValue( dialog.getText() ); return true; Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java?rev=741930&r1=741929&r2=741930&view=diff ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java (original) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java Sat Feb 7 18:26:27 2009 @@ -72,6 +72,20 @@ */ public class ValueEditorManager { + private static final String ATTRIBUTE_TYPE = "attributeType"; //$NON-NLS-1$ + + private static final String ATTRIBUTE = "attribute"; //$NON-NLS-1$ + + private static final String SYNTAX_OID = "syntaxOID"; //$NON-NLS-1$ + + private static final String SYNTAX = "syntax"; //$NON-NLS-1$ + + private static final String ICON = "icon"; //$NON-NLS-1$ + + private static final String NAME = "name"; //$NON-NLS-1$ + + private static final String CLASS = "class"; //$NON-NLS-1$ + /** The extension point ID for value editors */ private static final String EXTENSION_POINT = BrowserCommonConstants.EXTENSION_POINT_VALUE_EDITORS; @@ -123,13 +137,13 @@ // special case: multivalued editor multiValuedValueEditor = new MultivaluedValueEditor( this.parent, this ); - multiValuedValueEditor.setValueEditorName( "Mulitvalued Editor..." ); + multiValuedValueEditor.setValueEditorName( Messages.getString("ValueEditorManager.MulitivaluedEditor") ); //$NON-NLS-1$ multiValuedValueEditor.setValueEditorImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_MULTIVALUEDEDITOR ) ); // special case: entry editor entryValueEditor = new EntryValueEditor( this.parent, this ); - entryValueEditor.setValueEditorName( "Entry Editor..." ); + entryValueEditor.setValueEditorName( Messages.getString("ValueEditorManager.EntryEditor") ); //$NON-NLS-1$ entryValueEditor.setValueEditorImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_ENTRY ) ); @@ -705,7 +719,7 @@ { try { - IValueEditor valueEditor = ( IValueEditor ) vee.member.createExecutableExtension( "class" ); + IValueEditor valueEditor = ( IValueEditor ) vee.member.createExecutableExtension( CLASS ); valueEditor.create( parent ); valueEditor.setValueEditorName( vee.name ); valueEditor.setValueEditorImageDescriptor( vee.icon ); @@ -714,7 +728,7 @@ catch ( Exception e ) { BrowserCommonActivator.getDefault().getLog().log( - new Status( IStatus.ERROR, BrowserCommonConstants.PLUGIN_ID, 1, "Unable to create ValueEditor " + new Status( IStatus.ERROR, BrowserCommonConstants.PLUGIN_ID, 1, Messages.getString("ValueEditorManager.UnableToCreateValueEditor") //$NON-NLS-1$ + vee.className, e ) ); } } @@ -747,28 +761,28 @@ String extendingPluginId = extension.getNamespaceIdentifier(); proxy.member = member; - proxy.name = member.getAttribute( "name" ); - String iconPath = member.getAttribute( "icon" ); + proxy.name = member.getAttribute( NAME ); + String iconPath = member.getAttribute( ICON ); proxy.icon = AbstractUIPlugin.imageDescriptorFromPlugin( extendingPluginId, iconPath ); if ( proxy.icon == null ) { proxy.icon = ImageDescriptor.getMissingImageDescriptor(); } - proxy.className = member.getAttribute( "class" ); + proxy.className = member.getAttribute( CLASS ); IConfigurationElement[] children = member.getChildren(); for ( int c = 0; c < children.length; c++ ) { IConfigurationElement element = children[c]; String type = element.getName(); - if ( "syntax".equals( type ) ) + if ( SYNTAX.equals( type ) ) { - String syntaxOID = element.getAttribute( "syntaxOID" ); + String syntaxOID = element.getAttribute( SYNTAX_OID ); proxy.syntaxOids.add( syntaxOID ); } - else if ( "attribute".equals( type ) ) + else if ( ATTRIBUTE.equals( type ) ) { - String attributeType = element.getAttribute( "attributeType" ); + String attributeType = element.getAttribute( ATTRIBUTE_TYPE ); proxy.attributeTypes.add( attributeType ); } } Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages.properties URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages.properties?rev=741930&view=auto ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages.properties (added) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages.properties Sat Feb 7 18:26:27 2009 @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +EntryValueEditor.n_values={0} values: +AbstractDialogBinaryValueEditor.BinaryDateNBytes=Binary Data ({0} Bytes) +AbstractDialogBinaryValueEditor.InvalidData=Invalid Data +ValueEditorManager.EntryEditor=Entry Editor... +ValueEditorManager.MulitivaluedEditor=Mulitvalued Editor... +ValueEditorManager.UnableToCreateValueEditor=Unable to create ValueEditor Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages_de.properties URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages_de.properties?rev=741930&view=auto ============================================================================== --- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages_de.properties (added) +++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/messages_de.properties Sat Feb 7 18:26:27 2009 @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +EntryValueEditor.n_values={0} Werte: +AbstractDialogBinaryValueEditor.BinaryDateNBytes=Binäre Daten ({0} Bytes) +AbstractDialogBinaryValueEditor.InvalidData=Ungültige Daten +ValueEditorManager.EntryEditor=Eintrags-Editor... +ValueEditorManager.MulitivaluedEditor=Editor für mehrwertige Attribute... +ValueEditorManager.UnableToCreateValueEditor=Wert-Editor konnte nicht initialisiert werden