From 6d613baa363ceffa9b07e755666f1b51732b9787 Mon Sep 17 00:00:00 2001 From: jrb Date: Tue, 17 Aug 2004 19:28:50 +0000 Subject: Tue Aug 17 15:27:33 2004 Jonathan Blandford * src/krb5-auth-dialog.c: Use gettext * src/dummy-strings.c: Kerberos error messages to translate. git-svn-id: http://svn.gnome.org/svn/krb5-auth-dialog/trunk@13 517b70f8-ed25-0410-8bf6-f5db08f7b76e --- etpo/grammar.y | 20 +------------------- etpo/lexer.l | 35 ++++++++++------------------------- 2 files changed, 11 insertions(+), 44 deletions(-) (limited to 'etpo') diff --git a/etpo/grammar.y b/etpo/grammar.y index 9573abd..db1ac4b 100644 --- a/etpo/grammar.y +++ b/etpo/grammar.y @@ -50,25 +50,7 @@ error_code: ERROR_CODE_START TOKEN COMMA QUOTE literal QUOTE { } else { p = currentfile; } - printf("\n# %s:%s:%s\n", p, table, $2); - /* If the string doesn't contain a newline, just print - * it on a single line. */ - if (strchr($5, '\n') == NULL) { - printf("msgid \"%s\"\n", $5); - } else { - /* Split the string up along newline - * boundaries, for readability. */ - lines = g_strsplit($5, "\n", -1); - if (lines != NULL) { - printf("msgid \n"); - for (i = 0; lines[i] != NULL; i++) { - printf("\"%s\"\n", lines[i]); - } - g_strfreev(lines); - } - } - /* Output the template translation. */ - printf("msgstr \"\"\n"); + printf("\tN_(\"%s\"),\t/* %s:%s:%s */\n", $5, p, table, $2); } } | ERROR_CODE_START TOKEN COMMA QUOTE QUOTE { diff --git a/etpo/lexer.l b/etpo/lexer.l index 5709d57..ad86889 100644 --- a/etpo/lexer.l +++ b/etpo/lexer.l @@ -101,31 +101,15 @@ yywrap(void) static void header(void) { - struct timeval tv; - struct timezone tz; - struct tm *tm; - const char *boilerplate = - "# SOME DESCRIPTIVE TITLE.\n" - "# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n" - "# This file is distributed under the same license as the PACKAGE package.\n" - "# FIRST AUTHOR , YEAR.\n" - "#\n" - "#, fuzzy\n" - "msgid \"\"\n" - "msgstr \"\"\n" - "\"Project-Id-Version: PACKAGE VERSION\\n\"\n" - "\"Report-Msgid-Bugs-To: \\n\"\n" - "\"POT-Creation-Date: %04d-%02d-%02d %02d:%02d%s\\n\"\n" - "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n" - "\"Last-Translator: FULL NAME \\n\"\n" - "\"Language-Team: LANGUAGE \\n\"\n" - "\"MIME-Version: 1.0\\n\"\n" - "\"Content-Type: text/plain; charset=CHARSET\\n\"\n" - "\"Content-Transfer-Encoding: 8bit\\n\"\n"; - gettimeofday(&tv, &tz); - tm = gmtime(&tv.tv_sec); - printf(boilerplate, tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, "GMT"); + const char *boilerplate = "const char *dummy = {\n"; + printf(boilerplate); +} + +static void +tail(void) +{ + const char *boilerplate = "};\n"; + printf(boilerplate); } int @@ -163,5 +147,6 @@ main(int argc, char **argv) currentfile = ""; yyin = stdin; } + tail(); return 0; } -- cgit v1.2.3