Re: [PATCH v2 03/11] i18n: add--interactive: mark strings with interpolation for translation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 25, 2016, 22:57 UTC
- Message-ID
- <xmqqintjy4ct.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1472646690-9699-4-git-send-email-vascomalmeida@sapo.pt>
Vasco Almeida <vascomalmeida@sapo.pt> writes:
Show 6 quoted lines
> @@ -1048,7 +1048,7 @@ sub edit_hunk_manually {
> my $hunkfile = $repo->repo_path . "/addp-hunk-edit.diff";
> my $fh;
> open $fh, '>', $hunkfile
> - or die "failed to open hunk edit file for writing: " . $!;
> + or die sprintf(__("failed to open hunk edit file for writing: %s"), $!);OK, $! presumably is given in the user's language, so we let translators prepare the error-specific text and interpolate $! into it.
Makes sense.