aboutsummaryrefslogtreecommitdiff
path: root/etpo
diff options
context:
space:
mode:
authorjrb <jrb@517b70f8-ed25-0410-8bf6-f5db08f7b76e>2004-08-17 19:28:50 +0000
committerjrb <jrb@517b70f8-ed25-0410-8bf6-f5db08f7b76e>2004-08-17 19:28:50 +0000
commit6d613baa363ceffa9b07e755666f1b51732b9787 (patch)
treefc9230fde55224ba8ed03f9379e19096a47f72c8 /etpo
parent493373a66fc340f355377cbc27332e2e5e0040de (diff)
Tue Aug 17 15:27:33 2004 Jonathan Blandford <jrb@redhat.com>
* 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
Diffstat (limited to 'etpo')
-rw-r--r--etpo/grammar.y20
-rw-r--r--etpo/lexer.l35
2 files changed, 11 insertions, 44 deletions
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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\\n\"\n"
- "\"Language-Team: LANGUAGE <LL@li.org>\\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 = "<stdin>";
yyin = stdin;
}
+ tail();
return 0;
}