Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4138577
ve.dm.MWTranslateAnnotationNode.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.dm.MWTranslateAnnotationNode.js
View Options
/*!
* VisualEditor DataModel MWTranslateAnnotationNode class.
*/
/**
* DataModel MediaWiki translate annotation node.
*
* @class
* @abstract
* @extends ve.dm.MWAnnotationNode
*
* @constructor
* @param {Object} [element] Reference to element in linear model
* @param {ve.dm.Node[]} [children]
*/
ve
.
dm
.
MWTranslateAnnotationNode
=
function
VeDmMWTranslateAnnotationNode
()
{
// Parent constructor
ve
.
dm
.
MWTranslateAnnotationNode
.
super
.
apply
(
this
,
arguments
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
dm
.
MWTranslateAnnotationNode
,
ve
.
dm
.
MWAnnotationNode
);
/* Static members */
ve
.
dm
.
MWTranslateAnnotationNode
.
static
.
name
=
'mwTranslateAnnotation'
;
ve
.
dm
.
MWTranslateAnnotationNode
.
static
.
matchRdfaTypes
=
[
'mw:Annotation/translate'
,
'mw:Annotation/translate/End'
,
'mw:Annotation/tvar'
,
'mw:Annotation/tvar/End'
];
/* Methods */
ve
.
dm
.
MWTranslateAnnotationNode
.
static
.
toDataElement
=
function
(
domElements
)
{
// 'Parent' method
var
element
=
ve
.
dm
.
MWTranslateAnnotationNode
.
super
.
static
.
toDataElement
.
call
(
this
,
domElements
);
element
.
type
=
'mwTranslateAnnotation'
;
return
element
;
};
ve
.
dm
.
MWTranslateAnnotationNode
.
prototype
.
getWikitextTag
=
function
()
{
var
map
=
{
'mw:Annotation/translate'
:
'<translate>'
,
'mw:Annotation/translate/End'
:
'</translate>'
,
'mw:Annotation/tvar'
:
'<tvar>'
,
'mw:Annotation/tvar/End'
:
'</tvar>'
};
return
map
[
this
.
getAttribute
(
'type'
)
];
};
ve
.
dm
.
MWTranslateAnnotationNode
.
static
.
getHashObject
=
function
(
dataElement
)
{
// Consider all translation nodes to be comparable (T324790)
return
{
type
:
dataElement
.
type
};
};
/* Registration */
ve
.
dm
.
modelRegistry
.
register
(
ve
.
dm
.
MWTranslateAnnotationNode
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 14:43 (3 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0b/54/376d2de3be81529e3bfcddf105f0
Default Alt Text
ve.dm.MWTranslateAnnotationNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment