2009-04-02 Claude Paroz * modes/docbook.py: Use new hashlib module rather than deprecated md5 module, when available. Fixes bug #576161. 2008-07-14 Danilo Šegan * xml2po.py: Apply Goran Rakić's patch for #437371. 2007-03-16 Loïc Minier * Makefile.am: Display xsltproc invocation, honor its exit status, and pull the source from srcdir; this might expose some bugs; bug #169324. 2007-03-02 Danilo Šegan * Fix #413602: Use mfile variable name instead of file, thus overwriting file() call used later. Patch by Eduardo Habkost . 2006-12-26 Danilo Šegan * xml2po.py (autoNodeIsFinal): Cache autoNodeIsFinal value. (worthOutputting): Cache worthOutputting value. 2006-12-26 Danilo Šegan Fix bug #343749. Support for XHTML mode, partially by Claude Paroz . * TODO: Updated. * xml2po.py (processAttribute): Added. (read_treatedattributes): Added. (processElementTag): Use treated attributes. * modes/Makefile.am (common_DATA): Added xhtml.py. * modes/gs.py (gsXmlMode.getTreatedAttributes): * modes/empty.py (emptyXmlMode.getTreatedAttributes): * modes/docbook.py (docbookXmlMode.getTreatedAttributes): Added new method to every other mode. * modes/xhtml.py: Added Claude's XHTML mode. 2006-12-26 Danilo Šegan Fix bug #378073. * xml2po.py (autoNodeIsFinal): Really ignore ignored tags. 2006-12-26 Danilo Šegan * xml2po.py: Update copyright notice. * Makefile.am (xml2po): Remove configure.ac dependency. * autogen.sh, configure.ac: Removed. 2006-12-26 Danilo Šegan Fix bug #381607. * xml2po.py (MessageOutput.outputAll): Ignore untranslated messages in -r (reuse) mode. 2006-10-20 Danilo Šegan * xml2po.py: Improve speed with Alexander Nedotsukov's patch from bug #363451. 2006-05-14 Danilo Šegan * modes/docbook.py (docbookXmlMode.postProcessXmlTranslation): Treat year as utf-8 as well. 2006-04-11 Danilo Šegan * modes/docbook.py: Check if "translators-credits" is translated. 2006-04-01 Danilo Šegan * tests/*: updated test cases. 2006-04-01 Danilo Šegan Added Ubuntu mode supporting &language; entity replacement. * modes/Makefile.am (common_DATA): Added ubuntu.py. * modes/ubuntu.py: Added. 2006-04-01 Danilo Šegan Fix #172459. * xml2po.py (NoneTranslations): return None for all *gettext calls as a fallback. (getTranslation): make use of NoneTranslations. (processElementTag): if mark_untranslated, node.setLang('C'). 2006-04-01 Danilo Šegan * xml2po.py (myAttributeSerialize): Added entity-non-expanding serialization. (startTagForNode): Use myAttributeSerialize. 2006-04-01 Danilo Šegan Fix #317110. * xml2po.py (startTagForNode): fix attribute handling. (replaceNodeContentsWithText): Use startTagForNode for starttag. 2006-04-01 Danilo Šegan * xml2po.py (replaceNodeContentsWithText): Improve fix for #336765. 2006-03-31 Danilo Šegan Fixes bug #317502. * xml2po.py (normalizeNode): don't remove blank nodes followed by entities. 2006-03-31 Danilo Šegan Fixes bug #336765. * xml2po.py (replaceNodeContentsWithText): integrate DTD when keeping entities. * TODO: Document this fix. 2006-03-31 Danilo Šegan Fixes bug #172784. * xml2po.py (isFinalNode): ignore blank nodes. 2005-09-13 Stepan Kasal * xml2po.pc.in: Add datarootdir variable, for compatibility with future Autoconf releases. 2005-07-23 Danilo Šegan * xml2po.1.xml: Document --language option, rewrite other parts. * xml2po.py: Add "--language=LANG" option to explicitely set language. 2005-07-23 Danilo Šegan * xml2po.py: Replace /dev/null in msgfmt calls with NULL_STRING which is "NUL" when /dev/null doesn't exist (for Windows compatibility). 2005-07-22 Danilo Šegan * xml2po.py: use mofile for getting translationlanguage in -t (reported by Daniel Leidert). 2005-07-20 Danilo Šegan * xml2po.py: remove path from language name. 2005-07-18 Danilo Šegan Fixes #310754. * modes/docbook.py (docbookXmlMode.postProcessXmlTranslation): Encode translator credits as UTF-8 for libxml2. 2005-06-26 Danilo Šegan Fixes #300442. * Makefile.am (xml2po.1): Use xsltproc to generate. * xml2po.1.xml: Add stylesheet declaration. 2005-04-02 Danilo Šegan * xml2po.py (getTranslation): Use ugettext() instead of gettext(). s/.serialize()/.serialize('utf-8')/g (replaceNodeContentsWithText): Use utf-8. 2005-04-01 Danilo Šegan * xml2po.py (getTranslation): decode lookup string from utf-8. 2005-03-27 Danilo Šegan * TODO (BUGS): Updated. 2005-03-27 Danilo Šegan * xml2po.py (normalizeNode): Fix crash with "-k". (normalizeString): Add DTD always. 2005-03-27 Danilo Šegan Complete fix of #162089. * xml2po.py (startTagForNode): Use .serialize() instead of doing it manually. 2005-03-27 Danilo Šegan * xml2po.py (worthOutputting): Correct final tags semantics. (processElementTag): Use better check for final tags. * modes/docbook.py (docbookXmlMode.__init__): Separate objects tags. (docbookXmlMode.getIgnoredTags): Ignore them. (docbookXmlMode.getFinalTags): Use self.objects. 2005-03-27 Danilo Šegan Fix #162089. * xml2po.py (replaceNodeContentsWithText): Don't use startTagForNode, use endTagForNode. 2005-03-27 Danilo Šegan * modes/docbook.py (docbookXmlMode.getFinalTags): Add 'title' back to final tags. (docbookXmlMode.getFinalTags): Add 'figure', 'textobject', 'imageobject', 'mediaobject', 'screenshot'. * examples/two.po: Update. * xml2po.py (endTagForNode): Added. (processElementTag): Another rewrite. (doSerialize): Adjust for new processElementTag semantics. 2005-03-08 Funda Wang Fix #169577. * xml2po.py: Standard POT Hedaer ouput. 2005-03-07 Danilo Šegan Fix #169438. * xml2po.py (MessageOutput.outputHeader): Output POT Creation date. 2005-03-06 Danilo Šegan * xml2po.py (worthOutputting): Also check if worthOutputting(parent). 2005-03-04 Danilo Šegan * xml2po.py (replaceNodeContentsWithText): Add DTD for entity resolving. 2005-03-04 Danilo Šegan * modes/docbook.py (docbookXmlMode.getFinalTags): Remove 'title'. 2005-03-03 Danilo Šegan * xml2po.1.xml: Remove -f, -i references here as well. 2005-03-02 Danilo Šegan * xml2po.py (usage): Remove -f,-i references from -a help message. * .cvsignore: Added xml2po.1. * xml2po.1.xml: Added manpage source by Daniel Leidert. * Makefile.am: Handle "xml2po.1.xml" and "xml2po.1". 2005-03-01 Danilo Šegan * TODO (DONE): add tags in source references and output PO header. * xml2po.py (MessageOutput.outputMessage): Add "tag" in source references. (processElementTag): Pass node.name as tag to outputMessage. (MessageOutput.outputHeader): output PO file header. (MessageOutput.outputAll): call outputHeader. 2005-03-01 Danilo Šegan Fix #168571. * examples/two.po: Updated example. * xml2po.py (processElementTag): Rewritten. (processFinalTag): Removed. (worthOutputting): Final tags are worth if non-empty. (doSerialize): Respect new processElementTag semantics. (isFinalNode): Also 1 if all node.children are final. (getTranslation): Updated doc string. 2005-02-23 Danilo Šegan * xml2po.py (replaceNodeContentsWithText): Use ParserCtxt instead. 2005-02-23 Danilo Šegan * xml2po.py (replaceNodeContentsWithText): Add DTD here as well. 2004-12-23 Danilo Šegan * TODO: Added tag-simplifying request by Francesco. 2004-12-07 Danilo Šegan * xml2po.py: Not usable as a module (if __name__!='__main__'). 2004-12-07 Danilo Šegan Fix for #160354 by Satoru Satoh . * xml2po.py (usage): Separate usage message. (args): catch getopt exceptions. 2004-10-09 Danilo Šegan * modes/docbook.py (docbookXmlMode.getSpacePreserveTags): Add 'classsynopsisinfo', 'funcsynopsisinfo', 'synopsis', as per DocBook Definitive Guide. 2004-09-28 Danilo Šegan * xml2po.py (tryToUpdate): s/e:/e/ (extract-all-entities needs no parameter). (tryToUpdate): Don't append ".po" to lang. 2004-09-25 Danilo Šegan * xml2po.py: Add "-e" option to do .replaceEntities(1). 2004-09-16 Danilo Šegan * modes/docbook.py (docbookXmlMode.getSpacePreserveTags): Add 'screen' and 'literallayout'. * xml2po.py (MessageOutput.outputAll): Output "no-wrap" if needed. (MessageOutput.__init__): Add nowrap hash. (MessageOutput.outputMessage): Set nowrap for space-preserving messages. * TODO (TODO): More suggestions from Karl. 2004-09-15 Danilo Šegan * xml2po.py (normalizeString): No, never ends: remove more debuging output. 2004-09-15 Danilo Šegan * TODO (TODO): Uhm, it was Karl Eichwalder who proposed these, not Keld (embarrasment never ends!). * xml2po.py: Remove embarrasing debugging printouts. 2004-09-14 Danilo Šegan * xml2po.py (normalizeString): Fix the crash below: this now reports some errors when messages contain entities, and they're not correctly normalized, but at least it doesn't crash (only when used with -k option). 2004-09-14 Danilo Šegan * TODO (TODO): Add some items suggested by Keld. * configure.ac: Version up to 1.0.11. * xml2po.py (stringForEntity): Use expand_entities variable. Add expand_entities variable and "-k", "--keep-entities" options (this currently crashes with the "Segmentation fault" — need to look into it). 2004-06-19 Danilo Šegan * NEWS: Documented changes in 1.0.8, 1.0.9 and 1.0.10. * configure.ac: Move version up to 1.0.10. * README.in (Updating a translation): Changed recommendations for "-u" option. * xml2po.py: Suggest full filename for "-u" option. * xml2po.py (MessageOutput): Add support for translations. Add "-r" parameter for reusing translations. * TODO (TODO, DONE): Updated with new goals and achievements. 2004-04-17 Danilo Šegan * xml2po.py (replaceNodeContentsWithText): Handle whitespace-only fields. 2004-04-12 Danilo Šegan * xml2po.py (xml_error_handler): Use empty error handler. (normalizeString): Set up error handling for parsing. (replaceNodeContentsWithText): Likewise. 2004-04-12 Danilo Šegan * modes/docbook.py: Add "coding: utf-8" comment for Python 2.3's sake. 2004-04-07 Danilo Šegan * configure.ac: Push version number to 1.0.9. * modes/docbook.py (docbookXmlMode.postProcessXmlTranslation): Support "book" as well. (docbookXmlMode._find_articleinfo): Support "bookinfo" as well. 2004-03-18 Danilo Šegan * xml2po.py (MessageOutput.outputAll): Add space for other than first lines of multi-line comments. Call preProcessXml before traversing document tree. * modes/empty.py (emptyXmlMode.preProcessXml): Added. * modes/gs.py (gsXmlMode.preProcessXml): Added. * modes/docbook.py (docbookXmlMode.preProcessXml): Added with function _output_images which outputs simple messages for image files. * xml2po.py (MessageOutput): Move PO file output stuff into separate class, use global variable "msg" to access it. Use preProcessXml for each document. 2004-03-18 Danilo Šegan * Rerelease 1.0.7.1 with correct version number. * Makefile.am (xml2po): Make xml2po depend on configure.ac as well. 2004-03-18 Danilo Šegan * configure.ac: Push version to 1.0.7. * NEWS: Document 1.0.7 news. 2004-03-14 Danilo Šegan * xml2po.py: Support multi-line comments. 2004-03-14 Danilo Šegan * modes/docbook.py (docbookXmlMode.getFinalTags): Add "programlisting" to the list. * Makefile.am (publish): Don't hide the scp command. 2004-03-14 Danilo Šegan * .cvsignore: Add xml2po.pc. * Makefile.am: Add pkg-config related stuff. * configure.ac: Added code to install pkg-config files. * xml2po.pc.in: Added. 2004-03-14 Danilo Šegan * modes/docbook.py (docbookXmlMode._find_lastcopyright): Treat case when there's no children. (docbookXmlMode.postProcessXmlTranslation): Likewise. Handle case without a year. 2004-03-14 Danilo Šegan * modes/.cvsignore: Add *.pyc. * examples/.cvsignore: Add *.pot. * Makefile.am (xml2po): Use $(top_srcdir) when referencing xml2po.py, so builds outside top directory work. 2004-03-14 Danilo Šegan * Finally release 1.0.6 — this is release with major changes. * NEWS: Update with new entries. * xml2po.py (escapePoString): Replace "\t" with "\\t" as well. 2004-03-14 Danilo Šegan * TODO: Mention checking for msgfmt and msgmerge. * README: Document "gs" usage. * modes/Makefile.am (common_DATA): Add gs.py. * modes/gs.py (gsXmlMode): Added mode for handling Gnome Summaries. * examples/one.po: Updated example (gnome summary). 2004-03-14 Danilo Šegan * xml2po.py (args): Exit when printing version. * Makefile.am (publish): Replace spaces with tab so it might even work. * modes/docbook.py (docbookXmlMode.postProcessXmlTranslation): Small fix. * configure.ac: Removed subst of PACKAGE_VERSION. * xml2po.py: Handle undefined translator credits message in modules. Output a warning when module can't be loaded. * README.in: Installation instructions. * NEWS: Mention autotools switch. * TODO (DONE): Move installation TODOs. 2004-03-14 Danilo Šegan * configure.ac: Added check for libxml2. 2004-03-14 Danilo Šegan * autogen.sh: Added. * Makefile.am: Added CLEANFILES. (README): Add "publish" target to the Makefile.am. * README.in, README: Replaced README with README.in. * AUTHORS: Added. * Makefile: Removed, replaced with autotools. * configure.ac: Add autotools configuration. * Makefile.am: Likewise. * examples/Makefile.am: Likewise. * modes/Makefile.am: Likewise. * final-tags, ignored-tags: Removed. * .cvsignore: Add bunch of autogenerated files. * examples/.cvsignore: Likewise. * modes/.cvsignore: Likewise. 2004-03-13 Danilo Šegan * README: Document document type module development and usage. * NEWS (Changes): Document changes to options. * xml2po.py (args): Drop options -f, -i. Replace "-m" with option "-mode" to specify document mode. (read_tags): Drop function. (read_finaltags): Don't read files anymore. (read_ignoredtags): Likewise. (tryToUpdate): Update list of options and option handling. 2004-03-13 Danilo Šegan * TODO: Reflect current state. 2004-03-13 Danilo Šegan * NEWS: Document changes. * xml2po.py (load_mode): Function to dynamically load module. Try to load default_mode (docbook), else use automatic detection. * modes/docbook.py: Add docbookXmlMode suitable for DocBook. * modes/empty.py: Add emptyXmlMode prototype which does nothing. * xml2po.py (escapePoString): Add "\n" to escaping. 2004-03-13 Danilo Šegan * xml2po.py (outputMessage): escapePoString *after* normalizeString. (startTagForNode): Add support for namespaces. * xml2po.py (isSpacePreserveNode): Add function to detect xml:space="preserve". (processFinalTag): Use isSpacePreserveNode function. (processElementTag): Likewise. (normalizeNode): Likewise. 2004-03-13 Danilo Šegan * NEWS: Document fixes for version 1.0.6. * TODO: Document fixes for escaping strings. * xml2po.py (escapePoString): Separate escaping into function. (outputMessage): Use escapePoString here. (normalizeString): Don't escape string here (now we're working with unescaped string everywhere). (getTranslation): Don't replace "&" with "&". 2004-03-12 Danilo Šegan * NEWS: Mention fixes in 1.0.5. Publish a release. 2004-03-12 Danilo Šegan * xml2po.py (read_finaltags): Add orderedlist for better DocType handling. (read_ignoredtags): Likewise. (normalizeString): Improve handling of entities (include DTD at the start of temporary string). * TODO: Updated to reflect current state. * README: Push version to 1.0.5. (Caveats): Document obscure behaviour. * COPYING: Add COPYING (GPLv2 license text). * Makefile (VERSION): Push VERSION to 1.0.5. (DIST): Add COPYING. * xml2po.py (replaceNodeContentsWithText): Small bugfix (s/outtxt/text/). (stringForEntity): Add function to produce a string with replaced entities. (isExternalGeneralParsedEntity): Add hackish function to recognize if a entity reference node is external parsed entity. (doSerialize): Correct handling of entities (both external and other). (VERSION): Push up to 1.0.5. 2004-03-10 Danilo Šegan * TODO (TODO): More TODOs before 1.1. 2004-03-08 Danilo Šegan * Makefile: push VERSION to 1.0.4, release. 2004-03-08 Danilo Šegan * .cvsignore: Added with *.tar.gz. 2004-03-08 Danilo Šegan * README: Updated with requirements and new options. * xml2po.py: Updated help message for new options. * NEWS (Improvements): New "-u" option. * TODO (DONE): Move "-u" option. * xml2po.py (tryToUpdate): Add function for processing "-u" option. 2004-03-08 Danilo Šegan * TODO (DONE): Move TODO for "-p" option here. * NEWS (Improvements): Document "-p" option. * xml2po.py (args): Added "-p" option. 2004-03-07 Danilo Šegan * TODO (DONE): Move "-a" option here. (BUGS): document entity handling bugs. 2004-03-07 Danilo Šegan * NEWS: Document new features. * TODO (BUG): Document external entities. * xml2po.py (worthOutputting): Fix in detecting non-empty nodes. (autoNodeIsFinal): Add function to automatically detect nodes which are final. (isFinalNode): Add automatic detection of tags. (ignoreNode): When automatically detecting, ignore no nodes. * xml2po.py: Add "-a" option for automatic detection of tags. 2004-03-07 Danilo Šegan * NEWS: Added NEWS entry for 1.0.3. * xml2po.py (VERSION): Push up to 1.0.3, release. * Makefile: Push VERSION up to 1.0.3, add rule for publishing a tarball. 2004-03-06 Danilo Šegan * TODO (TODO): Updates to the list. * xml2po.py (doSerialize): Use node.serialize() instead of node.content for leaf nodes. 2004-03-03 Danilo Šegan * Makefile (DIST): Added NEWS. * NEWS: Added with info about 1.0.1 and 1.0.2. * xml2po.py (VERSION): Push to 1.0.2. * Makefile (VERSION): Likewise. 2004-03-03 Danilo Šegan * TODO (DONE): Mark issue with normalizeString as DONE. * xml2po.py (normalizeString): Use libxml2.parseMemory to detect ignoreable whitespace, and to otherwise remove whitespace only in text nodes (meaning attributes keep their spaces). (normalizeNode): Replaces whitespace in text nodes, used in normalizeString. 2004-03-03 Danilo Šegan * TODO: Updated and reorganized list of tasks a bit. 2004-03-03 Danilo Šegan * TODO (DONE): Reflect status of translator comments in TODO. * xml2po.py (getCommentForNode): Added support for extracting translators' comments. 2004-03-03 Danilo Šegan * TODO (DONE): Move "-o" option to reflect status. * xml2po.py: Implemented "-o" option for redirecting output to file. Redirected diagnostic output to stderr. 2004-03-03 Danilo Šegan * TODO: Add translators comments to future TODOs. * xml2po.py (normalizeString): Use regular expressions to strip whitespace (like intltool does now). 2004-03-01 Danilo Šegan * TODO: Add more TODOs. 2004-03-01 Danilo Šegan * Makefile: Improve tarball building (--parents is probably GNU extension). * examples/*: Moved sr.po and tst.xml into examples as example "one". Added another example (part of Bug-Buddy help document) "two". 2004-03-01 Danilo Šegan * Makefile: Added Makefile for creating tarballs. 2004-03-01 Danilo Šegan * xml2po.py (worthOutputting): Add function to check if nodes not listed in final-tags should be translated (compatibility with older xml2po). (replaceNodeContentsWithText): Add function (separated out of processFinalTag). (processElementTag): Use replaceNodeContentsWithText for worthOutputting nodes. * xml2po.py: Add licence notice at start (GPL), add VERSION number (now at 1.0.1) and --version parameter. Remove dependencies on string and types modules. 2004-02-29 Danilo Šegan * xml2po.py (doSerialize): Split processElementTag function, and split that one further into processFinalTag. * TODO (TODO): Added more entries. (DONE): Move nesting TODO to DONE section. Mention source code references as working. * xml2po.py: Support extracting POT from more than one XML file. (read_tags): Added function for reading tags. (read_finaltags): Read final-tags or return defaults. (read_ignoredtags): Read ignored-tags or return defaults. * xml2po.py: Added help message. Use line numbers when writing out POT file. * README: Small fixes, document ignore-tags and final-tags. * xml2po.py (doSerialize): Replace parseNodes and mySerialize with doSerialize: new function which supports nesting of final tags. 2004-02-13 Danilo Šegan * xml2po.py (nodeToText): Removed function. 2004-02-13 Danilo Šegan * xml2po.py: Nesting of final-tags and splitting them in PO files. 2004-01-23 Danilo Šegan * TODO: Updated with startTagForNode notice. 2004-01-22 Danilo Šegan * xml2po.py (parseNodes): (isFinalNode): put "not node.children" inside isFinalNode. (getTranslation): Fix a small bug. 2004-01-22 Danilo Šegan * Started ChangeLog.