Re: [PATCH v3 2/2] l10n: Add git-add.txt to localized man pages

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

 



On Mon, Mar 20, 2017 at 11:05 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> But more importantly, aren't we essentially adding an equivalent of
>
>         cd Documentation && cat git-*.txt
>
> to our codebase?
>
> Surely we cannot avoid having a copy of all messages that are to be
> translated using msgid/msgstr based approach, and we already do so
> for end-user-facing in-program strings, but it just feels a bit too
> much having to carry a duplicate (and slightly a stale) copy of the
> entire documentation set around.  For N languages, we'll have an
> equivalent for N copies of the English text, in addition to the
> translated documentation.

As someone reading this thread from the sidelines you never elaborate
on why this is a problem worth solving (other than "a bit too much")
before everyone downthread jumped on trying to figure out how to solve
this out-of tree somehow.

So I thought I'd do a basic test of what it would mean to have this
in-tree. For every git version (every tag) since v1.0.0 I created a
parallel version of all our git-*.txt documentation, applied rot13 to
it, and dropped it in Documentation/po/rot13[1].

The end result after repack is:

    $ du -sh git-*/.git
    88M     git-orig/.git
    89M     git-po4a/.git

Now of course this isn't equivalent to the *.po files we're talking
about, which'll also contain the original English version, so let's
say that's at least 2x the size, or just assume 2.5x for extra
overhead because the translation is longer / uses higher Unicode
characters or whatever.

That's still only an extra 2.5MB per-language for 10 years of history,
and an extra 3.75MB to the checkout.

Even if we had 10 languages with a 100% translation (a stretch, since
the core translations in po/ only have 12 languages) the .git
directory would grow from the current 88MB to 113MB, and the checkout
from 33MB to 70MB (for comparison the existing po/ directory is
5.3MB).

Maybe I've just become desensitized to bigger repos but that seems
like nothing to me. For comparison the linux.git repository has a
1.9GB .git and an 800MB checkout.

There's always going to be some inconvenience cost to pay when cloning
doesn't Just Work. Right now grabbing any tar'd up git.git from any
service it's on will give you something you can fully build. This'll
no longer be the case for the po4a assets.

If there's a good reason to break that kind of stuff fine, but the
growth in repo/checkout size noted above seems tiny to me compared to
disks & hardware these days.

1. rm -rfv Documentation/po; mkdir -p Documentation/po/rot13; for
version in $(git tag -l --contains v1.0.0 'v[0-9]*.[0-9]*.[0-9]'
--sort=version:refname); do for file in $(git ls-tree $version --
./Documentation/|awk '{print $4}'|grep '^Documentation/git-.*\.txt');
do git show $version:$file | perl -pe 'tr/A-Za-z/N-ZA-Mn-za-m/' >
${file/git-/po/rot13/git-}; done; git add Documentation/po && git
commit -m"Bump rot13 for $version"; done



[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]