[texworks] Localization of 'configuration/smart-quotes-modes.txt' (Was: Issues with translation)

Vladimir Lomov lomov.vl at gmail.com
Mon Aug 31 08:44:11 CEST 2009

2009/8/11 Jonathan Kew <jfkthame at googlemail.com>:
> On 11 Aug 2009, at 05:01, Vladimir wrote:
>> Hi.
>> I found some oddities with TeXworks while translating its interface.
>> First, if I do Format -> Auto-indent Mode -> (List) I see list of possible
>> variants: Whitespace only, ... but seems that the only source for these
>> strings is in the file
>> 'res/resfiles/configuration/auto-indent-patters.txt'
>> (the file is used in 'src/CompletingEdit.cpp').
>> Although it is not a problem to translate this file it is quite
>> inconvenient
>> to translate file which is unique for all languages.

> Yes, there's not currently a good mechanism to localize these strings; they
> can't go in the main .qm files because they're intended to be modifiable by
> the end user, not only by the original packager/translator/distributor.
How about add subdirectory to 'configuration', like 'configuration/ru'?
Suppose someone need to customize (and actually we need, in Russia we
use other type of quotes like ones in German and French languages)
'smart-quotes-modes.txt' then user/translator/distributor put
localized strings to
TeXworks will read this file if it exists, otherwise TeXworks will
read 'configuration/smart-quotes-modes.txt'.

The first disadvantage I see is that things became a bit complicated
(mean: error prone).

> I'm aware that we need a solution for this, but have not decided what I
> think is the best approach.
If this is not a secret, what solutions you consider?

Also is it possible to make something like tool-tip for smart quotes mode?
Now user either have to read (must!) manual to know what each mode do
or have to try all three modes and choose appropriate.

>> Secondly, these issues may be related with my Qt installation but I have
>> checked them on my laptop (Ubuntu, Qt 4.5.2) and my home Desktop (Slamd64,
>> Qt
>> 4.5.1) but:
>> In dialog "TeXworks Preferences" button "Restore Defaults" is not
>> translated
>> and I could not find this string in 'trans/TeXworks_ru.ts' (generated by
>> lupdate). The same with "Discard" button in a dialog appeared if someone
>> tries
>> to close TeXworks with unsaved changes in a file.

> Right; these are standard Qt buttons, and so their translations are supposed
> to come from the qt_XX.qm files rather than TeXworks_XX.qm, just like the
> "Cancel" button, for example.

> In testing here, I see that some languages seem to provide a translation for
> this, and others don't; presumably this simply means the string has been
> left untranslated in the qt_XX file. Perhaps it would be worth reporting
> this to the Qt project, with a suggested translation they could add.
Translation files could be fetched from http://qt.gitorious.org/, IMO
full translation will be in next Qt release.

WBR, Vladimir Lomov

More information about the texworks mailing list