Changeset 5499
- Timestamp:
- 2003-09-12T11:55:17+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/translate.pl
r5484 r5499 203 203 $fontchoice = " -foundry cronyx -fontname helvetica"; 204 204 } 205 # special case for Thai images 206 elsif ($language_symbol eq "th") { 207 $text = &unicode::unicode2singlebyte(&unicode::utf82unicode($text), "windows_874"); 208 $fontchoice = " -foundry monotype -fontname BrowalliaUPC -fontregistry tis620"; 209 } 205 210 # special case for Ukrainian images - font is windows_1251 encoded 206 211 elsif ($language_symbol eq "uk") { … … 208 213 $fontchoice = " -foundry rfx -fontname serene"; 209 214 } 210 # special case for Thai images211 # elsif ($language_symbol eq "th") {212 # $text = &unicode::unicode2singlebyte(&unicode::utf82unicode($text), "thai");213 # }214 215 215 216 # edit image macros … … 231 232 $options .= " -fontsize 10 -fontweight bold"; 232 233 } 234 # special case for Thai images 235 elsif ($language_symbol eq "th") { 236 $options .= " -fontsize 20 -fontweight bold"; # Browallia 237 } 233 238 # special case for Ukrainian images 234 239 elsif ($language_symbol eq "uk") { 235 240 $options .= " -fontsize 10"; 236 241 } 237 # elsif ($language_symbol eq "th") {238 # $options .= " -fontsize 30 -fontweight bold";239 # $options .= " -foundry 2rebels -fontname \"DB ThaiText\"";240 # $options .= " -fontsize 24";241 # $options .= " -foundry monotype -fontname \"Courier ProportionalThai\"";242 # }243 242 else { 244 243 $options .= " -fontsize 12"; … … 250 249 # &process_width_macro ($fullfilename, $image_name, \$image_macros); 251 250 252 } elsif ($image_type eq "nav_bar_button") { 253 251 } 252 elsif ($image_type eq "nav_bar_button") { 253 254 254 # generate on and off images 255 255 my $options = "-text \"$text\" -filenamestem $image_name -image_dir $image_dir"; … … 259 259 # special case for Thai images 260 260 if ($language_symbol eq "th") { 261 # $options .= " -fontsize 30"; 262 # $options .= " -foundry 2rebels -fontname \"DB ThaiText\" -fontweight bold"; 263 # $options .= " -fontsize 24"; 264 # $options .= " -foundry monotype -fontname \"Courier ProportionalThai\""; 261 $options .= " -fontsize 18 -fontweight bold"; # Browallia 265 262 } 266 263 else { … … 271 268 272 269 # generate green image 273 $options = "-text \"$text\" -filename ${image_name}gr.gif -image_dir $image_dir"; 274 $options .= $fontchoice; 275 276 `$ENV{'GSDLHOME'}/bin/script/gimp/green_bar-1.2.pl $options`; 270 $options = "-text \"$text\" -filenamestem ${image_name}gr -image_dir $image_dir"; 271 $options .= " -height 17 -fixed_width -width 87"; 272 $options .= " -bgcolor \"#96c19b\""; 273 $options .= $fontchoice; 274 275 # special case for Thai images 276 if ($language_symbol eq "th") { 277 $options .= " -fontsize 18 -fontweight bold"; # Browallia 278 } 279 else { 280 $options .= " -fontsize 17"; 281 } 282 283 `$ENV{'GSDLHOME'}/bin/script/gimp/flash_button-1.2.pl $options`; 284 285 # delete the unused light image 286 unlink(util::filename_cat($image_dir, "${image_name}gr" . "of.gif")); 287 288 # rename the dark image 289 &util::mv(util::filename_cat($image_dir, "${image_name}gr" . "on.gif"), 290 util::filename_cat($image_dir, "$image_name" . "gr.gif")); 277 291 278 292 # get width of new images and edit width macro … … 280 294 &process_width_macro ($fullfilename, $image_name, \$image_macros); 281 295 282 } elsif ($image_type eq "document_button") { 296 } 297 elsif ($image_type eq "document_button") { 283 298 284 299 # generate on and off images … … 295 310 $options .= " -fontsize 8"; 296 311 } 312 # special case for Thai images 313 elsif ($language_symbol eq "th") { 314 $options .= " -fontsize 22 -fontweight bold"; # Browallia 315 } 297 316 # special case for Ukrainian images 298 317 elsif ($language_symbol eq "uk") { … … 305 324 # &process_width_macro ($fullfilename, $image_name, \$image_macros); 306 325 307 } elsif ($image_type eq "collector_bar_button") { 326 } 327 elsif ($image_type eq "collector_bar_button") { 308 328 309 329 $text =~ s/\\n/\n/g; … … 352 372 unlink(util::filename_cat($image_dir, "nc$image_name" . "on.gif")); 353 373 354 } elsif ($image_type eq "green_bar_left_aligned") { 374 } 375 elsif ($image_type eq "green_bar_left_aligned") { 355 376 356 377 # generate green bar image (we're assuming these bars are always 537 … … 360 381 $options .= $fontchoice; 361 382 383 # special case for Thai images 384 if ($language_symbol eq "th") { 385 $options .= " -fontsize 18 -fontweight bold"; # Browallia 386 } 387 362 388 `$ENV{'GSDLHOME'}/bin/script/gimp/green_bar-1.2.pl $options`; 363 389 364 } elsif ($image_type eq "green_title") { 390 } 391 elsif ($image_type eq "green_title") { 365 392 366 393 # read the width if it is specified in $image_macros … … 371 398 my $options = "-text \"$text\" -filename ${image_name}.gif -image_dir $image_dir"; 372 399 $options .= " -width $width -height 57 -stripe_alignment right -text_alignment right"; 373 $options .= " -fontsize 26 -fontweight bold";374 400 $options .= $fontchoice; 401 402 # special case for Thai images 403 if ($language_symbol eq "th") { 404 $options .= " -fontsize 50 -fontweight bold"; # Browallia 405 } 406 else { 407 $options .= " -fontsize 26 -fontweight bold"; 408 } 375 409 376 410 `$ENV{'GSDLHOME'}/bin/script/gimp/title_icon-1.2.pl $options`; … … 381 415 # &process_width_macro ($fullfilename, $image_name, \$image_macros); 382 416 383 } elsif ($image_type eq "hand_made") { 384 417 } 418 elsif ($image_type eq "hand_made") { 419 385 420 $hand_made ++; 386 421 387 } else { 422 } 423 else { 388 424 389 425 print STDERR "WARNING (translate.pl): unknown image type found ($image_type)\n";
Note:
See TracChangeset
for help on using the changeset viewer.