[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [stellation-res] String Internationalization
|
Hi Jonathan,
I'm sorry for the delay in answering. Here you have the XLIFF DTD and tomorrow I will send you the TMX DTD.
Regards,
Rodolfo
On Thu, 2002-12-05 at 10:49, Jonathan Gossage wrote:
-----Original Message-----
From: stellation-res-admin@xxxxxxxxxxxxxxx [mailto:stellation-res-admin@xxxxxxxxxxxxxxx]On Behalf Of Rodolfo M.Raya
Sent: December 5, 2002 4:29 PM
To: stellation-res@xxxxxxxxxxxxxxx
Subject: RE: [stellation-res] String Internationalization
On Thu, 2002-12-05 at 07:02, Jonathan Gossage wrote:
> >-----Original Message-----
> >From: stellation-res-admin@xxxxxxxxxxxxxxx
> >[
mailto:stellation-res-admin@xxxxxxxxxxxxxxx]On Behalf Of Rodolfo M.Raya
> >Sent: December 5, 2002 12:24 PM
> >To: stellation-res@xxxxxxxxxxxxxxx
> >Subject: Re: [stellation-res] String Internationalization
> >
> >
> >On Tue, 2002-12-03 at 10:43, Jonathan Gossage wrote:
> >> > May I suggest that you store strings in an XML file?. Maybe using
> >> something like:
> >> >
> >> > <resource id="filemenu">
> >> > <string xml:lang="en-us">File</string>
> >> > <string xml:lang="es">Archivos</string>
> >> > <string xml:lang="fr">Fichier</string>
> >> > </resource>
> >> >
> >> > This can help in the future with the localization process.
> >> >
> >> > Regards,
> >> > Rodolfo
> >> >
> >> > --
> >> I am reluctant to use XML for the internal persistent storage
> >because of
> >> performance issues. Management of localized strings has been
> >identified by
> >> the Eclipse team as a performance problem area so I was
> >planning to use an
> >> optimized internal persistent layout. I think that the import/export
> >> facilities should be capable of putting the internal storage into XML
> >> format. In fact I would make this an extension point so that
> >different XML
> >> layouts could be generated to meet the needs of different tools.
> >
> >Hi Jonathan,
> >
> >If you provide the extension points to export/import strings then we can
> >write the tools to handle XML formats. Don't worry about this.
> >
> >Regards,
> >Rodolfo
> >--
One of the issues that I see here when exporting to external tools will be
in dealing with strings that are made up of fragments where some of the
fragments are text that needs to be translated and other fragments are data
to be converted to string format for final presentation. Typically this is
done programmatically, but to get good translations for this kind of thing
the external tools will need to be able to reconstruct and present the final
string to the translator so that correct grammatical and usage conventions
will be observed in the final product.
A similar issue will be where different gramatical forms (e.g. word plurals)
will be required depending on the values of data inserted into the string.
Any XML formats that we come up with should be capable of describing these
relatively complex requirements. The real problem may occur if the external
tools do not have the power to handle such situations.
Hi Jonathan,
Usually the text is converted to XML format and divided in "segments" before translation. A segment can be one string or just part of it.
Translation tools deal with segments of text and professional translators must reconstruct the context and provide the right localization.
The standard XML formats used in translations are TMX and XLIFF. Both formats contemplate all the necessary stuff. If you are interested in the subject, I can send you the DTDs that describe TMX and XLIFF.
Regards,
Rodolfo
Yes, I would definitely like to see them. It may make a difference in the internal structures and support code if I structure things with the export need in mind.
Regards
Jonathan
Personal Email
jgossage@xxxxxxxx
Business Email
jonathan@xxxxxxxxxxxxxx
<!-- XLIFF
Public Identifier: "-//XLIFF//DTD XLIFF//EN"
History of modifications (latest first):
Jan-28-2002 by YS: Implemented fixes after OASIS TC spec revision
May-15-2001 by YS: Add phase-name to <trans-unit> and <bin-unit>
May-15-2001 by YS: Reverse id for <trans-unit> to required
Apr-19-2001 by YS: Enda+JohnR last changes
Apr-18-2001 by YS: Removed empty ATTLISTs
Apr-12-2001 by YS: Changed target* to target+ in trans-match
Apr-11-2001 by YS: Fixed DOCTYPE id
Apr-10-2001 by YS: Synchronize from conference call
Apr-05-2001 by YS: Synchronize with latest specs
Apr-04-2001 by YS: Synchronize with latest specs
Apr-03-2001 by YS: Added name in <prop-group>
Apr-02-2001 by YS: Implemented JR fixes
Mar-29-2001 by JC: fixes for xml:space and bin-unit
Mar-28-2001 by YS: First draft version
-->
<!ENTITY % CodeContent "#PCDATA|sub" >
<!ENTITY % TextContent "#PCDATA|g|bpt|ept|ph|it|mrk|x|bx|ex" >
<!ENTITY lt "&#60;" >
<!ENTITY amp "&#38;" >
<!ENTITY gt ">" >
<!ENTITY apos "'" >
<!ENTITY quot """ >
<!-- ***************************************************************** -->
<!-- Structural Elements -->
<!-- ***************************************************************** -->
<!ELEMENT xliff (file)+ >
<!ATTLIST xliff
version CDATA #FIXED "1.0"
xml:lang CDATA #IMPLIED
>
<!ELEMENT file (header,body) >
<!ATTLIST file
original CDATA #REQUIRED
source-language CDATA #REQUIRED
datatype CDATA #REQUIRED
tool CDATA #IMPLIED
date CDATA #IMPLIED
xml:space (default|preserve) "default"
ts CDATA #IMPLIED
category CDATA #IMPLIED
target-language CDATA #IMPLIED
product-name CDATA #IMPLIED
product-version CDATA #IMPLIED
build-num CDATA #IMPLIED
>
<!-- tool default = "manual" -->
<!ELEMENT header (skl?,phase-group?,(prop-group|glossary|reference|note|count-group)*) >
<!ELEMENT skl (internal-file|external-file) >
<!ELEMENT internal-file (#PCDATA) >
<!ATTLIST internal-file
form CDATA #IMPLIED
crc NMTOKEN #IMPLIED
>
<!-- text|base64 (text is default) -->
<!ELEMENT external-file EMPTY >
<!ATTLIST external-file
href CDATA #REQUIRED
crc NMTOKEN #IMPLIED
uid NMTOKEN #IMPLIED
>
<!ELEMENT glossary (internal-file|external-file) >
<!ELEMENT reference (internal-file|external-file) >
<!ELEMENT note (#PCDATA) >
<!ATTLIST note
xml:lang CDATA #IMPLIED
priority (1|2|3|4|5|6|7|8|9|10) "1"
from CDATA #IMPLIED
>
<!ELEMENT prop-group (prop)+ >
<!ATTLIST prop-group
name CDATA #IMPLIED
>
<!ELEMENT prop (#PCDATA) >
<!ATTLIST prop
prop-type CDATA #REQUIRED
xml:lang CDATA #IMPLIED
>
<!ELEMENT context-group (context)+ >
<!ATTLIST context-group
name CDATA #REQUIRED
crc NMTOKEN #IMPLIED
>
<!-- Processing instructions related to <context-group>:
<?xliff-show-context-group name='value' ?>
Indicates that any <context-group> element with a name set to 'value' should be
displayed to the end-user.
-->
<!ELEMENT context (#PCDATA) >
<!ATTLIST context
context-type CDATA #REQUIRED
match-mandatory (yes|no) "no"
crc NMTOKEN #IMPLIED
>
<!-- Processing instructions related to <context>:
<?xliff-show-context context-type='value' ?>
Indicates that any <context> element with a context-type set to 'value' should
be displayed to the end-user.
-->
<!ELEMENT phase-group (phase)+ >
<!ELEMENT phase (note)* >
<!ATTLIST phase
phase-name CDATA #REQUIRED
process-name CDATA #REQUIRED
company-name CDATA #IMPLIED
tool CDATA #IMPLIED
date CDATA #IMPLIED
job-id CDATA #IMPLIED
contact-name CDATA #IMPLIED
contact-email CDATA #IMPLIED
contact-phone CDATA #IMPLIED
>
<!ELEMENT count-group (count)* >
<!ATTLIST count-group
name CDATA #REQUIRED
>
<!ELEMENT count (#PCDATA) >
<!ATTLIST count
count-type CDATA #IMPLIED
unit CDATA #IMPLIED
>
<!ELEMENT body (group|trans-unit|bin-unit)* >
<!ELEMENT group ((context-group*,count-group*,prop-group*,note*),(group|trans-unit|bin-unit)*)
>
<!ATTLIST group
id NMTOKEN #IMPLIED
datatype CDATA #IMPLIED
xml:space (default|preserve) "default"
ts CDATA #IMPLIED
restype CDATA #IMPLIED
resname NMTOKEN #IMPLIED
extradata CDATA #IMPLIED
help-id NMTOKEN #IMPLIED
menu CDATA #IMPLIED
menu-option CDATA #IMPLIED
menu-name CDATA #IMPLIED
coord CDATA #IMPLIED
font CDATA #IMPLIED
css-style CDATA #IMPLIED
style NMTOKEN #IMPLIED
exstyle NMTOKEN #IMPLIED
>
<!ELEMENT trans-unit (source,target?,(count-group|note|context-group|prop-group|alt-trans)*) >
<!ATTLIST trans-unit
id NMTOKEN #REQUIRED
approved (yes|no) #IMPLIED
translate (yes|no) "yes"
reformat (yes|no) "yes"
xml:space (default|preserve) "default"
datatype CDATA #IMPLIED
ts CDATA #IMPLIED
restype CDATA #IMPLIED
resname NMTOKEN #IMPLIED
extradata CDATA #IMPLIED
help-id NMTOKEN #IMPLIED
menu CDATA #IMPLIED
menu-option CDATA #IMPLIED
menu-name CDATA #IMPLIED
coord CDATA #IMPLIED
font CDATA #IMPLIED
css-style CDATA #IMPLIED
style NMTOKEN #IMPLIED
exstyle NMTOKEN #IMPLIED
size-unit CDATA #IMPLIED
maxwidth NMTOKEN #IMPLIED
minwidth NMTOKEN #IMPLIED
maxheight NMTOKEN #IMPLIED
minheight NMTOKEN #IMPLIED
maxbytes NMTOKEN #IMPLIED
minbytes NMTOKEN #IMPLIED
charclass CDATA #IMPLIED
phase-name CDATA #IMPLIED
>
<!-- size-unit: char|byte|pixel|glyph|dlgunit default='pixel' -->
<!ELEMENT source (%TextContent;)* >
<!ATTLIST source
xml:lang CDATA #IMPLIED
ts CDATA #IMPLIED
>
<!-- coord = "x;y;cx;cy"
font= "fontname[;size[;weight]]"
-->
<!ELEMENT target (%TextContent;)* >
<!ATTLIST target
state NMTOKEN #IMPLIED
phase-name NMTOKEN #IMPLIED
xml:lang CDATA #IMPLIED
ts CDATA #IMPLIED
restype CDATA #IMPLIED
resname NMTOKEN #IMPLIED
coord CDATA #IMPLIED
font CDATA #IMPLIED
css-style CDATA #IMPLIED
style NMTOKEN #IMPLIED
exstyle NMTOKEN #IMPLIED
>
<!ELEMENT alt-trans (source?,target+,(note|context-group|prop-group)*) >
<!ATTLIST alt-trans
match-quality CDATA #IMPLIED
tool CDATA #IMPLIED
crc NMTOKEN #IMPLIED
xml:lang CDATA #IMPLIED
origin CDATA #IMPLIED
datatype CDATA #IMPLIED
xml:space (default|preserve) "default"
ts CDATA #IMPLIED
restype CDATA #IMPLIED
resname NMTOKEN #IMPLIED
extradata CDATA #IMPLIED
help-id NMTOKEN #IMPLIED
menu CDATA #IMPLIED
menu-option CDATA #IMPLIED
menu-name CDATA #IMPLIED
coord CDATA #IMPLIED
font CDATA #IMPLIED
css-style CDATA #IMPLIED
style NMTOKEN #IMPLIED
exstyle NMTOKEN #IMPLIED
>
<!ELEMENT bin-unit (bin-source,bin-target?,(note|context-group|prop-group|trans-unit)*) >
<!ATTLIST bin-unit
id NMTOKEN #REQUIRED
mime-type NMTOKEN #REQUIRED
approved (yes|no) #IMPLIED
translate (yes|no) "yes"
reformat (yes|no) "yes"
ts CDATA #IMPLIED
restype CDATA #IMPLIED
resname NMTOKEN #IMPLIED
phase-name CDATA #IMPLIED
>
<!ELEMENT bin-source (internal-file|external-file) >
<!ATTLIST bin-source
ts CDATA #IMPLIED
>
<!ELEMENT bin-target (internal-file|external-file) >
<!ATTLIST bin-target
mime-type NMTOKEN #IMPLIED
ts CDATA #IMPLIED
state NMTOKEN #IMPLIED
phase-name NMTOKEN #IMPLIED
restype CDATA #IMPLIED
resname NMTOKEN #IMPLIED
>
<!-- ***************************************************************** -->
<!-- In-Line Elements -->
<!-- ***************************************************************** -->
<!ELEMENT g (%TextContent;)* >
<!ATTLIST g
id CDATA #REQUIRED
ctype CDATA #IMPLIED
clone (yes|no) "yes"
ts CDATA #IMPLIED
>
<!ELEMENT x EMPTY >
<!ATTLIST x
id CDATA #REQUIRED
ctype CDATA #IMPLIED
clone (yes|no) "yes"
ts CDATA #IMPLIED
>
<!ELEMENT bx EMPTY >
<!ATTLIST bx
id CDATA #REQUIRED
rid NMTOKEN #IMPLIED
ctype CDATA #IMPLIED
clone (yes|no) "yes"
ts CDATA #IMPLIED
>
<!ELEMENT ex EMPTY >
<!ATTLIST ex
id CDATA #REQUIRED
rid NMTOKEN #IMPLIED
ts CDATA #IMPLIED
>
<!ELEMENT ph (%CodeContent;)* >
<!ATTLIST ph
id CDATA #REQUIRED
ctype CDATA #IMPLIED
ts CDATA #IMPLIED
crc NMTOKEN #IMPLIED
assoc CDATA #IMPLIED
>
<!ELEMENT bpt (%CodeContent;)* >
<!ATTLIST bpt
id CDATA #REQUIRED
rid NMTOKEN #IMPLIED
ctype CDATA #IMPLIED
ts CDATA #IMPLIED
crc NMTOKEN #IMPLIED
>
<!ELEMENT ept (%CodeContent;)* >
<!ATTLIST ept
id CDATA #REQUIRED
rid NMTOKEN #IMPLIED
ts CDATA #IMPLIED
crc NMTOKEN #IMPLIED
>
<!ELEMENT it (%CodeContent;)* >
<!ATTLIST it
id CDATA #REQUIRED
pos (open|close) #REQUIRED
rid NMTOKEN #IMPLIED
ctype CDATA #IMPLIED
ts CDATA #IMPLIED
crc NMTOKEN #IMPLIED
>
<!ELEMENT mrk (%TextContent;)* >
<!ATTLIST mrk
mtype CDATA #REQUIRED
mid NMTOKEN #IMPLIED
comment CDATA #IMPLIED
ts CDATA #IMPLIED
>
<!ELEMENT sub (%TextContent;)* >
<!ATTLIST sub
datatype CDATA #IMPLIED
ctype CDATA #IMPLIED
>
<!-- ***** End of DTD ************************************************ -->