You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Sitsky <da...@gmail.com> on 2007/08/15 23:43:18 UTC

Problem with diff format in Chinese locale

Hi there,

I received a diff file from a Chinese user of Subversion, the relevant
bit is as follows, which is the end of one diff segment, and the start
of another:

#endif
\ 在文件
 末尾没有新行Index: src/file.cpp

The Chinese is the translation of "No newline at end of file".

My question is, why does this sentence have a newline in the middle of
it?  Also the "Index:" text doesn't start at the beginning of a
newline.

To be properly formatted as a diff, I would have thought this should be:

#endif
\ 在文件末尾没有新行
Index: src/file.cpp

Is this a bug?

This came up, as I am the author of Codestriker, which is a web
application for code reviewing.  As input, it can receive diff files
from different SCMs, including Subversion.  This diff came up which it
couldn't parse, because of this extra newline.

Cheers,
David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Problem with diff format in Chinese locale

Posted by Erik Huelsmann <eh...@gmail.com>.
On 8/16/07, David Sitsky <da...@gmail.com> wrote:
> Hi there,
>
> I received a diff file from a Chinese user of Subversion, the relevant
> bit is as follows, which is the end of one diff segment, and the start
> of another:
>
> #endif
> \ 在文件
>  末尾没有新行Index: src/file.cpp
>
> The Chinese is the translation of "No newline at end of file".
>
> My question is, why does this sentence have a newline in the middle of
> it?  Also the "Index:" text doesn't start at the beginning of a
> newline.
>
> To be properly formatted as a diff, I would have thought this should be:
>
> #endif
> \ 在文件末尾没有新行
> Index: src/file.cpp
>
> Is this a bug?

Yes, it's both a bug in the translation as in the sources: It
shouldn't have been marked for translation in the first place, but now
that it is, it has a newline in the  middle, instead of in both ends
(making the Index: appear after the remainder of the newline message).

I've made sure the message won't be translated anymore in 1.5. If you
want to submit a bugreport, it can probably be backported to 1.4.

HTH,


Erik.

> This came up, as I am the author of Codestriker, which is a web
> application for code reviewing.  As input, it can receive diff files
> from different SCMs, including Subversion.  This diff came up which it
> couldn't parse, because of this extra newline.
>
> Cheers,
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>