Commit Graph

23 Commits

Author SHA1 Message Date
Takayuki Shimizukawa
b91f70be6e Fix: 'make gettext' cause UnicodeDecodeError when templates contain utf-8 encoded string. 2013-04-13 22:44:37 +09:00
Takayuki Shimizukawa
b0b81d194d Fix: although template file did not have translation string, 'makee gettext' generate sphinx.pot 2013-04-13 21:16:22 +09:00
Georg Brandl
71360bcac6 builders: fix status_iterator backwards compatibility 2013-03-29 18:19:57 +01: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
Georg Brandl
9b4efc9ba3 Fix pyflakes issues. 2013-01-13 10:26:52 +01:00
Takayuki Shimizukawa
b17c588b0d Closes #976: Fix gettext does not extract index entries. 2013-01-05 23:38:21 +09:00
Georg Brandl
151856819c Copyright update. 2013-01-01 22:13:15 +01:00
Georg Brandl
9a4a3c9afa Satisfy "make check". 2011-10-09 23:09:57 +02:00
Robert Lehmann
468a15cbf0 Add project name to PO header. 2011-10-08 16:04:42 +02:00
Robert Lehmann
0f47e55787 Respect gettext_compact in message patching too. 2011-10-03 14:08:33 +02:00
Robert Lehmann
77329bf497 Closes #561: Add configuration option to prevent catalog bundling. 2011-10-03 13:20:53 +02:00
Georg Brandl
d7d7e0287f Fix #765: on Windows, relpath() does not always succeed. 2011-09-21 19:06:48 +02:00
Kouhei Sutou
773ba3b768 [i18n] fix reference line separator.
This commit fixes part of 5976facae92c commit:
  Refactor comment generating code for message catalogs.

The commit says "Refactor" but it changes original code behavior.
In original code, source locations are separated with " " but
in refactored code, source locations are separated with ", ".

msgmerge and po-mode that are part of the GNU gettext toolset treats
"," as part of source location. We can fix this problem by one of them:

  * Use " " instead of ", " as source locations separator
    in a "reference" line.
  * Put "reference" lines. Each "reference" line just has a source location.

This commit uses the latter because the latter has more higher readablility.

See also about "reference" line but it doesn't say about separator:
  http://www.gnu.org/s/hello/manual/gettext/PO-Files.html
2011-08-14 19:55:07 +09:00
Kouhei Sutou
f98cfbe862 [i18n] use relative path from output directory for source path.
This commit reverts part of 5976facae92c commit:
  Refactor comment generating code for message catalogs.

The commit says "Refactor" but it changes original code behavior.
In original code, start path for path.relpath() is self.outdir but
in refactored code, start path for path.relpath() is self.srcdir.

It should be self.outdir not self.srcdir to improve po-mode.el
support. po-mode.el has "po-cycle-source-reference" command. It
search source code relative from .po file directory.

See also::
  http://www.gnu.org/s/hello/manual/gettext/C-Sources-Context.html

    Program source files are usually found relative to where the PO
    file stands. As a special provision, when this fails, the file
    is also looked for, but relative to the directory immediately
    above it.
2011-08-12 14:29:19 +09:00
Robert Lehmann
b5f53e1972 Move node filtering into extract_messages. 2011-07-06 08:52:07 +02:00
Robert Lehmann
f1f7bde914 Distribute UUIDs over multiple comment lines. 2011-07-06 08:34:26 +02:00
Robert Lehmann
f477eaf26f Comment and stretch out code.
Also leverage the fact that we ignore Sphinx' built-in messages for catalogs.
2011-07-06 08:31:40 +02:00
Robert Lehmann
651a00f3cd Close #630: Revamp data structures used for message catalogs. 2011-07-06 08:25:25 +02:00
shibukawa yoshiki
16a2fd9010 skip literal_block 2010-10-28 09:34:47 +09:00
Robert Lehmann
0c9c9e8bee Refactor comment generating code for message catalogs.
Bring back UUIDs in comments too.

Overrides kou's 7b77dd3717af.
2011-07-06 07:50:02 +02:00
Kouhei Sutou
c43e9f2fef [i18n] support reference line.
From "3 The Format of PO Files" at
http://www.gnu.org/s/hello/manual/gettext/PO-Files.html ::

  Comment lines starting with #: contain references to the program's
  source code.

The reference comment is useful to jump to the source position.
GNU gettext tools support the reference comment. e.g.: po-mode.el binds
"s" key to "po-cycle-source-reference" that opens a source position in
a new buffer.
2011-05-08 17:48:38 +09:00
Kouhei Sutou
0d610fcff4 [i18n] don't generate duplicated msgid. 2011-05-08 17:32:41 +09:00
Georg Brandl
c266128c6d Rename "intl" module to "gettext", to make it easier to find. Distinguish environments with different versioning methods and always give the gettext builder its own doctree dir. 2011-01-08 17:32:32 +01:00