[texworks] Shortcuts and accelerators

Alain Delmotte esperanto at swing.be
Fri Apr 16 17:28:42 CEST 2010


Hi!

Jonathan Kew a écrit :
> On 16 Apr 2010, at 15:26, Alain Delmotte wrote:
>
>   
>> Hi!
>>
>> Not much enthusiasm responding to my previous message!!!  :-(((
>>     
>
> Sorry, I was intending to comment on it, just didn't get to it yet.
>
>   
>> Any way, I did find a better way to do it, which preserve the ability to have other languages.
>> I did keep the source as it is, but, using lupdate (part of the linguist system for translations), I did create an English translation (TeXworks_en.ts file) in which I have started to implement the shortcuts/accelerators and, after releasing the .qm file and putting it in "/texworksresource/translation, when I select English in the preferences (I normally use System default [French]) I get the underlined letters in the menu!!!
>>     
>
> I wondered if that would be a sensible approach. If we add accelerators to the built-in menu items (etc) in the source, then presumably all the translations would need to be updated because this will affect the "source" strings, and so the existing translations won't match any more. This would also clutter the original strings that translators see, which might be confusing.
>   
Right!
I did add the accelerators to the built-in menu items for compilation 
(yesterday trial) and this was not satisfactory, so I took them off and 
compiled a normal TeXworks.
I added the accelerators in the English translation file .ts (today trial).

NB. It also works under Linux (Ubuntu).

NB. 2 When one changes in the preferences from, let say, French (system 
default) to English, one should not select the English just under 
French, but the one added at the end of the list (due to the .qm 
file??!!). So the accelerators are immediately active, if not you have 
to close and re-open TW.
>> I'll complete that for my French translation and, if asked, for English.
>>     
>
> Sounds good to me. 
>
> If I recall correctly, there may be a few dialog-control accelerators already in the source. What I think we should probably do is to *remove* these (which will require updates to the various .ts files, I realize), and let ALL accelerators be defined through the .ts files.
>   
Yes the accelerators are mainly in the Search and Replace dialog boxes. 
They could/should be taken off and replaced by the translation .ts/.qm 
files.
> (Note that I'm only referring to "accelerators" here - the possibly-underlined characters in menu items, button names, etc - not to the "shortcuts" that appear separately in menu items. I think those may as well stay in the main source files, although translators can of course customize them as part of localization.)
>   
Yes, sorry; shortcuts are another think, which could be defined in the 
source or in a shortcut.ini file (my preference).

Alain
> Thanks!
>
> JK
>
>   
>> Attached is the .qm file with, only for now, the underlined letters for the menu.
>> If someone wants to test and report!!
>>
>> Alain
>>
>> <TeXworks_en.qm>
>>     
>
>
>
>   




More information about the texworks mailing list