Re: [PATCH 1/2] am: handle stray $dotest directory

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/2] am: handle stray $dotest directory

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:45

Ramkumar Ramachandra [off-list ref] writes:
Junio C Hamano wrote:
quoted
$dotest, or \$dotest?
Works fine for me like this.  Why do we escape the dollar in the other strings?
The reason would become clear once you think what string you are
feeding eval_gettext with if you do not escape.  The translators
translate a fixed string (possibly with placeholders) to a fixed
translated string (possibly with placeholders).

	eval_gettext "Stray $dotest directory found. ..."

would allow the shell to expand $dotest before eval_gettext sees it,
which would mean the string is no longer a constant.

Re: [PATCH 1/2] am: handle stray $dotest directory

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:57:45

Junio C Hamano wrote:
The reason would become clear once you think what string you are
feeding eval_gettext with if you do not escape.  The translators
translate a fixed string (possibly with placeholders) to a fixed
translated string (possibly with placeholders).

        eval_gettext "Stray $dotest directory found. ..."

would allow the shell to expand $dotest before eval_gettext sees it,
which would mean the string is no longer a constant.
Ah.  I was scratching my head wondering why $dotest needed to be
translated (it's just a path).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help