[Bug 12417] HTML5 is missing attribute for specifying translatability of content


--- Comment #18 from Yves <ysavourel@enlaso.com> 2011-07-27 13:11:05 UTC ---
(In reply to comment #12)
> (In reply to comment #9)
> > > Using class="notranslate" isn't an abuse as far as I can tell.
> > 
> > The class attribute is used for other things. Overloading it with "notranslate" is not a viable solution.
> I think the question that hixie had, was does it answer the use cases?
> In which ways, what does it break, what does it improve? (with code scenarios)

Good point. let me try:

If the translate feature was implemented with class. I think it would need:

- two values: e.g. 'notranslate' and 'translate' because the feature needs to
be able to override a parent directive.

- those values would need to be explicitly defined in the specification, so
they are standard.

- class would need to have some additional semantic associated to its behavior
as far as the scope. The idea is to implement the Translate data category
described in http://www.w3.org/TR/its/#trans-datacat 
I don't think 'class' currently is very explicit in that aspect.

BTW, if class can be used for indicating a boolean information such as
translate/do-not-translate along with other values (display classes, script
behaviour, etc.), why other type of boolean information do not use it as well?
For example 'hidden' or 'dragable' have their own attributes. I suppose the
same rational that applied to them can be applied to have a distinct attribute
for the translate feature.

> > > This seems like a feature that would get only narrow use.
> > > Is it really worth adding to the language?
> > 
> > I disagree. Several content providers are using workaround because a standard
> > solution does not exist.
> Is there a document with what the content providers are doing? 
> What code (workaround) are they using?

I don't think much documentation exists on this. I can mention some solutions
I've seen on material we had to localize (can't share names because of NDAs)

- Use of the class attribute with various value ('protect', 'noloc', etc.)

- Use of HTML comments before the element to which the directive pertains: e.g.
<!--notrans--><p>Text no to translate</p>

- Use of 'custom' attributes: <p notrans>Text not to translate</p>

> How to solve it with code without focusing on one possible solution?

It's a good point. Any solution that would provide an implementation of the ITS
Translate data category would be fine.

> > > It seems like the ideal solution would be a new
> > > language subtag, frankly.
> > 
> > Using a subtag is not the solution either. It overloads the value with
> > information that has nothing to do with the language.
> In which ways? Could you give more details. (code+explanation)

I think Felix has provided some answer for this already.
Mixing identification information with process information is not a good way to
keep separation of concerns.

And it would cause problem with formats where that separation is correctly
done. For example one could technically have: <elem xml:lang='en-notranslate'
its:translate='yes'>translatable or not?</elem>

I think a subtag would be a more dangerous solution than class. But class, as
described currently, is not enough.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Wednesday, 27 July 2011 13:11:08 UTC