MRT: LowercaseStrings not working for last word in file name

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
diopter
Junior Member
Junior Member
Posts: 31
Joined: 2017-02-02, 06:42 UTC
Location: Germany

MRT: LowercaseStrings not working for last word in file name

Post by *diopter »

LowercaseStrings=Deutsch:der,die,das,er,sie,es,wir,ihr,ihre,ein,bei,von,für,in,an,auf,unter,und,oder,als,ob,so,also,aber,nicht
File name: "von LiesMich oder nicht er test sie es von an.txt"

MRT-Result: "Von Liesmich oder nicht er Test sie es von An.txt"
Should be:  "Von Liesmich oder nicht er Test sie es von an.txt"
User avatar
white
Power Member
Power Member
Posts: 4595
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: MRT: LowercaseStrings not working for last word in file name

Post by *white »

diopter wrote: 2022-05-12, 05:24 UTC LowercaseStrings=Deutsch:der,die,das,er,sie,es,wir,ihr,ihre,ein,bei,von,für,in,an,auf,unter,und,oder,als,ob,so,also,aber,nicht
File name: "von LiesMich oder nicht er test sie es von an.txt"

MRT-Result: "Von Liesmich oder nicht er Test sie es von An.txt"
Should be:  "Von Liesmich oder nicht er Test sie es von an.txt"
Help says it is meant for "First of each word uppercase (English in Titles)".
In English titles, capitalizing the first and the last word is the rule.

See: https://capitalizemytitle.com/#capitalizationrules
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: MRT: LowercaseStrings not working for last word in file name

Post by *Stefan2 »

History.txt

"First of each word uppercase"- added a new setting for this older option:
13.05.18 Added: wincmd.ini [Configuration]
LowercaseStrings=English:a,an,the,at,by,for,in,of,on,to,from,up,and,as,but,or,nor,yet,so,vs
set title and excepted words for "First of each word uppercase" (32/64)

"First of each word uppercase (English in Titles)" new option in MRT
13.05.18 Added: Multi-rename tool: New upper/lowercase option "First of each word uppercase (English in Titles)"
which doesn't uppercase words like "a", "an", "the" etc., except at the start or end (32/64)




 
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *ghisler(Author) »

Total Commander uses the English capitalization rules, as described for example in Wikipedia:
https://en.wikipedia.org/wiki/Title_case
The rules of title case are not universally standardized. The standardization is only at the level of house styles and individual style guides. Most English style guides agree that the first and last words should always be capitalized, whereas articles, short prepositions, and some conjunctions should not be.
Author of Total Commander
https://www.ghisler.com
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *nsp »

ghisler(Author) wrote: 2022-05-12, 08:40 UTC Total Commander uses the English capitalization rules, as described for example in Wikipedia:
https://en.wikipedia.org/wiki/Title_case
The rules of title case are not universally standardized. The standardization is only at the level of house styles and individual style guides. Most English style guides agree that the first and last words should always be capitalized, whereas articles, short prepositions, and some conjunctions should not be.
That means that if you capitalize for Dutch or German... you lowercase English terms and we are not able to define lowercase exceptions for different target languages.
@ghisler does an ini parameter allows to override lowercase exceptions ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *ghisler(Author) »

There isn't, but I could add one. Do you only need this for the last word, or also for the first?
Author of Total Commander
https://www.ghisler.com
diopter
Junior Member
Junior Member
Posts: 31
Joined: 2017-02-02, 06:42 UTC
Location: Germany

Re: MRT: LowercaseStrings not working for last word in file name

Post by *diopter »

For me (German), a setting for the last word would be enough, as you probably know...
Please add it to the next beta.
Thanks.
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *nsp »

Only the last is needed for European schemes, do not know for others...
You could probably just add a marker like ! as last char of the language name indicating that last word do not override lowercase rules:

Code: Select all

LowercaseStrings=Deutsch!:der,die,das,er,sie,es,wir,ihr,ihre,ein,bei,von,für,in,an,auf,unter,und,oder,als,ob,so,also,aber,nicht
Do you also allows multiple languages ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *ghisler(Author) »

You could probably just add a marker like !
That's a great idea!
Do you also allows multiple languages ?
No, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *ghisler(Author) »

This was changed in Beta 6, please test it!

Just use

Code: Select all

LowercaseStrings=Deutsch!:der,die,das,er,sie,es,wir,ihr,ihre,ein,bei,von,für,in,an,auf,unter,und,oder,als,ob,so,also,aber,nicht
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *petermad »

2ghisler(Author)
It would be nice it it also worked when using no description -> using string 1397 from the language file instead.

So something like

Code: Select all

LowercaseStrings=!:der,die,das,er,sie,es,wir,ihr,ihre,ein,bei,von,für,in,an,auf,unter,und,oder,als,ob,so,also,aber,nicht
or

Code: Select all

LowercaseStrings=!der,die,das,er,sie,es,wir,ihr,ihre,ein,bei,von,für,in,an,auf,unter,und,oder,als,ob,so,also,aber,nicht
should also work.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: MRT: LowercaseStrings not working for last word in file name

Post by *ghisler(Author) »

Sorry, this isn't planned. Moved to "Will not be changed".
Author of Total Commander
https://www.ghisler.com
Post Reply