Ignore:
Timestamp:
Feb 15, 2010, 1:31:25 PM (15 years ago)
Author:
maron
Message:

odstranění nepřeložených textů při generování textů rozhraní pro addon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/create_addon.php

    r324 r326  
    159159      $Buffer .= 'f("'.addslashes($Line['ShortCut']).'", "'.$Original.'", "'.$Translated.'");'."\n";
    160160    }
    161     // Nepřeložené texty
    162     $Query = 'SELECT '.$Column['Column'].' as Original, ShortCut FROM '.$Group['TablePrefix'].' WHERE Language = 0  AND VersionStart <= '.$this->ClientVersion['BuildNumber'].' AND VersionEnd >= '.$this->ClientVersion['BuildNumber'].' AND entry NOT IN (SELECT entry FROM '.$Group['TablePrefix'].' WHERE (Complete = 1)  AND VersionStart <= '.$this->ClientVersion['BuildNumber'].' AND VersionEnd >= '.$this->ClientVersion['BuildNumber'].' AND '.$this->WhereLang.' AND '.$this->WhereUsers.')';
    163     $DbResult = $this->Database->query($Query);
    164     while($Line = $DbResult->fetch_array())
    165     {
    166       $Original = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Original'])));
    167       $Translated = str_replace("\r", '', str_replace("\n", '\r\\'."\n", $Line['Original']));
    168       if(substr($this->ClientVersion['Version'], 0, 2) == '2.')
    169       {
    170         $Original = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Original);
    171         $Translated = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Translated);
    172       }
    173       $Buffer .= 'f("'.addslashes($Line['ShortCut']).'", "'.$Original.'", "'.$Translated.'");'."\n";
    174     }
     161
    175162    if(!file_exists($this->TempDir.'CzWoW/')) mkdir($this->TempDir.'CzWoW/', 0777, true);
    176163    file_put_contents($this->TempDir.'CzWoW/LocalizationStrings.lua', $Buffer);
Note: See TracChangeset for help on using the changeset viewer.