Package net.sf.jmp3renamer

Examples of net.sf.jmp3renamer.Translatable


        }

        // for plugins
        Object[] translatables = translatableTracker.getServices();
        for (Object translatable : translatables) {
            Translatable t = (Translatable) translatable;
            TranslationTreeNode currentPluginNode = new TranslationTreeNode(new TranslationItem(t.toString()), true);
            pluginNode.add(currentPluginNode);

            // load all language tables
            languageTables = new Hashtable<String, Properties>();
            for (String supLang : Main.getSupportedLanguages()) {
                Properties lang = new Properties();
                try {
                    lang = t.getLanguageTable(supLang);
                } catch (Exception e) {
                    logger.warn("Couldn't load language file of plugin {} for locale {}", t, supLang);
                }
                languageTables.put(supLang, lang);
            }

            try {
                Properties english = t.getLanguageTable("en");
                Enumeration<?> en = english.propertyNames();
                List<TranslationTreeNode> list = new ArrayList<TranslationTreeNode>();
                while (en.hasMoreElements()) {
                    String key = (String) en.nextElement();
                    TranslationItem tp = new TranslationItem(key);
View Full Code Here


            String externalName = item.getKey();
            // determine internal name
            String internalName = "foobar";
            Object[] translatables = translatableTracker.getServices();
            for (Object translatable : translatables) {
                Translatable t = (Translatable) translatable;
                if(t.toString().equals(externalName)) {
                    internalName = t.getClass().getName();
                    internalName = internalName.substring(internalName.lastIndexOf(".")+1);
                }
            }
            storeTranslationNode(node, dir, internalName);
        }
View Full Code Here

                String externalName = item.getKey();
                // determine internal name
                String internalName = "foobar";
                Object[] translatables = translatableTracker.getServices();
                for (Object translatable : translatables) {
                    Translatable t = (Translatable) translatable;
                    if(t.toString().equals(externalName)) {
                        internalName = t.getClass().getName();
                        internalName = internalName.substring(internalName.lastIndexOf(".")+1);
                    }
                }
                storeTranslationNode(node, dir, internalName);
            }
View Full Code Here

TOP

Related Classes of net.sf.jmp3renamer.Translatable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.