[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Accelerator key problem in translation

From: Stanislav Petrakov <stannic_at_gmail.com>
Date: 2007-09-14 23:20:46 CEST

Hi devs,

2007/9/14, Stefan Küng <tortoisesvn@gmail.com>:

> >> The problem is that ResText simply extracts the resource strings, it
> >> doesn't "sort" them. And as we saw before: translators don't really
> >> like to have the grouped together. They always complain if we have two
> >> strings which are almost the same but not exactly the same.
> > Can you send me more info about ResText - I'm still thinking about
> > implementing ngettext similar result. We talk about this some time ago ...
>
> ResText is in the TSVN source tree. It's a tool I wrote some time ago to
> extract po files from exe and dll files and apply translated po files
> back to those files.
> ResText itself isn't really complicated. You shouldn't have much
> problems understanding the code. The only real problem was to find out
> how the resources are handled, because that's nowhere officially documented.
> The only thing I found was this:
> http://www.csn.ul.ie/~caolan/publink/winresdump/winresdump/doc/resfmt.txt
> and that's what I used to implement ResText.

I doubt what ResText can extract much extra data from .DLLs, as
context menus generated dynamically and most of the menu items are
located in string tables - there is no grouping info what we're
searching for.

Possible ways I see now are:
1) parse source files for strings
        temp.LoadString(ID_of_menuitem_string);
        popup.AppendMenu(..., ..., temp);
and try to reconstruct possible context menus

2) persuade Stefan to change an approach and generate menus from some
parseable data structure(s) instead of generating it by set of
statements :) (or do it personally and send patch in :)

> One problem: if in the default (English) language are two identical
> strings (e.g. &Copy), you will only see one such string in the po file.
> But in another language, you might want to set the accelerator for one
> of those strings differently than for the other, because they are used
> in different menus/dialogs/...
> How would you handle this situation? The only real solution to that
> would be to not pack identical strings together ...
There is no way to distinguish _identical_ strings only by themselves
:); at least, we need some more info: is it used in menu, label,
window title, etc. I suspect gettext utils don't cope well with
duplicates :), so the only way distinguish different use cases of same
strings is to make _strings_ different, e.g. by appending some
descriptive not-translatable prefix. We can get this info mostly from
.rc (and some source) files. I'll have a look at restext too...

> ... - much more work for the translators.
There is Translation Memory in poEdit :)

Regards,
Stan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Sep 14 23:17:15 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.