Package org.geoserver.web.translator.controller

Examples of org.geoserver.web.translator.controller.TranslationController


        }

        @Override
        protected List<TranslationInfo> getItems() {
            GeoServerApplication app = GeoServerApplication.get();
            TranslationController controller = app.getBeanOfType(TranslationController.class);
            Set<Locale> translatedLanguages = controller.getTranslatedLanguages();
            ArrayList<TranslationInfo> list = new ArrayList<TranslationInfo>(translatedLanguages
                    .size());

            for (Locale locale : translatedLanguages) {
                TranslationInfo info = new TranslationInfo();
                info.setLocale(locale);
                double percentComplete = controller.getPercentComplete(locale);
                double uncommittedPercent = controller.getUncommittedPercent(locale);
                info.setPercentComplete(percentComplete);
                info.setUncommittedPercent(uncommittedPercent);
                list.add(info);
            }
            return list;
View Full Code Here


        {
            TranslateBean translateBean;
            final GeoServerApplication application = getGeoServerApplication();
            translateBean = (TranslateBean) application.getMetaData(TRANSLATION_BEAN);
            if (translateBean == null) {
                TranslationController controller = getController();
                Map<Locale, Map<String, String>> translatedResources;
                translatedResources = controller.getTranslatedResources();

                // default locale is keyed by null
                Locale baseLocale = null;
                translateBean = new TranslateBean(baseLocale, translatedResources);
                application.setMetaData(TRANSLATION_BEAN, translateBean);
View Full Code Here

        return uiLanguageChoice;
    }

    private TranslationController getController() {
        GeoServerApplication application = getGeoServerApplication();
        TranslationController controller = application.getBeanOfType(TranslationController.class);
        return controller;
    }
View Full Code Here

TOP

Related Classes of org.geoserver.web.translator.controller.TranslationController

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.