Hi,
I'm one of Japanese translators of Wine. A few weeks ago, Wine's string resources were moved to one po format file. So I started translation about it. And now I face to a problem which is a same msgid text used in different contexts, like "Desktop" used in shell32.rc.
One of its contexts is a real path name of a desktop (IDS_DESKTOPDIRECTORY). That is "C:\Users\foo\Desktop"'s Desktop. In other contexts, it makes a localized name (IDS_DESKTOP). That is shown in a common dialog box. In the previous Japanese resource, the former was "Desktop" and the latter was localized. However, in the po file, they merged into one!
Therefore we need to distinguish above contexts somehow. But I'm afraid I don't familiar with gettext and wrc. Could someone please resolve this issue?
Akihiro Sagawa
On Thu, 20 Jan 2011, Akihiro Sagawa wrote: [...]
One of its contexts is a real path name of a desktop (IDS_DESKTOPDIRECTORY). That is "C:\Users\foo\Desktop"'s Desktop. In other contexts, it makes a localized name (IDS_DESKTOP). That is shown in a common dialog box. In the previous Japanese resource, the former was "Desktop" and the latter was localized. However, in the po file, they merged into one!
Context is going to be a problem one day but I'm not sure it is one in this case (hopefully it isn't).
I believe that in French the IDS_DESKTOPDIRECTORY is supposed to get translated. I'm not 100% this happens in Wine but on Windows I do get a path of the form 'c:\Documents and Settings\foo\Bureau' so in Wine I'd expect something like 'c:\users\foo\Bureau' too.
Does Windows do it differently for Japanese? Or is the problem that the translation differs because of the context?
On Thu, 20 Jan 2011, Francois Gouget wrote: (snipped)
I believe that in French the IDS_DESKTOPDIRECTORY is supposed to get translated. I'm not 100% this happens in Wine but on Windows I do get a path of the form 'c:\Documents and Settings\foo\Bureau' so in Wine I'd expect something like 'c:\users\foo\Bureau' too.
Does Windows do it differently for Japanese? Or is the problem that the translation differs because of the context?
Unfortunately, the answer is yes.
There are three styles in user profile directory name. 1.Windows NT 4 style, e.g. C:\Windows\Profile<name>. 2.Windows 2000 style, e.g. C:\Documents and Settings<name>. 3.Windows Vista style, e.g. C:\Users<name>.
In Japanese Windows, desktop directory name has following characteristics. 1.In Windows NT 4, localized with half-width katakana. 2.In Windows 2000, localized with full-width katakana. 3.In Windows Vista, no localization about directory name.
Japanese version of Windows XP is the second one. The desktop folder path is C:\Documents and Settings<user>\XXXXXX (where X is a Katakana characer). In this case, desktop directory name and its display name are same.
But Wine uses the third style (Vista style) as of the commit 853d9938 against shellpath.c. Hence I'd like to adapt a desktop directory name to user profile directory style, I kept IDS_DESKTOPDIRECTORY untranslated though I translated IDS_DESKTOP message.
So in French (or any other language), are there no differences between directory name and display name, especially in Vista?
Akihiro Sagawa
On Fri, 21 Jan 2011, Akihiro Sagawa wrote: [...]
In Japanese Windows, desktop directory name has following characteristics. 1.In Windows NT 4, localized with half-width katakana. 2.In Windows 2000, localized with full-width katakana. 3.In Windows Vista, no localization about directory name.
Japanese version of Windows XP is the second one. The desktop folder path is C:\Documents and Settings<user>\XXXXXX (where X is a Katakana characer). In this case, desktop directory name and its display name are same.
But Wine uses the third style (Vista style) as of the commit 853d9938 against shellpath.c.
Ah, sorry. I don't know about Vista and greater. So why does Wine do it the Vista way?
This has changed so much that it seems like we should be able to pick the scheme we prefer without breaking applications (or they would be broken on Windows already). Given that I'd personnaly pick the XP way (case 2).
So otherwise for context issues I believe the outcome of the WineConf discussion was that we'd insert a prefix in the two strings to translate, e.g. 'CTX-IDS_DESKTOP:Desktop' and 'CTX-IDS_DESKTOPDIRECTORY:Desktop', and have wrc remove it when producing the localized resource files (i.e. detect that the string to translate starts with 'CTX-' and remove everything until the colon). That means the English resource must be 'translated' too.
That's unless we figure out a more sophisticated mechanism but the problem was that the translation happens on the compiled resource so there's not much data to work with (i.e. special comments are out).
Francois Gouget fgouget@free.fr writes:
Ah, sorry. I don't know about Vista and greater. So why does Wine do it the Vista way?
This has changed so much that it seems like we should be able to pick the scheme we prefer without breaking applications (or they would be broken on Windows already). Given that I'd personnaly pick the XP way (case 2).
Using non-localized names for directories is probably better, in case the underlying filesystem doesn't support all character sets properly.
So otherwise for context issues I believe the outcome of the WineConf discussion was that we'd insert a prefix in the two strings to translate, e.g. 'CTX-IDS_DESKTOP:Desktop' and 'CTX-IDS_DESKTOPDIRECTORY:Desktop', and have wrc remove it when producing the localized resource files (i.e. detect that the string to translate starts with 'CTX-' and remove everything until the colon). That means the English resource must be 'translated' too.
The prefix is actually #msgctxt#, but yes that's how it works, it's already used in a couple of places.
Of course, if the directory is really supposed to be named Desktop in all languages then we might as well remove it from the .rc file.
On Thu, 20 Jan 2011, Alexandre Julliard wrote:
So otherwise for context issues I believe the outcome of the WineConf discussion was that we'd insert a prefix in the two strings to translate, e.g. 'CTX-IDS_DESKTOP:Desktop' and 'CTX-IDS_DESKTOPDIRECTORY:Desktop', and have wrc remove it when producing the localized resource files (i.e. detect that the string to translate starts with 'CTX-' and remove everything until the colon). That means the English resource must be 'translated' too.
The prefix is actually #msgctxt#, but yes that's how it works, it's already used in a couple of places.
Thank you for your advice. This is what I want to know.
I'll update the PO files with #msgctxt# to distinguish a desktop directory name from a displyed one. And continue tranlating ja.po file.
Akihiro Sagawa