/
312.txt
58 lines (41 loc) · 3.24 KB
/
312.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[7] [[HTML]] の [DFN[[CODE(HTMLa)@en[[[translate]]]] [[属性]]]]は、その[[要素]]の[[属性]]と[[内容]]を翻訳できるかどうかを表します。
* 仕様書
[REFS[
- [6] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2013-11-22 20:38:38 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#the-translate-attribute>
]REFS]
* 翻訳可能属性
[8] [[属性]]は、その種類によって翻訳するべきものとしないべきものがあります。例えば [CODE(HTMLa)@en[[[title]]]]
[[属性]]は翻訳するべきですが、 [CODE(HTMLa)@en[[[class]]]] [[属性]]は翻訳するべきではありません。
翻訳するべき[[属性]]のことを[DFN[[RUBYB[翻訳可能属性]@en[translatable attribute]]]]といいます。
[9] ある[[属性]]が翻訳可能かどうかは、当該[[属性]]の仕様 ([[HTML]] の場合は >>6) で規定されています。
[11] [[翻訳可能属性]]の中には、条件付きのものもあります。例えば [CODE(HTMLe)@en[[[input]]]] [[要素]]の
[CODE(HTMLa)@en[[[value]]]] [[属性]]は、 [CODE(HTMLa)@en[[[type]]]] [[属性]]が [CODE(HTML)@en[[[button]]]]
か [CODE(HTML)@en[[[reset]]]]
の時のみ翻訳可能です。また、 [CODE(HTMLe)@en[[[iframe]]]] [[要素]]の [CODE(HTMLa)@en[[[srcdoc]]]]
[[属性]]の値は [[HTML文書]]なので、再帰的に構文解析して翻訳可能な部分を探す必要があります。
[10] [[翻訳可能属性]]の[[機械可読]]な一覧データは <https://raw.github.com/manakai/data-web-defs/master/data/elements.json> にあります。
* 歴史
[1] [CITE@en[Web Applications 1.0 r6971 Introduce a new global attribute for localisers to tell whether or not content should be translated.]]
( ([TIME[2012-02-07 09:22:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6970&to=6971>
[2] [CITE[''''''[''''''whatwg'''''']'''''' Machine translation and related proposals]]
( ([TIME[2012-06-12 07:33:54 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-June/036354.html>
[3] [CITE@en[Web Applications 1.0 r7745 Clean up some translation-related things.]]
( ([TIME[2013-03-09 08:38:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7744&to=7745>
[4] [CITE@en[Web Applications 1.0 r8276 Mention that other specs may also list translatable attributes.]]
( ([TIME[2013-11-14 06:01:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8275&to=8276>
[5] [CITE@en[Web Applications 1.0 r8311 Allow <input type=button value> to be translated, since that value isn't submitted]]
( ([TIME[2013-11-23 05:22:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8310&to=8311>
[12] [CITE@en[Web Applications 1.0 r8322 Reset buttons also don't get submitted, so it's probably safe to translate them too.]]
( ([TIME[2013-12-03 08:07:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8321&to=8322>
[13] [CITE@en-US[Internationalization Tag Set (ITS) Version 2.0]]
( ([TIME[2013-10-27 19:39:43 +09:00]] 版))
<http://www.w3.org/TR/its20/#translatability-implementation>
[14] [CITE@en[Doc: Using translate directive]]
([TIME[2015-02-09 04:30:02 +09:00]] 版)
<http://angular-translate.github.io/docs/#/guide/05_using-translate-directive>