diff dwtx/text/edits/TextEditMessages.d @ 150:5cf141e43417

...
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 23:05:26 +0200
parents 000f9136b8f7
children 77b70cbb4c8d
line wrap: on
line diff
--- a/dwtx/text/edits/TextEditMessages.d	Sun Aug 24 22:41:48 2008 +0200
+++ b/dwtx/text/edits/TextEditMessages.d	Sun Aug 24 23:05:26 2008 +0200
@@ -44,9 +44,14 @@
 
 class TextEditMessages {
 
-    private static const String BUNDLE_NAME= "dwtx.text.edits.Messages"; //$NON-NLS-1$
+//     private static const String BUNDLE_NAME= "dwtx.text.edits.Messages"; //$NON-NLS-1$
+
+    private static const ResourceBundle RESOURCE_BUNDLE;//= ResourceBundle.getBundle(BUNDLE_NAME);
 
-    private static const ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME);
+    static this() {
+        RESOURCE_BUNDLE = ResourceBundle.getBundle(
+            getImportData!("dwtx.text.edits.TextEditMessages.properties"));
+    }
 
     private this() {
     }
@@ -55,15 +60,11 @@
         try {
             return RESOURCE_BUNDLE.getString(key);
         } catch (MissingResourceException e) {
-            return '!' + key + '!';
+            return '!' ~ key ~ '!';
         }
     }
 
-    public static String getFormattedString(String key, Object arg) {
-        return getFormattedString(key, new Object[] { arg });
-    }
-
-    public static String getFormattedString(String key, Object[] args) {
+    public static String getFormattedString(String key, Object[] args...) {
         return MessageFormat.format(getString(key), args);
     }
 }