Bug#245166: Proposed patch
tags 245166 patch
thanks
Attached is a proposed patch for fixing this bug (not trimming english
"translations" in lowmem).
I'm definitely a moron with C so there's maybe a better way to do
it...
But it seems to do the trick at the minimum..and keyboard names are in
natural English with it.
--
--- trimtemplates.c 2004-07-09 22:34:03.000000000 +0200
+++ trimtemplates.c.new 2004-07-09 22:30:29.000000000 +0200
@@ -10,6 +10,9 @@
#define DEFAULT_TO_REMOVE "Default-"
#define DESCRIPTION_TO_REMOVE "Description-"
#define CHOICES_TO_REMOVE "Choices-"
+#define DEFAULT_TO_KEEP "Default-en"
+#define DESCRIPTION_TO_KEEP "Description-en"
+#define CHOICES_TO_KEEP "Choices-en"
#define FILENAME_LENGTH 256
int trimtemplate(char *filename) {
@@ -46,8 +49,16 @@
|| strstr(template_line, CHOICES_TO_REMOVE)
|| strstr(template_line, DEFAULT_TO_REMOVE)
) {
- ignore = 1;
- continue;
+ if (strstr(template_line, DESCRIPTION_TO_KEEP)
+ || strstr(template_line, CHOICES_TO_KEEP)
+ || strstr(template_line, DEFAULT_TO_KEEP)
+ ) {
+ ignore = 0;
+ continue;
+ } else {
+ ignore = 1;
+ continue;
+ }
}
if (fputs(template_line, tmpfd) == EOF) {
perror("unable to write to temp file");
Reply to: