RE: [Patch #1093] User Menu localization



Here is the script. I would make a mess if I try to make
myself the Makefile changes.

*8-) David


 --- On Tue 02/18, Pavel Roskin < proski gnu org > wrote:
From: Pavel Roskin [mailto: proski gnu org]
To: dmartina excite com
     Cc: mc-devel gnome org
Date: Tue, 18 Feb 2003 09:40:39 -0500 (EST)
Subject: RE: [Patch #1093] User Menu localization

Hello!

> Second try: would you like/accept reusing the sed script to
> make a dummy C file which could be scanned in a traditional way?

Yes.

-- 
Regards,
Pavel Roskin


_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
#!/bin/sh

exec 1> dummy.c

# Beginning of a dummy C source file.
cat << EOF &&
/* Midnight Commander: dummy code for i18n purposes.
   Generated automatically by `basename $0`
 */

#include "../src/i18n.h"

char *dummy[]= {
EOF

# Include menu strings marked for translation.
sed -f - ../lib/mc.menu << EOF &&
#n
# Search menu entries.
/^+/{
# Next line is the text.
n
# Add comment and "N_()" envelope.
s/^.*$/\\
	\/* TRANSLATORS: User menu entries in "mc.menu". *\/\\
	N_("&"),/
p
}
EOF

# Tail to have a proper C program.
cat << EOF

	0
};

int main() {
	return 0;
}
EOF



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