[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [xliff] XLIFF and Windows Resources
Attached is the draft proposal for handling win32 resources in XLIFF.
Attachment:
Image4.gif
Description: GIF image
Attachment:
Image2.gif
Description: GIF image
Attachment:
Image3.gif
Description: GIF image
Attachment:
Image1.gif
Description: GIF image
Win32 Resources in XLIFFDraft
1.1. Menu Resources 1.2. Dialog Resource 1.3. String Resources 1.5. Message Resources
1. Win32 ResourcesWindows defines a number of resources used in the UI. These are authored in .rc files and compiled into the executable files of Windows, .exe and .dll files. This document describes how these resources are implemented in XLIFF.
<xliff version='1.0'> <file original='somefile.exe' source-language='en-US' datatype='Win32 Resource'>
<xliff version='1.0'> <file original='somefile.exe' source-language='en-US' datatype='Win32 Resource'> <header></header> <body> <group restype='type'> </group> </body> </file> </xliff>
1.1. Menu resources
<group restype='menu'> <group id='menu-id'> <trans-unit id='absolute retreival order' menu-option='menu-option' resname='name'> <source>caption</source> </trans-unit> <trans-unit id='absolute retreival order' menu-option='menu-option' resname='name'> <source>caption</source> </trans-unit> <group restype='popup-menu'> <trans-unit id='absolute retreival order' menu-option='menu-option' resname='name'> <source>caption</source> </trans-unit> </group> </group> </group>
Example: Novell Red Menu 7519The main menu of Novell Red will be used as an example. The following is the main menu as displayed by Microsoft DevStudio. In this example, the menu identifier is '7519'. This menu consists of a menu-bar with three menu-items: &File, &Tools, and &Help. The '&' indicates the accelerator key to use in accessing the menu-item, thus the underlined character. Each of the menu-bar menu-items is followed by a pop-up menu. These pop-up menus are grouped together following the menu-item that is their parent.
The resources of Novell Red's main menu are extracted in the following order. Example: Novell Red Menu ID 7519 Resources
Example: Novell Red Menu 7519 in XLIFF<group restype='menu'> <group id='7519'> <trans-unit id='1' resname='0' menu-option='16'> <source>&File</source> </trans-unit> <group restype='popup-menu'> <trans-unit id='2' resname='7528' menu-option='0'> <source>&Open...\tCtrl+O</source> </trans-unit> <trans-unit id='3' resname='7002' menu-option='0'> <source>-&Close\tCtrl+F4</source> </trans-unit> <trans-unit id='4' resname='7003' menu-option='0'> <source>&Save\tCtrl+S</source> </trans-unit> <trans-unit id='5' resname='0' menu-option='0' translate='no'> <source></source> </trans-unit> <trans-unit id='6' resname='7004' menu-option='0'> <source>&Login to NILE... </source> </trans-unit> <trans-unit id='7' resname='65535' menu-option='1'> <source>&Transfer</source> </trans-unit> <trans-unit id='8' resname='0' menu-option='0' translate='no'> <source></source> </trans-unit> <trans-unit id='9' resname='7005' menu-option='0' > <source>&Preferences... </source> </trans-unit> <trans-unit id='10' resname='0' menu-option='0' translate='no'> <source></source> </trans-unit> <trans-unit id='11' resname='7006' menu-option='0'> <source>Loa&d Custom DLL... </source> </trans-unit> <trans-unit id='12' resname='7007' menu-option='0'> <source>&Remove Custom DLL... </source> </trans-unit> <trans-unit id='13' resname='0' menu-option='0' translate='no'> <source></source> </trans-unit> <trans-unit id='14' resname='7008' menu-option='128'> <source>E&xit\tAlt+F4</source> </trans-unit> </group> <trans-unit id='15' resname='0' menu-option='16'> <source>&Tools</source> </trans-unit> <group restype='popup-menu'> <trans-unit id='16' resname='7134' menu-option='0'> <source>&Word Count... </source> </trans-unit> <trans-unit id='17' resname='7534' menu-option='0'> <source>&Near Match Lookup... </source> </trans-unit> <trans-unit id='18' resname='7136' menu-option='0'> <source>&Terminology Manager...\tAlt+F1</source> </trans-unit> <trans-unit id='19' resname='0' menu-option='0' translate='no'> <source></source> </trans-unit> <trans-unit id='20' resname='0' menu-option='145'> <source>&Macro</source> </trans-unit> <group restype='popup-menu'> <trans-unit id='21' resname='7137' menu-option='0'> <source>&Play...\tAlt+F10</source> </trans-unit> <trans-unit id='22' resname='7138' menu-option='128'> <source>&Edit...\tCtrl+F10</source> </trans-unit> </group> </group> <trans-unit id='23' resname='0' menu-option='144'> <source>&Help</source> </trans-unit> <group restype='popup-menu'> <trans-unit id='24' resname='7160' menu-option='0'> <source>&Help Topics</source> </trans-unit> <trans-unit id='25' resname='7161' menu-option='0'> <source>&Tip of the Day... </source> </trans-unit> <trans-unit id='26' resname='0' menu-option='0' translate='no'> <source></source> </trans-unit> <trans-unit id='27' resname='7162' menu-option='128'> <source>&About...</source> </trans-unit> </group> </group> </group>
1.2. Dialog Resources
<group restype='dialog'> <group id='resname of dialog' numchildren='count of controls' font='font of dialog'> <trans-unit id='absolute retreival order' resname='control name' restype='class of control' style='window style value' coord='window coord'> <source>caption</source> </trans-unit> </group> </group>
Example: Novell Red Dialog 2200Example: Novell Red Dialog 2200 Resources
Example: Novell Red Dialog 2200 in XLIFF<group restype='dialog'> <group id=2200 numchildren='32' font='Helv,8,0,0'> <trans-unit id='433' resname='2200' restype='dialog' style='#x90C800C0' coord='0,0,332,230'> <source>Control Properties</source> </trans-unit> <trans-unit id='434' resname='65535 ' restype='button ' style='#x50000007' coord='8,4,265,125'> <source>Settings</source> </trans-unit> <trans-unit id='435' resname='65535' restype='static ' style='#x50020000' coord='18,57,40,10'> <source>&Translation:</source> </trans-unit> <trans-unit id='436' resname='2202' restype='edit' translate='no' style='#x50A10004' coord='64,55,199,35'> <source></source> </trans-unit> <trans-unit id='437' resname='65535' restype='button' style='#x50020000' coord='18,96,26,10'> <source>&X Pos.:</source> </trans-unit> <trans-unit id='438' resname='2203' restype='edit' translate='no' style='#x50810000' coord='64,94,25,13'> <source></source> </trans-unit> <trans-unit id='439' resname='65535' restype='button' style='#x50020000' coord='106,96,28,10'> <source>&Y Pos.:</source> </trans-unit> <trans-unit id='440' resname='2204' restype='edit' translate='no' style='#x50810000' coord='147,94,25,13'> <source></source> </trans-unit> <trans-unit id='441' resname='65535' restype='static' style='#x50020000' coord='18,113,21,10'> <source>&Width:</source> </trans-unit> <trans-unit id='442' resname='2205' restype='edit' translate='no' style='#x50810000' coord='64,111,25,13'> <source></source> </trans-unit> <trans-unit id='443' resname='65535' restype='button' style='#x50020000' coord='106,113,24,10'> <source>H&eight:</source> </trans-unit> <trans-unit id='444' resname='2206' restype='edit' translate='no' style='#x50810000' coord='147,111,25,13'> <source></source> </trans-unit> <trans-unit id='445' resname='2214' restype='button' style='#x50030000' coord='205,94,58,14'> <source>&Copy English</source> </trans-unit> <trans-unit id='446' resname='2207' restype='button' style='#x50030003' coord='13,143,59,10'> <source>Review si&zing</source> </trans-unit> <trans-unit id='447' resname='2213 ' restype='button' style='#x50010003' coord='13,154,67,10'> <source>&Do not auto-size</source> </trans-unit> <trans-unit id='448' resname='2208 ' restype='button' style='#x50010003' coord='90,143,74,10'> <source>Re&view translation</source> </trans-unit> <trans-unit id='449' resname='2209 ' restype='button' style='#x50010003' coord='90,154,66,10'> <source>Do not tr&anslate</source> </trans-unit> <trans-unit id='450' resname='4701 ' restype='button' style='#x58000003' coord='244,143,69,10'> <source>Vendor chan&ged</source> </trans-unit> <trans-unit id='451' resname='4766 ' restype='SysTabControl32' style='#x50030000' coord='17,171,297,48'> <source>Tab1</source> </trans-unit> <trans-unit id='452' resname='4749 ' restype='edit' translate='no' style='#x50010844' coord='18,185,295,33'> <source></source> </trans-unit> <trans-unit id='453' resname='2210 ' restype='edit' translate='no' style='#x50010044' coord='18,185,295,33'> <source></source> </trans-unit> <trans-unit id='454' resname='2215 ' restype='edit' translate='no' style='#x50810044' coord='18,185,295,33'> <source></source> </trans-unit> <trans-unit id='455' resname='1 ' restype='button' style='#x50030001' coord='281,8,43,14'> <source>OK</source> </trans-unit> <trans-unit id='456' resname='2 ' restype='button' style='#x50010000' coord='281,25,43,14'> <source>Cancel</source> </trans-unit> <trans-unit id='457' resname='9 ' restype='button' style='#x50030000' coord='281,47,43,14'> <source>&Help</source> </trans-unit> <trans-unit id='458' resname='2211 ' restype='button' style='#x50030000' coord='281,69,43,14'> <source>&Next</source> </trans-unit> <trans-unit id='459' resname='2212 ' restype='button' style='#x50010000' coord='281,86,43,14'> <source>&Previous</source> </trans-unit> <trans-unit id='460' resname='65535 ' restype='button' style='#x50020000' coord='18,18,28,10'> <source>Engli&sh:</source> </trans-unit> <trans-unit id='461' resname='2201 ' restype='edit' translate='no' style='#x50A10804' coord='64,16,199,35'> <source></source> </trans-unit> <trans-unit id='462' resname='65535 ' restype='button' style='#x50000007' coord='8,133,317,92'> <source>Notes</source> </trans-unit> <trans-unit id='463' resname='4702 ' restype='button' style='#x50010003' coord='167,154,73,10'> <source>Mnemonic conflict</source> </trans-unit> <trans-unit id='464' resname='4703 ' restype='button' style='#x50010003' coord='167,143,55,10'> <source>Fuzzy match</source> </trans-unit> <trans-unit id='465' resname='4704 ' restype='button' style='#x50010003' coord='244,154,26,10'> <source>QA</source> </trans-unit> </group> </group> 1.3. String Resources
<group restype='string'> <group id='resname of dialog' numchildren='count of controls' font='font of dialog'> <trans-unit id='absolute retreival order' resname='control name' restype='class of control' style='window style value' coord='window coord'> <source>caption</source> </trans-unit> </group> </group> Example: Novell Red string table (partial)
Example: Novell Red string table (partial) Resources
Example: Novell Red Stringtable (partial) in XLIFF<group restype='dialog'> <trans-unit id='744' resname='0' translate='no'> <source></source> </trans-unit> <trans-unit id='745' resname='1'> <source>Tab %d</source> </trans-unit> <trans-unit id='746' resname='2'> <source>Edit</source> </trans-unit> <trans-unit id='747' resname='3'> <source>Edit Resource Project</source> </trans-unit> <trans-unit id='748' resname='4'> <source>Red did not exit normally during its last use. Click OK to cleanup temporary files. </source> </trans-unit> <trans-unit id='749' resname='5'> <source>Copyright © 1994-2000 Novell, Inc.\nAll rights reserved.\nPortions Copyright © Microsoft, Corp. </source> </trans-unit> <trans-unit id='750' resname='6'> <source>IDOK</source> </trans-unit> <trans-unit id='751' resname='7'> <source>IDCANCEL</source> </trans-unit> <trans-unit id='752' resname='8'> <source>Out of memory. </source> </trans-unit> <trans-unit id='753' resname='9'> <source>Cannot create file %s. The file could be in use by another application, the device may be full or file access was denied. </source> </trans-unit> <trans-unit id='754' resname='10'> <source>Save changes to resource file %s? </source> </trans-unit> <trans-unit id='755' resname='11'> <source>Save changes to project file %s? </source> </trans-unit> <trans-unit id='756' resname='12'> <source>%s is an invalid project file or a version that is unsupported. </source> </trans-unit> <trans-unit id='757' resname='13'> <source>Cannot open project file %s. </source> </trans-unit> <trans-unit id='758' resname='14'> <source>A symbol must start with an alphabetic character or '_', and the ID must be an integer. </source> </trans-unit> <trans-unit id='759' resname='15'> <source>You must make a selection before this operation.</source> </trans-unit> <trans-unit id='760' resname='16'> <source>%s is not a valid custom control DLL. </source> </trans-unit> <trans-unit id='761' resname='17'> <source>Defines</source> </trans-unit> <trans-unit id='762' resname='18'> <source>Include</source> </trans-unit> <trans-unit id='763' resname='19'> <source>redproj.ini</source> </trans-unit> <trans-unit id='764' resname='20'> <source>%s value must be greater than zero. </source> </trans-unit> <trans-unit id='765' resname='21'> <source>Could not create control of class %s with the specified styles. </source> </trans-unit> <trans-unit id='766' resname='22'> <source>Cannot open resource file %s. </source> </trans-unit> <trans-unit id='767' resname='23'> <source>Discard changes? </source> </trans-unit> <trans-unit id='768' resname='24'> <source>%s value must be a positive number. </source> </trans-unit> <trans-unit id='769' resname='25'> <source>Memory error! Save files and exit as soon as possible. </source> </trans-unit> <trans-unit id='770' resname='26'> <source>%s cannot be loaded. </source> </trans-unit> <trans-unit id='771' resname='27'> <source>Discard changes to this dialog? </source> </trans-unit> <trans-unit id='772' resname='28'> <source>A non-zero point size must be entered when specifying a font. </source> </trans-unit> <trans-unit id='773' resname='29'> <source>The maximum spacing must be greater than or equal to the minimum spacing. </source> </trans-unit> <trans-unit id='774' resname='30'> <source>Custom control class %s is already loaded. </source> </trans-unit> </group>
1.4. Accelerator Resources{undone} 1.5. Message Resources{see String Resources} |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC