Added more Wikipedia configurations
authoraxelcl <axelcl>
Sun, 9 Jan 2005 16:40:15 +0000 (16:40 +0000)
committeraxelcl <axelcl>
Sun, 9 Jan 2005 16:40:15 +0000 (16:40 +0000)
15 files changed:
archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikiProperties.java
archive/net.sourceforge.phpeclipse.wiki/wikis/WikibooksDE.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikibooksDE.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikibooksEN.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikibooksEN.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikinewsDE.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikinewsDE.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikinewsEN.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikinewsEN.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaAR.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaAR.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaCA.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaCA.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaDA.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaDA.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaDE.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaDE.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaEN.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaEN.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaEO.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaEO.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaES.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaES.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaET.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaET.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaFI.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaFI.properties with 100% similarity]
archive/net.sourceforge.phpeclipse.wiki/wikis/WikipediaFR.properties [moved from archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/config/WikipediaFR.properties with 100% similarity]

index 5c6a2b7..301420d 100644 (file)
@@ -5,10 +5,17 @@ package net.sourceforge.phpeclipse.wiki.actions.mediawiki.config;
 //The modified sources are available under the "Common Public License"
 //with permission from the original author: Daniel Wunsch
 
+import java.io.IOException;
+import java.io.InputStream;
 import java.text.MessageFormat;
 import java.util.MissingResourceException;
+import java.util.PropertyResourceBundle;
 import java.util.ResourceBundle;
 
+import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
+
+import org.eclipse.core.runtime.Path;
+
 public class WikiProperties {
 
   private static final String PACKAGE_NAME = WikiProperties.class.getPackage().getName();
@@ -18,8 +25,16 @@ public class WikiProperties {
   private ResourceBundle fgResourceBundle = null;
 
   protected WikiProperties(String locale) {
-    RESOURCE_BUNDLE = PACKAGE_NAME + "." + locale;
-    fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+    try {
+      InputStream is = WikiEditorPlugin.getDefault().openStream(new Path("wikis/"+locale+".properties"));
+      fgResourceBundle = new PropertyResourceBundle(is);
+//      RESOURCE_BUNDLE = PACKAGE_NAME + "." + locale;
+//      fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+    } catch (IOException e) {
+      // TODO Auto-generated catch block
+      e.printStackTrace();
+    }
+    
   }
 
   public String getString(String key) {