Nodes that are replicated like todo don't have a uid, however i18n also unnecessary.
If extensions need to choose i18n for the extended nodes or not, we need another approach.
- 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.
%z sets an empty string when datetimes are "naive" (no timezone
specified), but some packages expect a timezone specifier on the
POT-Creation-Date header and will error out if it is missing
(e.g. babel's pofile.read_po).
Lifted the stdlib's UTC timezone recipe and set this explicitly, it's
not the correct timezone but at least it's a timezone.
The LocalTimezone recipe might be a better one.
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
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.
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.