Examples of JahiaResourceBundle


Examples of org.jahia.utils.i18n.JahiaResourceBundle

    public String getLabel(Locale locale) {
        String label = labels.get(locale);
        if (label == null) {
            JahiaTemplatesPackage aPackage = getDeclaringNodeType().getTemplatePackage();
            label = new JahiaResourceBundle(getResourceBundleId(), locale, aPackage!=null ? aPackage.getName(): null, JahiaTemplatesRBLoader
                    .getInstance(Thread.currentThread().getContextClassLoader(), null)).getString(
                    getResourceBundleKey(), getName().replace(':', '_'));
            labels.put(locale, label);
        }
        return label;
View Full Code Here

Examples of org.jahia.utils.i18n.JahiaResourceBundle

            labelsByNodeType.put(locale,labelNodeType);
        }
        String label = labelNodeType.get(nodeType.getName());
        if(label==null) {
            JahiaTemplatesPackage aPackage = nodeType.getTemplatePackage();
            label = new JahiaResourceBundle(nodeType.getResourceBundleId(), locale, aPackage!=null ? aPackage.getName(): null, JahiaTemplatesRBLoader
                    .getInstance(Thread.currentThread().getContextClassLoader(), null)).getString(
                    getResourceBundleKey(nodeType), getLabel(locale));
            labelNodeType.put(nodeType.getName(), label);
        }
        return label;
View Full Code Here

Examples of org.jahia.utils.i18n.JahiaResourceBundle

            tooltipsByNodeType.put(locale,labelNodeType);
        }
        String label = labelNodeType.get(nodeType.getName());
        if(label==null) {
            JahiaTemplatesPackage aPackage = nodeType.getTemplatePackage();
            label = new JahiaResourceBundle(nodeType.getResourceBundleId(), locale, aPackage!=null ? aPackage.getName(): null, JahiaTemplatesRBLoader
                    .getInstance(Thread.currentThread().getContextClassLoader(), null)).getString(
                    getResourceBundleKey(nodeType)+".ui.tooltip", "");
            labelNodeType.put(nodeType.getName(), label);
        }
        return label;
View Full Code Here

Examples of org.jahia.utils.i18n.JahiaResourceBundle

                HashMap<String, Object> map = new HashMap<String, Object>();
                Properties properties = view.getProperties();
                for (Map.Entry<Object, Object> entry : properties.entrySet()) {
                    map.put(entry.getKey().toString(), entry.getValue());
                }
                JahiaResourceBundle rb = new JahiaResourceBundle(null, locale, view.getModule().getName());

                String displayName = rb.get(declaringPropertyDefinition.getResourceBundleKey() + "." + view.getKey().replace(':', '_'),
                        view.getKey());
                ChoiceListValue c =  new ChoiceListValue(displayName, map, new ValueImpl(view.getKey(), PropertyType.STRING, false));
                try {

                    final File imagePath = new File(
View Full Code Here

Examples of org.jahia.utils.i18n.JahiaResourceBundle

            if (templatePackageName == null) {
                String resourceBundleName = StringUtils.substringBeforeLast(StringUtils.substringAfter(template.replaceAll("/WEB-INF",""), "/")
                        .replaceAll("/", "."), ".");
                resourceBundle = JahiaResourceBundle.lookupBundle(resourceBundleName, locale);
            } else {
                resourceBundle = new JahiaResourceBundle(locale, templatePackageName);
            }
            final Bindings bindings = scriptContext.getBindings(ScriptContext.ENGINE_SCOPE);
            bindings.put("bundle", resourceBundle);
            bindings.putAll(bindedObjects);
            Reader scriptContent = null;
View Full Code Here

Examples of org.jahia.utils.i18n.JahiaResourceBundle

    public ValidatorResults validate(final String inputHTML) {
        if (logger.isDebugEnabled()) {
            logger.debug("Validate: " + inputHTML);
        }
        final ValidatorResults evh = new ValidatorResults();
        bundle = new JahiaResourceBundle(JahiaResourceBundle.JAHIA_INTERNAL_RESOURCES, uiLocale);

        if (inputHTML == null || inputHTML.length() == 0)
            return evh;

        final String tmp;
View Full Code Here

Examples of org.jahia.utils.i18n.JahiaResourceBundle

            chain.pushAttribute(request, "moduleMap", new HashMap());
        }

        Script script = (Script) request.getAttribute("script");
        chain.pushAttribute(context.getRequest(), Config.FMT_LOCALIZATION_CONTEXT + ".request", new LocalizationContext(
                new JahiaResourceBundle(resource.getLocale(), script.getView().getModule().getName()),
                resource.getLocale()));
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.