directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r720814 - in /directory/studio/trunk/schemaeditor/src/main: java/org/apache/directory/studio/schemaeditor/model/io/ resources/org/apache/directory/studio/schemaeditor/model/io/
Date Wed, 26 Nov 2008 11:34:12 GMT
Author: felixk
Date: Wed Nov 26 03:34:10 2008
New Revision: 720814

URL: http://svn.apache.org/viewvc?rev=720814&view=rev
Log:
- Fix NLS parameter stuff
- Add German translation

Added:
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties
  (with props)
Modified:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages.properties

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java?rev=720814&r1=720813&r2=720814&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
Wed Nov 26 03:34:10 2008
@@ -36,6 +36,7 @@
 import org.apache.directory.studio.schemaeditor.model.ObjectClassImpl;
 import org.apache.directory.studio.schemaeditor.model.Schema;
 import org.apache.directory.studio.schemaeditor.model.SchemaImpl;
+import org.eclipse.osgi.util.NLS;
 
 
 /**
@@ -67,7 +68,7 @@
         }
         catch ( IOException e )
         {
-            throw new OpenLdapSchemaFileImportException( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyBegin")
+ path + Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyEnd") ); //$NON-NLS-1$
//$NON-NLS-2$
+            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         try
@@ -76,16 +77,15 @@
         }
         catch ( IOException e )
         {
-            throw new OpenLdapSchemaFileImportException( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyBegin")
+ path + Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyEnd") ); //$NON-NLS-1$
//$NON-NLS-2$
+            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
         }
         catch ( ParseException e )
         {
             ExceptionMessage exceptionMessage = parseExceptionMessage( e.getMessage() );
-            throw new OpenLdapSchemaFileImportException( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyBegin")
//$NON-NLS-1$
-                + path
-                + Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyEnd") //$NON-NLS-1$
-                + ( exceptionMessage == null ? "" : Messages.getString("OpenLdapSchemaFileImporter.Line")
+ exceptionMessage.lineNumber + Messages.getString("OpenLdapSchemaFileImporter.Column") //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
-                    + exceptionMessage.columnNumber + Messages.getString("OpenLdapSchemaFileImporter.Cause")
+ exceptionMessage.cause ) ); //$NON-NLS-1$
+            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyBegin"),
new String[]{
+                path}) //$NON-NLS-1$
+                + ( exceptionMessage == null ? "" : NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.ErrorMessage"),
new String[]{exceptionMessage.lineNumber,
+                    exceptionMessage.columnNumber,  exceptionMessage.cause}) ) ); //$NON-NLS-1$
         }
 
         String schemaName = getNameFromPath( path );

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java?rev=720814&r1=720813&r2=720814&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
Wed Nov 26 03:34:10 2008
@@ -35,6 +35,7 @@
 import org.dom4j.DocumentException;
 import org.dom4j.Element;
 import org.dom4j.io.SAXReader;
+import org.eclipse.osgi.util.NLS;
 
 
 /**
@@ -80,13 +81,13 @@
         }
         catch ( DocumentException e )
         {
-            throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotReadCorrectlyStart")
+ path + Messages.getString("ProjectsImporter.NotReadCorrectlyEnd") );
+            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) );
         }
 
         Element rootElement = document.getRootElement();
         if ( !rootElement.getName().equals( PROJECT_TAG ) )
         {
-            throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotValidProjectStart")
+ path + Messages.getString("ProjectsImporter.NotValidProjectEnd") );
+            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotValidProject"),
new String[]{ path }) );
         }
 
         readProject( rootElement, project, path );
@@ -119,14 +120,14 @@
         }
         catch ( DocumentException e )
         {
-        	PluginUtils.logError(Messages.getString("ProjectsImporter.NotReadCorrectlyStart")
+ path + Messages.getString("ProjectsImporter.NotReadCorrectlyEnd"), e);
-            throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotReadCorrectlyStart")
+ path + Messages.getString("ProjectsImporter.NotReadCorrectlyEnd") );
+        	PluginUtils.logError(NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) , e);
+            throw new ProjectsImportException(NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) );
         }
 
         Element rootElement = document.getRootElement();
         if ( !rootElement.getName().equals( PROJECTS_TAG ) )
         {
-            throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotValidProjectStart")
+ path + Messages.getString("ProjectsImporter.NotValidProjectEnd") );
+            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotValidProject"),
new String[]{ path }) );
         }
 
         for ( Iterator<?> i = rootElement.elementIterator( PROJECT_TAG ); i.hasNext();
)
@@ -204,8 +205,8 @@
 
                 if ( schemaConnector == null )
                 {
-                    throw new ProjectsImportException( Messages.getString("ProjectsImporter.NoSchemaConnectorIDFound")
-                        + schemaConnectorId + "." ); //$NON-NLS-1$
+                    throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NoSchemaConnectorIDFound"),
+                        new String[]{ schemaConnectorId})); //$NON-NLS-1$
                 }
 
                 project.setSchemaConnector( schemaConnector );
@@ -287,7 +288,7 @@
         }
         catch ( DocumentException e )
         {
-            throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotReadCorrectlyStart")
+ path + Messages.getString("ProjectsImporter.NotReadCorrectlyEnd") );
+            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) );
         }
 
         Element rootElement = document.getRootElement();
@@ -301,7 +302,7 @@
         }
         else
         {
-            throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotValidProjectStart")
+ path + Messages.getString("ProjectsImporter.NotValidProjectEnd") );
+            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotValidProject"),
new String[]{ path }) );
         }
     }
 }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java?rev=720814&r1=720813&r2=720814&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
Wed Nov 26 03:34:10 2008
@@ -39,6 +39,7 @@
 import org.dom4j.DocumentException;
 import org.dom4j.Element;
 import org.dom4j.io.SAXReader;
+import org.eclipse.osgi.util.NLS;
 
 
 /**
@@ -107,13 +108,13 @@
         }
         catch ( DocumentException e )
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotReadCorrectlyBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotReadCorrectlyEnd") ); //$NON-NLS-1$
//$NON-NLS-2$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         Element rootElement = document.getRootElement();
         if ( !rootElement.getName().equals( SCHEMAS_TAG ) )
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotValidSchemaBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotValidSchemaEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         return readSchemas( rootElement, path );
@@ -142,7 +143,7 @@
         }
         catch ( DocumentException e )
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotReadCorrectlyBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotReadCorrectlyEnd") );
+            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         Element rootElement = document.getRootElement();
@@ -169,7 +170,7 @@
 
         if ( !element.getName().equals( SCHEMAS_TAG ) )
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotValidSchemaBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotValidSchemaEnd") );
+            throw new XMLSchemaFileImportException(NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         for ( Iterator<?> i = element.elementIterator( SCHEMA_TAG ); i.hasNext(); )
@@ -234,7 +235,7 @@
     {
         if ( !element.getName().equals( SCHEMA_TAG ) )
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotValidSchemaBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotValidSchemaEnd") );
+            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         Attribute nameAttribute = element.attribute( NAME_TAG );
@@ -827,7 +828,7 @@
         }
         catch ( DocumentException e )
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotReadCorrectlyBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotReadCorrectlyEnd") );
+            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
         }
 
         Element rootElement = document.getRootElement();
@@ -841,7 +842,7 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NotValidSchemaBegin")
+ path + Messages.getString("XMLSchemaFileImporter.NotValidSchemaEnd") );
+            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
         }
     }
 }

Modified: directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages.properties?rev=720814&r1=720813&r2=720814&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages.properties
(original)
+++ directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages.properties
Wed Nov 26 03:34:10 2008
@@ -15,27 +15,20 @@
 # specific language governing permissions and limitations
 # under the License.
 
-OpenLdapSchemaFileImporter.Cause=, Cause\: 
-OpenLdapSchemaFileImporter.Column=, Column\: 
-OpenLdapSchemaFileImporter.Line=\nLine\: 
-OpenLdapSchemaFileImporter.NotReadCorrectlyBegin=The file '
-OpenLdapSchemaFileImporter.NotReadCorrectlyEnd=' can not be read correctly.
-ProjectsImporter.NoSchemaConnectorIDFound=The parser was not able to find the SchemaConnector
with ID :
+OpenLdapSchemaFileImporter.ErrorMessage=Line\: {0}, column\: {1}, cause\: {2}
+OpenLdapSchemaFileImporter.NotReadCorrectly=The file "{0}" can not be read correctly.
+ProjectsImporter.NoSchemaConnectorIDFound=The parser was not able to find the SchemaConnector
with ID "{0}".
 ProjectsImporter.NotConvertableSchema=The parser was not able to convert the schemas of the
project.
 ProjectsImporter.NotConvertableValue=The parser was not able to convert the type value of
the project.
-ProjectsImporter.NotReadCorrectlyEnd=' can not be read correctly.
-ProjectsImporter.NotReadCorrectlyStart=The file '
-ProjectsImporter.NotValidProjectEnd=' does not seem to be a valid project file.
-ProjectsImporter.NotValidProjectStart=The file '
+ProjectsImporter.NotReadCorrectly=The file "{0}" can not be read correctly.
+ProjectsImporter.NotValidProject=The file "{0}" does not seem to be a valid project file.
 XMLSchemaFileImporter.76=The parser was not able to convert a boolean value.
 XMLSchemaFileImporter.InvalidSyntaxForOID=A syntax definition must contain an attribute for
the OID.
 XMLSchemaFileImporter.NoMatchingRuleForOID=A matching rule definition must contain an attribute
for the OID.
 XMLSchemaFileImporter.NoOIDInAttribute=An attribute type definition must contain an attribute
for the OID.
 XMLSchemaFileImporter.NoOIDInClass=An object class definition must contain an attribute for
the OID.
-XMLSchemaFileImporter.NotReadCorrectlyBegin=The file '
-XMLSchemaFileImporter.NotReadCorrectlyEnd=' can not be read correctly.
-XMLSchemaFileImporter.NotValidSchemaBegin=The file '
-XMLSchemaFileImporter.NotValidSchemaEnd=' does not seem to be a valid Schema file.
+XMLSchemaFileImporter.NotReadCorrectly=The file "{0}" can not be read correctly.
+XMLSchemaFileImporter.NotValidSchema=The file "{0}" does not seem to be a valid Schema file.
 XMLSchemaFileImporter.UnceonvertableAttribute=The parser was not able to convert the usage
value of the attribute type.
 XMLSchemaFileImporter.UnconvertableInteger=The parser was not able to convert the syntax
length value of the attribute type to an integer.
 XMLSchemaFileImporter.UnconvertableValue=The parser was not able to convert the usage value
of the attribute type.

Added: directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties?rev=720814&view=auto
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties
(added)
+++ directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties
Wed Nov 26 03:34:10 2008
@@ -0,0 +1,34 @@
+# 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.
+
+OpenLdapSchemaFileImporter.ErrorMessage=Zeile\: {0}, Spalte\: {1}, Grund\: {2}
+OpenLdapSchemaFileImporter.NotReadCorrectlyBegin=Die Datei "{0}" konnte nicht korrekt gelesen
werden.
+ProjectsImporter.NoSchemaConnectorIDFound=Der Parser war nicht in der Lagen, den SchemaConnector
mit der OID "{0}" zu finden.
+ProjectsImporter.NotConvertableSchema=Der Parser war nicht in der Lagen, das Schema des Projekts
umzuwandeln.
+ProjectsImporter.NotConvertableValue=Der Parser war nicht in der Lagen, den Typen Wert des
Projekts umzuwandeln.
+ProjectsImporter.NotReadCorrectly=Die Datei "{0}" kann nicht korrekt gelesen werden.
+ProjectsImporter.NotValidProject=Die Datei "{0}" scheint keine g\u00FCltige Projekt Datei
zu sein.
+XMLSchemaFileImporter.76=Der Parser war nicht in der Lagen, einen boolschen Wert umzuwandeln.
+XMLSchemaFileImporter.InvalidSyntaxForOID=Eine Syntax Definition muss ein Attribut f\u00FCr
die OID enthalten.
+XMLSchemaFileImporter.NoMatchingRuleForOID=Eine passende Regel Definition muss ein Attribute
f\u00FCr die OID enthalten.
+XMLSchemaFileImporter.NoOIDInAttribute=Eine Attribut-Typ Definition muss ein Attribut f\u00FCr
die OID enthalten.
+XMLSchemaFileImporter.NoOIDInClass=Eine Objekt Klasse muss ein Attribut f\u00FCr die OID
enthalten.
+XMLSchemaFileImporter.NotReadCorrectly=Die Datei "{0}" kann nicht korrekt gelesen werden.
+XMLSchemaFileImporter.NotValidSchema=Die Datei "{0}" scheint keine g\u00FCltige Schema Datei
zu sein.
+XMLSchemaFileImporter.UnceonvertableAttribute=Der PArser war nicht in der Lagen, den verwendeten
Wert des Attribut-Typs umzuwandeln.
+XMLSchemaFileImporter.UnconvertableInteger=Der Parser war nicht in der Lagen, den Wert der
Syntayl\u00E4nge des Attribut-Typs in einen Integer umzuwandeln.
+XMLSchemaFileImporter.UnconvertableValue=Der Parser war nicht in der Lagen, den verwendeten
Wert des Attribut-Typs umzuwandeln.

Propchange: directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message