[
https://issues.apache.org/jira/browse/ROL-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kohei Nozaki updated ROL-2109:
------------------------------
Attachment: roller-bug-ss.png
The page shows messages that inconsistent with my browser's language
configuration (English).
> Media Files page shows texts that incosistent with user's language
> ------------------------------------------------------------------
>
> Key: ROL-2109
> URL: https://issues.apache.org/jira/browse/ROL-2109
> Project: Apache Roller
> Issue Type: Bug
> Components: User Interface - General
> Affects Versions: 5.1.2
> Reporter: Kohei Nozaki
> Assignee: Roller Unassigned
> Priority: Minor
> Attachments: roller-bug-ss.png
>
>
> In MediaFileView class, it saves some text messages in static variables as
> follows:
> {noformat}
> // Search criteria - drop-down for file type
> private static List<KeyValueObject> FILE_TYPES = null;
> // Search criteria - drop-down for size filter
> private static List<KeyValueObject> SIZE_FILTER_TYPES = null;
> // Search criteria - drop-down for size unit
> private static List<KeyValueObject> SIZE_UNITS = null;
> {noformat}
> They will be initialized inside myPrepare() method as follows:
> {noformat}
> if (SIZE_FILTER_TYPES == null) {
> SIZE_FILTER_TYPES = Arrays.asList(new KeyValueObject(
> "mediaFileView.gt", getText("mediaFileView.gt")),
> new KeyValueObject("mediaFileView.ge",
> getText("mediaFileView.ge")), new KeyValueObject(
> "mediaFileView.eq", getText("mediaFileView.eq")),
> new KeyValueObject("mediaFileView.le",
> getText("mediaFileView.le")), new KeyValueObject(
> "mediaFileView.lt", getText("mediaFileView.lt")));
> FILE_TYPES = Arrays.asList(new KeyValueObject("mediaFileView.any",
> getText("mediaFileView.any")), new KeyValueObject(
> "mediaFileView.others", getText("mediaFileView.others")),
> new KeyValueObject("mediaFileView.image",
> getText("mediaFileView.image")),
> new KeyValueObject("mediaFileView.video",
> getText("mediaFileView.video")),
> new KeyValueObject("mediaFileView.audio",
> getText("mediaFileView.audio")));
> SIZE_UNITS = Arrays.asList(new KeyValueObject(
> "mediaFileView.bytes", getText("mediaFileView.bytes")),
> new KeyValueObject("mediaFileView.kb",
> getText("mediaFileView.kb")), new KeyValueObject(
> "mediaFileView.mb", getText("mediaFileView.mb")));
> SORT_OPTIONS = Arrays.asList(new KeyValueObject("name",
> getText("generic.name")), new KeyValueObject(
> "date_uploaded", getText("mediaFileView.date")),
> new KeyValueObject("type", getText("mediaFileView.type")));
> }
> {noformat}
> This makes Roller to use only one language in those messages. I think that
> this class must stop saving those texts in static variables, and get suitable
> messages for each request according to user's language.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)