Start a new topic

REQ Case conversion features

I'd like to request some additional features for the Target segment pane and the Add new term/fragment dialogue box:

  • Convert first letter after a tag to uppercase
  • Convert first letter after an opening quote to uppercase
  • Convert whole segment to lowercase, make the first letter uppercase -- with one keyboard shortcut or mouse button (without having to toggling thru the complete Ctrl+= toggling sequence).
  • Convert the first letter of every word to uppercase.

3 people like this idea

related AutoHotkey script:


;-----------------------------------------------------------***

 

; convert src and trgt selections to lowercase and add to glossary via Quick add shortcut (bypassing New term dialogue) 

; Make sure that: Edit > Edit source segents is SWITCHED OFF, as this script changes the case of the source text (and target text).

 

+!g:: ; Trigger with: Alt+Shift+g

 

Send, ^= ;Press "Ctrl+Equals" twice to change case to all lowercase

Sleep, 50

Send, ^=

Sleep, 50

 

Send, {Tab} ; Tab to move to other side

Sleep, 50

 

Send, ^= ;Press "Ctrl+Equals" twice to change case to all lowercase

Sleep, 50

Send, ^=

Sleep, 50

 

Send, {Tab} ; Tab to move to other side

Sleep, 50

 

Send, !g ; Quick add (resulting lowercase term pair) to glossary without dialogue

Return


Hmm, There must be a better way to automatically convert everything to lowercase before sending it to your glossary. Hans?

I suggest that you get in touch with some pros for AHK in order to set up a kind of framework for manipulating strings and exchanging them with CafeTran (for you and the rest of the Windows fraction of the CafeTran community). I only have this for Mac. You'll need basic techniques like: set variable to clipboard content and vice verse, activate CafeTran (which isn't straightforward on Mac, since CafeTran is a Java app), write variables to a UTF8 file. Once you have these bricks, we can start building. I'm happy to advise then.

Lenting: You'll need basic techniques like: set variable to clipboard content and vice verse, activate CafeTran (which isn't straightforward on Mac, since CafeTran is a Java app), write variables to a UTF8 file. Once you have these bricks, we can start building.


The usual hilarious pseudo-connoisseurial humbug. On a Mac, you only need Automator and a few prefab Services for all of the above. Activating CafeTran on a Mac is as easy as "tell" to activate or set frontmost (AppleScript), or launching (Automator) it. Just like any app, nothing to do with Java.


H.

I think that it's clear that we disagree on this too, Hans van den Broek ...


"hilarious pseudo-connoisseurial humbug" very eloquent, this wording. Respect for that!

Lenting: I think that it's clear that we disagree on this too


It's not very smart to disagree with facts.


H.


1 person likes this

Thanks Hans (L),


I pretty much know how to do all that stuff in AHK. I'll have a go when I have a moment to spare and report back here (for the benefit of the other Winheads like myself).

Okay, here's for inspiration:


image

image

image

image

Please send my warmest regards to Mr. Hans van den Broek, Indonesia.

Login to post a comment