aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/generate_utf_tables.php
blob: 3d5188163d4444bd74c64ac037e96ac06b6f3815 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

if (php_sapi_name() != 'cli')
{
	die("This program must be run from the command line.\n");
}

//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");

set_time_limit(0);

define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

echo "Checking for required files\n";
download('http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt');
download('http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt');
download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt');
echo "\n";

require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
$file_contents = array();

/**
* Generate some Hangul/Jamo stuff
*/
echo "\nGenerating Hangul and Jamo tables\n";
for ($i = 0; $i < UNICODE_HANGUL_LCOUNT; ++$i)
{
	$utf_char = cp_to_utf(UNICODE_HANGUL_LBASE + $i);
	$file_contents['utf_normalizer_common']['utf_jamo_index'][$utf_char] = $i * UNICODE_HANGUL_VCOUNT * UNICODE_HANGUL_TCOUNT + UNICODE_HANGUL_SBASE;
	$file_contents['utf_normalizer_common']['utf_jamo_type'][$utf_char] = UNICODE_JAMO_L;
}

for ($i = 0; $i < UNICODE_HANGUL_VCOUNT; ++$i)
{
	$utf_char = cp_to_utf(UNICODE_HANGUL_VBASE + $i);
	$file_contents['utf_normalizer_common']['utf_jamo_index'][$utf_char] = $i * UNICODE_HANGUL_TCOUNT;
	$file_contents['utf_normalizer_common']['utf_jamo_type'][$utf_char] = UNICODE_JAMO_V;
}

for ($i = 0; $i < UNICODE_HANGUL_TCOUNT; ++$i)
{
	$utf_char = cp_to_utf(UNICODE_HANGUL_TBASE + $i);
	$file_contents['utf_normalizer_common']['utf_jamo_index'][$utf_char] = $i;
	$file_contents['utf_normalizer_common']['utf_jamo_type'][$utf_char] = UNICODE_JAMO_T;
}

/**
* Load the CompositionExclusions table
*/
echo "Loading CompositionExclusion\n";
$fp = fopen('CompositionExclusions.txt', 'rt');

$exclude = array();
while (!feof($fp))
{
	$line = fgets($fp, 1024);

	if (!strpos(' 0123456789ABCDEFabcdef', $line[0]))
	{
		continue;
	}

	$cp = strtok($line, ' ');

	if ($pos = strpos($cp, '..'))
	{
		$start = hexdec(substr($cp, 0, $pos));
		$end = hexdec(substr($cp, $pos + 2));

		for ($i = $start; $i < $end; ++$i)
		{
			$exclude[$i] = 1;
		}
	}
	else
	{
		$exclude[hexdec($cp)] = 1;
	}
}
fclose($fp);

/**
* Load QuickCheck tables
*/
echo "Generating QuickCheck tables\n";
$fp = fopen('DerivedNormalizationProps.txt', 'rt');

while (!feof($fp))
{
	$line = fgets($fp, 1024);

	if (!strpos(' 0123456789ABCDEFabcdef', $line[0]))
	{
		continue;
	}

	$p = array_map('trim', explode(';', strtok($line, '#')));

	/**
	* Capture only NFC_QC, NFKC_QC
	*/
	if (!preg_match('#^NFK?C_QC$#', $p[1]))
	{
		continue;
	}

	if ($pos = strpos($p[0], '..'))
	{
		$start = hexdec(substr($p[0], 0, $pos));
		$end = hexdec(substr($p[0], $pos + 2));
	}
	else
	{
		$start = $end = hexdec($p[0]);
	}

	if ($start >= UTF8_HANGUL_FIRST && $end <= UTF8_HANGUL_LAST)
	{
		/**
		* We do not store Hangul syllables in the array
		*/
		continue;
	}

	if ($p[2] == 'M')
	{
		$val = UNICODE_QC_MAYBE;
	}
	else
	{
		$val = UNICODE_QC_NO;
	}

	if ($p[1] == 'NFKC_QC')
	{
		$file = 'utf_nfkc_qc';
	}
	else
	{
		$file = 'utf_nfc_qc';
	}

	for ($i = $start; $i <= $end; ++$i)
	{
		/**
		* The vars have the same name as the file: $utf_nfc_qc is in utf_nfc_qc.php
		*/
		$file_contents[$file][$file][cp_to_utf($i)] = $val;
	}
}
fclose($fp);

/**
* Do mappings
*/
echo "Loading Unicode decomposition mappings\n";
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');

$map = array();
while (!feof($fp))
{
	$p = explode(';', fgets($fp, 1024));
	$cp = hexdec($p[0]);

	if (!empty($p[3]))
	{
		/**
		* Store combining class > 0
		*/
		$file_contents['utf_normalizer_common']['utf_combining_class'][cp_to_utf($cp)] = (int) $p[3];
	}

	if (!isset($p[5]) || !preg_match_all('#[0-9A-F]+#', strip_tags($p[5]), $m))
	{
		continue;
	}

	if (strpos($p[5], '>'))
	{
		$map['NFKD'][$cp] = implode(' ', array_map('hexdec', $m[0]));
	}
	else
	{
		$map['NFD'][$cp] = $map['NFKD'][$cp] = implode(' ', array_map('hexdec', $m[0]));
	}
}
fclose($fp);

/**
* Build the canonical composition table
*/
echo "Generating the Canonical Composition table\n";
foreach ($map['NFD'] as $cp => $decomp_seq)
{
	if (!strpos($decomp_seq, ' ') || isset($exclude[$cp]))
	{
		/**
		* Singletons are excluded from canonical composition
		*/
		continue;
	}

	$utf_seq = implode('', array_map('cp_to_utf', explode(' ', $decomp_seq)));

	if (!isset($file_contents['utf_canonical_comp']['utf_canonical_comp'][$utf_seq]))
	{
		$file_contents['utf_canonical_comp']['utf_canonical_comp'][$utf_seq] = cp_to_utf($cp);
	}
}

/**
* Decompose the NF[K]D mappings recursively and prepare the file contents
*/
echo "Generating the Canonical and Compatibility Decomposition tables\n\n";
foreach ($map as $type => $decomp_map)
{
	foreach ($decomp_map as $cp => $decomp_seq)
	{
		$decomp_map[$cp] = decompose($decomp_map, $decomp_seq);
	}
	unset($decomp_seq);

	if ($type == 'NFKD')
	{
		$file = 'utf_compatibility_decomp';
		$var = 'utf_compatibility_decomp';
	}
	else
	{
		$file = 'utf_canonical_decomp';
		$var = 'utf_canonical_decomp';
	}

	/**
	* Generate the corresponding file
	*/
	foreach ($decomp_map as $cp => $decomp_seq)
	{
		$file_contents[$file][$var][cp_to_utf($cp)] = implode('', array_map('cp_to_utf', explode(' ', $decomp_seq)));
	}
}

/**
* Generate and/or alter the files
*/
foreach ($file_contents as $file => $contents)
{
	/**
	* Generate a new file
	*/
	echo "Writing to $file.$phpEx\n";

	if (!$fp = fopen($phpbb_root_path . 'includes/utf/data/' . $file . '.' . $phpEx, 'wb'))
	{
		trigger_error('Cannot open ' . $file . ' for write');
	}

	fwrite($fp, '<?php');
	foreach ($contents as $var => $val)
	{
		fwrite($fp, "\n\$GLOBALS[" . my_var_export($var) . ']=' . my_var_export($val) . ";");
	}
	fclose($fp);
}

echo "\n*** UTF-8 normalization tables done\n\n";

/**
* Now we'll generate the files needed by the search indexer
*/
echo "Generating search indexer tables\n";

$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');

$map = array();
while ($line = fgets($fp, 1024))
{
	/**
	* The current line is split, $m[0] hold the codepoint in hexadecimal and
	* all other fields numbered as in http://www.unicode.org/Public/UNIDATA/UCD.html#UnicodeData.txt
	*/
	$m = explode(';', $line);

	/**
	* @var	integer	$cp			Current char codepoint
	* @var	string	$utf_char	UTF-8 representation of current char
	*/
	$cp = hexdec($m[0]);
	$utf_char = cp_to_utf($cp);

	/**
	* $m[2] holds the "General Category" of the character
	* @link http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values
	*/
	switch ($m[2][0])
	{
		case 'L':
			/**
			* We allow all letters and map them to their lowercased counterpart on the fly
			*/
			$map_to_hex = (isset($m[13][0])) ? $m[13] : $m[0];

			if (preg_match('#^LATIN.*(?:LETTER|LIGATURE) ([A-Z]{2}(?![A-Z]))$#', $m[1], $capture))
			{
				/**
				* Special hack for some latin ligatures. Using the name of a character
				* is bad practice, but for now it works well enough.
				*
				* @todo Note that ligatures with combining marks such as U+01E2 are
				* not supported at this time
				*/
				$map[$cp] = strtolower($capture[1]);
			}
			else if (isset($m[13][0]))
			{
				/**
				* If the letter has a lowercased form, use it
				*/
				$map[$cp] = hex_to_utf($m[13]);
			}
			else
			{
				/**
				* In all other cases, map the letter to itself
				*/
				$map[$cp] = $utf_char;
			}
			break;

		case 'M':
			/**
			* We allow all marks, they are mapped to themselves
			*/
			$map[$cp] = $utf_char;
			break;

		case 'N':
			/**
			* We allow all numbers, but we map them to their numeric value whenever
			* possible. The numeric value (field #8) is in ASCII already
			*
			* @todo Note that fractions such as U+00BD will be converted to something
			* like "1/2", with a slash. However, "1/2" entered in ASCII is converted
			* to "1 2". This will have to be fixed.
			*/
			$map[$cp] = (isset($m[8][0])) ? $m[8] : $utf_char;
			break;

		default:
			/**
			* Everything else is ignored, skip to the next line
			*/
			continue 2;
	}
}
fclose($fp);

/**
* Add some cheating
*/
$cheats = array(
	'00DF'	=>	'ss',		#	German sharp S
	'00C5'	=>	'ae',		#	Capital A with diaeresis
	'00E4'	=>	'ae',		#	Small A with diaeresis
	'00D6'	=>	'oe',		#	Capital O with diaeresis
	'00F6'	=>	'oe',		#	Small O with diaeresis
	'00DC'	=>	'ue',		#	Capital U with diaeresis
	'00FC'	=>	'ue',		#	Small U with diaeresis
);

/**
* Add our "cheat replacements" to the map
*/
foreach ($cheats as $hex => $map_to)
{
	$map[hexdec($hex)] = $map_to;
}

/**
* Split the map into smaller blocks
*/
$file_contents = array();
foreach ($map as $cp => $map_to)
{
	$file_contents[$cp >> 11][cp_to_utf($cp)] = $map_to;
}
unset($map);

foreach ($file_contents as $idx => $contents)
{
	echo "Writing to search_indexer_$idx.$phpEx\n";
	$fp = fopen($phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx, 'wb');
	fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
	fclose($fp);
}
echo "\n*** Search indexer tables done\n\n";


die("\nAll done!\n");


////////////////////////////////////////////////////////////////////////////////
//                             Internal functions                             //
////////////////////////////////////////////////////////////////////////////////

/**
* Decompose a sequence recusively
*
* @param	array	$decomp_map	Decomposition mapping, passed by reference
* @param	string	$decomp_seq	Decomposition sequence as decimal codepoints separated with a space
* @return	string				Decomposition sequence, fully decomposed
*/
function decompose(&$decomp_map, $decomp_seq)
{
	$ret = array();
	foreach (explode(' ', $decomp_seq) as $cp)
	{
		if (isset($decomp_map[$cp]))
		{
			$ret[] = decompose($decomp_map, $decomp_map[$cp]);
		}
		else
		{
			$ret[] = $cp;
		}
	}

	return implode(' ', $ret);
}


/**
* Return a parsable string representation of a variable
*
* This is function is limited to array/strings/integers
*
* @param	mixed	$var		Variable
* @return	string				PHP code representing the variable
*/
function my_var_export($var)
{
	if (is_array($var))
	{
		$lines = array();

		foreach ($var as $k => $v)
		{
			$lines[] = my_var_export($k) . '=>' . my_var_export($v);
		}

		return 'array(' . implode(',', $lines) . ')';
	}
	else if (is_string($var))
	{
		return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
	}
	else
	{
		return $var;
	}
}

/**
* Download a file to the develop/ dir
*
* @param	string	$url		URL of the file to download
* @return	void
*/
function download($url)
{
	global $phpbb_root_path;

	if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
	{
		return;
	}

	echo 'Downloading from ', $url, ' ';

	if (!$fpr = fopen($url, 'rb'))
	{
		die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
	}

	if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
	{
		die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
	}

	$i = 0;
	$chunk = 32768;
	$done = '';

	while (!feof($fpr))
	{
		$i += fwrite($fpw, fread($fpr, $chunk));
		echo str_repeat("\x08", strlen($done));

		$done = ($i >> 10) . ' KiB';
		echo $done;
	}
	fclose($fpr);
	fclose($fpw);

	echo "\n";
}

/**
* Convert a codepoint in hexadecimal to a UTF-8 char
*
* @param	string	$hex		Codepoint, in hexadecimal
* @return	string				UTF-8 char
*/
function hex_to_utf($hex)
{
	return cp_to_utf(hexdec($hex));
}

/**
* Return a UTF string formed from a sequence of codepoints in hexadecimal
*
* @param	string	$seq		Sequence of codepoints, separated with a space
* @return	string				UTF-8 string
*/
function hexseq_to_utf($seq)
{
	return implode('', array_map('hex_to_utf', explode(' ', $seq)));
}

/**
* Convert a codepoint to a UTF-8 char
*
* @param	integer	$cp			Unicode codepoint
* @return	string				UTF-8 string
*/
function cp_to_utf($cp)
{
	if ($cp > 0xFFFF)
	{
		return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
	}
	else if ($cp > 0x7FF)
	{
		return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
	}
	else if ($cp > 0x7F)
	{
		return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
	}
	else
	{
		return chr($cp);
	}
}
-format msgid "" "Graphic Card\n" "\n" " The installer will normally automatically detect and configure the\n" "graphic card installed on your machine. If this is not correct, you can\n" "choose from this list the card you actually have installed.\n" "\n" " In the situation where different servers are available for your card,\n" "with or without 3D acceleration, you're asked to choose the server which\n" "best suits your needs." msgstr "" "Monitor\n" "\n" " Odatda, o'rnatuvchi kompyuteringizga ulangan monitorni\n" "avtomatik ravishda aniqlaydi va moslaydi. Agar bu noto'g'ri\n" "bo'lsa, aslida ulangan monitorni ro'yxatdan tanlashingiz mumkin." #: ../help.pm:234 #, c-format msgid "" "X (for X Window System) is the heart of the GNU/Linux graphical interface\n" "on which all the graphical environments (KDE, GNOME, AfterStep,\n" "WindowMaker, etc.) bundled with Mandriva Linux rely upon.\n" "\n" "You'll see a list of different parameters to change to get an optimal\n" "graphical display.\n" "\n" "Graphic Card\n" "\n" " The installer will normally automatically detect and configure the\n" "graphic card installed on your machine. If this is not correct, you can\n" "choose from this list the card you actually have installed.\n" "\n" " In the situation where different servers are available for your card,\n" "with or without 3D acceleration, you're asked to choose the server which\n" "best suits your needs.\n" "\n" "\n" "\n" "Monitor\n" "\n" " Normally the installer will automatically detect and configure the\n" "monitor connected to your machine. If it is not correct, you can choose\n" "from this list the monitor which is connected to your computer.\n" "\n" "\n" "\n" "Resolution\n" "\n" " Here you can choose the resolutions and color depths available for your\n" "graphics hardware. Choose the one which best suits your needs (you will be\n" "able to make changes after the installation). A sample of the chosen\n" "configuration is shown in the monitor picture.\n" "\n" "\n" "\n" "Test\n" "\n" " Depending on your hardware, this entry might not appear.\n" "\n" " The system will try to open a graphical screen at the desired\n" "resolution. If you see the test message during the test and answer \"%s\",\n" "then DrakX will proceed to the next step. If you do not see it, then it\n" "means that some part of the auto-detected configuration was incorrect and\n" "the test will automatically end after 12 seconds and return you to the\n" "menu. Change settings until you get a correct graphical display.\n" "\n" "\n" "\n" "Options\n" "\n" " This steps allows you to choose whether you want your machine to\n" "automatically switch to a graphical interface at boot. Obviously, you may\n" "want to check \"%s\" if your machine is to act as a server, or if you were\n" "not successful in getting the display configured." msgstr "" #: ../help.pm:291 #, c-format msgid "" "Monitor\n" "\n" " Normally the installer will automatically detect and configure the\n" "monitor connected to your machine. If it is not correct, you can choose\n" "from this list the monitor which is connected to your computer." msgstr "" "Monitor\n" "\n" " Odatda, o'rnatuvchi kompyuteringizga ulangan monitorni\n" "avtomatik ravishda aniqlaydi va moslaydi. Agar bu noto'g'ri\n" "bo'lsa, aslida ulangan monitorni ro'yxatdan tanlashingiz mumkin." #: ../help.pm:298 #, c-format msgid "" "Resolution\n" "\n" " Here you can choose the resolutions and color depths available for your\n" "graphics hardware. Choose the one which best suits your needs (you will be\n" "able to make changes after the installation). A sample of the chosen\n" "configuration is shown in the monitor picture." msgstr "" #: ../help.pm:306 #, c-format msgid "" "In the situation where different servers are available for your card, with\n" "or without 3D acceleration, you're asked to choose the server which best\n" "suits your needs." msgstr "" #: ../help.pm:311 #, c-format msgid "" "Options\n" "\n" " This steps allows you to choose whether you want your machine to\n" "automatically switch to a graphical interface at boot. Obviously, you may\n" "want to check \"%s\" if your machine is to act as a server, or if you were\n" "not successful in getting the display configured." msgstr "" #: ../help.pm:319 #, c-format msgid "" "You now need to decide where you want to install the Mandriva Linux\n" "operating system on your hard drive. If your hard drive is empty or if an\n" "existing operating system is using all the available space you will have to\n" "partition the drive. Basically, partitioning a hard drive means to\n" "logically divide it to create the space needed to install your new\n" "Mandriva Linux system.\n" "\n" "Because the process of partitioning a hard drive is usually irreversible\n" "and can lead to data losses, partitioning can be intimidating and stressful\n" "for the inexperienced user. Fortunately, DrakX includes a wizard which\n" "simplifies this process. Before continuing with this step, read through the\n" "rest of this section and above all, take your time.\n" "\n" "Depending on the configuration of your hard drive, several options are\n" "available:\n" "\n" " * \"%s\". This option will perform an automatic partitioning of your blank\n" "drive(s). If you use this option there will be no further prompts.\n" "\n" " * \"%s\". The wizard has detected one or more existing Linux partitions on\n" "your hard drive. If you want to use them, choose this option. You will then\n" "be asked to choose the mount points associated with each of the partitions.\n" "The legacy mount points are selected by default, and for the most part it's\n" "a good idea to keep them.\n" "\n" " * \"%s\". If Microsoft Windows is installed on your hard drive and takes\n" "all the space available on it, you will have to create free space for\n" "GNU/Linux. To do so, you can delete your Microsoft Windows partition and\n" "data (see ``Erase entire disk'' solution) or resize your Microsoft Windows\n" "FAT or NTFS partition. Resizing can be performed without the loss of any\n" "data, provided you've previously defragmented the Windows partition.\n" "Backing up your data is strongly recommended. Using this option is\n" "recommended if you want to use both Mandriva Linux and Microsoft Windows on\n" "the same computer.\n" "\n" " Before choosing this option, please understand that after this\n" "procedure, the size of your Microsoft Windows partition will be smaller\n" "than when you started. You'll have less free space under Microsoft Windows\n" "to store your data or to install new software.\n" "\n" " * \"%s\". If you want to delete all data and all partitions present on\n" "your hard drive and replace them with your new Mandriva Linux system, " "choose\n" "this option. Be careful, because you will not be able to undo this " "operation\n" "after you confirm.\n" "\n" " !! If you choose this option, all data on your disk will be deleted. !!\n" "\n" " * \"%s\". This option appears when the hard drive is entirely taken by\n" "Microsoft Windows. Choosing this option will simply erase everything on the\n" "drive and begin fresh, partitioning everything from scratch.\n" "\n" " !! If you choose this option, all data on your disk will be lost. !!\n" "\n" " * \"%s\". Choose this option if you want to manually partition your hard\n" "drive. Be careful -- it is a powerful but dangerous choice and you can very\n" "easily lose all your data. That's why this option is really only\n" "recommended if you have done something like this before and have some\n" "experience. For more instructions on how to use the DiskDrake utility,\n" "refer to the ``Managing Your Partitions'' section in the ``Starter Guide''." msgstr "" #: ../help.pm:377 #, c-format msgid "Use existing partition" msgstr "Diskda bor qismlardan foydalanish" #: ../help.pm:370 #, c-format msgid "Use the free space on the Microsoft Windows® partition" msgstr "" #: ../help.pm:370 #, c-format msgid "Erase entire disk" msgstr "Butun diskni o'chirish" #: ../help.pm:380 #, c-format msgid "" "There you are. Installation is now complete and your GNU/Linux system is\n" "ready to be used. Just click on \"%s\" to reboot the system. Do not forget\n" "to remove the installation media (CD-ROM or floppy). The first thing you\n" "should see after your computer has finished doing its hardware tests is the\n" "boot-loader menu, giving you the choice of which operating system to start.\n" "\n" "The \"%s\" button shows two more buttons to:\n" "\n" " * \"%s\": enables you to create an installation floppy disk which will\n" "automatically perform a whole installation without the help of an operator,\n" "similar to the installation you've just configured.\n" "\n" " Note that two different options are available after clicking on that\n" "button:\n" "\n" " * \"%s\". This is a partially automated installation. The partitioning\n" "step is the only interactive procedure.\n" "\n" " * \"%s\". Fully automated installation: the hard disk is completely\n" "rewritten, all data is lost.\n" "\n" " This feature is very handy when installing on a number of similar\n" "machines. See the Auto install section on our web site for more\n" "information.\n" "\n" " * \"%s\"(*): saves a list of the packages selected in this installation.\n" "To use this selection with another installation, insert the floppy and\n" "start the installation. At the prompt, press the [F1] key, type >>linux\n" "defcfg=\"floppy\"<< and press the [Enter] key.\n" "\n" "(*) You need a FAT-formatted floppy. To create one under GNU/Linux, type\n" "\"mformat a:\", or \"fdformat /dev/fd0\" followed by \"mkfs.vfat\n" "/dev/fd0\"." msgstr "" #: ../help.pm:412 #, c-format msgid "Generate auto-install floppy" msgstr "Avto-o'rnatish disketni yaratish" #: ../help.pm:405 #, c-format msgid "Replay" msgstr "" #: ../help.pm:405 #, c-format msgid "Automated" msgstr "" #: ../help.pm:405 #, c-format msgid "Save packages selection" msgstr "" #: ../help.pm:408 #, c-format msgid "" "If you chose to reuse some legacy GNU/Linux partitions, you may wish to\n" "reformat some of them and erase any data they contain. To do so, please\n" "select those partitions as well.\n" "\n" "Please note that it's not necessary to reformat all pre-existing\n" "partitions. You must reformat the partitions containing the operating\n" "system (such as \"/\", \"/usr\" or \"/var\") but you do not have to " "reformat\n" "partitions containing data that you wish to keep (typically \"/home\").\n" "\n" "Please be careful when selecting partitions. After the formatting is\n" "completed, all data on the selected partitions will be deleted and you\n" "will not be able to recover it.\n" "\n" "Click on \"%s\" when you're ready to format the partitions.\n" "\n" "Click on \"%s\" if you want to choose another partition for your new\n" "Mandriva Linux operating system installation.\n" "\n" "Click on \"%s\" if you wish to select partitions which will be checked for\n" "bad blocks on the disk." msgstr "" #: ../help.pm:437 #, c-format msgid "" "By the time you install Mandriva Linux, it's likely that some packages will\n" "have been updated since the initial release. Bugs may have been fixed,\n" "security issues resolved. To allow you to benefit from these updates,\n" "you're now able to download them from the Internet. Check \"%s\" if you\n" "have a working Internet connection, or \"%s\" if you prefer to install\n" "updated packages later.\n" "\n" "Choosing \"%s\" will display a list of web locations from which updates can\n" "be retrieved. You should choose one near to you. A package-selection tree\n" "will appear: review the selection, and press \"%s\" to retrieve and install\n" "the selected package(s), or \"%s\" to abort." msgstr "" #: ../help.pm:450 #, c-format msgid "" "At this point, DrakX will allow you to choose the security level you desire\n" "for your machine. As a rule of thumb, the security level should be set\n" "higher if the machine is to contain crucial data, or if it's to be directly\n" "exposed to the Internet. The trade-off that a higher security level is\n" "generally obtained at the expense of ease of use.\n" "\n" "If you do not know what to choose, keep the default option. You'll be able\n" "to change it later with the draksec tool, which is part of Mandriva Linux\n" "Control Center.\n" "\n" "Fill the \"%s\" field with the e-mail address of the person responsible for\n" "security. Security messages will be sent to that address." msgstr "" #: ../help.pm:461 #, c-format msgid "Security Administrator" msgstr "Xavfsizlik boshqaruvchisi" #: ../help.pm:464 #, c-format msgid "" "At this point, you need to choose which partition(s) will be used for the\n" "installation of your Mandriva Linux system. If partitions have already been\n" "defined, either from a previous installation of GNU/Linux or by another\n" "partitioning tool, you can use existing partitions. Otherwise, hard drive\n" "partitions must be defined.\n" "\n" "To create partitions, you must first select a hard drive. You can select\n" "the disk for partitioning by clicking on ``hda'' for the first IDE drive,\n" "``hdb'' for the second, ``sda'' for the first SCSI drive and so on.\n" "\n" "To partition the selected hard drive, you can use these options:\n" "\n" " * \"%s\": this option deletes all partitions on the selected hard drive\n" "\n" " * \"%s\": this option enables you to automatically create ext3 and swap\n" "partitions in the free space of your hard drive\n" "\n" "\"%s\": gives access to additional features:\n" "\n" " * \"%s\": saves the partition table to a floppy. Useful for later\n" "partition-table recovery if necessary. It is strongly recommended that you\n" "perform this step.\n" "\n" " * \"%s\": allows you to restore a previously saved partition table from a\n" "floppy disk.\n" "\n" " * \"%s\": if your partition table is damaged, you can try to recover it\n" "using this option. Please be careful and remember that it does not always\n" "work.\n" "\n" " * \"%s\": discards all changes and reloads the partition table that was\n" "originally on the hard drive.\n" "\n" " * \"%s\": un-checking this option will force users to manually mount and\n" "unmount removable media such as floppies and CD-ROMs.\n" "\n" " * \"%s\": use this option if you wish to use a wizard to partition your\n" "hard drive. This is recommended if you do not have a good understanding of\n" "partitioning.\n" "\n" " * \"%s\": use this option to cancel your changes.\n" "\n" " * \"%s\": allows additional actions on partitions (type, options, format)\n" "and gives more information about the hard drive.\n" "\n" " * \"%s\": when you are finished partitioning your hard drive, this will\n" "save your changes back to disk.\n" "\n" "When defining the size of a partition, you can finely set the partition\n" "size by using the Arrow keys of your keyboard.\n" "\n" "Note: you can reach any option using the keyboard. Navigate through the\n" "partitions using [Tab] and the [Up/Down] arrows.\n" "\n" "When a partition is selected, you can use:\n" "\n" " * Ctrl-c to create a new partition (when an empty partition is selected)\n" "\n" " * Ctrl-d to delete a partition\n" "\n" " * Ctrl-m to set the mount point\n" "\n" "To get information about the different file system types available, please\n" "read the ext2FS chapter from the ``Reference Manual''.\n" "\n" "If you are installing on a PPC machine, you will want to create a small HFS\n" "``bootstrap'' partition of at least 1MB which will be used by the yaboot\n" "bootloader. If you opt to make the partition a bit larger, say 50MB, you\n" "may find it a useful place to store a spare kernel and ramdisk images for\n" "emergency boot situations." msgstr "" #: ../help.pm:526 #, c-format msgid "Save partition table" msgstr "" #: ../help.pm:526 #, c-format msgid "Restore partition table" msgstr "" #: ../help.pm:526 #, c-format msgid "Rescue partition table" msgstr "" #: ../help.pm:526 #, c-format msgid "Removable media auto-mounting" msgstr "" #: ../help.pm:526 #, c-format msgid "Wizard" msgstr "" #: ../help.pm:526 #, c-format msgid "Undo" msgstr "" #: ../help.pm:526 #, c-format msgid "Toggle between normal/expert mode" msgstr "Odiy/ekspert usuliga o'tish" #: ../help.pm:536 #, c-format msgid "" "More than one Microsoft partition has been detected on your hard drive.\n" "Please choose the one which you want to resize in order to install your new\n" "Mandriva Linux operating system.\n" "\n" "Each partition is listed as follows: \"Linux name\", \"Windows name\"\n" "\"Capacity\".\n" "\n" "\"Linux name\" is structured: \"hard drive type\", \"hard drive number\",\n" "\"partition number\" (for example, \"hda1\").\n" "\n" "\"Hard drive type\" is \"hd\" if your hard dive is an IDE hard drive and\n" "\"sd\" if it is a SCSI hard drive.\n" "\n" "\"Hard drive number\" is always a letter after \"hd\" or \"sd\". With IDE\n" "hard drives:\n" "\n" " * \"a\" means \"master hard drive on the primary IDE controller\";\n" "\n" " * \"b\" means \"slave hard drive on the primary IDE controller\";\n" "\n" " * \"c\" means \"master hard drive on the secondary IDE controller\";\n" "\n" " * \"d\" means \"slave hard drive on the secondary IDE controller\".\n" "\n" "With SCSI hard drives, an \"a\" means \"lowest SCSI ID\", a \"b\" means\n" "\"second lowest SCSI ID\", etc.\n" "\n" "\"Windows name\" is the letter of your hard drive under Windows (the first\n" "disk or partition is called \"C:\")." msgstr "" #: ../help.pm:567 #, c-format msgid "" "\"%s\": check the current country selection. If you're not in this country,\n" "click on the \"%s\" button and choose another. If your country is not in " "the\n" "list shown, click on the \"%s\" button to get the complete country list." msgstr "" #: ../help.pm:572 #, c-format msgid "" "This step is activated only if an existing GNU/Linux partition has been\n" "found on your machine.\n" "\n" "DrakX now needs to know if you want to perform a new installation or an\n" "upgrade of an existing Mandriva Linux system:\n" "\n" " * \"%s\". For the most part, this completely wipes out the old system.\n" "However, depending on your partitioning scheme, you can prevent some of\n" "your existing data (notably \"home\" directories) from being over-written.\n" "If you wish to change how your hard drives are partitioned, or to change\n" "the file system, you should use this option.\n" "\n" " * \"%s\". This installation class allows you to update the packages\n" "currently installed on your Mandriva Linux system. Your current " "partitioning\n" "scheme and user data will not be altered. Most of the other configuration\n" "steps remain available and are similar to a standard installation.\n" "\n" "Using the ``Upgrade'' option should work fine on Mandriva Linux systems\n" "running version \"8.1\" or later. Performing an upgrade on versions prior\n" "to Mandriva Linux version \"8.1\" is not recommended." msgstr "" #: ../help.pm:594 #, c-format msgid "" "Depending on the language you chose (), DrakX will automatically select a\n" "particular type of keyboard configuration. Check that the selection suits\n" "you or choose another keyboard layout.\n" "\n" "Also, you may not have a keyboard which corresponds exactly to your\n" "language: for example, if you are an English-speaking Swiss native, you may\n" "have a Swiss keyboard. Or if you speak English and are located in Quebec,\n" "you may find yourself in the same situation where your native language and\n" "country-set keyboard do not match. In either case, this installation step\n" "will allow you to select an appropriate keyboard from a list.\n" "\n" "Click on the \"%s\" button to be shown a list of supported keyboards.\n" "\n" "If you choose a keyboard layout based on a non-Latin alphabet, the next\n" "dialog will allow you to choose the key binding which will switch the\n" "keyboard between the Latin and non-Latin layouts." msgstr "" #: ../help.pm:612 #, c-format msgid "" "The first step is to choose your preferred language.\n" "\n" "Your choice of preferred language will affect the installer, the\n" "documentation, and the system in general. First select the region you're\n" "located in, then the language you speak.\n" "\n" "Clicking on the \"%s\" button will allow you to select other languages to\n" "be installed on your workstation, thereby installing the language-specific\n" "files for system documentation and applications. For example, if Spanish\n" "users are to use your machine, select English as the default language in\n" "the tree view and \"%s\" in the Advanced section.\n" "\n" "About UTF-8 (unicode) support: Unicode is a new character encoding meant to\n" "cover all existing languages. However full support for it in GNU/Linux is\n" "still under development. For that reason, Mandriva Linux's use of UTF-8 " "will\n" "depend on the user's choices:\n" "\n" " * If you choose a language with a strong legacy encoding (latin1\n" "languages, Russian, Japanese, Chinese, Korean, Thai, Greek, Turkish, most\n" "iso-8859-2 languages), the legacy encoding will be used by default;\n" "\n" " * Other languages will use unicode by default;\n" "\n" " * If two or more languages are required, and those languages are not using\n" "the same encoding, then unicode will be used for the whole system;\n" "\n" " * Finally, unicode can also be forced for use throughout the system at a\n" "user's request by selecting the \"%s\" option independently of which\n" "languages were been chosen.\n" "\n" "Note that you're not limited to choosing a single additional language. You\n" "may choose several, or even install them all by selecting the \"%s\" box.\n" "Selecting support for a language means translations, fonts, spell checkers,\n" "etc. will also be installed for that language.\n" "\n" "To switch between the various languages installed on your system, you can\n" "launch the \"localedrake\" command as \"root\" to change the language used\n" "by the entire system. Running the command as a regular user will only\n" "change the language settings for that particular user." msgstr "" #: ../help.pm:650 #, c-format msgid "Espanol" msgstr "" #: ../help.pm:643 #, c-format msgid "Use Unicode by default" msgstr "" #: ../help.pm:646 #, c-format msgid "" "Usually, DrakX has no problems detecting the number of buttons on your\n" "mouse. If it does, it assumes you have a two-button mouse and will\n" "configure it for third-button emulation. The third-button mouse button of a\n" "two-button mouse can be obtained by simultaneously clicking the left and\n" "right mouse buttons. DrakX will automatically know whether your mouse uses\n" "a PS/2, serial or USB interface.\n" "\n" "If you have a 3-button mouse without a wheel, you can choose a \"%s\"\n" "mouse. DrakX will then configure your mouse so that you can simulate the\n" "wheel with it: to do so, press the middle button and move your mouse\n" "pointer up and down.\n" "\n" "If for some reason you wish to specify a different type of mouse, select it\n" "from the list provided.\n" "\n" "You can select the \"%s\" entry to chose a ``generic'' mouse type which\n" "will work with nearly all mice.\n" "\n" "If you choose a mouse other than the default one, a test screen will be\n" "displayed. Use the buttons and wheel to verify that the settings are\n" "correct and that the mouse is working correctly. If the mouse is not\n" "working well, press the space bar or [Return] key to cancel the test and\n" "you will be returned to the mouse list.\n" "\n" "Occasionally wheel mice are not detected automatically, so you will need to\n" "select your mouse from a list. Be sure to select the one corresponding to\n" "the port that your mouse is attached to. After selecting a mouse and\n" "pressing the \"%s\" button, a mouse image will be displayed on-screen.\n" "Scroll the mouse wheel to ensure that it is activating correctly. As you\n" "scroll your mouse wheel, you will see the on-screen scroll wheel moving.\n" "Test the buttons and check that the mouse pointer moves on-screen as you\n" "move your mouse about." msgstr "" #: ../help.pm:684 #, c-format msgid "with Wheel emulation" msgstr "" #: ../help.pm:684 #, c-format msgid "Universal | Any PS/2 & USB mice" msgstr "Istagan PS/2 va USB sichqoncha" #: ../help.pm:687 #, c-format msgid "" "Please select the correct port. For example, the \"COM1\" port under\n" "Windows is named \"ttyS0\" under GNU/Linux." msgstr "" "Iltimos to'g'ri portni tanlang. Masalan, Windows'dagi \"COM1\"\n" "portining nomi GNU/Linux'da \"ttyS0\"." #: ../help.pm:684 #, c-format msgid "" "A boot loader is a little program which is started by the computer at boot\n" "time. It's responsible for starting up the whole system. Normally, the boot\n" "loader installation is totally automated. DrakX will analyze the disk boot\n" "sector and act according to what it finds there:\n" "\n" " * if a Windows boot sector is found, it will replace it with a GRUB/LILO\n" "boot sector. This way you'll be able to load either GNU/Linux or any other\n" "OS installed on your machine.\n" "\n" " * if a GRUB or LILO boot sector is found, it'll replace it with a new one.\n" "\n" "If DrakX can not determine where to place the boot sector, it'll ask you\n" "where it should place it. Generally, the \"%s\" is the safest place.\n" "Choosing \"%s\" will not install any boot loader. Use this option only if " "you\n" "know what you're doing." msgstr "" #: ../help.pm:745 #, c-format msgid "" "Now, it's time to select a printing system for your computer. Other\n" "operating systems may offer you one, but Mandriva Linux offers two. Each of\n" "the printing systems is best suited to particular types of configuration.\n" "\n" " * \"%s\" -- which is an acronym for ``print, do not queue'', is the choice\n" "if you have a direct connection to your printer, you want to be able to\n" "panic out of printer jams, and you do not have networked printers. (\"%s\"\n" "will handle only very simple network cases and is somewhat slow when used\n" "within networks.) It's recommended that you use \"pdq\" if this is your\n" "first experience with GNU/Linux.\n" "\n" " * \"%s\" stands for `` Common Unix Printing System'' and is an excellent\n" "choice for printing to your local printer or to one halfway around the\n" "planet. It's simple to configure and can act as a server or a client for\n" "the ancient \"lpd\" printing system, so it's compatible with older\n" "operating systems which may still need print services. While quite\n" "powerful, the basic setup is almost as easy as \"pdq\". If you need to\n" "emulate a \"lpd\" server, make sure you turn on the \"cups-lpd\" daemon.\n" "\"%s\" includes graphical front-ends for printing or choosing printer\n" "options and for managing the printer.\n" "\n" "If you make a choice now, and later find that you do not like your printing\n" "system you may change it by running PrinterDrake from the Mandriva Linux\n" "Control Center and clicking on the \"%s\" button." msgstr "" #: ../help.pm:768 #, c-format msgid "pdq" msgstr "" #: ../help.pm:724 #, c-format msgid "CUPS" msgstr "" #: ../help.pm:724 #, c-format msgid "Expert" msgstr "Ekspert" #: ../help.pm:771 #, c-format msgid "" "DrakX will first detect any IDE devices present in your computer. It will\n" "also scan for one or more PCI SCSI cards on your system. If a SCSI card is\n" "found, DrakX will automatically install the appropriate driver.\n" "\n" "Because hardware detection is not foolproof, DrakX may fail in detecting\n" "your hard drives. If so, you'll have to specify your hardware by hand.\n" "\n" "If you had to manually specify your PCI SCSI adapter, DrakX will ask if you\n" "want to configure options for it. You should allow DrakX to probe the\n" "hardware for the card-specific options which are needed to initialize the\n" "adapter. Most of the time, DrakX will get through this step without any\n" "issues.\n" "\n" "If DrakX is not able to probe for the options to automatically determine\n" "which parameters need to be passed to the hardware, you'll need to manually\n" "configure the driver." msgstr "" #: ../help.pm:789 #, c-format msgid "" "\"%s\": if a sound card is detected on your system, it'll be displayed\n" "here. If you notice the sound card is not the one actually present on your\n" "system, you can click on the button and choose a different driver." msgstr "" "\"%s\": agar kompyuterda tovush kartasi aniqlansa u shu erda ko'rsatiladi.\n" "Agar ko'rsatilgan tovush kartasi kompyuterdagi tovush kartasi\n" "bilan mos kelmasa, tugmani bosib boshqa drayverni tanlashingiz mumkin." #: ../help.pm:794 #, c-format msgid "" "As a review, DrakX will present a summary of information it has gathered\n" "about your system. Depending on the hardware installed on your machine, you\n" "may have some or all of the following entries. Each entry is made up of the\n" "hardware item to be configured, followed by a quick summary of the current\n" "configuration. Click on the corresponding \"%s\" button to make the change.\n" "\n" " * \"%s\": check the current keyboard map configuration and change it if\n" "necessary.\n" "\n" " * \"%s\": check the current country selection. If you're not in this\n" "country, click on the \"%s\" button and choose another. If your country\n" "is not in the list shown, click on the \"%s\" button to get the complete\n" "country list.\n" "\n" " * \"%s\": by default, DrakX deduces your time zone based on the country\n" "you have chosen. You can click on the \"%s\" button here if this is not\n" "correct.\n" "\n" " * \"%s\": verify the current mouse configuration and click on the button\n" "to change it if necessary.\n" "\n" " * \"%s\": if a sound card is detected on your system, it'll be displayed\n" "here. If you notice the sound card is not the one actually present on your\n" "system, you can click on the button and choose a different driver.\n" "\n" " * \"%s\": if you have a TV card, this is where information about its\n" "configuration will be displayed. If you have a TV card and it is not\n" "detected, click on \"%s\" to try to configure it manually.\n" "\n" " * \"%s\": you can click on \"%s\" to change the parameters associated with\n" "the card if you feel the configuration is wrong.\n" "\n" " * \"%s\": by default, DrakX configures your graphical interface in\n" "\"800x600\" or \"1024x768\" resolution. If that does not suit you, click on\n" "\"%s\" to reconfigure your graphical interface.\n" "\n" " * \"%s\": if you wish to configure your Internet or local network access,\n" "you can do so now. Refer to the printed documentation or use the\n" "Mandriva Linux Control Center after the installation has finished to " "benefit\n" "from full in-line help.\n" "\n" " * \"%s\": allows to configure HTTP and FTP proxy addresses if the machine\n" "you're installing on is to be located behind a proxy server.\n" "\n" " * \"%s\": this entry allows you to redefine the security level as set in a\n" "previous step ().\n" "\n" " * \"%s\": if you plan to connect your machine to the Internet, it's a good\n" "idea to protect yourself from intrusions by setting up a firewall. Consult\n" "the corresponding section of the ``Starter Guide'' for details about\n" "firewall settings.\n" "\n" " * \"%s\": if you wish to change your bootloader configuration, click this\n" "button. This should be reserved to advanced users. Refer to the printed\n" "documentation or the in-line help about bootloader configuration in the\n" "Mandriva Linux Control Center.\n" "\n" " * \"%s\": through this entry you can fine tune which services will be run\n" "on your machine. If you plan to use this machine as a server it's a good\n" "idea to review this setup." msgstr "" #: ../help.pm:809 #, fuzzy, c-format msgid "TV card" msgstr "ISDN karta" #: ../help.pm:809 #, c-format msgid "ISDN card" msgstr "ISDN karta" #: ../help.pm:858 #, c-format msgid "Graphical Interface" msgstr "Grafik interfeys" #: ../help.pm:861 #, c-format msgid "" "Choose the hard drive you want to erase in order to install your new\n" "Mandriva Linux partition. Be careful, all data on this drive will be lost\n" "and will not be recoverable!" msgstr "" #: ../help.pm:866 #, c-format msgid "" "Click on \"%s\" if you want to delete all data and partitions present on\n" "this hard drive. Be careful, after clicking on \"%s\", you will not be able\n" "to recover any data and partitions present on this hard drive, including\n" "any Windows data.\n" "\n" "Click on \"%s\" to quit this operation without losing data and partitions\n" "present on this hard drive." msgstr "" "Bu diskdagi barcha ma'lumotni va diskning barcha qismlarini\n" "o'chirish uchun \"%s\"ni bosing. Ehtiyot bo'ling, \"%s\"ni bosganingizdan\n" "keyin diskdagi ma'lumotni va diskning qismlarini, shu jumlada\n" "Windows ma'lumotini ham, tiklab bo'lmaydi.\n" "\n" "Ma'lumotni va diskning barcha qismlarini yo'qotmasdan bu\n" "operatsiyani to'xtatish uchun \"%s\"ni bosing." #: ../help.pm:872 #, c-format msgid "Next ->" msgstr "Keyingi ->" #: ../help.pm:872 #, c-format msgid "<- Previous" msgstr "<- Oldingi" #~ msgid "authentication" #~ msgstr "tasdiqlash"