[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: RE: [xliff] <bin-unit> problem
All, I haven't solved the resizing of images in HTML pages, but here are my thoughts. Hopefully they will offer some insight. HTML IMG ELEMENT Say an image in an HTML page needs to be localized. In this case, it is a screen shot of the options dialog in Internet Explorer. The size of the dialog varies slightly depending on the language. <img src="ieoptions2.gif" alt="Internet Security Options" width="305" height="339" /> ATTEMPT USING JUST TRANS-UNIT At first, I thought to create four <trans-unit> elements to store the four attributes. <!-- src --> <trans-unit id="ieOptionsImg" restype="file"> <source>ieoptions2.gif</source> <target></target> </trans-unit> <!-- alt --> <trans-unit id="ieOptionsAlt" datatype="plaintext"> <source>Internet Security Options</source> <target></target> </trans-unit> <!-- width --> <trans-unit id="ieOptionsWidth" size-unit="pixel"> <source>305</source> <target></target> </trans-unit> <!-- height --> <trans-unit id="ieOptionsHeight" size-unit="pixel"> <source>339</source> <target></target> </trans-unit> There are some problems with this first approach: * It fails to group the width and height with the image. * The URL in the src attribute can be changed, but does make use of the <external-file> element. However, the 'restype' attribute has "file" as a possible value, so I'm unsure which to use. * The 'size-unit' attribute is defined to specify "the units of measure used in the maxheight, minheight, maxwidth, and minwidth attributes", not the units of the text in the <source> element. ATTEMPT USING BIN-UNIT Using <bin-unit>, it would appear as shown here. <bin-unit id="ieOptions" mime-type="image/gif" reformat="yes"> <bin-source> <external-file href="ieoptions2.gif" /> </bin-source> <trans-unit id="ieOptionsSize" coord="0;0;305;339" reformat="coord-cx;coord-cy"> <source /> </trans-unit> <trans-unit id="ieOptionsAlt" datatype="plaintext"> <source>Internet Security Options</source> <target></target> </trans-unit> </bin-unit> Returning from the translator, it would appear as shown here. <bin-unit id="ieOptions" mime-type="image/gif" reformat="yes"> <bin-source> <external-file href="ieoptions2.gif" /> </bin-source> <bin-target> <external-file href="ieoptions2fr.gif" /> </bin-target> <trans-unit id="ieOptionsSize" coord="0;0;305;339" reformat="coord-cx;coord-cy"> <source /> <target coord="0;0;309;374" /> </trans-unit> <trans-unit id="ieOptionsAlt" datatype="plaintext"> <source>Internet Security Options</source> <target>Options de securite Internet</target> </trans-unit> </bin-unit> This would produce the following HTML. <img src="ieoptions2fr.gif" alt="Options de securite Internet" width=309 height=374> SUMMARY To me, this approach is not intuitive. This is evident because I did not originally consider using <bin-unit>. It does, however, seem reasonable to me as long as documentation is provided with recommended practices and sufficient examples are given. Without patterns to guide them, XLIFF adoptors will be somewhat lost as to the best approach when transforming their source to XLIFF. QUESTIONS * Should the <trans-unit> element for the 'alt' attribute be WITHIN the <bin-unit> element or not? * Are the 'coord' units always pixels or does the 'size-unit' also apply to 'coord' values? * Yves, what does 'kenavo' mean? Regards, Doug Domeny -----Original Message----- From: Yves Savourel [mailto:ysavourel@translate.com] Sent: Friday, February 07, 2003 4:55 PM To: XLIFF list Subject: [xliff] <bin-unit> problem Hi John & all, The way I've been handling data for icon, bitmaps, etc. is by using a corresponding <trans-unit>. For example, in your case I would do something like this: <bin-unit id='1' translate='yes' reformat='yes' mime-type='image/icon'> <bin-source> <external-file href="btnadvanced.gif"/> </bin-unit> <trans-unit id='0' coord='0;0;86;16'> <source/> </trans-unit> </bin-unit> If the icon size changes I would expect the localized document to be: <bin-unit id='1' translate='yes' reformat='yes' mime-type='image/icon'> <bin-source> <external-file href="btnadvanced.gif"/> </bin-unit> <trans-unit id='0' coord='0;0;86;16'> <source/> <target coord='0;0;94;24'/> </trans-unit> </bin-unit> I guess you can generalize this as using the first <trans-unit> of a 'container' as the place to put data that go with the container. Here the 'container' would be the icon (with possible text in it). Wouldn't that work for you John? On a side note I'd like to remind everyone that this is a good example why going through profiles of different formats would 'have been'/'be(?) better before we close the next major version of XLIFF. I'm pretty sure we'll have some surprises when trying to work with Windows resources such as MESSAGETABLE, FONT, FONTDIR, GROUP_ICON, GROUP_CURSOR, MENUEX, etc. And that is for Win32 resources only. kenavo and have a great week-end, -yves -----Original Message----- From: John Reid [mailto:JREID@novell.com] Sent: Fri, February 07, 2003 2:07 PM To: > Subject: [xliff] <bin-unit> problem Hi All, I have just now come across a situation where we have icons that are being localized. In doing this we need to keep track of the change in size of the icon. However, the current definition of <bin-unit> does not have that information. In the <trans-unit> we have the coord attribute to store that info. Since we are at a 1.0 implementation, we could use a <prop> to give us that info but I prefer the <context> since we can codify it and make it understandable to translators, provided that the tools understand it. <bin-unit id="1" mime-type="image/gif" translate="yes" reformat="yes"> <bin-source><external-file href="btnadvanced.gif"/></bin-source> <context-group name="translation"> <context context-type="bin-coord">0;0;86;16</context> </context-group> </bin-unit> The better solution would be to add coord as an attribute of <bin-unit> and <bin-target>. After all, what does reformat control for <bin-unit>? The only attributes that could be reformatted are mime-type, restype, and resname. We may need the other following attributes: coord <bin-unit> and <bin-target> size-unit <bin-unit> only maxheight <bin-unit> only minheight <bin-unit> only maxwidth <bin-unit> only minwidth <bin-unit> only The above could then be expressed as follows. <bin-unit id="1" mime-type="image/gif" translate="yes" reformat="yes" coord="0;0;86;16"> <bin-source><external-file href="btnadvanced.gif"/></bin-source> </bin-unit> If someone has come across this same problem and found a different solution, I would appreciate the help. Otherwise, as much as I don't want to delay the process, we may want to consider taking care of this now. What do you think? thanks, john ---------------------------------------------------------------- To subscribe or unsubscribe from this elist use the subscription manager: <http://lists.oasis-open.org/ob/adm.pl>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC