diff options
-rw-r--r-- | perl-MDK-Common.spec | 6 | ||||
-rw-r--r-- | perl_checker.src/parser_helper.ml | 23 |
2 files changed, 26 insertions, 3 deletions
diff --git a/perl-MDK-Common.spec b/perl-MDK-Common.spec index cc63a7c..b3770af 100644 --- a/perl-MDK-Common.spec +++ b/perl-MDK-Common.spec @@ -2,7 +2,7 @@ # do not change the version here, change in MDK/Common.pm.pl %define version THEVERSION -%define release 13mdk +%define release 14mdk Summary: Various simple functions Name: perl-MDK-Common @@ -51,6 +51,10 @@ rm -rf $RPM_BUILD_ROOT # MODIFY IN THE CVS: cvs.mandrakesoft.com:/cooker soft/perl-MDK-Common %changelog +* Wed Jan 15 2003 Pixel <pixel@mandrakesoft.com> 1.0.4-14mdk +- perl_checker: when generating pot, add an header and fake line numbers to + please msgmerge + * Mon Jan 6 2003 Pixel <pixel@mandrakesoft.com> 1.0.4-13mdk - MDK::Common::Func: add "find", "any" and "every" diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 19ee2da..d04e79f 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -493,7 +493,26 @@ let check_format_a_la_printf s pos = in check_format_a_la_printf_ 0 let generate_pot file = - let fd = open_out file in + let fd = open_out file in + output_string fd +"# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid \"\" +msgstr \"\" +\"Project-Id-Version: PACKAGE VERSION\\n\" +\"POT-Creation-Date: 2002-12-05 19:52+0100\\n\" +\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\" +\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\" +\"Language-Team: LANGUAGE <LL@li.org>\\n\" +\"MIME-Version: 1.0\\n\" +\"Content-Type: text/plain; charset=CHARSET\\n\" +\"Content-Transfer-Encoding: 8-bit\\n\" + +" ; + let rec print_formatted_char = function | '"' -> output_char fd '\\'; output_char fd '"' | '\t' -> output_char fd '\\'; output_char fd 't' @@ -508,7 +527,7 @@ let generate_pot file = List.iter (fun po_comment -> output_string fd ("#. " ^ po_comment ^ "\n")) po_comments; List.iter (fun _ -> Hashtbl.remove pot_strings_and_file s) l ; - fprintf fd "#: %s\n" (String.concat " " l) ; + fprintf fd "#: %s\n" (String.concat " " (List.map (fun s -> s ^ ":1") l)) ; output_string fd "#, c-format\n" ; output_string fd (if String.contains s '\n' then "msgid \"\"\n\"" else "msgid \"") ; |