You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "karlpauls (via GitHub)" <gi...@apache.org> on 2023/12/04 21:35:06 UTC

[PR] Make i18n dependency optional [sling-org-apache-sling-scripting-sightly]

karlpauls opened a new pull request, #24:
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly/pull/24

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Make i18n dependency optional [sling-org-apache-sling-scripting-sightly]

Posted by "karlpauls (via GitHub)" <gi...@apache.org>.
karlpauls merged PR #24:
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly/pull/24


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Make i18n dependency optional [sling-org-apache-sling-scripting-sightly]

Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on code in PR #24:
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly/pull/24#discussion_r1415084666


##########
src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/I18nRuntimeExtension.java:
##########
@@ -61,11 +61,22 @@ public Object call(final RenderContext renderContext, Object... arguments) {
         return get(bindings, text, locale, basename, hint);
     }
 
+    private Object getResourceBundleProvider(SlingScriptHelper slingScriptHelper) {
+        Class clazz;
+        try {
+            clazz = getClass().getClassLoader().loadClass("org.apache.sling.i18n.ResourceBundleProvider");
+        } catch (Throwable t) {
+            LOG.warn("i18n package not available");

Review Comment:
   I think it would be good to log the warn only once



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org