Commit Graph

974 Commits

Author SHA1 Message Date
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
Yuya Nishihara
146f5e3a27 i18n: use inspect.getsourcelines() to obtain lineno from func or class
Before, func must be a function object. I want to make it parse docstring
of classes, too.
2016-07-27 21:53:14 +09:00
Mads Kiilerich
38cb771268 spelling: fixes of non-dictionary words 2016-10-17 23:16:55 +02:00
Matt Mackall
2f932b7682 merge with stable 2016-03-02 16:44:56 -06:00
Wagner Bruna
9d5da66d98 i18n-pt_BR: synchronized with bffe7c27f5f7 2016-02-29 22:20:53 -03:00
FUJIWARA Katsunori
27b5df55d8 i18n-ja: synchronized with 03346da08322 2016-02-29 22:52:29 +09:00
Wagner Bruna
520e980e14 i18n-pt_BR: synchronized with f565b894e807 2016-02-03 10:57:27 -02:00
FUJIWARA Katsunori
7b42659ca1 i18n-ja: synchronized with 8722bd8b0726 2016-02-01 23:17:40 +09:00
Wagner Bruna
f0a0975a77 i18n-pt_BR: synchronized with 2fdffa2ec2c4 2016-02-01 12:12:06 -02:00
Matt Mackall
c0ab1b7cbf merge with stable 2016-02-29 17:52:17 -06:00
Bryan O'Sullivan
dd6b32aa80 i18n: fix a test-gendoc.t failure 2016-01-14 10:31:06 -08:00
Matt Mackall
d7ec07e23e merge with stable 2016-01-02 02:13:56 +01:00
FUJIWARA Katsunori
d7f83ba96c i18n-ja: synchronized with b1a0b5b8828a 2016-01-01 12:21:11 +09:00
timeless
2c1511b176 i18n: add execute bit to check-translation.py 2015-12-22 11:03:33 +00:00
Yuya Nishihara
1d7fbf80aa i18n: make sure to include translation of (DEPRECATED)
This patch replaces old "DEPRECATED" msgid by "(DEPRECATED)" if that .po
file does not have "(DEPRECATED)" but have "... (DEPRECATED)".

It is necessary to hide deprecated options correctly.
2015-11-03 22:44:57 +09:00
Yuya Nishihara
1a1642aa7c i18n: do not abuse msgstr of "DEPRECATED" to check for bad translation
Because f94973e0eefb requires the msgstr of "(DEPRECATED)", old *.po files
must be blamed. Using "DEPRECATED" would just hide the error.

For example, "LANG=da_DK.UTF-8 hg help serve" fails to hide deprecated
options right now, but check-translation.py couldn't detect it because
da.po has outdated translation of "DEPRECATED".
2015-11-03 22:39:26 +09:00
FUJIWARA Katsunori
6881eb2c6f i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up
Since f94973e0eefb, deprecated commands, options and so on are
detected by "(DEPRECATED)" instead of "DEPRECATED".

"hg.pot" generated from recent source files doesn't contain msgid
"DEPRECATED", and looking the translation of "DEPRECATED" up in
up-to-date *.po files works incorrectly.

But on the other hand, there are still old *.po files, which contain
msgid "DEPRECATED" but not "(DEPRECATED)". Looking the translation of
"(DEPRECATED)" up in such old *.po files also works incorrectly.

This patch resolves this problem by looking translation of both
"DEPRECATED" and "(DEPRECATED)" up.

This should work correctly, because previous patch makes "deprecated"
checker be applied only on translations, of which msgid contains exact
"(DEPRECATED)" string.

'p.msgstr' examination in 'deprecatedsetup()' is needed to ignore
untranslated entries. This also makes 'deprecatedpe.msgstr'
examination in 'deprecated()' meaningless.
2015-11-01 08:38:56 +09:00
FUJIWARA Katsunori
7c484b491b i18n: fix regexp pattern to detect translation for DEPRECATED
Since f94973e0eefb, deprecated commands, options and so on are
detected by "(DEPRECATED)" instead of "DEPRECATED".

Therefore, 'deprecated' checker in i18n/check-translation.py should
check translation, of which msgid contains "(DEPRECATED)" instead of
"DEPRECATED".

At glance, it seems to do so, but it actually doesn't, because Python
regexp treats "()" as grouping of patterns and "(DEPRECATED)" matches
only against "DEPRECATED".
2015-11-01 08:38:56 +09:00
Wagner Bruna
d32d84ab4a i18n-pt_BR: synchronized with 9258975676a4 2015-11-01 15:24:57 -02:00
FUJIWARA Katsunori
66cb39338f i18n-ja: synchronized with 284326a73bff 2015-11-01 05:34:27 +09:00
FUJIWARA Katsunori
5a05b076f2 i18n: calculate correct line number in source of messages to be translated
Before this patch, line number in source of the message to be
translated is wrong in hg.pot, if corresponded message is placed after
".. DIRECTIVE::", because number of lines related to such directive
isn't added to variable "delta", which holds number of untranslated
lines in given text.

This patch always adds "2" to "delta", because text block is split
into translation units by "\n\n".
2016-02-11 23:15:34 +09:00
Matt Mackall
eb810eca5f merge with stable 2015-10-01 12:17:46 -05:00
Wagner Bruna
9560b312bd i18n-pt_BR: synchronized with e1c84c9ac25a 2015-10-01 11:09:36 -03:00
timeless@mozdev.org
1e8c71dffb i18n-zh_CN: annotate broken HG: translations 2015-09-25 03:47:48 -04:00
FUJIWARA Katsunori
eaf3b5592f i18n-ja: synchronized with 8f6d74e8777a 2015-08-31 23:14:58 +09:00
timeless@mozdev.org
1796c2de4c tests: add more doctests for check-translation deprecated 2015-09-17 21:20:35 -04:00
timeless@mozdev.org
8ab1a3583e tests: cleanup check-translation deprecated 2015-09-17 21:20:17 -04:00
timeless@mozdev.org
cef7f703ed tests: check for inconsistently translated DEPRECATED
Mercurial expects DEPRECATED to be translated consistently,
not doing that breaks Mercurial.
2015-09-17 07:49:18 -04:00
timeless@mozdev.org
80f4daf493 i18n-fr: reject translation which is missing DEPRECATED 2015-09-17 07:33:21 -04:00
timeless@mozdev.org
5d6c8cf675 i18n-pt_BR: select a single definition of DEPRECATED
Mercurial expects DEPRECATED to be translated consistently,
not doing that breaks Mercurial.
2015-09-17 07:47:30 -04:00
timeless@mozdev.org
0f2ad741cd i18n-sv: select a single definition of DEPRECATED
Mercurial expects DEPRECATED to be translated consistently,
not doing that breaks Mercurial.
2015-09-17 07:37:20 -04:00
timeless@mozdev.org
3c256de349 i18n-ro: use ()s instead of [] for DEPRECATED 2015-09-17 07:34:27 -04:00
timeless@mozdev.org
0669670d0b i18n-ro: include translation of DEPRECATED 2015-09-17 07:34:13 -04:00
timeless@mozdev.org
346d662db7 i18n-zh_CN: include translation of DEPRECATED 2015-09-17 07:35:03 -04:00
timeless@mozdev.org
cb880bc40e i18n-it: include translation of DEPRECATED 2015-09-17 07:33:44 -04:00
timeless@mozdev.org
63d6405686 i18n-da: include translation of DEPRECATED 2015-09-17 07:32:28 -04:00
Wagner Bruna
d9218da8c7 i18n-pt_BR: synchronized with 936c4f790419 2015-08-13 16:50:05 -03:00
Matt Mackall
d585ecbe64 i18n: fix unclosed inline span in pt_BR
This was causing test-gendoc.t to complain:

WARNING: Inline interpreted text or phrase reference start-string
without end-string.
2015-07-31 10:49:15 -05:00
FUJIWARA Katsunori
895418cefb i18n-ja: synchronized with bcb4578674eb 2015-07-31 18:39:48 +09:00
Wagner Bruna
1a4e90ed7e i18n-pt_BR: synchronized with 6aaad589ef8a 2015-07-29 11:37:36 -03:00
Gregory Szorc
5380dea2a7 global: mass rewrite to use modern exception syntax
Python 2.6 introduced the "except type as instance" syntax, replacing
the "except type, instance" syntax that came before. Python 3 dropped
support for the latter syntax. Since we no longer support Python 2.4 or
2.5, we have no need to continue supporting the "except type, instance".

This patch mass rewrites the exception syntax to be Python 2.6+ and
Python 3 compatible.

This patch was produced by running `2to3 -f except -w -n .`.
2015-06-23 22:20:08 -07:00
FUJIWARA Katsunori
f215738702 i18n-ja: synchronized with 87267040cd32 2015-06-01 10:50:15 +09:00
Wagner Bruna
d3f6348af8 i18n-pt_BR: synchronized with 1f494259cbf1 2015-05-22 11:54:43 -03:00
FUJIWARA Katsunori
4424b8d24d i18n-ja: synchronized with 0fc13b42416a 2015-04-30 19:12:28 +09:00
Wagner Bruna
51af6ac437 i18n-pt_BR: synchronized with 7deb565901a9 2015-04-29 16:43:02 -03:00
Wagner Bruna
8c89a6489a i18n-pt_BR: synchronized with 44dfca3ef1e3 2015-04-23 00:07:37 -03:00
Michael O'Connor
d4eb35d7ec transaction: add missing newline to message
Add a missing newline to the "journal was created by a
different version of Mercurial" message.
2015-04-14 10:59:26 -04:00
Matt Mackall
8f35738cc3 merge with stable 2015-04-01 20:38:36 -05:00
Wagner Bruna
8c2719662d i18n-pt_BR: synchronized with f920316ac560 2015-03-31 20:20:17 -03:00
Wagner Bruna
af401eafef i18n-pt_BR: synchronized with be4e8b8e43d7 2015-03-01 00:18:43 -03:00
FUJIWARA Katsunori
5a992da389 i18n-ja: synchronized with be4e8b8e43d7 2015-03-01 01:28:05 +09:00
FUJIWARA Katsunori
c16c2eca4a i18n-ja: synchronized with d197a07d4a2b 2015-02-01 08:24:08 +09:00
Wagner Bruna
edf02017e9 i18n-pt_BR: synchronized with 7c70060dff84 2015-01-29 10:13:18 -02:00
Wagner Bruna
465fe55cbb i18n-pt_BR: synchronized with 962d40fe1951 2015-01-18 11:16:45 -02:00
Jordi Gutiérrez Hermoso
8eb132f5ea style: kill ersatz if-else ternary operators
Although Python supports `X = Y if COND else Z`, this was only
introduced in Python 2.5. Since we have to support Python 2.4, it was
a very common thing to write instead `X = COND and Y or Z`, which is a
bit obscure at a glance. It requires some intricate knowledge of
Python to understand how to parse these one-liners.

We change instead all of these one-liners to 4-liners. This was
executed with the following perlism:

    find -name "*.py" -exec perl -pi -e 's,(\s*)([\.\w]+) = \(?(\S+)\s+and\s+(\S*)\)?\s+or\s+(\S*)$,$1if $3:\n$1    $2 = $4\n$1else:\n$1    $2 = $5,' {} \;

I tweaked the following cases from the automatic Perl output:

    prev = (parents and parents[0]) or nullid
    port = (use_ssl and 443 or 80)
    cwd = (pats and repo.getcwd()) or ''
    rename = fctx and webutil.renamelink(fctx) or []
    ctx = fctx and fctx or ctx
    self.base = (mapfile and os.path.dirname(mapfile)) or ''

I also added some newlines wherever they seemd appropriate for readability

There are probably a few ersatz ternary operators still in the code
somewhere, lurking away from the power of a simple regex.
2015-03-13 17:00:06 -04:00
Matt Mackall
b08c6cab93 merge with stable 2014-12-29 13:10:47 -06:00
FUJIWARA Katsunori
ef3bad18bd i18n-ja: synchronized with 04d70d13ef9d 2014-12-29 15:59:56 +09:00
Wagner Bruna
1546a1d329 i18n-pt_BR: synchronized with 480699610f70 2014-12-26 17:21:08 -02:00
Wagner Bruna
3b892bfd69 i18n-pt_BR: synchronized with a05dbabaa7d7 2014-12-01 11:21:30 -02:00
FUJIWARA Katsunori
43f343827a i18n-ja: synchronized with 4b491ac93c5c 2014-11-29 14:32:12 +09:00
Matt Mackall
289d6b53bc merge with stable 2014-12-01 19:34:11 -06:00
Mads Kiilerich
523c87c1fe spelling: fixes from proofreading of spell checker issues 2014-04-17 22:47:38 +02:00
FUJIWARA Katsunori
7568a9762d i18n-ja: synchronized with e47ebaad2ffc 2014-11-01 18:03:17 +09:00
Wagner Bruna
45eb8f69e8 i18n-pt_BR: synchronized with 237838ba8a0e 2014-10-31 22:30:39 -02:00
FUJIWARA Katsunori
659bd4d145 i18n-ja: synchronized with 736cb15b8fb9 2014-11-01 01:03:11 +09:00
Wagner Bruna
9c62163a53 i18n-pt_BR: synchronized with 5ee35e3c2f35 2014-10-27 20:38:17 -02:00
Wagner Bruna
9eb76d45d6 i18n-pt_BR: synchronized with ed876f44a269 2014-10-23 18:17:00 -02:00
Matt Mackall
600a8a1715 merge with i18n 2014-10-18 18:05:10 -05:00
Alexander Sauta
9578fc17f5 i18n-ru: synchronized with bc20b710d0da 2014-10-13 14:46:50 +01:00
Wagner Bruna
0be158ded2 i18n-pt_BR: minor fixes and rewording on histedit help text 2014-09-30 13:43:30 -03:00
Wagner Bruna
61b30f0d0e i18n-pt_BR: synchronized with d307c14fbf45 2014-09-30 10:17:59 -03:00
Wagner Bruna
e7e5f8b6c3 i18n-pt_BR: synchronized with 7bd2f92d9634 2014-09-22 15:39:21 -03:00
Wagner Bruna
aef4c89e3e i18n-pt_BR: synchronized with 359fb11497a4 2014-09-01 10:57:27 -03:00
FUJIWARA Katsunori
645a149940 i18n-ja: synchronized with 86be79fee795 2014-08-31 20:49:13 +09:00
Wagner Bruna
e74e5f203b i18n-pt_BR: synchronized with 86be79fee795 2014-08-30 09:40:31 -03:00
Matt Mackall
c4175c9947 i18n-ru: fix RST breakage spotted by test-gendoc
test-gendoc complained:

   % extracting documentation from ru
   checking for parse errors
+  gendoc-ru.txt:5686: (WARNING/2) Field list ends without a blank
   line; unexpected unindent.
+  gendoc-ru.txt:8327: (WARNING/2) Definition list ends without a
   blank line; unexpected unindent.
2014-08-09 16:04:36 -05:00
Matt Mackall
b1763500b3 i18n-ru: undo fix buildbot breakage
Buildbot complained:

   $ python check-translation.py *.po
+  ru.po:9576:fatal(promptchoice): number of choices differs between
msgid and msgstr
+  [1]

Prompt text was obviously wrong.. because it didn't include a prompt.
2014-08-09 15:46:54 -05:00
Alexander Sauta
fcd2aba024 i18n-ru: syncronized with 0c46fc3bf33b 2014-08-04 16:08:42 +01:00
Alexander Sauta
ffd3e9a4f6 merge with i18n 2014-08-04 16:21:58 +01:00
Alexander Sauta
46861b290d i18n-ru: sync with 664883681beb (fuzzies) 2014-08-04 18:51:18 +04:00
Alexander Sauta
979c9fae76 i18n-ru: sync with 664883681beb (missing strings) 2014-08-01 19:49:28 +04:00
FUJIWARA Katsunori
609db83006 i18n-ja: synchronized with 79b027f3e471 2014-08-01 17:29:02 +09:00
Wagner Bruna
c6972296d9 i18n-pt_BR: synchronized with 132509f68e6a 2014-08-01 02:02:06 -03:00
FUJIWARA Katsunori
c96cb8047e i18n-ja: synchronized with 30dda0e5f710 2014-08-01 01:13:53 +09:00
Vladimir Zakharov
31c92599e4 i18n-ru: update 'revisions' translation 2014-07-30 17:24:08 +04:00
Wagner Bruna
4676efefe3 i18n-pt_BR: synchronized with 664883681beb 2014-07-29 19:29:02 -03:00
Vladimir Zakharov
4b1133e73b i18n-ru: update 'revsets' translation 2014-07-29 19:08:41 +04:00
Pierre-Yves David
7ff3cfd076 i18n: add parenthesis in Brazilian translation of the resolve message
Eu falo brasileiro agora. Eu não sou uma batata!
2014-07-26 03:35:42 +02:00
Wagner Bruna
d98e4eed2d i18n-pt_BR: synchronized with 4bd0f3b99c93 2014-07-20 18:08:29 -03:00
Matt Mackall
b738313af7 merge with stable 2014-10-01 15:05:09 -05:00
Augie Fackler
f41d193435 merge with stable 2014-09-04 09:59:23 -04:00
Mads Kiilerich
ecd224f8a0 cleanup: rename check-translation.py checker function - don't hide global var 2014-08-15 16:20:47 +02:00
Alexander Sauta
71da53dee4 i18n-ru: prompts fixed 2013-10-16 08:22:06 +01:00
Wagner Bruna
c3d415934f i18n-pt_BR: synchronized with dcea22e932ea 2014-06-30 18:52:57 -03:00
FUJIWARA Katsunori
c3902d4df9 i18n-ja: synchronized with dcea22e932ea 2014-06-30 19:09:01 +09:00
FUJIWARA Katsunori
0046eddd01 i18n-ja: synchronized with cf35f502afe7 2014-05-30 19:52:55 +09:00
Martin Geisler
0f500cca9a i18n-zh_TW: set Language header
This avoids a warning from msgfmt:

  $ msgfmt -v -o mercurial/locale/zh_TW/LC_MESSAGES/hg.mo i18n/zh_TW.po -c
  i18n/zh_TW.po:7: warning: header field 'Language' still has the
  initial default value
2014-05-07 09:23:23 +02:00
Jakob Krainz
fa0a94dffd i18n-de: translation improvement for gpg extension 2014-05-07 09:15:58 +02:00