Skip to content

Commit f602d41

Browse files
committed
translations - last of the main messages
all non debug messages now in string catalog (unless some overlooked); further refinement may be needed as messages translated.
1 parent 00069b6 commit f602d41

File tree

4 files changed

+96
-47
lines changed

4 files changed

+96
-47
lines changed

bcread.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int check_too_bad(unsigned int bad_count); /* new 0.91p */
2424
int check_too_bad(unsigned int bad_count) /* return 1 if too many bad clusters */
2525
{
2626
if (bad_count == MAX_BAD_SECTORS) {
27-
printf("\n *** Too many bad clusters! Do a surface scan after FORMAT! ***\n");
27+
printf(catgets(catalog, 26, 0, "\n *** Too many bad clusters! Do a surface scan after FORMAT! ***\n"));
2828
return 1;
2929
}
3030
return 0;
@@ -41,7 +41,7 @@ int check_too_bad(unsigned int bad_count) /* return 1 if too many bad clusters *
4141
unsigned long BadClustPreserve(void)
4242
{
4343
if (parameter_block.bpb.bytes_per_sector != 512) {
44-
printf("BadClustPreserve aborted: not 512 bytes/sector!\n");
44+
printf(catgets(catalog, 26, 1, "BadClustPreserve aborted: not 512 bytes/sector!\n"));
4545
return 0xffffffffUL;
4646
}
4747
if (param.fat_type == FAT32) {
@@ -77,10 +77,10 @@ unsigned long BadClustPreserve32(void) /* should use multisector read here */
7777
cluststart += (fatsize * parameter_block.bpb.number_of_fats);
7878

7979
if (debug_prog == TRUE)
80-
printf(" Scanning FAT Sectors %lu to %lu...\n",
80+
printf(catgets(catalog, 26, 2, " Scanning FAT Sectors %lu to %lu...\n"),
8181
fatstart, fatstart+fatsize);
8282
else
83-
printf(" Scanning existing FAT...\n");
83+
printf(catgets(catalog, 26, 3, " Scanning existing FAT...\n"));
8484

8585
j = 0;
8686
for (sect = fatstart; sect < (fatstart+fatsize); sect += chunksize) {
@@ -142,7 +142,7 @@ unsigned long BadClustPreserve32(void) /* should use multisector read here */
142142
if (percentage != 100) Display_Percentage_Formatted(100);
143143
}
144144

145-
printf("\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n",
145+
printf(catgets(catalog, 26, 4, "\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n"),
146146
countused, countbad, countitems, last_used);
147147
return ( cluststart +
148148
( (1+last_used-2) * BPB_SECTORS_PER_CLUSTER(parameter_block.bpb) ) - 1 );
@@ -213,7 +213,7 @@ unsigned long BadClustPreserve16(void)
213213
} /* for all FAT sectors */
214214
if (debug_prog == TRUE) printf("\n");
215215

216-
printf("\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n",
216+
printf(catgets(catalog, 26, 5, "\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n"),
217217
countused, countbad, countitems, last_used);
218218
return ( cluststart +
219219
( (1+last_used-2) * BPB_SECTORS_PER_CLUSTER(parameter_block.bpb) ) - 1 );
@@ -239,7 +239,7 @@ unsigned long BadClustPreserve12(void) /* FAT12 is max 12 sectors / FAT, simple
239239

240240
if (fatsize > 1) buf = (unsigned char *)(&huge_sector_buffer[0]);
241241
if (fatsize > (sizeof(huge_sector_buffer_0) >> 9)) {
242-
printf(" Cannot process existing FAT12, too big!\n");
242+
printf(catgets(catalog, 26, 6, " Cannot process existing FAT12, too big!\n"));
243243
return 0xffffffffUL;
244244
}
245245
/* no scan announcement: just show the results. FAT12 is tiny. */
@@ -294,7 +294,7 @@ unsigned long BadClustPreserve12(void) /* FAT12 is max 12 sectors / FAT, simple
294294
index += 3;
295295
}
296296

297-
printf("\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n",
297+
printf(catgets(catalog, 26, 7, "\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n"),
298298
countused, countbad, countitems, last_used);
299299
return ( cluststart +
300300
( (1+last_used-2) * BPB_SECTORS_PER_CLUSTER(parameter_block.bpb) ) - 1 );

nls/format.en

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
1,4:NO
2323
# other possibly common bits
2424
1,5:Failed!\n
25+
1,6:Failed.\n
26+
1,7:Aborting.\n
2527

2628
# short help screen (shown if compiled without LEGACY_HELP)
2729
# Use as many messages as needed, 1 message per max 79 column line
@@ -402,6 +404,29 @@
402404
23,14: Drive looks unformatted, UNFORMAT information NOT saved.\n
403405
23,15:Number of reserved sectors differs: FOUND %lu / PLANNED %u.\n
404406
23,16:Number of FATs differs: FOUND %lu / PLANNED %hu\n
407+
23,17:Cluster size differs: FOUND %lu / PLANNED %hu (sectors)\n
408+
# FOUND # FAT?? / PLANNED # FAT??
409+
23,18:FAT size differs: FOUND %lu %s / PLANNED %lu %s\n
410+
23,19:MIRROR data would overwrite used clusters. Aborting.
411+
23,20:SafeFormat: have to trash %lu used data sectors!\n
412+
23,21:Mirror map pointer write error - UNFORMAT will fail for you!\n
413+
23,22:Skipping UNFORMAT / mirror data backup step.\n
414+
23,23:Read error at sector %lu - UNFORMAT data damaged\n
415+
23,24:Write error at sector %lu - UNFORMAT data damaged\n
416+
23,25: Mirror map is %lu bytes long,
417+
23,26: %lu sectors mirrored.\n
418+
23,27:No MIRROR / UNDELETE data: Wrong magic.\n
419+
23,28:\n End of mirror map. UNFORMAT done.\n
420+
23,29: Cloning boot sector into backup.\n
421+
23,30: Invalidating filesystem info sector data.\n
422+
23,31:*** Could not copy backup sector %lu to sector %lu ***\n
423+
23,32:Boot sector would be overwritten by nonsense, 0 or > 7 FATs.\n
424+
23,33:*** Could not restore sector %lu ***\n
425+
23,34:*** Could not clone FAT sector %lu into sector %lu ***\n
426+
23,35:WARNING: %hu FAT copies requested, using %hu instead.\n
427+
23,36:WARNING: UNFORMAT turns FAT1x drive into FAT32.\n
428+
23,37:WARNING: UNFORMAT turns FAT32 drive into FAT1x!?\n
429+
23,38:\n Boot sector data: %hu FAT copies (offset %lu), %lu sectors per FAT\n
405430

406431
# savefs.c unable to save filesystem properties error message
407432
# Use as many messages as needed, 1 message per max 79 column line
@@ -411,3 +436,27 @@
411436
24,0:Filesystem properties will change, cannot preserve the\n
412437
24,1:(possibly empty) old bad cluster list. Use a surface scan\n
413438
24,2:tool or FORMAT /U if you want to update the bad cluster list.\n
439+
440+
# recordbc.c
441+
25,0:Unusable disk: Bad sector in system data. Format terminated.\n
442+
25,1:\nBoot sector broken.\n
443+
25,2:\nFAT sector broken.\n
444+
25,3:\nRoot directory sector broken.\n
445+
25,4:\nBoot sector broken.\n
446+
25,5:\nFAT sector broken.\n
447+
25,6:\nRoot directory sector broken.\n
448+
25,7:\nReserved sector (boot, info, backup of either...) broken.\n
449+
25,8:\nFAT sector broken.\n
450+
25,9:*** Bad sector %lu, cluster %lu marked bad in FAT! ***\n
451+
25,10:WARNING: Have to mark USED cluster %lu as bad!\n
452+
25,11:*** Found %u bad sectors. Marked %lu clusters as bad. ***\n
453+
454+
# bcread.c (bad clusters)
455+
26,0:\n *** Too many bad clusters! Do a surface scan after FORMAT! ***\n
456+
26,1:BadClustPreserve aborted: not 512 bytes/sector!\n
457+
26,2: Scanning FAT Sectors %lu to %lu...\n
458+
26,3: Scanning existing FAT...\n
459+
26,4:\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n
460+
26,5:\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n
461+
26,6: Cannot process existing FAT12, too big!\n
462+
26,7:\n Cluster stats: %lu used, %lu bad, %lu items, %lu last.\n

recordbc.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void Record_Bad_Clusters_FAT32(void);
2626
void unusable_wimp(void);
2727
void unusable_wimp(void) /* give up format attempt, broken metadata sector */
2828
{
29-
printf("Unusable disk: Bad sector in system data. Format terminated.\n");
29+
printf(catgets(catalog, 25, 0, "Unusable disk: Bad sector in system data. Format terminated.\n"));
3030
Exit(4,30);
3131
} /* unusable_wimp */
3232

@@ -75,14 +75,14 @@ void Record_Bad_Clusters_FAT12(void)
7575

7676
if (bad_sector_map[0] < parameter_block.bpb.reserved_sectors)
7777
{
78-
printf("\nBoot sector broken.\n");
78+
printf(catgets(catalog, 25, 1, "\nBoot sector broken.\n"));
7979
}
8080
else
8181
{
8282
if (bad_sector_map[0] < first_root_sector)
83-
printf("\nFAT sector broken.\n");
83+
printf(catgets(catalog, 25, 2, "\nFAT sector broken.\n"));
8484
else
85-
printf("\nRoot directory sector broken.\n");
85+
printf(catgets(catalog, 25, 3, "\nRoot directory sector broken.\n"));
8686
}
8787

8888
unusable_wimp(); /* can happen for all FAT types - common code (0.91p) */
@@ -199,14 +199,14 @@ void Record_Bad_Clusters_FAT16(void)
199199

200200
if (bad_sector_map[0] < parameter_block.bpb.reserved_sectors)
201201
{
202-
printf("\nBoot sector broken.\n");
202+
printf(catgets(catalog, 25, 4, "\nBoot sector broken.\n"));
203203
}
204204
else
205205
{
206206
if (bad_sector_map[0] < first_root_sector)
207-
printf("\nFAT sector broken.\n");
207+
printf(catgets(catalog, 25, 5, "\nFAT sector broken.\n"));
208208
else
209-
printf("\nRoot directory sector broken.\n");
209+
printf(catgets(catalog, 25, 6, "\nRoot directory sector broken.\n"));
210210
}
211211

212212
unusable_wimp(); /* can happen for all FAT types - common code (0.91p) */
@@ -313,9 +313,9 @@ void Record_Bad_Clusters_FAT32(void) /* added actual FAT writing in 0.91j */
313313
/* Terminate the program... the disk is not usable. */
314314

315315
if (bad_sector_map[0] < parameter_block.bpb.reserved_sectors)
316-
printf("\nReserved sector (boot, info, backup of either...) broken.\n");
316+
printf(catgets(catalog, 25, 7, "\nReserved sector (boot, info, backup of either...) broken.\n"));
317317
else
318-
printf("\nFAT sector broken.\n");
318+
printf(catgets(catalog, 25, 8, "\nFAT sector broken.\n"));
319319

320320
unusable_wimp(); /* can happen for all FAT types - common code (0.91p) */
321321

@@ -351,13 +351,13 @@ void Record_Bad_Clusters_FAT32(void) /* added actual FAT writing in 0.91j */
351351
fat_value |= sector_buffer[fat_index+0];
352352

353353
if (fat_value == 0)
354-
printf("*** Bad sector %lu, cluster %lu marked bad in FAT! ***\n",
354+
printf(catgets(catalog, 25, 9, "*** Bad sector %lu, cluster %lu marked bad in FAT! ***\n"),
355355
bad_sector_map[bad_sector_map_index], bad_cluster);
356356

357357
if ( (fat_value < 0x0ffffff0UL) || (fat_value > 0x0ffffff7UL) ) /* not yet marked? */
358358
{
359359
if (fat_value != 0)
360-
printf("WARNING: Have to mark USED cluster %lu as bad!\n", bad_cluster);
360+
printf(catgets(catalog, 25, 10, "WARNING: Have to mark USED cluster %lu as bad!\n"), bad_cluster);
361361

362362
drive_statistics.allocation_units_with_bad_sectors++;
363363

@@ -375,7 +375,7 @@ void Record_Bad_Clusters_FAT32(void) /* added actual FAT writing in 0.91j */
375375
bad_sector_map_index++;
376376
} /* loop over bad sector list */
377377

378-
printf("*** Found %u bad sectors. Marked %lu clusters as bad. ***\n",
378+
printf(catgets(catalog, 25, 11, "*** Found %u bad sectors. Marked %lu clusters as bad. ***\n"),
379379
bad_sector_map_index, drive_statistics.allocation_units_with_bad_sectors);
380380

381381
}

0 commit comments

Comments
 (0)