This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
(from Submission copy of spec, Appendix C issue 4) smlerr:localizationID provides a mechanism allowing for translation of a fixed string, ala a Java resource bundle, but only does this for strings whose entire value is known when the translation is crafted. There is no provision for including other values embedded w/in the translated string, which in general can be thought of as keyword substitution.
Created ACTION-143 - Create proposal [on Valentina Popescu - due 2007-10-24].
proposal attached under this note http://lists.w3.org/Archives/Public/public-sml/2007Nov/0195.html
I agree with the proposal mentioned in comment #2. The proposal is summarized below for quick reference. 1. Change the namespace name to a more general name (for example, sml:localizationId) to position it as a localization mechanism for items other than error messages. 2. Change the type of this attribute from anyURI to qname. The namespace part of the qname, a URI, will be used to point to a localized resource. The local part of the qname will identify a specific string within the resource. 3. How an implementation locates a localized resource using the URI is implementation dependent. 4. It is implementation dependant how variable substitution can be achieved in translated strings. SML will propose as best practices ( non-normative ) the use of xsl:variable for variable substitution support in schematron messages
Fix as per #2 and #3
Changes under the SML spec : 1. Replaced section 5.1 Localization of Error Messages with a new sesction , 6. Localization of natural-language texts : http://dev.w3.org/cvsweb/~checkout~/2007/xml/sml/build/sml.html?content-type=text/html;%20charset=utf-8#Localization_of_Messages 2. Added a new section under 8. SML Extension Reference, sml:locid http://dev.w3.org/cvsweb/~checkout~/2007/xml/sml/build/sml.html?content-type=text/html;%20charset=utf-8#locid 3. Created a new Sample under Appendices, D. Localization and Variable Substitution Sample (Non-Normative) : http://dev.w3.org/cvsweb/~checkout~/2007/xml/sml/build/sml.html?content-type=text/html;%20charset=utf-8#LocalizationSample Under SML IF spec : 1. Added a new sample under Appendices, Localization of IF Identity Sample (Non-Normative) : file:///D:/TPTP/EclipseCon2007/eclipse/workspace/sml/build/sml-if.html#LocalizationSample Under the sml.xsd file Defined a new attribute, sml:locid: <!-- CONTEXT: To be used in <sch:assert>, <sch:report> and elements with textual content. This attribute is used to support string localization. It is used to define the translation location for the text content of the containing element.--> <xs:attribute name="locid" type="xs:QName"/> Completely removed sml-err-schema.xsd This schema contained the smlerr attribute used for localization and the schematron sml output types, removed from the spec during the LC.
The right link for the IF 'Localization of IF Identity Sample section' ( instead of the file url attached in comment #5 ): http://dev.w3.org/cvsweb/~checkout~/2007/xml/sml/build/sml-if.html?content-type=text/html;%20charset=utf-8#LocalizationSample
I agree with the changes in comment# 5 and comment# 6.
+1 to changes made for this bug.
The changes made to support keyword substitution and sml:locid seem mostly OK to me. (Or rather, the current text in the sections mentioned seems mostly OK -- I have not actually reviewed the previous text.) But there are some shortcomings which I hope will receive editorial attention: From sections 6 and 8.1.7 of SML this reader does not get any clear idea of how sml:locid is to be used. (To the extent that I'm a typical vocabulary designer, this is alarming. To the extent that I'm a vocabulary designer with higher than usual tolerance for spec prose and indirection, it's more alarming.) A one- or two-line example would help in either 6 or 8.1.7, as would a pointer to the longer example in appendix F. There is nothing formally wrong about using a Qname like "lang:StudendIDNotStartWith99" in the example. But it does seem odd not to spell it "...StudentID..." (with a 't' not a 'd' at the end of 'Student'). This looks like a typo. The examples in appendix F have some stray > symbols (two that I saw). The example in the appendix would, I think, be clearer if it went into slightly more painful detail, and said explicitly that "http://www.university.example.org/translation/" is the URI of a translation resource and "StudendIDNotStartWith99" is an id used to locate the desired set of translations within that resource. It would be clearer still if it showed what such a translation resource might in theory look like. And the text should be clearer than it now is on whether "StudendIDNotStartWith99" is an ID in the strict sense (declared with a DTD), in the XSDL sense (value of type xsd:ID), or generic sense (it's a magic cookie which an application will use to find things). The motivation and usage of the variable named $var (not to mention the scope of the variable) are not clear to me from the discussion. I hope this can be made clearer.
Editors to consider comment #9; not necessary to mark "needsReview" for any changes based on comment #9.
Addressed comment #9: - Fixed spaces/typo identified in comment #9 - Updated sample 'F. Localization and Variable Substitution Sample' with more (and intended better :) description file:///D:/TPTP/EclipseCon2007/eclipse/workspace/sml/build/sml.html#LocalizationSample - Added links from the normative section to the 'F. Localization and Variable Substitution Sample ' sample file:///D:/TPTP/EclipseCon2007/eclipse/workspace/sml/build/sml.html#Localization_of_Messages
Replacing file URL under comment #11 : Link to the sample http://dev.w3.org/cvsweb/~checkout~/2007/xml/sml/build/sml.html?content-type=text/html;%20charset=utf-8#LocalizationSample Link to the Normative section : http://dev.w3.org/cvsweb/~checkout~/2007/xml/sml/build/sml.html?content-type=text/html;%20charset=utf-8#Localization_of_Messages