From 4cb276067a472a4ff08636c208fff523bd38dced Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Fri, 26 Feb 2010 17:03:25 +0000 Subject: [PATCH] OPENJPA-1538 Move hard coded text in OpenJPAVersion.java to localizer.properties. Patch contributed by Cathy Nordstrom. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@916757 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/conf/OpenJPAVersion.java | 7 +++++-- .../resources/org/apache/openjpa/conf/localizer.properties | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java b/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java index 4f83bb7d7..57afbd537 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java @@ -25,6 +25,7 @@ import java.util.Properties; import java.util.StringTokenizer; import org.apache.openjpa.lib.util.J2DoPrivHelper; +import org.apache.openjpa.lib.util.Localizer; /** * This class contains version information for OpenJPA. It uses @@ -35,6 +36,8 @@ import org.apache.openjpa.lib.util.J2DoPrivHelper; */ public class OpenJPAVersion { + private static final Localizer _loc = Localizer.forPackage(OpenJPAVersion.class); + public static final String VERSION_NUMBER; public static final String VERSION_ID; public static final String VENDOR_NAME = "OpenJPA"; @@ -128,9 +131,9 @@ public class OpenJPAVersion { buf.append(VENDOR_NAME).append(" "); buf.append(VERSION_NUMBER); buf.append("\n"); - buf.append("version id: ").append(VERSION_ID); + buf.append(_loc.get("version-id")).append(": ").append(VERSION_ID); buf.append("\n"); - buf.append("Apache svn revision: ").append(REVISION_NUMBER); + buf.append(_loc.get("openjpa-revision")).append(": ").append(REVISION_NUMBER); buf.append("\n"); } diff --git a/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties b/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties index cd52dd51e..860efbecf 100644 --- a/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties +++ b/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties @@ -632,3 +632,5 @@ class-not-found: Can not set "{0}", which requires class "{1}". invalid-config-object: Invalid object provided in configuration property \ "{0}". Expected type was "{1}". +version-id: version id +openjpa-revision: Apache svn revision