makestrings   [plain text]


#
# convert an array of C strings to a localizable string file
#

#
# echo any comments
#
/\/\*/, /\*\//

#
# reformat and print any strings
#
/\"/, /\"/ {formatstr($0)}


function formatstr (str) {
	sub(/\t\"/, "\"", str)
	sub(/\",/, "\"", str)
	sub(/%[d|s|u|x|o]/, "%@", str)
	sub(/%[d|s|u|x|o]/, "%@", str)
	sub(/%[d|s|u|x|o]/, "%@", str)
	printf("%s = %s;\n", str, str)
}