Changeset 420 for trunk/form.php


Ignore:
Timestamp:
Apr 7, 2010, 10:42:01 AM (14 years ago)
Author:
george
Message:
  • Opraveno: Hromadný překlad více položek se stejnými anglickými originály. Nefungovalo správně pro skupiny překladu s řetězcovým indexem jako např. NPCOption.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/form.php

    r393 r420  
    33include('includes/global.php');   
    44
    5 function ColorNames($Text,$names) {
    6        
    7          // $buff[] = array($Line['ID'],GetIDbyName($Table),$Line[$Column],$Line['Tran']);
     5function ColorNames($Text, $names)
     6{
     7 
     8   // $buff[] = array($Line['ID'],GetIDbyName($Table),$Line[$Column],$Line['Tran']);
    89  foreach($names as $Line) {
    9         if ($Line[3] <> '') {
    10            $Text = str_replace($Line[2],'<span Title="Byl nalezen překlad: '.$Line[3].'" class="edit">'.$Line[2].'</span>',$Text);
    11            $Text = str_replace(strtolower($Line[2]),'<span Title="Byl nalezen překlad: '.$Line[3].'" class="edit">'.$Line[2].'</span>',$Text);
    12         } else {
     10  if ($Line[3] <> '') {
     11     $Text = str_replace($Line[2],'<span Title="Byl nalezen překlad: '.$Line[3].'" class="edit">'.$Line[2].'</span>',$Text);
     12     $Text = str_replace(strtolower($Line[2]),'<span Title="Byl nalezen překlad: '.$Line[3].'" class="edit">'.$Line[2].'</span>',$Text);
     13  } else {
    1314       $Text = str_replace($Line[2],'<span Title="Jméno bylo nalezeno v názvech a můžete ho přeložit. Začnete kliknutím na: Vyhledat v názvech" class="edit">'.$Line[2].'</span>',$Text);
    1415       $Text = str_replace(strtolower($Line[2]),'<span Title="Jméno bylo nalezeno v názvech a můžete ho přeložit. Začnete kliknutím na: Vyhledat v názvech" class="edit">'.$Line[2].'</span>',$Text);
    1516     }
    1617  }
    17         return $Text;
     18  return $Text;
    1819}
    1920
     
    2223$GroupId = LoadGroupIdParameter();
    2324$Table = $TranslationTree[$GroupId]['TablePrefix'];
    24 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; else $Action = '';
     25if(array_key_exists('action', $_GET)) $Action = $_GET['action'];
     26  else $Action = '';
    2527
    2628if(array_key_exists('ID', $_GET))
     
    3032  $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$TextID);
    3133  $Line = mysql_fetch_assoc($DbResult);
    32   if(!$Line) die('Překlad nenalezen.');
     34  if(!$Line) ErrorMessage('Překlad nenalezen.');
    3335   
    3436  $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE `Language` = 0  AND `Entry` = '.$Line['Entry'].' AND `VersionEnd` = '.$Line['VersionEnd'].' LIMIT 1');
    3537  $LineAJ = mysql_fetch_assoc($DbResult);
    36   if(!$Line) die('Anglický originál k překladu nenalezen.');
     38  if(!$Line) ErrorMessage('Anglický originál k překladu nenalezen.');
    3739 
    3840  $IDUser = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$Line['User']);
Note: See TracChangeset for help on using the changeset viewer.