Autocapitalize first letter of segment
Thread poster: Spiros Doikas
Spiros Doikas
Spiros Doikas  Identity Verified
Local time: 08:33
Member (2002)
English to Greek
+ ...
Mar 13

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?

 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
ChatGPT Mar 13

^+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
Spiros Doikas  Identity Verified
Local time: 08:33
Member (2002)
English to Greek
+ ...
TOPIC STARTER
autohotkey Mar 13

I have also posted at the autohotkey forum
https://www.autohotkey.com/boards/viewtopic.php?f=82&t=127272&p=562919#p562919

Would be better if the script was more intuitive, ie simply enter space and have the first letter of the first word capitalized.


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
Not tested Mar 13

Spiros Doikas wrote:

I have also posted at the autohotkey forum
https://www.autohotkey.com/boards/viewtopic.php?f=82&t=127272&p=562919#p562919

Would be better if the script was more intuitive, ie simply enter space and have the first letter of the first word capitalized.


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
Stepan Konev  Identity Verified
Russian Federation
Local time: 08:33
English to Russian
AHK script to batch replace the first lowercase letter with uppercase one Mar 13

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
Stepan Konev  Identity Verified
Russian Federation
Local time: 08:33
English to Russian
There must be tabs in between each pair of letters Mar 13

*There must be tabs in between each pair of letters. Proz has changed tabs to spaces.

 
Spiros Doikas
Spiros Doikas  Identity Verified
Local time: 08:33
Member (2002)
English to Greek
+ ...
TOPIC STARTER
Vote for it Mar 19

Following my support request, they published it as a feature request. Feel free to upvote it
https://support.phrase.com/hc/en-us/community/posts/13154279110940-Add-option-to-auto-capitalize-first-letter-of-a-segment


 


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






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »