necrox Posted February 28, 2011 Report Share Posted February 28, 2011 Following issue: <Name>Mozilla Thunderbird en_US Setup</Name> <TargetPath>{downloads}\{category}\{appname:trimend: en_US Setup}\{appname:replace: :_}_v{version}.{url:ext} {appname:trimend: en_US Setup} results in Mozilla Thunderbird <Name>Mozilla Thunderbird de_DE Setup</Name> <TargetPath>{downloads}\{category}\{appname:trimend: de_DE Setup}\{appname:replace: :_}_v{version}.{url:ext} {appname:trimend: de_DE Setup} results in Mozilla Thunderbir <- missing "d" I guess the problem is the double D. I have 3 applications ending with d followed by the addition which also starts with d. It is always the same. Trimend doesn't work properly. Link to comment Share on other sites More sharing options...
Omniferum Posted March 1, 2011 Report Share Posted March 1, 2011 Just as an alternative you may prefer to use curved brackets in your app name. So like Mozilla Thunderbird (en_US Setup) and then use {appname:regexreplace: \(.*\):} It's what I do for extra notes regarding the app, like if it is 32 or 64-bit, portable, english etc. Also you may just want to use {appname:replace: de_DE Setup:} Seeing as you are defining the entire string you want removed another command may work just as well. Link to comment Share on other sites More sharing options...
necrox Posted March 1, 2011 Author Report Share Posted March 1, 2011 I think the second solution is the best one. Thank You! Nevertheless the trimend-double-D problem is a bug... @floele: How about a second appname field for comments like language, installer type (portable/setup) which can be used for the listing and for the online database? Maybe with a checkbox to use it/or not in conjunction with the first appname field? Link to comment Share on other sites More sharing options...
Omniferum Posted March 1, 2011 Report Share Posted March 1, 2011 I've never really used trim or trimend but looking at the wiki the trim command seems to be only for characters, not whole words. Because they end in d, removes the d as it is at the 'end' of the string. I'm sure if you did {appname:replace: rde_DE Setup:} you would get Mozilla Thunderbi Still I think my second suggestion is closer to what you actually want anyway. However if you use my first all you'd need to do is place important program notes in curved brackets and you wouldn't have to specify {appname:replace: ilikemilk:} for every single app and just use {appname:regexreplace: \(.*\):} Link to comment Share on other sites More sharing options...
floele Posted March 5, 2011 Report Share Posted March 5, 2011 trim only accepts a list of characters, not words. If it includes "de_DE", it will remove all d, e, and _ from the end. Link to comment Share on other sites More sharing options...
necrox Posted March 7, 2011 Author Report Share Posted March 7, 2011 I see! Thank you for the explanation. Actually Omniferum solved my problem. The use of curved brackets in my app names is much more flexible. Many thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now