You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2016/04/30 13:23:12 UTC
[jira] [Comment Edited] (OFBIZ-7021) Rename .ftl file as per best
practises
[ https://issues.apache.org/jira/browse/OFBIZ-7021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265291#comment-15265291 ]
Jacques Le Roux edited comment on OFBIZ-7021 at 4/30/16 11:23 AM:
------------------------------------------------------------------
OK this is a tedious task!
I found the great http://renamewand.sourceforge.net and used it to rename FTL templates. I'm not sure I used the best method, but I got some result (see svn.st attached)
Here are the command I used
{code}
java -jar ~/tools/RenameWand22/RenameWand.jar -r "<a>.ftl" "<FN.spaceout.pascal>.ftl"
java -jar ~/tools/RenameWand22/RenameWand.jar -r "<a>.Ftl.ftl" "<a>.ftl"
java -jar ~/tools/RenameWand22/RenameWand.jar -r "<a>.Fo.ftl" "<a>.fo.ftl"
{code}
But this only capitalizes (put the 1st letter to uppercase). Because if we have a filename like minilastproductsearches.ftl we have no ways to automate the process :/
There are a lot of files like that and most are under specialpurpose/ecommerce/template/ (147 templates at all) where it's a real mess with underscore separators as well. So unfortunately apart doing it there by hand ...
Then comes the most tedious (and risky) part: renames files in code, where they are called...
I wonder now if this task is realistic...
was (Author: jacques.le.roux):
OK this is a tedious task!
I found the great http://renamewand.sourceforge.net and used it to rename FTL templates. I'm not sure I used the best method, but I got some result (see svn.ftl attached)
Here are the command I used
{code}
java -jar ~/tools/RenameWand22/RenameWand.jar -r "<a>.ftl" "<FN.spaceout.pascal>.ftl"
java -jar ~/tools/RenameWand22/RenameWand.jar -r "<a>.Ftl.ftl" "<a>.ftl"
java -jar ~/tools/RenameWand22/RenameWand.jar -r "<a>.Fo.ftl" "<a>.fo.ftl"
{code}
But this only capitalizes (put the 1st letter to uppercase). Because if we have a filename like minilastproductsearches.ftl we have no ways to automate the process :/
There are a lot of files like that and most are under specialpurpose/ecommerce/template/ (147 templates at all) where it's a real mess with underscore separators as well. So unfortunately apart doing it there by hand ...
Then comes the most tedious (and risky) part: renames files in code, where they are called...
I wonder now if this task is realistic...
> Rename .ftl file as per best practises
> --------------------------------------
>
> Key: OFBIZ-7021
> URL: https://issues.apache.org/jira/browse/OFBIZ-7021
> Project: OFBiz
> Issue Type: Sub-task
> Components: ALL APPLICATIONS
> Affects Versions: Trunk
> Reporter: Deepak Dixit
> Assignee: Jacques Le Roux
> Attachments: LowecaseFtlFileNames.txt, svn.st
>
>
> Rename all the ftl file name into upper camel case pattern.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)