That is the question!
We have a bunch of shell paths to translate in shell32.rc. However, based on my French Windows VMs and computers I believe a number of them should not be translated:
* As far as I can tell 'Program Files' is never translated. * Same thing for 'SendTo' and 'Recent'. * 'Application Data' appears to be translated in NT4 but not on Windows 2000 and greater.
Generally speaking translating a path causes all sorts of trouble with broken applications. For instance one regularly ends up with a 'Common Files' folder as well as the French 'Fichiers Communs' one, even on a clean Windows install!
Looking at Windows 2000 and greater it seems that Microsoft first decided to only translate the folders most visible to the user. That would explain why 'Application Data', 'Local Settings' and their ilk are not translated.
But the very latest fashion (e.g. Windows 7), appears to be to never translate the actual on-disk folder name and use 'desktop.ini' files to get a localized name in the GUI. So for instance on Windows 7 the 'Program Files' folder is called that way on disk but it appears as 'Programmes' in Windows Explorer because of the desktop.ini file (as an anecdote 'Program Files (x86)' has no 'desktop.ini' file and thus is not translated in Explorer. What a mess!).
So what do we want to do?
The patch below marks the paths that are not meant to be translated as such to reduce the translators burden and avoid mistakes. Some paths mix parts that need to be translated with other that shouldn't. Given the CSIDL_Data structure I'm not sure that can be avoided but I'll be happy with any patch that avoids that. In the meantime I use the message context to give instructions to the translator.
Does this make sense? Any better solution?
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc index 92d9d72..3aaa0f2 100644 --- a/dlls/shell32/shell32.rc +++ b/dlls/shell32/shell32.rc @@ -200,31 +200,31 @@ the folder?" IDS_PERSONAL "My Documents" IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\Programs\StartUp" - IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_RECENT "#msgctxt#do not translate#Recent" + IDS_SENDTO "#msgctxt#do not translate#SendTo" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" IDS_DESKTOPDIRECTORY "#msgctxt#directory#Desktop" IDS_NETHOOD "NetHood" IDS_TEMPLATES "Templates" - IDS_APPDATA "Application Data" + IDS_APPDATA "#msgctxt#do not translate#Application Data" IDS_PRINTHOOD "PrintHood" - IDS_LOCAL_APPDATA "Local Settings\Application Data" - IDS_INTERNET_CACHE "Local Settings\Temporary Internet Files" - IDS_COOKIES "Cookies" - IDS_HISTORY "Local Settings\History" - IDS_PROGRAM_FILES "Program Files" - IDS_PROGRAM_FILESX86 "Program Files (x86)" + IDS_LOCAL_APPDATA "#msgctxt#do not translate#Local Settings\Application Data" + IDS_INTERNET_CACHE "#msgctxt#do not translate#Local Settings\Temporary Internet Files" + IDS_COOKIES "#msgctxt#do not translate#Cookies" + IDS_HISTORY "#msgctxt#do not translate 'Local Settings'#Local Settings\History" + IDS_PROGRAM_FILES "#msgctxt#do not translate#Program Files" + IDS_PROGRAM_FILESX86 "#msgctxt#do not translate#Program Files (x86)" IDS_MYPICTURES "My Pictures" - IDS_PROGRAM_FILES_COMMON "Program Files\Common Files" - IDS_PROGRAM_FILES_COMMONX86 "Program Files (x86)\Common Files" + IDS_PROGRAM_FILES_COMMON "#msgctxt#do not translate 'Program Files'#Program Files\Common Files" + IDS_PROGRAM_FILES_COMMONX86 "#msgctxt#do not translate 'Program Files (x86)'#Program Files (x86)\Common Files" IDS_COMMON_DOCUMENTS "Documents" IDS_ADMINTOOLS "Start Menu\Programs\Administrative Tools" IDS_COMMON_MUSIC "Music" IDS_COMMON_PICTURES "Pictures" IDS_COMMON_VIDEO "Videos" - IDS_CDBURN_AREA "Local Settings\Application Data\Microsoft\CD Burning" + IDS_CDBURN_AREA "#msgctxt#do not translate#Local Settings\Application Data\Microsoft\CD Burning" IDS_CONTACTS "Contacts" IDS_LINKS "Links" IDS_PHOTO_ALBUMS "Pictures\Slide Shows"
We could translate the path and setup an English symlink automatically if possible?
J. Leclanche
On Tue, Jan 17, 2012 at 10:36 AM, Francois Gouget fgouget@free.fr wrote:
That is the question!
We have a bunch of shell paths to translate in shell32.rc. However, based on my French Windows VMs and computers I believe a number of them should not be translated:
- As far as I can tell 'Program Files' is never translated.
- Same thing for 'SendTo' and 'Recent'.
- 'Application Data' appears to be translated in NT4 but not on Windows
2000 and greater.
Generally speaking translating a path causes all sorts of trouble with broken applications. For instance one regularly ends up with a 'Common Files' folder as well as the French 'Fichiers Communs' one, even on a clean Windows install!
Looking at Windows 2000 and greater it seems that Microsoft first decided to only translate the folders most visible to the user. That would explain why 'Application Data', 'Local Settings' and their ilk are not translated.
But the very latest fashion (e.g. Windows 7), appears to be to never translate the actual on-disk folder name and use 'desktop.ini' files to get a localized name in the GUI. So for instance on Windows 7 the 'Program Files' folder is called that way on disk but it appears as 'Programmes' in Windows Explorer because of the desktop.ini file (as an anecdote 'Program Files (x86)' has no 'desktop.ini' file and thus is not translated in Explorer. What a mess!).
So what do we want to do?
The patch below marks the paths that are not meant to be translated as such to reduce the translators burden and avoid mistakes. Some paths mix parts that need to be translated with other that shouldn't. Given the CSIDL_Data structure I'm not sure that can be avoided but I'll be happy with any patch that avoids that. In the meantime I use the message context to give instructions to the translator.
Does this make sense? Any better solution?
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc index 92d9d72..3aaa0f2 100644 --- a/dlls/shell32/shell32.rc +++ b/dlls/shell32/shell32.rc @@ -200,31 +200,31 @@ the folder?" IDS_PERSONAL "My Documents" IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\Programs\StartUp"
IDS_RECENT "Recent"
IDS_SENDTO "SendTo"
IDS_RECENT "#msgctxt#do not translate#Recent"
IDS_SENDTO "#msgctxt#do not translate#SendTo" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" IDS_DESKTOPDIRECTORY "#msgctxt#directory#Desktop" IDS_NETHOOD "NetHood" IDS_TEMPLATES "Templates"
IDS_APPDATA "Application Data"
IDS_APPDATA "#msgctxt#do not translate#Application
Data" IDS_PRINTHOOD "PrintHood"
IDS_LOCAL_APPDATA "Local Settings\\Application Data"
IDS_INTERNET_CACHE "Local Settings\\Temporary Internet
Files"
IDS_COOKIES "Cookies"
IDS_HISTORY "Local Settings\\History"
IDS_PROGRAM_FILES "Program Files"
IDS_PROGRAM_FILESX86 "Program Files (x86)"
IDS_LOCAL_APPDATA "#msgctxt#do not translate#Local
Settings\Application Data"
IDS_INTERNET_CACHE "#msgctxt#do not translate#Local
Settings\Temporary Internet Files"
IDS_COOKIES "#msgctxt#do not translate#Cookies"
IDS_HISTORY "#msgctxt#do not translate 'Local
Settings'#Local Settings\History"
IDS_PROGRAM_FILES "#msgctxt#do not translate#Program
Files"
IDS_PROGRAM_FILESX86 "#msgctxt#do not translate#Program
Files (x86)" IDS_MYPICTURES "My Pictures"
IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files"
IDS_PROGRAM_FILES_COMMONX86 "Program Files (x86)\\Common Files"
IDS_PROGRAM_FILES_COMMON "#msgctxt#do not translate 'Program
Files'#Program Files\Common Files"
IDS_PROGRAM_FILES_COMMONX86 "#msgctxt#do not translate 'Program
Files (x86)'#Program Files (x86)\Common Files" IDS_COMMON_DOCUMENTS "Documents" IDS_ADMINTOOLS "Start Menu\Programs\Administrative Tools" IDS_COMMON_MUSIC "Music" IDS_COMMON_PICTURES "Pictures" IDS_COMMON_VIDEO "Videos"
IDS_CDBURN_AREA "Local Settings\\Application
Data\Microsoft\CD Burning"
IDS_CDBURN_AREA "#msgctxt#do not translate#Local
Settings\Application Data\Microsoft\CD Burning" IDS_CONTACTS "Contacts" IDS_LINKS "Links" IDS_PHOTO_ALBUMS "Pictures\Slide Shows" -- 1.7.7.3
Or you could do the other way around. More programs expect the English path name than translated ones. Honestly, translating path names is a recipe for disaster. On Jan 17, 2012 8:25 AM, "Jerome Leclanche" adys.wh@gmail.com wrote:
We could translate the path and setup an English symlink automatically if possible?
J. Leclanche
On Tue, Jan 17, 2012 at 10:36 AM, Francois Gouget fgouget@free.fr wrote:
That is the question!
We have a bunch of shell paths to translate in shell32.rc. However, based on my French Windows VMs and computers I believe a number of them should not be translated:
- As far as I can tell 'Program Files' is never translated.
- Same thing for 'SendTo' and 'Recent'.
- 'Application Data' appears to be translated in NT4 but not on Windows
2000 and greater.
Generally speaking translating a path causes all sorts of trouble with broken applications. For instance one regularly ends up with a 'Common Files' folder as well as the French 'Fichiers Communs' one, even on a clean Windows install!
Looking at Windows 2000 and greater it seems that Microsoft first decided to only translate the folders most visible to the user. That would explain why 'Application Data', 'Local Settings' and their ilk are not translated.
But the very latest fashion (e.g. Windows 7), appears to be to never translate the actual on-disk folder name and use 'desktop.ini' files to get a localized name in the GUI. So for instance on Windows 7 the 'Program Files' folder is called that way on disk but it appears as 'Programmes' in Windows Explorer because of the desktop.ini file (as an anecdote 'Program Files (x86)' has no 'desktop.ini' file and thus is not translated in Explorer. What a mess!).
So what do we want to do?
The patch below marks the paths that are not meant to be translated as such to reduce the translators burden and avoid mistakes. Some paths mix parts that need to be translated with other that shouldn't. Given the CSIDL_Data structure I'm not sure that can be avoided but I'll be happy with any patch that avoids that. In the meantime I use the message context to give instructions to the translator.
Does this make sense? Any better solution?
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc index 92d9d72..3aaa0f2 100644 --- a/dlls/shell32/shell32.rc +++ b/dlls/shell32/shell32.rc @@ -200,31 +200,31 @@ the folder?" IDS_PERSONAL "My Documents" IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\Programs\StartUp"
IDS_RECENT "Recent"
IDS_SENDTO "SendTo"
IDS_RECENT "#msgctxt#do not translate#Recent"
IDS_SENDTO "#msgctxt#do not translate#SendTo" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" IDS_DESKTOPDIRECTORY "#msgctxt#directory#Desktop" IDS_NETHOOD "NetHood" IDS_TEMPLATES "Templates"
IDS_APPDATA "Application Data"
IDS_APPDATA "#msgctxt#do not
translate#Application Data" IDS_PRINTHOOD "PrintHood"
IDS_LOCAL_APPDATA "Local Settings\\Application Data"
IDS_INTERNET_CACHE "Local Settings\\Temporary Internet
Files"
IDS_COOKIES "Cookies"
IDS_HISTORY "Local Settings\\History"
IDS_PROGRAM_FILES "Program Files"
IDS_PROGRAM_FILESX86 "Program Files (x86)"
IDS_LOCAL_APPDATA "#msgctxt#do not translate#Local
Settings\Application Data"
IDS_INTERNET_CACHE "#msgctxt#do not translate#Local
Settings\Temporary Internet Files"
IDS_COOKIES "#msgctxt#do not translate#Cookies"
IDS_HISTORY "#msgctxt#do not translate 'Local
Settings'#Local Settings\History"
IDS_PROGRAM_FILES "#msgctxt#do not translate#Program
Files"
IDS_PROGRAM_FILESX86 "#msgctxt#do not translate#Program
Files (x86)" IDS_MYPICTURES "My Pictures"
IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files"
IDS_PROGRAM_FILES_COMMONX86 "Program Files (x86)\\Common Files"
IDS_PROGRAM_FILES_COMMON "#msgctxt#do not translate 'Program
Files'#Program Files\Common Files"
IDS_PROGRAM_FILES_COMMONX86 "#msgctxt#do not translate 'Program
Files (x86)'#Program Files (x86)\Common Files" IDS_COMMON_DOCUMENTS "Documents" IDS_ADMINTOOLS "Start Menu\Programs\Administrative Tools" IDS_COMMON_MUSIC "Music" IDS_COMMON_PICTURES "Pictures" IDS_COMMON_VIDEO "Videos"
IDS_CDBURN_AREA "Local Settings\\Application
Data\Microsoft\CD Burning"
IDS_CDBURN_AREA "#msgctxt#do not translate#Local
Settings\Application Data\Microsoft\CD Burning" IDS_CONTACTS "Contacts" IDS_LINKS "Links" IDS_PHOTO_ALBUMS "Pictures\Slide Shows" -- 1.7.7.3
On Tue, 17 Jan 2012, Jerome Leclanche wrote:
We could translate the path and setup an English symlink automatically if possible?
I don't think that's a good option. I think our two options are:
1) Translate the folder names that need to be translated using the resource files. 2) Or don't translate the folder names at all and use desktop.ini files so they appear to be localized in the GUI (which may require further development in various parts).
(2) is really the way things are going these days, I belive even Gnome is doing it that way. So inventing our own solution really does not sound like a good idea to me (plus it has a lot of issues with duplicate names and when you change the locale).
I think it's reasonable to do (2) even without adding support for desktop.ini files right now. And really here I'm just interested in what to do with these resource strings.
Francois Gouget fgouget@free.fr writes:
I think it's reasonable to do (2) even without adding support for desktop.ini files right now. And really here I'm just interested in what to do with these resource strings.
Doing (2) should be fine. Then the strings don't need to be in resources at all, they can be constants in the code.
On Tue, 17 Jan 2012, Alexandre Julliard wrote:
Francois Gouget fgouget@free.fr writes:
I think it's reasonable to do (2) even without adding support for desktop.ini files right now. And really here I'm just interested in what to do with these resource strings.
Doing (2) should be fine. Then the strings don't need to be in resources at all, they can be constants in the code.
Do you mean it just for the paths I identified as not being translated usually ('Program Files' for instance) or all of them (e.g. 'My Pictures')? I guess ultimately with the desktop.ini approach we can do that for all of them, I'm just unsure about whether now's the right time.