All files / ext.wikilambda.edit/store/classes LabelData.js

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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                                              1172x 1172x 1172x       28x  
/*!
 * WikiLambda LabelData class
 *
 * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt
 * @license MIT
 */
'use strict';
 
/**
 * LabelData class contains the information of a localized label.
 * This is the type of object that's saved in the global store and
 * is returned by the getter getLabelData to those components that
 * need not only the string label of a key, but also the language
 * of the available label.
 *
 * @class
 * @property {string} zid ID of a ZPersistentObject, ZKey or ZArgumentDeclaration
 * @property {string} label
 * @property {string} lang ZID of the ZNaturalLanguage object that identifies the
 *     language the label is in
 */
class LabelData {
	constructor( zid, label, lang ) {
		this.zid = zid;
		this.label = label;
		this.lang = lang;
	}
}
 
module.exports = exports = LabelData;