Commit Graph

182 Commits

Author SHA1 Message Date
shimizukawa
87527b8558 fix too long line 2015-02-24 22:38:49 +09:00
shimizukawa
bb85c1c87f refs #1235: i18n: 'uri' and 'alt' attribute on 'image' and 'figure' nodes can be translated if gettext_additional_targets has 'image'. 2015-02-22 19:35:49 +09:00
shimizukawa
0ad1c154c0 refs #1235: i18n: 'doctest-block' and 'raw' node can be translated if gettext_additional_targets has that string. 2015-02-22 15:40:01 +09:00
shimizukawa
c53fa4b369 refs #1235: i18n: 'literal-block' node can be translated if 'literal-block' is set to gettext_additional_targets. 2015-02-22 13:51:02 +09:00
Georg Brandl
a23903d8d5 Merge branch 'stable' 2015-01-03 21:41:14 +01:00
Georg Brandl
567d52f199 all: update copyright 2015-01-03 21:36:32 +01:00
Georg Brandl
7bbaa4c73f Test suite fixes after env.update() change. 2014-09-22 15:08:15 +02:00
Georg Brandl
ac690b4b07 move new assertion helpers to util.py 2014-09-21 18:54:01 +02:00
Georg Brandl
fa91f19e55 Reimplement assert_in and assert_not_in, they are not in nose in Py2.6. 2014-09-21 18:48:21 +02:00
Georg Brandl
be72ed6dc7 Refactor/speed up test_intl by combining all tests with a certain builder into a generator. 2014-09-21 18:26:50 +02:00
Georg Brandl
d47a7587f9 Complete test suite overhaul.
* rename a few test modules to make the names more consistent

* do not copy/use Sphinx from build/ (unnecessary without 2to3)

* use a temporary dir for *all* test projects, the source tree
  will stay pristine that way  (default is tests/build)

* speed up tests by ~3x by splitting up test projects and avoiding
  rebuilds
2014-09-21 17:17:02 +02:00
Takayuki Shimizukawa
2d1549b35a wrap py3 iterators with list() for each places that expect a list object. refs #1350. 2014-04-30 23:25:44 +09:00
Takayuki Shimizukawa
1e58062692 remove 'six' name except importing line. 2014-04-30 21:30:46 +09:00
Takayuki Shimizukawa
c3c879f2c6 use six privided functions/classes to support py2/py3 in one source. refs #1350. 2014-04-29 19:59:58 +09:00
Takayuki Shimizukawa
68290a266c introduce the six module and reduce sphinx.util.pycompat implementation. refs #1350. 2014-04-29 11:46:47 +09:00
Georg Brandl
18755458a1 merge with stable 2014-03-25 09:31:44 +01:00
Takayuki Shimizukawa
43a9881c4b Fix i18n: missing python domain's cross-references with currentmodule directive or currentclass directive. refs #1363
* node attributes 'py:module', 'py:class' is provided from environment (e.x. currentmodule directive is provided on previous line, not on node)
* Because translation nodes are parsed in independently, 'provided attributes by environment' are not exist.
* For a pending_xref nodes, all attributes of a translated xref node should be same as original xref node in current test cases.
* For the above reasons, I overwrite all attributes from origonal node to new translated xref node.
2014-03-23 23:01:15 +09:00
Georg Brandl
ac92719ac3 Update copyright year. 2014-03-01 08:18:23 +01:00
Georg Brandl
e030031321 Update copyright year. 2014-03-01 08:18:16 +01:00
Dmitry Shachnev
ce2185ce27 Modernize the code now that Python 2.5 is no longer supported
- Use print function instead of print statement;
- Use new exception handling;
- Use in operator instead of has_key();
- Do not use tuple arguments in functions;
- Other miscellaneous improvements.

This is based on output of `futurize --stage1`, with some
manual corrections.
2014-01-19 14:17:10 +04:00
Takayuki Shimizukawa
f7cb510ebd Drop python-3.1 and remove support codes 2013-12-15 16:04:23 +09:00
Takayuki Shimizukawa
a8fc938d1b Drop python-2.5 and remove 2.4,2.5 support codes 2013-12-15 14:16:53 +09:00
Takayuki Shimizukawa
63d34cca47 Add tests and code refine for pull request #190. 2013-11-12 15:17:09 +00:00
Georg Brandl
424ca5c28a test_intl fix-up after versionmodified change. 2013-10-12 22:57:09 +02:00
Takayuki Shimizukawa
313559116d Backed out changeset cfe9e2d11003 refs #1265 2013-10-04 08:12:20 +00:00
Takayuki Shimizukawa
603a75d8d3 Now gettext translates label target name. Fix i18n: crash when using a indirect target and translating a target section name. Closes #1265 2013-10-04 05:07:09 +09:00
Takayuki Shimizukawa
b37f385810 Add test refs #1265 (comment-6264794) to validate translated label link shifting. 2013-10-03 02:53:53 +00:00
Takayuki Shimizukawa
7682f477dc Fix i18n: crash when translating section name that is pointed from named target. Closes #1265 2013-09-23 19:53:22 +09:00
Takayuki Shimizukawa
33c9e1fb28 Fix i18n: gettext did not translate admonition directive's title. Closes #1206 2013-07-03 08:19:10 +00:00
Takayuki Shimizukawa
7904b0678a Fix i18n: footnote reference number missing for auto numbered named footnote and auto symbol footnote. Closes #1176 2013-06-21 03:28:32 +00:00
Takayuki Shimizukawa
2cdb6b03c9 test improvement 2013-06-21 01:09:13 +00:00
Takayuki Shimizukawa
4579bb6e85 fix: translation mechanism break label target if label and section name are same. refs #1193 2013-06-19 06:07:47 +00:00
Takayuki Shimizukawa
f9b733fc47 test_intl:external_link test case correction to fit to reST syntax. 2013-06-18 11:14:27 +00:00
Takayuki Shimizukawa
a997f98333 fix: keep reference if link refname was translated. refs #1193
case1::

   Keep link to ExternalSite_.

   It will translated with ``\`SomeOtherString\`_``.

   .. _ExternalSite: http://example.com

case2::

   Keep link to `title string`_ before appearing.

   title string
   =============

case3::

   Keep link to glossary 'term string'.

   .. glossary::

      term string
         description...
2013-06-19 10:42:26 +00:00
Takayuki Shimizukawa
afc6b6d1f8 Fix: Multiple references in the same line return the same link with i18n. Closes #1193 2013-06-17 00:12:02 +09:00
Takayuki Shimizukawa
bd4da7df55 add tests for "multiple cross references in the same line return the same link". refs #1090, #1193 2013-06-16 14:25:29 +09:00
Takayuki Shimizukawa
deb01d8e30 Fix multiple cross references (term, ref, doc) in the same line return the same link with i18n. refs #1090, #1193 2013-06-16 23:57:08 +09:00
Takayuki Shimizukawa
c8ebb875de Rebuild i18n target document when catalog updated 2013-04-15 00:56:13 +09:00
Georg Brandl
52515eeb86 Copyright header update. 2013-04-01 11:41:48 +02:00
Georg Brandl
1af3e3ea71 tests: replace "from util import *" by explicit imports 2013-04-01 11:39:32 +02:00
Georg Brandl
9abf39f912 Fix overlong lines. 2013-03-31 15:44:04 +02:00
Takayuki Shimizukawa
b8850502d2 merge heads 2013-03-17 10:58:28 +09:00
Takayuki Shimizukawa
2c409959ac Add i18n capabilities for custom templates.
For example: The Sphinx reference documentation in doc directory provides
sphinx.pot file from ``doc/_templates/*.html`` by ``make gettext``.
2013-03-10 22:07:31 +09:00
Nozomu Kaneko
1bd7aaed7f merge 2013-02-06 13:28:26 +09:00
Takayuki Shimizukawa
7ebd7ab2a9 fix: roles' reftarget ware swapped if there are some roles in 1 line and translation exchange rthat roles position. refs #1090 2013-02-05 12:47:08 +09:00
Takayuki Shimizukawa
d6f31f3fa1 remove unusable 'SEVERE: Duplicate ID' message for footnote that the translation node has been recognized as a duplicate. 2013-02-04 23:06:44 +09:00
Takayuki Shimizukawa
c1c0a03895 fix: reporting correct line number when translations have wrong reST syntax or else. 2013-02-04 22:23:03 +09:00
Nozomu Kaneko
81d21a7714 make versionmodified translatable 2013-02-04 09:03:34 +09:00
Nozomu Kaneko
6aa8d4b373 Merged in knzm/sphinx-fix-docfields-fork (pull request #96) 2013-02-04 05:59:15 +09:00
Takayuki Shimizukawa
a86ea846e2 Fix :term: doesn't link to glossary if term text translated. refs #1090 2013-01-30 23:41:37 +09:00
Takayuki Shimizukawa
6f4764f77b Fix gettext does not extract glossary terms. Closes #1090 2013-01-30 00:13:58 +09:00
Georg Brandl
7d68f0e4a2 Fix long lines reported by "make check". 2013-01-13 10:22:38 +01:00
Nozomu Kaneko
d2a087e88d fix tests correspond to 6c70ca26a841 (Divide test_intl target ...) 2013-01-06 20:33:43 +09:00
Robert Lehmann
32b87e258b merge birkenfeld/sphinx 2013-01-06 12:14:57 +01:00
Nozomu Kaneko
f01d1358f8 resolve conflicts 2013-01-06 20:12:54 +09:00
Robert Lehmann
2b3fb57cc5 merge knzm/sphinx-fix-seealso-fork 2013-01-06 11:44:58 +01:00
Takayuki Shimizukawa
9b9c69042e Divide test_intl target source files for speed-up. 2013-01-06 16:15:49 +09:00
Takayuki Shimizukawa
b17c588b0d Closes #976: Fix gettext does not extract index entries. 2013-01-05 23:38:21 +09:00
Nozomu Kaneko
a56a8f87c8 merge 2013-01-05 20:43:45 +09:00
Takayuki Shimizukawa
ab6706e6ed Closes #940: Fix gettext does not extract figure caption.
This is docutils issue.
see also: https://sourceforge.net/tracker/?func=detail&aid=3599485&group_id=38414&atid=422032
2013-01-05 01:06:42 +09:00
Jonathan Waltman
cf4166fa58 Fix `test_i18n_literalblock_warning` which would sometimes fail due to the text wrapping of error messages. 2013-01-03 13:55:26 -06:00
Takayuki Shimizukawa
7022b6f251 Add regression test for gettext does not extract definition terms. Closes #975 2013-01-01 14:17:53 +09:00
Nozomu Kaneko
023a53c609 stop calling rmtree in a test 2012-12-24 04:04:39 +09:00
Nozomu Kaneko
ba50c00a0e merge heads 2012-12-24 03:39:37 +09:00
Nozomu Kaneko
40b5167657 remove useless comments 2012-12-19 08:02:21 +09:00
Nozomu Kaneko
ccd8067ee5 fix #1058: footnote backlinks with i18n 2012-12-19 07:49:17 +09:00
Nozomu Kaneko
a1e9f2d675 make docfield translatable 2012-12-18 06:08:25 +09:00
Takayuki Shimizukawa
6e044aedbc Avoid unusable warning in using i18n translation. Closes #1057.
And there is related information at pull request #86
2012-12-16 22:56:38 +09:00
Nozomu Kaneko
13850c478d make seealso translatable 2012-12-16 13:20:01 +09:00
Jonathan Waltman
29f768e48f Fix minor bugs in test_intl.py causing tests to fail under python 2.5
os.path.relpath not defined in Python 2.5, use equivalent from
sphinx.util.pycompat

Also avoid trying to create an existing directory when remnants exist
of an earlier failed build
2012-12-11 01:36:50 -06:00
Takayuki Shimizukawa
21355d3249 Update warnings for inconsistency reference translations. Thanks @jonwaltman! 2012-12-07 16:38:21 +09:00
Takayuki Shimizukawa
bfe96c14a7 fix: rescue extra named-reference that appeared in same translation message. 2012-12-05 20:52:19 +09:00
Takayuki Shimizukawa
e9275d3f0c change: Make readable-text a priority.
If the number of reference does not match then some links will be broken.
2012-12-05 19:35:07 +09:00
Takayuki Shimizukawa
e9f3ad438b move i18n test documents to i18n subdir. 2012-12-05 13:38:04 +09:00
Takayuki Shimizukawa
8a1cb70354 refactoring 2012-12-05 13:11:30 +09:00
Takayuki Shimizukawa
2472dcec39 checking whether the number of references is equal in both the translated form and the untranslated form? If they're not equal, emit a warning and don't bother trying to transfer the references. 2012-12-05 13:11:16 +09:00
Takayuki Shimizukawa
c347b50330 fix #1044 refs #955: fix external/inline links with localization 2012-11-27 17:30:08 +09:00
Takayuki Shimizukawa
f50091b643 fix #955: consider the numbered-footnote. update test and code 2012-11-22 12:12:41 +09:00
Takayuki Shimizukawa
30c3fff6d7 fixed #955: footnote i18n translation cause KeyError and 'Only update text nodes in translation' change at b7b808e46851 break translation. 2012-11-22 11:43:09 +09:00
Tim Martin
4fb8139f36 Fixed a bug in test_intl.py: teardown didn't get called if the test was skipped 2011-04-17 00:22:10 +01:00
Robert Lehmann
3de93d83d6 Split up tests for locale patching. 2010-11-14 19:50:30 +01:00
Robert Lehmann
f055c1593f Split up sphinx-i18n tests into build and patch phase. 2010-11-14 19:42:50 +01:00