OASIS XML Localisation Interchange File Format (XLIFF) TC

  • 1.  RE: [xliff]

    Posted 02-10-2003 10:03
     MHonArc v2.5.2 -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    xliff message

    [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