Author: jalkanen
Date: Fri Mar 14 14:04:54 2008
New Revision: 637263

URL: http://svn.apache.org/viewvc?rev=637263&view=rev
Log:
Improved to take arguments at runtime; as well as allow relative paths.

Modified:
    incubator/jspwiki/trunk/tests/TranslationsCheck.java

Modified: incubator/jspwiki/trunk/tests/TranslationsCheck.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/TranslationsCheck.java?rev=637263&r1=637262&r2=637263&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/TranslationsCheck.java (original)
+++ incubator/jspwiki/trunk/tests/TranslationsCheck.java Fri Mar 14 14:04:54 
2008
@@ -6,6 +6,14 @@
 /**
  * Simple utility that shows you a sorted list of property differences between
  * the 'default en' and a given i18n file. It also warns if there are any 
duplicates.
+ * <p>
+ * The first argument is the language, and it is mandatory.
+ * The second argument is the path.  If the path is not defined, uses current 
path (.)
+ * <p>
+ * For example (if you're compiling your classes to "classes"):
+ * <code>
+ * java -cp classes TranslationsCheck fi
+ * </code>
  * 
  * @author Christoph Sauer
  * @author Florian Holeczek
@@ -16,11 +24,24 @@
     private static final TreeSet duplProps = new TreeSet();
     
     // Change these to your settings...
-    static String base = "C:/eclipse_workspace/JSPWiki 2.6.x";
-    static String suffix = "de";
-    
+    static String base = ".";
+    static String suffix = null;
+   
     public static void main(String[] args) throws IOException
     {
+        if( args.length == 0 )
+        {
+            System.out.println("Usage: java TranslationsCheck <language> 
[<path>]");
+            return;
+        }
+        
+        suffix = args[0];
+
+        if( args.length >= 2 )
+        {
+            base = args[1];
+        }
+        
         System.out.println("Using code base " + Release.VERSTR);
         System.out.println("Internationalization property file differences 
between 'default en' and '"
                            + suffix + "' following:\n");


Reply via email to