summaryrefslogtreecommitdiff
path: root/itstool.in
Commit message (Collapse)AuthorAgeFilesLines
* Fix errors from accidental global variable removalShaun McCance2020-12-261-7/+8
| | | | | | In a recent commit for profiling, I moved the __main__ code to a main() function. This broke some stuff that relied on an accidentally global variable. Now the variable gets passed as a param, as it should.
* Cache computed values for translate, localefilter, and locnoteShaun McCance2020-12-121-6/+35
| | | | | | | | If these aren't explicitly set for a node with a selector or local markup, then we have to chain up, often all the way to the root. But we were doing this over and over again, chaining up across the same nodes. This change stores the computed value, so chaining up usually hits that cache. I was careful to clear the cache if new rules are applied.
* Don't re-lookup ITS params for every single ruleShaun McCance2020-12-061-26/+39
| | | | | | | | | We have to create a new XPath context for every rule, and we have to freshly apply any ITS params to that context. But what we were also doing is looking thru the children of the parent ITS rules element for param element each time. This was inefficient. Looking for param elements only once per ruleset gives a small but measurable speed boost.
* Apply ITS files passed with -i in --join modeShaun McCance2018-11-081-0/+3
| | | | Fixes https://github.com/itstool/itstool/issues/34
* Fix py 2/3 issues and add a test caseShaun McCance2018-08-211-19/+15
|
* Open file as bytes, since we're saving bytes!Álvaro Muñoz2018-08-201-3/+3
|
* Fix #28 (python 3.7, macOS)Álvaro Muñoz2018-08-181-0/+3
|
* Fix #30Álvaro Muñoz2018-08-181-0/+2
|
* Fix compatibility with pyhton 3.7 (no need to encode to bytes)Álvaro Muñoz2018-08-181-2/+2
|
* Be more careful about libxml2 memory managementShaun McCance2017-10-251-2/+11
| | | | I think this fixes https://github.com/itstool/itstool/issues/17
* Fix massive performance issueShaun McCance2017-10-111-2/+9
| | | | Fixed https://github.com/itstool/itstool/issues/15
* Merge branch 'master' into placeholderShaun McCance2017-08-151-79/+116
|\
| * Merge pull request #3 from hsoft/masterShaun McCance2017-08-151-79/+114
| |\ | | | | | | | | | | | | Add python 3 support All tests pass with both py2 and py3
| | * Fix problem with merging translations under py3Virgil Dupras2016-01-161-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes three problems at once: 1. When fiddling with credits nodes, we would get an error about libxml2 expecting `str` rather than `bytes`. We could fix this by encoding the value only when uner py2. 2. When writing the merged XML, our serlialized data would be `str` under py3, which would cause implicit encoding problems when writing that contents to the file. 3. `fout` would not be closed after writing, which would sometimes cause the target file to end up with no contents at all (at least on my machine.
| | * Add python 3 supportVirgil Dupras2015-03-151-77/+103
| | |
| * | Fix keep entities mode after libxml2 changesShaun McCance2017-08-151-0/+2
| | | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=762110
* | | Get Placeholder out of MessageClaude Paroz2017-05-011-7/+8
|/ /
* | Add -j command to UsageShaun McCance2016-09-021-1/+3
| |
* | Add --path option for extra paths for ITS filesShaun McCance2016-08-311-2/+17
| |
* | Don't error out (except under -s) for mismatched placeholdersShaun McCance2016-03-141-1/+11
|/
* Fix UTF-8 handling for translated attributesShaun McCance2014-03-171-1/+1
|
* itstool.1: Update man pageShaun McCance2013-12-171-1/+1
|
* Don't hardcode python pathRyan Lortie2013-12-111-1/+1
| | | | | | | Instead, use automake to find it at runtime and put #!@PYTHON@ at the top of itstool.in. https://bugs.freedesktop.org/show_bug.cgi?id=72533
* Fixed crash in locale filter and drop rule, #715116Shaun McCance2013-11-241-2/+2
| | | | | When the dropped node has no preceding sibling, itstool crashes because it tries to unlink prev node if it's blank.
* itstool.in: Allow users to set ITS paramsShaun McCance2013-11-011-24/+38
|
* Merge branch 'master' into its-2-0Shaun McCance2013-10-281-9/+38
|\
| * Added an option to retain entity referencesShaun McCance2013-09-211-5/+27
| | | | | | | | | | | | | | You still have to load the DTD if the entities are defined in the external subset, because libxml2 checks references even if it doesn't dereference them. It would be nice if this weren't necessary.
| * Fix utf8 issue introduced in Sep 20 commitShaun McCance2013-09-211-4/+6
| |
| * Merge commit 'refs/merge-requests/4' of gitorious.org:itstool/itstoolShaun McCance2013-08-211-3/+10
| |\
| | * add --load-dtd optionGalen Charlton2012-08-291-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option tells itstool to load external DTDs when parsing the document to be translated. This prevents errors when the document includes entity references defined in those DTDs. Note that externally-defined entity refs still cannot be used in translated strings in the PO files. Also note that this adds test cases that require either network access or updating the local XML catalog to including the DocBook DTDs. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
* | | Support localeFilterType="exclude"Shaun McCance2013-10-281-16/+48
| | |
* | | Add support for its:paramShaun McCance2013-10-271-1/+11
| | |
* | | Fixed issue with preserveSpace from xml:space attributeShaun McCance2013-10-271-8/+7
| | |
* | | Properly handle loc note inheritanceShaun McCance2013-02-091-4/+7
| | |
* | | Add LocNote class to better track localization note infoShaun McCance2013-02-091-19/+50
| | |
* | | Fix IdValue for attributes and nodes with attributesShaun McCance2013-02-091-1/+1
| | |
* | | Adding the ITS 2.0 test suite, found here:Shaun McCance2013-02-021-8/+25
| | | | | | | | | | | | https://github.com/finnle/ITS-2.0-Testsuite/commits/master
* | | Implemented ITS 2.0 "ID Value" data categoryShaun McCance2012-09-261-1/+47
| | |
* | | Support for local withinTextShaun McCance2012-09-211-2/+10
| | |
* | | Fix tests for namespace prefix handlingShaun McCance2012-09-201-4/+4
| | |
* | | Merge branch 'master' into its-2-0Shaun McCance2012-09-201-2/+8
|\ \ \ | |/ /
| * | Support namespace prefixes on elementsShaun McCance2012-09-201-2/+8
| |/
* | Adding test output for External ResourceShaun McCance2012-09-191-0/+2
| |
* | Use External Resource implementation for itst:externalRefRuleShaun McCance2012-09-191-40/+6
| |
* | Implemented ITS 2.0 External Resource data categoryShaun McCance2012-09-191-0/+51
| |
* | Sort attribute names in test outputShaun McCance2012-09-111-2/+2
| |
* | First pass at implementing Locale FilterShaun McCance2012-09-111-37/+124
| |
* | Implemented test suite output for withinTextShaun McCance2012-09-101-12/+15
| |
* | Adding test suite output for its:translateShaun McCance2012-09-101-33/+77
| |
* | Implemented ITS 2.0 Preserve Space data categoryShaun McCance2012-09-081-7/+13
|/