[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#29277: marked as done (Constructing sentences in dinstall makes translation to Finnish hard)

Your message dated Thu, 13 Oct 2005 16:20:32 -0400
with message-id <20051013202032.GA29224@kitenet.net>
and subject line boot-floppies end of life
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 10 Nov 1998 23:10:48 +0000
Received: (qmail 7239 invoked from network); 10 Nov 1998 23:10:47 -0000
Received: from cc.jyu.fi (root@
  by master.debian.org with SMTP; 10 Nov 1998 23:10:47 -0000
Received: from doris.cc.jyu.fi (antkaij@doris.cc.jyu.fi [])
	by cc.jyu.fi (8.8.8/8.8.8/NO UCE/antispam-2 [postmaster@cc.jyu.fi]) with ESMTP id BAA20025
	for <submit@bugs.debian.org>; Wed, 11 Nov 1998 01:10:45 +0200 (EET)
Received: (from antkaij@localhost)
	by doris.cc.jyu.fi (8.8.7/8.8.7) id BAA06926;
	Wed, 11 Nov 1998 01:10:43 +0200
Message-ID: <19981111011042.B5522@doris.cc.jyu.fi>
Date: Wed, 11 Nov 1998 01:10:42 +0200
From: Antti-Juhani Kaijanaho <gaia@iki.fi>
To: submit@bugs.debian.org
Subject: Constructing sentences in dinstall makes translation to Finnish hard
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.91.1i

Package: boot-floppies
Version: 2.0.11
Severity: wishlist

I have been translating the boot floppies to Finnish.  However, I've
found that the dinstall program does some unwise things when it
constructs some of its strings that must be translated.  These things
it does make it hard for me to make the translation in a reliable way.

Consider the code in bootconfig.c (make_boot_floppy).  It constructs
the four sentences 

  Please place a blank floppy disk in the first floppy disk drive, and
  press ENTER.

  Please place a blank, formatted floppy disk in the first floppy disk
  drive, and press ENTER.

  Please place a blank floppy disk in the second floppy disk drive, and
  press ENTER.

  Please place a blank, formatted floppy disk in the second floppy
  disk drive, and press ENTER.

from the following four strings:

  ", formatted"
  "Please place a blank%s floppy disk in the %s floppy disk drive, and press

I can see that this is clever.  The same story is continued in
choose_medium.c (mount_and_check_floppy).  There, eg. the strings 

  "Please place the %s in the %s floppy drive"

are used to construct the (partial) sentences 

  Please place the %s in the first floppy drive

  Please place the %s in the second floppy drive

Now, the way things are in the source, I am forced to translate every
occurrence of "first" and every occurrence of "second" in the same
way.  This is not a good idea: depending on context, the words
translate differently.  By luck, the examples I found in the source do
not break with Finnish.  However, this coding style is not a good idea
in a internationalizable program, because sooner or later it will
break.  And it makes things harder for the translator, as the full
implications of a string to be translated cannot be deduced from the
context; one has to look in the source and figure out all the
combinations in order to make an intelligent choice of wording.

A good quote from a good source:

"... avoid writing code that makes assumptions about the structure of
words or sentences. When you want the precise text of a sentence to
vary depending on the data, use two or more alternative string
constants each containing a complete sentences, rather than inserting
conditionalized words or phrases into a single sentence framework."
(GNU Coding Standards, Section "Internationalization")

I'm including a patch that corrects those problems I've found with
quick grepping.  As I progress with my translation, I may give you
more in the future.  The patch is untested but should show how things
canbe done more cleanly.

Since nothing really breaks (even if this is because of luck), I'm
using `severity: wishlist'.  I do hope, however, that my patch or an
equivalent is applied, as it makes my life easier as a translator.


Only in boot-floppies-official/utilities/dinstall: .plan
diff -aur boot-floppies-official/utilities/dinstall/bootconfig.c boot-floppies/utilities/dinstall/bootconfig.c
--- boot-floppies-official/utilities/dinstall/bootconfig.c	Sun Jun 28 03:05:43 1998
+++ boot-floppies/utilities/dinstall/bootconfig.c	Wed Nov 11 00:31:22 1998
@@ -208,9 +208,15 @@
 int make_boot_floppy (void)
+  /* Rewritten by Antti-Juhani Kaijanaho <gaia@iki.fi> to make this
+     better translatable. */
   char* device="/dev/fd0";
-  char* designation=MSG_FIRST;
-  char* formatted="";
+  static char* msgs [2][2] = { { MSG_CHANGE_FIRST_DISK_L,
+                                 MSG_CHANGE_FORMATTED_FIRST_DISK_L },
+                               { MSG_CHANGE_SECOND_DISK_L,
+                                 MSG_CHANGE_FORMATTED_SECOND_DISK_L } };
+  int designation=0;
+  int formatted=0;
   int result;
   struct stat tmp;
@@ -219,14 +225,14 @@
       return 1;
-    designation=MSG_SECOND;
+    designation=1;
   if(stat("/usr/bin/superformat",&tmp)!=0) {
-  sprintf(prtbuf,MSG_CHANGE_DISK_L,formatted,designation);
+  sprintf(prtbuf, msgs [designation] [formatted]);
diff -aur boot-floppies-official/utilities/dinstall/choose_medium.c boot-floppies/utilities/dinstall/choose_medium.c
--- boot-floppies-official/utilities/dinstall/choose_medium.c	Fri Jul  3 17:09:28 1998
+++ boot-floppies/utilities/dinstall/choose_medium.c	Wed Nov 11 00:43:22 1998
@@ -37,6 +37,8 @@
   FILE *tmpstream;
   struct stat statbuf;
+  /* Minimally rewritten by Antti-Juhani Kaijanaho <gaia@iki.fi> to
+     make this better translatable. */
   for (;;) {
     if (!device) {
@@ -66,8 +68,9 @@
     if (! strncmp(device,"/dev/fd",7) ){
-      sprintf(prtbuf,MSG_PLACE_FLOPPY,text,
-        ((device[7]=='0')?MSG_FIRST:MSG_SECOND));
+      sprintf(prtbuf, ((device[7]=='0')
+              text);
       if (twoButtonBox(prtbuf,MSG_PLEASE_INSERT_DISK,
         if(dinam) free(device);
@@ -83,7 +86,9 @@
     if (! NAME_ISREG( T_FILE("/floppy/type.txt"), &statbuf ) ) {
-      sprintf(prtbuf,MSG_WRONG_FLOPPY_L,text,text,((device[7]=='0')?MSG_FIRST:MSG_SECOND));
+      sprintf(prtbuf,((device[7]=='0')
+              text,text);
     if ((tmpstream=fopen("/floppy/type.txt","r"))==NULL) {
diff -aur boot-floppies-official/utilities/dinstall/lang_C.h boot-floppies/utilities/dinstall/lang_C.h
--- boot-floppies-official/utilities/dinstall/lang_C.h	Sun Jul  5 13:02:05 1998
+++ boot-floppies/utilities/dinstall/lang_C.h	Wed Nov 11 00:29:31 1998
@@ -22,8 +22,6 @@
 #define MSG_UMOUNT_FAILED	"Unmount failed"
 #define MSG_PROBLEM		"Problem"
-#define MSG_FIRST               "first"
-#define MSG_SECOND              "second"
 #define MSG_RESCUE_FLOPPY       "Rescue Floppy"
 #define MSG_DRIVERS_FLOPPY      "Drivers Floppy"
@@ -62,9 +60,14 @@
 or you may be able to boot directly from the hard disk.\n\
 Use the second floppy drive to create a boot floppy?"
 #define MSG_USE_SECOND_FLOPPY		"Use Second Floppy Drive?"		
-#define MSG_FORMATTED			", formatted"
-#define MSG_CHANGE_DISK_L		"Please place a blank%s floppy disk in the %s floppy disk \
-drive, and press ENTER."
+#define MSG_CHANGE_FIRST_DISK_L "Please place a blank floppy disk in the \
+first floppy disk drive, and press ENTER."
+#define MSG_CHANGE_FORMATTED_FIRST_DISK_L "Please place a blank, formatted \
+floppy disk in the first floppy disk drive, and press ENTER."
+#define MSG_CHANGE_SECOND_DISK_L "Please place a blank floppy disk in the \
+second floppy disk drive, and press ENTER."
+#define MSG_CHANGE_FORMATTED_SECOND_DISK_L "Please place a blank, formatted \
+floppy disk in the second floppy disk drive, and press ENTER."
 #define MSG_CHANGE_DISK			"Change Disk"
 #define MSG_BOOT_FLOPPY_FAILED		"Creation of a boot floppy failed. Please make sure that\nthe floppy was not write-protected, and that you put it in the %s drive. Try another floppy if the problem persists"
 #define MSG_RUNNING_SILO		"Running SILO to make the kernel able to boot from the \n
@@ -196,10 +199,12 @@
 #define MSG_SELECT_DISK_DRIVE	"Select Disk Drive"
 #define MSG_SELECT_FLOPPY_DRIVE "Please select the floppy drive you will use to read the %s."
-#define MSG_PLACE_FLOPPY	"Please place the %s in the %s floppy drive"
+#define MSG_PLACE_FIRST_FLOPPY	"Please place the %s in the first floppy drive"
+#define MSG_PLACE_SECOND_FLOPPY	"Please place the %s in the second floppy drive"
 #define MSG_PLEASE_INSERT_DISK	"Please Insert disk"
 #define MSG_UNABLE_TO_MOUNT	"Unable to mount the %s."
-#define MSG_WRONG_FLOPPY_L	"This is not the %s. Please place the %s in the %s floppy drive and try again."
+#define MSG_WRONG_FIRST_FLOPPY_L	"This is not the %s. Please place the %s in the first floppy drive and try again."
+#define MSG_WRONG_SECOND_FLOPPY_L	"This is not the %s. Please place the %s in the second floppy drive and try again."
 #define MSG_CANNOT_OPEN_TYPE_TXT	"Cannot open /floppy/type.txt "
 #define MSG_CANNOT_READ_TYPE_TXT	"Cannot read /floppy/type.txt "
 #define MSG_INSTALLING_FLOPPY	"Installing the %s "

Antti-Juhani Kaijanaho A7 <gaia@iki.fi> ** <URL:http://www.iki.fi/gaia/> **

                       The FAQ is your friend.
                            Trust the FAQ.
Received: (at 29277-done) by bugs.debian.org; 13 Oct 2005 20:20:52 +0000
>From joey@kitenet.net Thu Oct 13 13:20:52 2005
Return-path: <joey@kitenet.net>
Received: from kitenet.net [] (postfix)
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EQ9ZK-0006BL-00; Thu, 13 Oct 2005 13:20:51 -0700
Received: from dragon.kitenet.net (97-148-dial.xtn.net [])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "Joey Hess", Issuer "Joey Hess" (verified OK))
	by kitenet.net (Postfix) with ESMTP id 9B209181B5;
	Thu, 13 Oct 2005 20:20:43 +0000 (GMT)
Received: by dragon.kitenet.net (Postfix, from userid 1000)
	id A53A0BFA45; Thu, 13 Oct 2005 16:20:32 -0400 (EDT)
Date: Thu, 13 Oct 2005 16:20:32 -0400
From: Joey Hess <joey@kitenet.net>
To: 225693-done@bugs.debian.org, 225704-done@bugs.debian.org,
	144067-done@bugs.debian.org, 148785-done@bugs.debian.org,
	152152-done@bugs.debian.org, 156334-done@bugs.debian.org,
	156704-done@bugs.debian.org, 158426-done@bugs.debian.org,
	160532-done@bugs.debian.org, 161998-done@bugs.debian.org,
	161999-done@bugs.debian.org, 163735-done@bugs.debian.org,
	192792-done@bugs.debian.org, 192797-done@bugs.debian.org,
	218360-done@bugs.debian.org, 241932-done@bugs.debian.org,
	131709-done@bugs.debian.org, 131967-done@bugs.debian.org,
	143620-done@bugs.debian.org, 96946-done@bugs.debian.org,
	122738-done@bugs.debian.org, 122769-done@bugs.debian.org,
	125895-done@bugs.debian.org, 126030-done@bugs.debian.org,
	134970-done@bugs.debian.org, 136073-done@bugs.debian.org,
	138282-done@bugs.debian.org, 141166-done@bugs.debian.org,
	143404-done@bugs.debian.org, 144099-done@bugs.debian.org,
	144245-done@bugs.debian.org, 144452-done@bugs.debian.org,
	146132-done@bugs.debian.org, 146700-done@bugs.debian.org,
	147122-done@bugs.debian.org, 147232-done@bugs.debian.org,
	148962-done@bugs.debian.org, 149118-done@bugs.debian.org,
	150333-done@bugs.debian.org, 150779-done@bugs.debian.org,
	150790-done@bugs.debian.org, 150791-done@bugs.debian.org,
	152863-done@bugs.debian.org, 153296-done@bugs.debian.org,
	153861-done@bugs.debian.org, 154064-done@bugs.debian.org,
	154284-done@bugs.debian.org, 155089-done@bugs.debian.org,
	155379-done@bugs.debian.org, 155745-done@bugs.debian.org,
	156015-done@bugs.debian.org, 156726-done@bugs.debian.org,
	156748-done@bugs.debian.org, 157431-done@bugs.debian.org,
	157815-done@bugs.debian.org, 158947-done@bugs.debian.org,
	160223-done@bugs.debian.org, 160621-done@bugs.debian.org,
	161074-done@bugs.debian.org, 161284-done@bugs.debian.org,
	162387-done@bugs.debian.org, 163086-done@bugs.debian.org,
	164007-done@bugs.debian.org, 164845-done@bugs.debian.org,
	165345-done@bugs.debian.org, 170888-done@bugs.debian.org,
	170904-done@bugs.debian.org, 170905-done@bugs.debian.org,
	171027-done@bugs.debian.org, 173047-done@bugs.debian.org,
	173899-done@bugs.debian.org, 174754-done@bugs.debian.org,
	178832-done@bugs.debian.org, 180334-done@bugs.debian.org,
	181119-done@bugs.debian.org, 181739-done@bugs.debian.org,
	183811-done@bugs.debian.org, 184147-done@bugs.debian.org,
	185111-done@bugs.debian.org, 185420-done@bugs.debian.org,
	185610-done@bugs.debian.org, 186594-done@bugs.debian.org,
	187486-done@bugs.debian.org, 187654-done@bugs.debian.org,
	190358-done@bugs.debian.org, 192356-done@bugs.debian.org,
	193029-done@bugs.debian.org, 194839-done@bugs.debian.org,
	195251-done@bugs.debian.org, 195955-done@bugs.debian.org,
	198864-done@bugs.debian.org, 205519-done@bugs.debian.org,
	206056-done@bugs.debian.org, 208253-done@bugs.debian.org,
	210825-done@bugs.debian.org, 210904-done@bugs.debian.org,
	218514-done@bugs.debian.org, 223975-done@bugs.debian.org,
	224469-done@bugs.debian.org, 224936-done@bugs.debian.org,
	228848-done@bugs.debian.org, 231829-done@bugs.debian.org,
	231896-done@bugs.debian.org, 237182-done@bugs.debian.org,
	240201-done@bugs.debian.org, 245768-done@bugs.debian.org,
	250735-done@bugs.debian.org, 255739-done@bugs.debian.org,
	257451-done@bugs.debian.org, 261887-done@bugs.debian.org,
	268103-done@bugs.debian.org, 268790-done@bugs.debian.org,
	290239-done@bugs.debian.org, 304779-done@bugs.debian.org,
	304780-done@bugs.debian.org, 304782-done@bugs.debian.org,
	304783-done@bugs.debian.org, 304784-done@bugs.debian.org,
	319391-done@bugs.debian.org, 110717-done@bugs.debian.org,
	117319-done@bugs.debian.org, 129479-done@bugs.debian.org,
	140305-done@bugs.debian.org, 145120-done@bugs.debian.org,
	159887-done@bugs.debian.org, 163737-done@bugs.debian.org,
	164460-done@bugs.debian.org, 164461-done@bugs.debian.org,
	170764-done@bugs.debian.org, 174050-done@bugs.debian.org,
	116583-done@bugs.debian.org, 137717-done@bugs.debian.org,
	167240-done@bugs.debian.org, 313677-done@bugs.debian.org,
	126370-done@bugs.debian.org, 127535-done@bugs.debian.org,
	138467-done@bugs.debian.org, 142359-done@bugs.debian.org,
	146713-done@bugs.debian.org, 156882-done@bugs.debian.org,
	165156-done@bugs.debian.org, 131553-done@bugs.debian.org,
	149275-done@bugs.debian.org, 113785-done@bugs.debian.org,
	127677-done@bugs.debian.org, 154137-done@bugs.debian.org,
	163386-done@bugs.debian.org, 57368-done@bugs.debian.org,
	70639-done@bugs.debian.org, 136312-done@bugs.debian.org,
	64571-done@bugs.debian.org, 69157-done@bugs.debian.org,
	70944-done@bugs.debian.org, 82637-done@bugs.debian.org,
	119753-done@bugs.debian.org, 127520-done@bugs.debian.org,
	130893-done@bugs.debian.org, 140215-done@bugs.debian.org,
	142669-done@bugs.debian.org, 143596-done@bugs.debian.org,
	158422-done@bugs.debian.org, 165552-done@bugs.debian.org,
	175686-done@bugs.debian.org, 175687-done@bugs.debian.org,
	176881-done@bugs.debian.org, 190178-done@bugs.debian.org,
	3905-done@bugs.debian.org, 19846-done@bugs.debian.org,
	27004-done@bugs.debian.org, 29277-done@bugs.debian.org,
	36071-done@bugs.debian.org, 48778-done@bugs.debian.org,
	53940-done@bugs.debian.org, 59181-done@bugs.debian.org,
	61065-done@bugs.debian.org, 64428-done@bugs.debian.org,
	64430-done@bugs.debian.org, 64432-done@bugs.debian.org,
	64569-done@bugs.debian.org, 64570-done@bugs.debian.org,
	69150-done@bugs.debian.org, 69151-done@bugs.debian.org,
	69153-done@bugs.debian.org, 74081-done@bugs.debian.org,
	122741-done@bugs.debian.org, 127537-done@bugs.debian.org,
	246443-done@bugs.debian.org, 144680-done@bugs.debian.org,
	153854-done@bugs.debian.org, 156308-done@bugs.debian.org,
	156710-done@bugs.debian.org, 120950-done@bugs.debian.org
Subject: boot-floppies end of life
Message-ID: <20051013202032.GA29224@kitenet.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua"
Content-Disposition: inline
User-Agent: Mutt/1.5.10i
Delivered-To: 29277-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
X-CrossAssassin-Score: 163

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I'm closing all bug reports filed on the boot-floppies since this
codebase has reached its end of life. boot-floppies is only in Debian
oldstable now (and temporarily in unstable because of bug #224469).

The new installer for sarge and beyond is of course, the
debian-installer. It solves a great many issues present in the

If you believe that your boot-floppies bug is still present in
debian-installer somehow, then please reopen the bug report and reassign
it there, or perhaps better, file a new bug report.

see shy jo

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

Version: GnuPG v1.4.2 (GNU/Linux)



Reply to: