Autocapitalize first letter of segment Thread poster: Spiros Doikas
| Spiros Doikas Local time: 06:14 Member (2002) English to Greek + ...
This is standard feature in most CAT tools I know, in Phrase, still sadly lacking. Does one know of any autohotkey script or any other way that would accomplish that? | | |
^+c::
Send, ^a
Send, ^c
ClipWait
StringUpper, firstLetter, clipboard, T
StringMid, restOfString, clipboard, 2
clipboard := firstLetter . restOfString
Send, ^v
return
```
This script still triggers with Ctrl+Shift+C. It selects all text, copies it to the clipboard, changes the first letter of the first word to uppercase, and then pastes the modified text.
Not tested!
[Edited at 2024-03-13 15:23 GMT] | | | Spiros Doikas Local time: 06:14 Member (2002) English to Greek + ... TOPIC STARTER |
Sure. But you can also link the suggested macro—if it works at all—to the command to navigate to the next segment. | |
|
|
Stepan Konev Russian Federation Local time: 07:14 English to Russian AHK script to batch replace the first lowercase letter with uppercase one | Mar 13, 2024 |
I would do it in two steps.
First, use a regex to filter segments starting with a lowercase only.
I use this one: ^[а-я] but it is for the Cyrillic alphabet.
You can use ^[a-z] or ^[a-ž] depending on your language.
Second step is to run the following script (provided that you replace all Cyrillic pairs of letters with your language letters) with Win+R:
#r::
InputBox,Var,Batch Replace List, How many times do you want to run the sequence? ... See more I would do it in two steps.
First, use a regex to filter segments starting with a lowercase only.
I use this one: ^[а-я] but it is for the Cyrillic alphabet.
You can use ^[a-z] or ^[a-ž] depending on your language.
Second step is to run the following script (provided that you replace all Cyrillic pairs of letters with your language letters) with Win+R:
#r::
InputBox,Var,Batch Replace List, How many times do you want to run the sequence?
loop, % Var
{ClipSaved := ClipboardAll
Clipboard =
SendInput, ^a^c
ClipWait, 30
FixString := Clipboard
vList := " ;continuation section
(
а А
б Б
в В
г Г
д Д
е Е
ё Ё
ж Ж
з З
и И
й Й
к К
л Л
м М
н Н
о О
п П
р Р
с С
т Т
у У
ф Ф
х Х
ц Ц
ч Ч
ш Ш
щ Щ
ъ Ъ
ы Ы
ь Ь
э Э
ю Ю
я Я
)"
Loop, Parse, vList, `n
{
oTemp := StrSplit(A_LoopField, "`t")
FindWhat := "^\Q" . oTemp.1 . "\E" ; Match the lowercase letter only at the start of a line
FixString := RegExReplace(FixString, FindWhat, oTemp.2)
}
oTemp := ""
Clipboard := FixString ; load the new string to clipboard
Sleep 200
Send ^v
Sleep 200
SendInput, {Down}
Sleep 200
}
Return
The downside of this method is that you need to know how many segments you have filtered out in step 1, which you can't know for sure with Phrase. Neither it shows the number of filtered segments, nor it has an option to move to the next segment with one keystroke. ▲ Collapse | | | Stepan Konev Russian Federation Local time: 07:14 English to Russian There must be tabs in between each pair of letters | Mar 13, 2024 |
*There must be tabs in between each pair of letters. Proz has changed tabs to spaces. | | | Spiros Doikas Local time: 06:14 Member (2002) English to Greek + ... TOPIC STARTER | There is no moderator assigned specifically to this forum. To report site rules violations or get help, please contact site staff » Autocapitalize first letter of segment Wordfast Pro | Translation Memory Software for Any Platform
Exclusive discount for ProZ.com users!
Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value
Buy now! » |
| CafeTran Espresso | You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |