[
https://issues.apache.org/jira/browse/OFBIZ-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17577867#comment-17577867
]
ASF subversion and git services commented on OFBIZ-12660:
---------------------------------------------------------
Commit c85550e3062435752a79d6e1f653b830d51cab96 in ofbiz-framework's branch
refs/heads/trunk from Florian Motteau
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=c85550e306 ]
Fixed: Wrong Less file path for some theme/locale combinations (OFBIZ-12660)
(#521)
For some themes, we rely on toLowerCase method to build a Less file path.
toLowerCase("I") = "ı" for some locales (TR, AZ), which lead to incorrect
file paths and finally broken themes.
> Wrong Less file URL when locale is tr-TR
> ----------------------------------------
>
> Key: OFBIZ-12660
> URL: https://issues.apache.org/jira/browse/OFBIZ-12660
> Project: OFBiz
> Issue Type: Bug
> Components: themes
> Affects Versions: 18.12.06, 22.01.01, Upcoming Branch
> Reporter: Florian Motteau
> Assignee: Jacques Le Roux
> Priority: Major
> Attachments: OFBIZ-12660.patch, image-2022-07-19-17-21-33-183.png,
> of-12660.mp4, turkish-dotless-i-bug.mp4
>
>
> h3. If
> * current locale is tr-TR (and most certainly az-AZ, maybe others, where
> [dotless i|https://en.wikipedia.org/wiki/Dotless_I] exists),
> * the theme name contains a "i" (`RAINBOWSTONE-SAPHIR` for example),
> * the theme uses this line in /template/includes/Header.ftl to generate a
> link to a Less file (rainbowstone, helveticus, maybe others) :
> {code:java}
> <link rel="stylesheet/less"
> href="<@ofbizContentUrl>/helveticus/${visualTheme.visualThemeId?replace("_","-")?lower_case}.less</@ofbizContentUrl>"
> type="text/css"/>{code}
> h3. Then
> * the Freemarker `lower_case` function generates dotless i's when
> lowercasing "I",
> * the link to the Less ends up with a 404
> * no more styles :/
> See [^turkish-dotless-i-bug.mp4]
> h3. Leads to fix this
> * Find a way to override the current locale for `lower_case` calls (and
> always use en-EN)
> * Do not rely on a locale sensitive function to generate links to style files
> * Ban "i" from visual theme names :)
> * more ideas ?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)