[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [xliff] XLIFF and Windows Resources
Hi everyone, At the Unicode conference last month, several of us (John R, Enda, Jaime, etc.) decided start working on defining a common way to represent Windows resources in XLIFF, since we were all producing XLIFF documents from RC and/or Compiled files. This way any tool will be able to rely on the same representation regardless who did the extraction. Since this may be of interest to more people, we thought it would be good to have that discussion in a thread of the mailing list. John will soon (if not before this message) post a first document with some examples and descriptions, etc. The attached HTML file contains my notes after reading his document, as well as some additional concerns/notes/etc. cheers -yves
Notes about XLIFF and Windows Resources (The ones with "Re JR Example" refer to John's document).
Re JR Example: numchildren
attribute: Why would we need such information?
Wouldn't a
simple count of the children nodes of the group can give the information?
Re JR Example: The examples shows all resources of the same type grouped in a single <group>. I don't think we want to force this: when extracted from an RC file the resources can be in any order, in separate sections, grouping them will cause a lot of additional work in extract and merge. On the other hand, once in XLIFF you can easily use XPath to get all resource of a same type if needed.
I think we will need to have some description about how to handle ID: in documents extracted from RC file it may be more interesting to have the mnemonic ID rather than the numeric value (IDS_MYSTRING vs. 1001). The problem then is that the same file could generate different IDs depending whether it comes from the RC or the compiled version. I guess someone who wants to do some comparison would have to resolve the IDs based on the header file (could be a nice utility).
Re JR Example: Wouldn't it make more sense to have the resname
for each string to be the actual ID of that
string, and not id
?
We will need to provide a mapping between Windows Languague IDs and RFC 3066 values (for xml:lang, source-language, etc.). I've started that but several are difficult to map.
I've looked at the CultureInfo identifier in XP where the mapping would be logically done since they are using RFC 3066 values there, but there have non-conformant values in some cases, and even no mapping in some cases. Not a pretty picture.
We will need to specify the scope of the data we are working with here. I assume: not including Windows XP, for now.
Some tools may want to extract only a small part of the resources (ID and text for example). Maybe(?) we should make provision for this. Maybe we could have two types of extracted resources: complete (you can create a runtime output of the dialog from them), or partial (only some data are available).
restype
Values for ControlsUsing the control class name (or number) as the restype
value is
probably not enough, at least for the pre-defined control classes:
When working from RC files, there are a lot of controls that are
"Button" but are, depending of their style, very different: check
boxes, radio buttons, icon, etc. I think it may be useful to have such
distinction in the restype
value otherwise it's almost impossible
to easily know what kind of control the "Button" is (you would have to
look at the value of the style: rather impossible for humans).
Also, we probably need to enforce either lowercase or uppercase values since
Windows class name are non case sensitive, but resname
is.
Re JR Example: I'm still nervous about having negative values for styles. Maybe a better solution would be to use hexadecimal values rather than signed decimal. It would also be easier to 'read' it compared to the actual values in Windows header file.
Example: style="0x80C80080"
(instead of style="-2134376320"
).
We should have some recommendation (or explicitly said we don't have any recommendation) about how to represent the resource text itself: Should \n, \a, etc. be represented as inline codes? Should it be un-escaped? etc.
Also how to represent accelerators? Should we have a common way for this ("Alt+c", "^C", etc.) or should it be handled through the style?
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC