You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erik Hatcher (JIRA)" <ji...@apache.org> on 2015/10/09 04:21:26 UTC

[jira] [Comment Edited] (SOLR-8128) Current locale not set on LocaleConfig-based Velocity tools

    [ https://issues.apache.org/jira/browse/SOLR-8128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14949779#comment-14949779 ] 

Erik Hatcher edited comment on SOLR-8128 at 10/9/15 2:20 AM:
-------------------------------------------------------------

Here's a patch that configures the built-in $math, $number, and $display tools with the specified locale (via v.locale); all of these are Velocity LocaleConfig extending classes.  This patch also configures any custom tools that extend LocaleConfig too.  Also, $resource (SolrVelocityResourceTool) was refactored to have its locale configured similarly, now that I understand how LocaleConfig works.


was (Author: ehatcher):
Here's a patch that configures the built-in $math, $number, and $display tools with the specified locale (via v.locale); all of these are Velocity LocaleConfig extending classes.  This patch also configures any custom tools that extend LocaleConfig too.

> Current locale not set on LocaleConfig-based Velocity tools
> -----------------------------------------------------------
>
>                 Key: SOLR-8128
>                 URL: https://issues.apache.org/jira/browse/SOLR-8128
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Erik Hatcher
>            Assignee: Erik Hatcher
>         Attachments: SOLR-8128.patch
>
>
> The locale feature of VelocityResponseWriter is currently used to set the locale for the $resource tool.  However, there are some other tools that leverage the locale setting that are falling back to the default system locale.
> For example, $number.format should allow {{$number.format("integer",50000)}} to render the number in the v.locale specified locale but always uses the default system locale.  
> A workaround for number formatting is to use the $resource.locale setting like this:  {{$number.format("integer",50000,$resource.locale)}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org