- Timestamp:
- Feb 7, 2009, 12:58:56 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/addon/CzWoW/CzWoW.lua
r61 r73 115 115 Show_Status(); 116 116 else 117 DEFAULT_CHAT_FRAME:AddMessage("/czwow quests - zap tne/vypne překládání questů");118 DEFAULT_CHAT_FRAME:AddMessage("/czwow spells - zap tne/vypne překládání spells");119 DEFAULT_CHAT_FRAME:AddMessage("/czwow books - zap tne/vypne překládání books");120 DEFAULT_CHAT_FRAME:AddMessage("/czwow monsters - zap tne/vypne překládání monsters");121 DEFAULT_CHAT_FRAME:AddMessage("/czwow npcs - zap tne/vypne překládání npcs");122 DEFAULT_CHAT_FRAME:AddMessage("/czwow interface - zap tne/vypne překládání interface");123 DEFAULT_CHAT_FRAME:AddMessage("/czwow combatlog - zap tne/vypne překládání combatlog");117 DEFAULT_CHAT_FRAME:AddMessage("/czwow quests - zapne/vypne překládání questů"); 118 DEFAULT_CHAT_FRAME:AddMessage("/czwow spells - zapne/vypne překládání spells"); 119 DEFAULT_CHAT_FRAME:AddMessage("/czwow books - zapne/vypne překládání books"); 120 DEFAULT_CHAT_FRAME:AddMessage("/czwow monsters - zapne/vypne překládání monsters"); 121 DEFAULT_CHAT_FRAME:AddMessage("/czwow npcs - zapne/vypne překládání npcs"); 122 DEFAULT_CHAT_FRAME:AddMessage("/czwow interface - zapne/vypne překládání interface"); 123 DEFAULT_CHAT_FRAME:AddMessage("/czwow combatlog - zapne/vypne překládání combatlog"); 124 124 DEFAULT_CHAT_FRAME:AddMessage("/czwow show - zobrazit"); 125 125 end -
trunk/addon/make.php
r61 r73 8 8 */ 9 9 10 // Replace special codes by lua functions 10 11 function ReplaceVarInText($string) 11 12 { 12 13 $string = str_replace('$N', '"..strlower(UnitName("player")).."', $string); 13 14 $string = str_replace('$n', '"..strlower(UnitName("player")).."', $string); 15 $string = str_replace('$C', '"..strlower(UnitClass("player")).."', $string); 14 16 $string = str_replace('$c', '"..strlower(UnitClass("player")).."', $string); 15 $string = str_replace('$C', '"..strlower(UnitClass("player")).."', $string);16 17 $string = str_replace('$R', '"..strlower(UnitRace("player")).."', $string); 17 18 $string = str_replace('$r', '"..strlower(UnitRace("player")).."', $string); 19 $Gender = '$G'; 20 while(strpos($string, $Gender) !== false) 21 { 22 $Before = substr($string, 0, strpos($string, $Gender)); 23 $Man = substr($string, strpos($string, $Gender) + 2); 24 $Woman = substr($Man, strpos($Man, ':') + 1); 25 $After = substr($Woman, strpos($Woman, ';') + 1); 26 $Man = substr($Man, 0, strpos($Man, ':')); 27 $Woman = substr($Woman, 0, strpos($Woman, ';')); 28 $string = $Before.'"..gsub(gsub(UnitSex("player"), "^2$", "'. 29 $Man.'"), "^3$", "'.$Woman.'").."'.$After; 30 } 31 $Gender = '$g'; 32 while(strpos($string, $Gender) !== false) 33 { 34 $Before = substr($string, 0, strpos($string, $Gender)); 35 $Man = substr($string, strpos($string, $Gender) + 2); 36 $Woman = substr($Man, strpos($Man, ':') + 1); 37 $After = substr($Woman, strpos($Woman, ';') + 1); 38 $Man = substr($Man, 0, strpos($Man, ':')); 39 $Woman = substr($Woman, 0, strpos($Woman, ';')); 40 $string = $Before.'"..gsub(gsub(UnitSex("player"), "^2$", "'.$Man.'"), "^3$", "'.$Woman.'").."'.$After; 41 } 18 42 19 43 $string = str_replace('$', '', $string); 20 $string = str_replace( chr(13), '', $string);21 $string = str_replace( chr(10), '', $string);44 $string = str_replace("\r", '', $string); 45 $string = str_replace("\n", '\r\n', $string); 22 46 return($string); 23 47 } … … 27 51 // $string = mysql_escape_string($string); 28 52 $string = strtolower($string); 29 $string = str_replace('$gman:woman;', '"..gsub(gsub(UnitSex("player"), "^2$", "man"), "^3$", "woman").."', $string); 30 $string = str_replace('$g man : woman;', '"..gsub(gsub(UnitSex("player"), "^2$", "man"), "^3$", "woman").."', $string); 31 $string = str_replace('$ghis:her;', '"..gsub(gsub(UnitSex("player"), "^2$", "his"), "^3$", "her").."', $string); 32 $string = str_replace('$g his : her;', '"..gsub(gsub(UnitSex("player"), "^2$", "his"), "^3$", "her").."', $string); 33 $string = str_replace('$glad:lass;', '"..gsub(gsub(UnitSex("lad"), "^2$", "his"), "^3$", "lass").."', $string); 34 $string = str_replace('$g lad : lass;', '"..gsub(gsub(UnitSex("lad"), "^2$", "his"), "^3$", "lass").."', $string); 35 53 36 54 $string = str_replace('"', '\"', $string); 37 55 $string = str_replace('$b$b', ' ', $string); 38 56 $string = str_replace('$b $b', ' ', $string); 39 57 $string = str_replace('$b', ' ', $string); 40 $string = str_replace(' ', ' ', $string); 58 while(strpos($string, ' ')) 59 $string = str_replace(' ', ' ', $string); 41 60 $string = ReplaceVarInText($string); 42 61 return($string); … … 144 163 while($Line = mysql_fetch_array($DbResult)) 145 164 { 146 $Buffer .= 'f("'.addslashes($Line['id_text']).'", "'. addslashes($Line['Original']).'", "'.addslashes($Line['Translation']).'");'."\n";165 $Buffer .= 'f("'.addslashes($Line['id_text']).'", "'.str_replace("\n", '\r\\', addslashes($Line['Original'])).'", "'.str_replace("\n", '\r\\', addslashes($Line['Translation'])).'");'."\n"; 147 166 } 148 167 file_put_contents($TempDir.'LocalizationStrings.lua', $Buffer); -
trunk/sql/structure.sql
r71 r73 27 27 `File` int(11) NOT NULL default '0', 28 28 `Language` int(11) NOT NULL default '0', 29 `Vote` float NOT NULL, 30 `CountVote` int(11) NOT NULL, 31 `User` int(11) NOT NULL, 32 `Complete` int(11) NOT NULL, 33 `Take` int(11) NOT NULL, 34 `admin_check` int(11) NOT NULL, 29 `User` int(11) NOT NULL, 30 `Complete` int(11) NOT NULL, 31 `Take` int(11) NOT NULL, 35 32 PRIMARY KEY (`ID`), 36 33 KEY `entry` (`entry`), … … 94 91 `castbarcaption` varchar(255) NOT NULL, 95 92 `Language` int(11) NOT NULL default '0', 96 `Vote` float NOT NULL, 97 `CountVote` int(11) NOT NULL, 98 `User` int(11) NOT NULL, 99 `Complete` int(11) NOT NULL, 100 `Take` int(11) NOT NULL, 101 `admin_check` int(11) NOT NULL default '0', 93 `User` int(11) NOT NULL, 94 `Complete` int(11) NOT NULL, 95 `Take` int(11) NOT NULL, 102 96 PRIMARY KEY (`ID`), 103 97 KEY `entry` (`entry`), … … 119 113 `Text` text NOT NULL, 120 114 `Language` int(11) NOT NULL default '0', 121 `Vote` float NOT NULL, 122 `CountVote` int(11) NOT NULL, 123 `User` int(11) NOT NULL, 124 `Complete` int(11) NOT NULL, 125 `Take` int(11) NOT NULL, 126 `admin_check` int(11) NOT NULL default '0', 115 `User` int(11) NOT NULL, 116 `Complete` int(11) NOT NULL, 117 `Take` int(11) NOT NULL, 127 118 PRIMARY KEY (`ID`), 128 119 KEY `entry` (`entry`), … … 180 171 `Description` varchar(255) NOT NULL, 181 172 `Language` int(11) NOT NULL default '0', 182 `Vote` float NOT NULL, 183 `CountVote` int(11) NOT NULL, 184 `User` int(11) NOT NULL, 185 `Complete` int(11) NOT NULL, 186 `Take` int(11) NOT NULL, 187 `admin_check` int(11) NOT NULL default '0', 173 `User` int(11) NOT NULL, 174 `Complete` int(11) NOT NULL, 175 `Take` int(11) NOT NULL, 188 176 PRIMARY KEY (`ID`), 189 177 KEY `entry` (`entry`), … … 209 197 PRIMARY KEY (`ID`), 210 198 KEY `user` (`user`) 211 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1292 5;199 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12926 ; 212 200 213 201 -- -------------------------------------------------------- … … 222 210 `help` varchar(255) NOT NULL, 223 211 `Language` int(11) NOT NULL default '0', 224 `Vote` float NOT NULL, 225 `CountVote` int(11) NOT NULL, 226 `User` int(11) NOT NULL, 227 `Complete` int(11) NOT NULL, 228 `Take` int(11) NOT NULL, 229 `admin_check` int(11) NOT NULL default '0', 212 `User` int(11) NOT NULL, 213 `Complete` int(11) NOT NULL, 214 `Take` int(11) NOT NULL, 230 215 PRIMARY KEY (`ID`), 231 216 KEY `entry` (`entry`), … … 247 232 `content_default` varchar(255) NOT NULL, 248 233 `Language` int(11) NOT NULL default '0', 249 `Vote` float NOT NULL, 250 `CountVote` int(11) NOT NULL, 251 `User` int(11) NOT NULL, 252 `Complete` int(11) NOT NULL, 253 `Take` int(11) NOT NULL, 254 `admin_check` int(11) NOT NULL default '0', 234 `User` int(11) NOT NULL, 235 `Complete` int(11) NOT NULL, 236 `Take` int(11) NOT NULL, 255 237 PRIMARY KEY (`ID`), 256 238 KEY `entry` (`entry`), … … 301 283 `Text7_1` text character set latin2 collate latin2_czech_cs, 302 284 `Language` int(11) NOT NULL default '0', 303 `Vote` float NOT NULL, 304 `CountVote` int(11) NOT NULL, 305 `User` int(11) NOT NULL, 306 `Complete` int(11) NOT NULL, 307 `Take` int(11) NOT NULL, 308 `admin_check` int(11) NOT NULL default '0', 285 `User` int(11) NOT NULL, 286 `Complete` int(11) NOT NULL, 287 `Take` int(11) NOT NULL, 309 288 PRIMARY KEY (`ID`), 310 289 KEY `entry` (`entry`), … … 326 305 `Text` text character set latin2 collate latin2_czech_cs, 327 306 `Language` int(11) NOT NULL, 328 `Vote` float NOT NULL, 329 `CountVote` int(11) NOT NULL, 330 `User` int(11) NOT NULL, 331 `Complete` int(11) NOT NULL, 332 `Take` int(11) NOT NULL, 333 `admin_check` int(11) NOT NULL default '0', 307 `User` int(11) NOT NULL, 308 `Complete` int(11) NOT NULL, 309 `Take` int(11) NOT NULL, 334 310 PRIMARY KEY (`ID`), 335 311 KEY `entry` (`entry`), … … 360 336 `ObjectiveText4` text character set latin2 collate latin2_czech_cs NOT NULL, 361 337 `Language` int(11) NOT NULL default '1', 362 `Vote` float NOT NULL default '0',363 `CountVote` int(11) NOT NULL,364 338 `User` int(11) NOT NULL, 365 339 `Complete` int(11) NOT NULL default '1', 366 340 `Take` int(11) NOT NULL, 367 `admin_check` int(11) NOT NULL default '0',368 341 PRIMARY KEY (`ID`), 369 342 KEY `entry` (`entry`), … … 385 358 `comment` text NOT NULL, 386 359 `Language` int(11) NOT NULL default '0', 387 `Vote` float NOT NULL, 388 `CountVote` int(11) NOT NULL, 389 `User` int(11) NOT NULL, 390 `Complete` int(11) NOT NULL, 391 `Take` int(11) NOT NULL, 392 `admin_check` int(11) NOT NULL default '0', 360 `User` int(11) NOT NULL, 361 `Complete` int(11) NOT NULL, 362 `Take` int(11) NOT NULL, 393 363 PRIMARY KEY (`ID`), 394 364 KEY `entry` (`entry`), … … 411 381 `comment` text NOT NULL, 412 382 `Language` int(11) NOT NULL default '0', 413 `Vote` float NOT NULL, 414 `CountVote` int(11) NOT NULL, 415 `User` int(11) NOT NULL, 416 `Complete` int(11) NOT NULL, 417 `Take` int(11) NOT NULL, 418 `admin_check` int(11) NOT NULL default '0', 383 `User` int(11) NOT NULL, 384 `Complete` int(11) NOT NULL, 385 `Take` int(11) NOT NULL, 419 386 PRIMARY KEY (`ID`), 420 387 KEY `entry` (`entry`), … … 454 421 `Description` text NOT NULL, 455 422 `Language` int(11) NOT NULL default '0', 456 `Vote` float NOT NULL, 457 `CountVote` int(11) NOT NULL, 458 `User` int(11) NOT NULL, 459 `Complete` int(11) NOT NULL, 460 `Take` int(11) NOT NULL, 461 `admin_check` int(11) NOT NULL default '0', 423 `User` int(11) NOT NULL, 424 `Complete` int(11) NOT NULL, 425 `Take` int(11) NOT NULL, 462 426 PRIMARY KEY (`ID`), 463 427 KEY `entry` (`entry`), … … 467 431 KEY `Complete` (`Complete`) 468 432 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=42088 ; 469 470 -- --------------------------------------------------------471 472 --473 -- Struktura tabulky `tag`474 --475 476 CREATE TABLE IF NOT EXISTS `tag` (477 `ID` int(11) NOT NULL auto_increment,478 `type_translation` int(11) NOT NULL,479 `ID_translation` int(11) NOT NULL,480 `ID_user` int(11) NOT NULL,481 `tag` int(11) NOT NULL,482 PRIMARY KEY (`ID`)483 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=335 ;484 433 485 434 -- --------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.