ngx-i18nsupport-lib
Version:
A Typescript library to work with Angular generated i18n files (xliff, xmb)
43 lines • 1.9 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var parsed_message_part_1 = require("./parsed-message-part");
/**
* Created by martin on 14.06.2017.
* A message part consisting of an empty tag like <br/>.
*/
var ParsedMessagePartEmptyTag = /** @class */ (function (_super) {
__extends(ParsedMessagePartEmptyTag, _super);
function ParsedMessagePartEmptyTag(tagname, idcounter) {
var _this = _super.call(this, parsed_message_part_1.ParsedMessagePartType.EMPTY_TAG) || this;
_this._tagname = tagname;
_this._idcounter = idcounter;
return _this;
}
ParsedMessagePartEmptyTag.prototype.asDisplayString = function (format) {
if (this._idcounter === 0) {
return '<' + this._tagname + '>';
}
else {
return '<' + this._tagname + ' id="' + this._idcounter.toString() + '">';
}
};
ParsedMessagePartEmptyTag.prototype.tagName = function () {
return this._tagname;
};
ParsedMessagePartEmptyTag.prototype.idCounter = function () {
return this._idcounter;
};
return ParsedMessagePartEmptyTag;
}(parsed_message_part_1.ParsedMessagePart));
exports.ParsedMessagePartEmptyTag = ParsedMessagePartEmptyTag;
//# sourceMappingURL=S:/experimente/ngx-i18nsupport-lib/src/impl/parsed-message-part-empty-tag.js.map