Re: [PATCH 12/12] fsck: mark strings for translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 于2018年10月30日周二 上午1:43写道:
> On Mon, Oct 29 2018, Ævar Arnfjörð Bjarmason wrote:
> Unlike the rest of our stack where we need to support however many years
> old tools we can freely rely on bleeding-edge gettext features, since
> the only person we need to convince to upgrade is Jiang. I.e. he accepts
> the PRs from translators, (presumably) runs msgfmt --check and then
> submits the result to Junio.

I used a shell script to check commits before I send a pull request to Junio.
This script is in the po-helper branch, see:
https://github.com/git-l10n/git-po/tree/po-helper

It can catch unmatched '\n' errors (missing or unnecessary '\n').

    $ git diff
   diff --git a/po/zh_CN.po b/po/zh_CN.po
   index eabd4d1f8e..6b0d9ebc60 100644
   --- a/po/zh_CN.po
   +++ b/po/zh_CN.po
   @@ -5157,7 +5157,7 @@ msgstr  "略过补丁 '%s'。"
    #
    #, perl-format
    msgid   "Skipping %s with backup suffix '%s'.\n"
   -msgstr  "略过 %s 含备份后缀 '%s'。\n"
   +msgstr  "略过 %s 含备份后缀 '%s'。"
    #
    #, c-format
    msgid   "Skipping repository %s\n"

   $ LC_ALL=C po-helper.sh check
   ------------------------------------------------------------
   bg.po     : 3958 translated messages.
   ca.po     : 3328 translated messages, 18 fuzzy translations, 30
untranslated messages.
   de.po     : 3958 translated messages.
   es.po     : 3958 translated messages.
   fr.po     : 3957 translated messages, 1 fuzzy translation.
   is.po     : 14 translated messages.
   it.po     : 716 translated messages, 350 untranslated messages.
   ko.po     : 3608 translated messages.
   pt_PT.po  : 3198 translated messages.
   ru.po     : 3366 translated messages, 594 untranslated messages.
   sv.po     : 3958 translated messages.
   vi.po     : 3958 translated messages.
   zh_CN.po  : po/zh_CN.po:19717: 'msgid' and 'msgstr' entries do not
both end with '\n'
   msgfmt: found 1 fatal error
   3958 translated messages.
   ------------------------------------------------------------
   Show updates of git.pot...

   # Nothing changed. (run 'make pot' first)
   ------------------------------------------------------------
   Check commits...

   0 commits checked complete.
   ------------------------------------------------------------
   Note: If you want to check for upstream l10n update, run:
   Note:
   Note:     po-helper.sh check update <remote>
   ------------------------------------------------------------

So, no warry about it. BTW, I agree with Jonathan.

> Jonathan said:
> IMHO the advantage of leaving the \n out in the message is not so much
> that we don't trust translators but more that where we can make their
> lives easier, we should.

--
Jiang Xin




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux