[haiku-gsoc] locale kit patch: fix multiline strings and escaped chars

  • From: PulkoMandy <pulkomandy@xxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Mon, 6 Jul 2009 22:19:18 +0200

This patch changes the behaviour of collectcatkeys and linkcatkeys :

Collectcatkeys will no longer replace \t by tab, \n by newline, and \"
by a quote. This way the catkeys text files are easily readable and
can be parsed without problems.
I will also allow he strings to be separated on multiple lines. This
is used in the string I took as a test in the locale preflet. So you
are no longer forced to break the 80-column layout
Something is still not supported : lines such as "A very"/* commented
*/"long string." are no parsed. But they should not happen often, and
maybe cpp removes comments ?

Linkcatkeys will parse the \t, \n and \" and replace them with the
correct values. This is needed to mach the string that are in the
application, and collectcatkeys no longer does it.

The patch include these changes both for host- and haiku-side versions
of the tools.

I'm now back to work on the jam rules...

-- 
Adrien Destugues / PulkoMandy
Elève ingénieur ENSSAT EII1- www.enssat.fr
GSoC student for Haiku - http://haiku-os.org
GrafX2 project team - http://code.google.com/p/grafx2

Other related posts: