Changeset 451


Ignore:
Timestamp:
Apr 12, 2010, 8:27:00 PM (14 years ago)
Author:
maron
Message:

Oprava při vybrání pouze některých překladů u addonu

Location:
trunk/export
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/create_addon.php

    r445 r451  
    107107    while($Group = $DbResult->fetch_assoc())
    108108    {
     109          //získání čísla verze pro export
    109110      $ID = $this->Database->query('SELECT LastVersion FROM `Group` WHERE Id = '.$Group['Id']);
    110111      $LastVersion = $ID->fetch_assoc();
     
    150151      }
    151152    }
     153
     154
     155    // Generete list file of translated
     156    $CountFiles = 'CountFiles.lua';
     157    $Buffer = '';
     158    foreach($CreatedFileList as $CreatedFile)
     159      $Buffer .= 'CZWOW_'.str_replace('_','_count=',$CreatedFile).';'."\n";
     160    foreach($TranslationTree as $Group)
     161      foreach($TranslationTree[$Group['Id']]['Items'] as $Column)
     162      if (($Column['AddonFileName'] != '') and (!in_array($Column['AddonFileName'].'_1', $CreatedFileList)))
     163      {
     164        $Buffer .= 'CZWOW_'.$Column['AddonFileName'].'_count=0;'."\n";
     165          }
     166         
     167    file_put_contents($this->TempDir.'CzWoW/'.$CountFiles, $Buffer);
     168 
    152169 
    153170    // Generate file Translates.xml
    154171    $Buffer = '<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/.\FrameXML\UI.xsd">'."\n";
     172    $Buffer .= '<script file="'.$CountFiles.'"/>'."\n";
    155173    foreach($CreatedFileList as $CreatedFile)
    156174      $Buffer .= '<script file="'.$CreatedFile.'.lua"/>'."\n";
     
    170188    $Column['Column'] = 'Text';
    171189   
    172     $DbResult = $this->Database->query($this->BuildQuery($Group));
     190    $DbResult = $this->Database->query('SELECT `Group`.* FROM `ExportGroup` JOIN `Group` ON `Group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$this->Id.' AND `Group`.`TablePrefix` != "" AND `Group`.`Id` = 14');
     191    //$Group = $DbResult->fetch_assoc();
     192    if ($DbResult->num_rows == 0)
     193      $CanGenerated = '-1';
     194    else
     195      $CanGenerated = '';
     196   
     197    $DbResult = $this->Database->query($this->BuildQuery($Group,'',$CanGenerated));
    173198    while($Line = $DbResult->fetch_array())
    174199    {
  • trunk/export/files/3.2.0/CzWoW/CzWoW.lua

    r276 r451  
    1616  local en = text;
    1717  text = trim(text);
    18   if getglobal("CZWOW_QuestTitle_1")[text] then return getglobal("CZWOW_QuestTitle_1")[text];
    19   elseif getglobal("CZWOW_QuestObjective_1")[text] then return getglobal("CZWOW_QuestObjective_1")[text];
    20   elseif getglobal("CZWOW_QuestDescription_1")[text] then return getglobal("CZWOW_QuestDescription_1")[text];
    21   elseif getglobal("CZWOW_QuestProgress_1")[text] then return getglobal("CZWOW_QuestProgress_1")[text];
    22   elseif getglobal("CZWOW_QuestReward_1")[text] then return getglobal("CZWOW_QuestReward_1")[text];
    23   elseif getglobal("CZWOW_NPCAction_1")[text] then return getglobal("CZWOW_NPCAction_1")[text];
    24   elseif getglobal("CZWOW_BookPage_1")[text] then return getglobal("CZWOW_BookPage_1")[text];
    25   else
     18          for i=1, CZWOW_QuestTitle_count, 1 do
     19                  if getglobal("CZWOW_QuestTitle_"..i)[text] then
     20                        return getglobal("CZWOW_QuestTitle_"..i)[text];
     21                end
     22        end
     23          for i=1, CZWOW_QuestObjective_count, 1 do
     24                  if getglobal("CZWOW_QuestObjective_"..i)[text] then
     25                        return getglobal("CZWOW_QuestObjective_"..i)[text];
     26                end
     27        end
     28          for i=1, CZWOW_QuestProgress_count, 1 do
     29                  if getglobal("CZWOW_QuestProgress_"..i)[text] then
     30                        return getglobal("CZWOW_QuestProgress_"..i)[text];
     31                end
     32        end
     33          for i=1, CZWOW_QuestReward_count, 1 do
     34                  if getglobal("CZWOW_QuestReward_"..i)[text] then
     35                        return getglobal("CZWOW_QuestReward_"..i)[text];
     36                end
     37        end
     38          for i=1, CZWOW_NPCAction_count, 1 do
     39                  if getglobal("CZWOW_NPCAction_"..i)[text] then
     40                        return getglobal("CZWOW_NPCAction_"..i)[text];
     41                end
     42        end
     43          for i=1, CZWOW_BookPage_count, 1 do
     44                  if getglobal("CZWOW_BookPage_"..i)[text] then
     45                        return getglobal("CZWOW_BookPage_"..i)[text];
     46                end
     47        end
    2648          for i=1, CZWOW_NPCText_count, 1 do
    2749                  if getglobal("CZWOW_NPCText_"..i)[text] then
     
    3153     return en;
    3254  end
    33 end
    3455
    3556CzWoW_OnLoad=function()
  • trunk/export/files/3.3.0/CzWoW/CzWoW.lua

    r325 r451  
    2020  local en = text;
    2121  text = trim(text);
    22   if getglobal("CZWOW_QuestTitle_1")[text] then return getglobal("CZWOW_QuestTitle_1")[text];
    23   elseif getglobal("CZWOW_QuestObjective_1")[text] then return getglobal("CZWOW_QuestObjective_1")[text];
    24   elseif getglobal("CZWOW_QuestDescription_1")[text] then return getglobal("CZWOW_QuestDescription_1")[text];
    25   elseif getglobal("CZWOW_QuestProgress_1")[text] then return getglobal("CZWOW_QuestProgress_1")[text];
    26   elseif getglobal("CZWOW_QuestReward_1")[text] then return getglobal("CZWOW_QuestReward_1")[text];
    27   elseif getglobal("CZWOW_NPCAction_1")[text] then return getglobal("CZWOW_NPCAction_1")[text];
    28   elseif getglobal("CZWOW_BookPage_1")[text] then return getglobal("CZWOW_BookPage_1")[text];
    29   else
     22          for i=1, CZWOW_QuestTitle_count, 1 do
     23                  if getglobal("CZWOW_QuestTitle_"..i)[text] then
     24                        return getglobal("CZWOW_QuestTitle_"..i)[text];
     25                end
     26        end
     27          for i=1, CZWOW_QuestObjective_count, 1 do
     28                  if getglobal("CZWOW_QuestObjective_"..i)[text] then
     29                        return getglobal("CZWOW_QuestObjective_"..i)[text];
     30                end
     31        end
     32          for i=1, CZWOW_QuestProgress_count, 1 do
     33                  if getglobal("CZWOW_QuestProgress_"..i)[text] then
     34                        return getglobal("CZWOW_QuestProgress_"..i)[text];
     35                end
     36        end
     37          for i=1, CZWOW_QuestReward_count, 1 do
     38                  if getglobal("CZWOW_QuestReward_"..i)[text] then
     39                        return getglobal("CZWOW_QuestReward_"..i)[text];
     40                end
     41        end
     42          for i=1, CZWOW_NPCAction_count, 1 do
     43                  if getglobal("CZWOW_NPCAction_"..i)[text] then
     44                        return getglobal("CZWOW_NPCAction_"..i)[text];
     45                end
     46        end
     47          for i=1, CZWOW_BookPage_count, 1 do
     48                  if getglobal("CZWOW_BookPage_"..i)[text] then
     49                        return getglobal("CZWOW_BookPage_"..i)[text];
     50                end
     51        end
    3052          for i=1, CZWOW_NPCText_count, 1 do
    3153                  if getglobal("CZWOW_NPCText_"..i)[text] then
     
    3456        end
    3557     return en;
    36   end
    37 end     
     58  end     
    3859
    3960    function SC_ChaChingPanel_OnLoad(panel)
  • trunk/export/files/3.3.2/CzWoW/CzWoW.lua

    r397 r451  
    2424  local en = text;
    2525  text = trim(text);
    26   if getglobal("CZWOW_QuestTitle_1")[text] then return getglobal("CZWOW_QuestTitle_1")[text];
    27   elseif getglobal("CZWOW_QuestObjective_1")[text] then return getglobal("CZWOW_QuestObjective_1")[text];
    28   elseif getglobal("CZWOW_QuestDescription_1")[text] then return getglobal("CZWOW_QuestDescription_1")[text];
    29   elseif getglobal("CZWOW_QuestProgress_1")[text] then return getglobal("CZWOW_QuestProgress_1")[text];
    30   elseif getglobal("CZWOW_QuestReward_1")[text] then return getglobal("CZWOW_QuestReward_1")[text];
    31   elseif getglobal("CZWOW_NPCAction_1")[text] then return getglobal("CZWOW_NPCAction_1")[text];
    32   elseif getglobal("CZWOW_BookPage_1")[text] then return getglobal("CZWOW_BookPage_1")[text];
    33   else
     26          for i=1, CZWOW_QuestTitle_count, 1 do
     27                  if getglobal("CZWOW_QuestTitle_"..i)[text] then
     28                        return getglobal("CZWOW_QuestTitle_"..i)[text];
     29                end
     30        end
     31          for i=1, CZWOW_QuestObjective_count, 1 do
     32                  if getglobal("CZWOW_QuestObjective_"..i)[text] then
     33                        return getglobal("CZWOW_QuestObjective_"..i)[text];
     34                end
     35        end
     36          for i=1, CZWOW_QuestProgress_count, 1 do
     37                  if getglobal("CZWOW_QuestProgress_"..i)[text] then
     38                        return getglobal("CZWOW_QuestProgress_"..i)[text];
     39                end
     40        end
     41          for i=1, CZWOW_QuestReward_count, 1 do
     42                  if getglobal("CZWOW_QuestReward_"..i)[text] then
     43                        return getglobal("CZWOW_QuestReward_"..i)[text];
     44                end
     45        end
     46          for i=1, CZWOW_NPCAction_count, 1 do
     47                  if getglobal("CZWOW_NPCAction_"..i)[text] then
     48                        return getglobal("CZWOW_NPCAction_"..i)[text];
     49                end
     50        end
     51          for i=1, CZWOW_BookPage_count, 1 do
     52                  if getglobal("CZWOW_BookPage_"..i)[text] then
     53                        return getglobal("CZWOW_BookPage_"..i)[text];
     54                end
     55        end
    3456          for i=1, CZWOW_NPCText_count, 1 do
    3557                  if getglobal("CZWOW_NPCText_"..i)[text] then
     
    3860        end
    3961     return en;
    40   end
     62 
    4163end   
    4264
  • trunk/export/files/3.3.3a/CzWoW/CzWoW.lua

    r441 r451  
    2424  local en = text;
    2525  text = trim(text);
    26   if getglobal("CZWOW_QuestTitle_1")[text] then return getglobal("CZWOW_QuestTitle_1")[text];
    27   elseif getglobal("CZWOW_QuestObjective_1")[text] then return getglobal("CZWOW_QuestObjective_1")[text];
    28   elseif getglobal("CZWOW_QuestDescription_1")[text] then return getglobal("CZWOW_QuestDescription_1")[text];
    29   elseif getglobal("CZWOW_QuestProgress_1")[text] then return getglobal("CZWOW_QuestProgress_1")[text];
    30   elseif getglobal("CZWOW_QuestReward_1")[text] then return getglobal("CZWOW_QuestReward_1")[text];
    31   elseif getglobal("CZWOW_NPCAction_1")[text] then return getglobal("CZWOW_NPCAction_1")[text];
    32   elseif getglobal("CZWOW_BookPage_1")[text] then return getglobal("CZWOW_BookPage_1")[text];
    33   else
     26          for i=1, CZWOW_QuestTitle_count, 1 do
     27                  if getglobal("CZWOW_QuestTitle_"..i)[text] then
     28                        return getglobal("CZWOW_QuestTitle_"..i)[text];
     29                end
     30        end
     31          for i=1, CZWOW_QuestObjective_count, 1 do
     32                  if getglobal("CZWOW_QuestObjective_"..i)[text] then
     33                        return getglobal("CZWOW_QuestObjective_"..i)[text];
     34                end
     35        end
     36          for i=1, CZWOW_QuestProgress_count, 1 do
     37                  if getglobal("CZWOW_QuestProgress_"..i)[text] then
     38                        return getglobal("CZWOW_QuestProgress_"..i)[text];
     39                end
     40        end
     41          for i=1, CZWOW_QuestReward_count, 1 do
     42                  if getglobal("CZWOW_QuestReward_"..i)[text] then
     43                        return getglobal("CZWOW_QuestReward_"..i)[text];
     44                end
     45        end
     46          for i=1, CZWOW_NPCAction_count, 1 do
     47                  if getglobal("CZWOW_NPCAction_"..i)[text] then
     48                        return getglobal("CZWOW_NPCAction_"..i)[text];
     49                end
     50        end
     51          for i=1, CZWOW_BookPage_count, 1 do
     52                  if getglobal("CZWOW_BookPage_"..i)[text] then
     53                        return getglobal("CZWOW_BookPage_"..i)[text];
     54                end
     55        end
    3456          for i=1, CZWOW_NPCText_count, 1 do
    3557                  if getglobal("CZWOW_NPCText_"..i)[text] then
     
    3860        end
    3961     return en;
    40   end
     62 
    4163end   
    4264
Note: See TracChangeset for help on using the changeset viewer.