Commit Graph

971 Commits

Author SHA1 Message Date
Yuya Nishihara
2c811cd701 log: translate column labels at once (issue5750)
This makes sure that all columns are aligned. getlogcolumns() is hosted by
templatekw so the namespaces module can see it.

i18n/de.po is updated so test-log.t passes with no error. "obsolete:" and
"instability:" are kept untranslated.
2017-12-02 16:29:49 +09:00
Wagner Bruna
9766674d68 i18n-pt_BR: synchronized with f1d5a55d6a57 2017-11-21 13:50:25 -02:00
Augie Fackler
69ce54473a merge with i18n 2017-11-01 16:07:33 -04:00
Wagner Bruna
27cee4a057 i18n-pt_BR: synchronized with cb9be6b29e0b 2017-11-01 08:31:16 -02:00
muxator
aaf12eb558 commands: be more uniform in an "hg update" error message
"can only specify one of -C/--clean, -c/--check, or -m/merge"
becomes
"can only specify one of -C/--clean, -c/--check, or -m/--merge"
2017-10-23 22:45:24 +02:00
Yuya Nishihara
b009eae820 scmutil: extract helper functions that returns human-readable change id
We do "'%d:%s' % (ctx...)" at several places, so let's formalize it. A low-
level function, formatrevnode(ui, rev, node), is extracted so we can pass
a manifest rev/node pair.

Note that hex() for manifest output can be replaced with hexfunc() because
it is printed only when debugflag is set.

i18n/de.po is updated so test-log.t passes with no error.
2017-09-24 12:43:57 +09:00
Kevin Bullock
f0dbcd6ad0 merge with stable 2017-09-18 14:12:20 -05:00
Augie Fackler
5363193f8d merge with i18n 2017-09-18 11:51:41 -04:00
Wagner Bruna
8e84af047a i18n-pt_BR: synchronized with 9a68e2267bd0 2017-07-31 12:18:42 -03:00
FUJIWARA Katsunori
cfbdc0a924 i18n: use actual filename, in which function is defined, for hg.pot
Before this patch, source filename for msgid in hg.pot file becomes
incorrect, if a function is defined in file A, but detected in dict in
file B,

For example, almost all debug* commands are defined in
debugcommands.py, but hggettext detects them in "table" of
commands.py. Therefore, docstring fragments of debug* commands are
marked as "defined in commands.py" in hg.pot file.

This is serious problem for translation, because the cost to find out
original location of texts increases very much.
2017-08-02 00:02:11 +09:00
Augie Fackler
beda3d5545 i18n: update check-translation script to pass import checker 2017-08-22 14:14:52 -04:00
FUJIWARA Katsunori
3880aa6258 i18n: ignore docstring for modules under mercurial
Docstring of modules is needed only for "hg help -e EXTNAME".

This is a preparation for applying hggettext on util.py, which has
module docstring, but it isn't needed for translation.
2017-08-15 21:06:26 +09:00
FUJIWARA Katsunori
cabc81b3e9 i18n: use saved object to get actual function information if available
To list up available compression types instead of
".. bundlecompressionmarker" in "hg help bundlespec" output, proxy
object "docobject" is used, because:

- current online help system requires that __doc__ of registered
  object (maybe, function) is already well formatted in reST syntax

- bundletype() method of compressionengine classes is used to list up
  available compression types, but

- __doc__ of bundletype() object (= "instancemethod") is read-only

On the other hand, hggettext requires original function object, in
order to get document location in source code.

Therefore, description of each compression types isn't yet
translatable. Even if translatable, translators should make much
effort to determine location of original texts in source code.

To get actual function information, this patch makes hggettext use
function object saved as "_origfunc", if it is available. This patch
also changes bundlecompressiontopics() side, in order to explain how
these changes work easily.

This patch is a part of preparations for making description of each
compression types translatable.
2017-08-15 19:27:24 +09:00
FUJIWARA Katsunori
c9b96a17fc i18n: ignore doctest part to avoid warning at "make update-pot"
hggettext assumes that backslashes in docstring are always doubled in
original source code, in order to find the location of original
docstring out certainly.

This assumption almost always works as expected. But doctest easily
breaks it, because many of backslashes in doctests aren't doubled.
This mismatching causes "unknown offset in ..." warning at "make
update-pot".

To avoid such warning, this patch ignores doctest part of docstring
before finding the location of original docstring out.

BTW, at this patch, only person() in templatefilters.py has doctest
part, which causes "unknown offset ..." warning.

Therefore, just making backslashes in that doctest doubled can avoid
such warning, too. But forcing doctest writers to double backslashes
in doctest isn't reasonable, IMHO.
2017-08-13 15:20:16 +09:00
FUJIWARA Katsunori
e62afbdb39 i18n: make hggettext use original docstring to compute offset
Before this patch, hggettext uses __doc__ of each functions to compute
offset of document text.

But __doc__ of many functions is already modified by decorators in
registrar (e.g. @templatekeyword adds ":NAME: " prefix to it), and
hggettext can not find it out in original source.

This causes many "unknown offset in ..." warning at "make update-pot",
and leaving them might cause overlooking serious problems.

This patch makes hggettext use original docstring, which decorators in
registrar save into _origdoc, to compute offset.

Even after this patch, there are still a few "unknown offset in ..."
warning at "make update-pot" for specific reasons. These will be fixed
later one by one.
2017-08-02 01:03:20 +09:00
Augie Fackler
9a0febea27 merge with stable 2017-08-10 14:23:41 -04:00
Augie Fackler
1f0dfd2543 i18n: fix check-translation.py to be less broken on Python 3
These are all simple one-argument print statements, so this syntax
works the same way in 2 and 3.

Differential Revision: https://phab.mercurial-scm.org/D276
2017-06-15 13:31:33 -04:00
Augie Fackler
1248f98f98 merge with stable 2017-07-05 11:55:26 -04:00
Wagner Bruna
4dab97608c i18n-pt_BR: synchronized with bfeb75461255 2017-06-29 12:07:54 -03:00
Wagner Bruna
66a53a8e31 i18n-pt_BR: fix syntax error on translation 2017-06-02 20:50:46 -03:00
Wagner Bruna
2d3ddc9080 i18n-pt_BR: synchronized with 98315436ecec 2017-06-01 20:06:02 -03:00
Wagner Bruna
6d75e48bdf i18n-pt_BR: synchronized with b0ea8556414f 2017-05-31 20:42:58 -03:00
FUJIWARA Katsunori
dc9b825bd4 i18n-ja: synchronized with 878ab1a44c7e 2017-05-01 07:23:29 +09:00
Wagner Bruna
c77d653cee i18n-pt_BR: synchronized with 11b8e606c473 2017-03-02 11:08:20 -03:00
FUJIWARA Katsunori
7f697ba8f8 i18n-ja: synchronized with 11b8e606c473 2017-03-01 16:43:22 +09:00
FUJIWARA Katsunori
4f46584dea i18n: update Report-Msgid-Bugs-To property of *.po files
This patch replaces domain of mercurial-devel ML address by
mercurial-scm.org for "Report-Msgid-Bugs-To" property of each *.po
files.

This avoids releasing 4.1.1 with invalid "Report-Msgid-Bugs-To"
in *.mo file, if corresponded *.po file isn't msgmerge-ed with recent
hg.pot by translator.

These *.po files aren't covered by check-code.py pattern newly added
in subsequent patch, because it ignores them.
2017-02-11 00:23:55 +09:00
Wagner Bruna
7bddc427a8 i18n-pt_BR: synchronized with 9495fca182d9 2017-02-01 08:47:11 -02:00
Matt Harbison
55b2ad69f6 i18n: drop a py25 conditional
I'm not sure how to test this one.  `make update-pot` spews all kinds of
warnings, though it did before this change too.
2017-06-16 20:55:34 -04:00
Augie Fackler
067ebafd12 merge with stable 2017-01-04 14:52:59 -05:00
FUJIWARA Katsunori
09901b0e62 i18n-ja: synchronized with ba32670f6070 2016-12-31 17:19:09 +09:00
Wagner Bruna
8125fda43a i18n-pt_BR: synchronized with bb96c28331a8 2016-11-25 07:39:02 -02:00
Mads Kiilerich
9c5f48e630 shelve: add missing space in help text
The change is trivial and unlikely to have been translated so we update
translation files too.
2016-11-14 22:43:25 +01:00
FUJIWARA Katsunori
01dbfe3b9d i18n-ja: synchronized with 7b9e11755707 2016-11-01 04:27:41 +09:00
Wagner Bruna
9782d338af i18n-pt_BR: synchronized with e12e65f5ea1f 2016-10-22 23:18:43 -02:00
Kevin Bullock
734a4f1625 merge default into stable for 4.0 code freeze 2016-10-18 14:15:15 -05:00
Wagner Bruna
d1300184e4 i18n-pt_BR: synchronized with 6c105ed84c14 2016-10-11 20:39:47 -03:00
Wagner Bruna
511ad6839c i18n-pt_BR: synchronized with 9c29cf2af0ce 2016-08-31 13:58:33 -03:00
FUJIWARA Katsunori
8d71526776 i18n-ja: synchronized with 9b5b7cc2faf0 2016-08-01 08:27:22 +09:00
Wagner Bruna
dc05ec8bba i18n-pt_BR: synchronized with ec63fb038fbc 2016-07-19 19:01:11 -03:00
Pulkit Goyal
aef2bdd39a py3: make files use absolute_import and print_function
This patch includes addition of absolute_import and print_function to the
 files where they are missing. The modern importing conventions are also followed.
2016-07-03 22:28:24 +05:30
Matt Mackall
c0d551e8ec merge with stable 2016-07-01 16:02:56 -05:00
Wagner Bruna
ddd16592d2 i18n-pt_BR: synchronized with fe2fb19f4279 2016-07-01 07:41:37 -03:00
Pierre-Yves David
5bcff70a60 merge with stable 2016-09-14 17:12:39 +02:00
Wagner Bruna
9fe82bf618 i18n-pt_BR: synchronized with 2ae54831e766 2016-05-01 00:12:56 -03:00
Pulkit Goyal
ce56f5973f py3: make i18n/hggettext use print_function 2016-05-13 02:58:15 +05:30
Pulkit Goyal
f24edb8c72 py3: make i18n/hggettext use absolute_import 2016-05-13 02:56:13 +05:30
Pulkit Goyal
6499112aa6 py3: make i18n/posplit use print_function 2016-05-13 03:09:30 +05:30
Pulkit Goyal
91f9f5358d py3: make i18n/posplit use absolute_import 2016-05-13 03:08:46 +05:30
Kevin Bullock
8647dcca4a merge with stable 2016-12-01 15:55:45 -06:00
Augie Fackler
f37a723203 merge with stable 2016-11-27 20:44:52 -05:00