Parse item flags.
This commit is contained in:
@@ -113,6 +113,13 @@ PO.parse = function (data) {
|
||||
finish();
|
||||
item.references.push(trim(line.replace(/^#:/, '')));
|
||||
}
|
||||
else if (line.match(/^#,/)) { // Flags
|
||||
finish();
|
||||
var flags = trim(line.replace(/^#,/, '')).split(",");
|
||||
for (var i = 0; i < flags.length; i++) {
|
||||
item.flags[flags[i]] = true;
|
||||
}
|
||||
}
|
||||
else if (line.match(/^#/)) { // Comment
|
||||
finish();
|
||||
item.comments.push(trim(line.replace(/^#/, '')));
|
||||
@@ -157,6 +164,7 @@ PO.Item = function () {
|
||||
this.msgid_plural = null;
|
||||
this.msgstr = [];
|
||||
this.comments = [];
|
||||
this.flags = {};
|
||||
};
|
||||
|
||||
PO.Item.prototype.toString = function () {
|
||||
|
||||
Reference in New Issue
Block a user