protected override bool OnEntry(string msgid, string msgidPlural, bool hasPlural, string[] translations, string flags, string[] references, string comment, string[] autocomments) { if (String.IsNullOrEmpty(msgid)) { // gettext header: Catalog headers = new Catalog(project); headers.ParseHeaderString(translations[0]); charset = headers.Charset; if (charset == "CHARSET") { charset = "iso-8859-1"; } return(false); // stop parsing } return(true); }
protected override bool OnEntry(string msgid, string msgidPlural, bool hasPlural, string[] translations, string flags, string[] references, string comment, string[] autocomments) { if (String.IsNullOrEmpty(msgid) && !headerParsed) { // gettext header: catalog.ParseHeaderString(translations[0]); catalog.Comment = comment; headerParsed = true; } else { CatalogEntry d = new CatalogEntry(catalog, String.Empty, String.Empty); if (!String.IsNullOrEmpty(flags)) { d.Flags = flags; } d.SetString(msgid); if (hasPlural) { d.SetPluralString(msgidPlural); } d.SetTranslations(translations); d.Comment = comment; for (uint i = 0; i < references.Length; i++) { d.AddReference(references[i]); } for (uint i = 0; i < autocomments.Length; i++) { d.AddAutoComment(autocomments[i]); } catalog.AddItem(d); } return(true); }