source: client_files/Generate/define.php

Last change on this file was 61, checked in by george, 16 years ago
  • Přidáno: Export překladů do českého WoW Addonu.
  • Upraveno: Export souborů se nyní ukládá samostatně do složek dle jmen uživatelů.
  • Přidáno: Zobrazování chyb dle konfigurace.
File size: 11.7 KB
Line 
1<?php
2//definice konstant
3 $dir_out = 'compile/';
4 $version = '1.1';
5 $wow = 'CZ';
6 $where = "Vote > 3 AND Language = 1 AND complete = 1";
7 $where_sk = "Vote > 3 AND Language = 2 AND complete = 1";
8 $limit = '';
9
10 $ListFile[0] = array(
11 "File" => "QuestDescription_1.lua",
12 "Header" => $wow."WOW_QuestDescription_count=1;".$wow."WOW_QuestDescription_1={",
13 "Footer" => "};if not ".$wow."WOW_QuestDescription then ".$wow."WOW_QuestDescription=0;end;".$wow."WOW_QuestDescription=".$wow."WOW_QuestDescription",
14 "sql" => "SELECT DISTINCT entry, (
15 SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
16 ORDER BY vote DESC LIMIT 1
17) as cz, (
18 SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
19) as en FROM quests as quests_distric
20WHERE $where_sk $limit",
21 );
22 $ListFile[1] = array(
23 "File" => "QuestObjective_1.lua",
24 "Header" => $wow."WOW_QuestObjective_count=1;".$wow."WOW_QuestObjective_1={",
25 "Footer" => "};if not ".$wow."WOW_QuestObjective then ".$wow."WOW_QuestObjective=0; end; ".$wow."WOW_QuestObjective=".$wow."WOW_QuestObjective",
26 "sql" => "SELECT DISTINCT entry, (
27 SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
28 ORDER BY vote DESC LIMIT 1
29) as cz, (
30 SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
31) as en FROM quests as quests_distric
32WHERE $where_sk $limit",
33 );
34 $ListFile[2] = array(
35 "File" => "QuestReward_1.lua",
36 "Header" => $wow."WOW_QuestReward_count=1;".$wow."WOW_QuestReward_1={",
37 "Footer" => "};if not ".$wow."WOW_QuestReward then ".$wow."WOW_QuestReward=0; end; ".$wow."WOW_QuestReward=".$wow."WOW_QuestReward",
38 "sql" => "SELECT DISTINCT entry, (
39 SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
40 ORDER BY vote DESC LIMIT 1
41) as cz, (
42 SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
43) as en FROM quests as quests_distric
44WHERE $where_sk $limit",
45 );
46 $ListFile[3] = array(
47 "File" => "QuestProgress_1.lua",
48 "Header" => $wow."WOW_QuestProgress_count=1;".$wow."WOW_QuestProgress_1={",
49 "Footer" => "};if not ".$wow."WOW_QuestProgress then ".$wow."WOW_QuestProgress=0; end; ".$wow."WOW_QuestProgress=".$wow."WOW_QuestProgress",
50 "sql" => "SELECT DISTINCT entry, (
51 SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
52 ORDER BY vote DESC LIMIT 1
53) as cz, (
54 SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
55) as en FROM quests as quests_distric
56WHERE $where_sk $limit",
57 );
58 $ListFile[4] = array(
59 "File" => "BookPage_1.lua",
60 "Header" => $wow."WOW_BookPage_count=1;".$wow."WOW_BookPage_1={",
61 "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
62 "sql" => "SELECT DISTINCT entry, (
63 SELECT Text FROM page as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 2 AND complete = 1
64 ORDER BY vote DESC LIMIT 1
65) as cz, (
66 SELECT Text FROM page as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
67) as en FROM page as page_text_distric
68WHERE $where_sk $limit",
69 );
70
71 $sql = '';
72 for ($i=0;$i<8 ;++$i ) {
73 for ($j=0;$j<2 ;++$j ) {
74 $sql = $sql."SELECT DISTINCT entry, (
75 SELECT text".$i."_$j FROM npc as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 2 AND complete = 1
76 ORDER BY vote DESC LIMIT 1
77) as cz, (
78 SELECT text".$i."_$j FROM npc as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
79) as en FROM npc as npc_text_distric
80WHERE $where $limit UNION ";
81 }
82 }
83 $sql = substr($sql, 0, strlen($sql)-7);
84 $ListFile[5] = array(
85 "File" => "NPCText_1.lua",
86 "sql" => $sql,
87 "Header" => $wow."WOW_NPCText_count=1;".$wow."WOW_NPCText_1={",
88 "Footer" => "};if not ".$wow."WOW_NPCText then ".$wow."WOW_NPCText=0; end; ".$wow."WOW_NPCText=".$wow."WOW_NPCText",
89 );
90
91 //české texty ================================================================
92
93
94 $ListFile[6] = array(
95 "File" => "QuestDescription_2.lua",
96 "Header" => $wow."WOW_QuestDescription_count=2;".$wow."WOW_QuestDescription_2={",
97 "Footer" => "};if not ".$wow."WOW_QuestDescription then ".$wow."WOW_QuestDescription=0;end;".$wow."WOW_QuestDescription=".$wow."WOW_QuestDescription",
98 "sql" => "SELECT DISTINCT entry, (
99 SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
100 ORDER BY vote DESC LIMIT 1
101) as cz, (
102 SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
103) as en FROM quests as quests_distric
104WHERE $where $limit",
105 );
106 $ListFile[7] = array(
107 "File" => "QuestObjective_2.lua",
108 "Header" => $wow."WOW_QuestObjective_count=2;".$wow."WOW_QuestObjective_2={",
109 "Footer" => "};if not ".$wow."WOW_QuestObjective then ".$wow."WOW_QuestObjective=0; end; ".$wow."WOW_QuestObjective=".$wow."WOW_QuestObjective",
110 "sql" => "SELECT DISTINCT entry, (
111 SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
112 ORDER BY vote DESC LIMIT 1
113) as cz, (
114 SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
115) as en FROM quests as quests_distric
116WHERE $where $limit",
117 );
118 $ListFile[8] = array(
119 "File" => "QuestReward_2.lua",
120 "Header" => $wow."WOW_QuestReward_count=2;".$wow."WOW_QuestReward_2={",
121 "Footer" => "};if not ".$wow."WOW_QuestReward then ".$wow."WOW_QuestReward=0; end; ".$wow."WOW_QuestReward=".$wow."WOW_QuestReward",
122 "sql" => "SELECT DISTINCT entry, (
123 SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
124 ORDER BY vote DESC LIMIT 1
125) as cz, (
126 SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
127) as en FROM quests as quests_distric
128WHERE $where $limit",
129 );
130 $ListFile[9] = array(
131 "File" => "QuestProgress_2.lua",
132 "Header" => $wow."WOW_QuestProgress_count=2;".$wow."WOW_QuestProgress_2={",
133 "Footer" => "};if not ".$wow."WOW_QuestProgress then ".$wow."WOW_QuestProgress=0; end; ".$wow."WOW_QuestProgress=".$wow."WOW_QuestProgress",
134 "sql" => "SELECT DISTINCT entry, (
135 SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
136 ORDER BY vote DESC LIMIT 1
137) as cz, (
138 SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
139) as en FROM quests as quests_distric
140WHERE $where $limit",
141 );
142 $ListFile[10] = array(
143 "File" => "BookPage_2.lua",
144 "Header" => $wow."WOW_BookPage_count=2;".$wow."WOW_BookPage_2={",
145 "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
146 "sql" => "SELECT DISTINCT entry, (
147 SELECT Text FROM page as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 1 AND complete = 1
148 ORDER BY vote DESC LIMIT 1
149) as cz, (
150 SELECT Text FROM page as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
151) as en FROM page as page_text_distric
152WHERE $where $limit",
153 );
154
155
156 $sql = '';
157 for ($i=0;$i<8 ;++$i ) {
158 for ($j=0;$j<2 ;++$j ) {
159 $sql = $sql."SELECT DISTINCT entry, (
160 SELECT text".$i."_$j FROM npc as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 1 AND complete = 1
161 ORDER BY vote DESC LIMIT 1
162) as cz, (
163 SELECT text".$i."_$j FROM npc as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
164) as en FROM npc as npc_text_distric
165WHERE $where $limit UNION ";
166 }
167 }
168 $sql = substr($sql, 0, strlen($sql)-7);
169
170 $ListFile[11] = array(
171 "File" => "NPCText_2.lua",
172 "Header" => $wow."WOW_NPCText_count=2;".$wow."WOW_NPCText_2={",
173 "Footer" => "};if not ".$wow."WOW_NPCText then ".$wow."WOW_NPCText=0; end; ".$wow."WOW_NPCText=".$wow."WOW_NPCText",
174 "sql" => $sql,
175 );
176
177 $define_images[0] = array(
178 "File" => "quests",
179 "sql" => "quests",
180 "where" => $where,
181 );
182 $define_images[1] = array(
183 "File" => "npc_text",
184 "sql" => "npc_text",
185 "where" => $where,
186 );
187 $define_images[2] = array(
188 "File" => "page_text",
189 "sql" => "page_text",
190 "where" => $where,
191 );
192
193 $define_images[3] = array(
194 "File" => "quests_sk",
195 "sql" => "quests",
196 "where" => $where_sk,
197 );
198 $define_images[4] = array(
199 "File" => "npc_text_sk",
200 "sql" => "npc_text",
201 "where" => $where_sk,
202 );
203 $define_images[5] = array(
204 "File" => "page_text_sk",
205 "sql" => "page_text",
206 "where" => $where_sk,
207 );
208
209
210$var_g = array(
211array('good sir','my lady'),
212array('lord','lady'),
213array(' lad ',' lass'),
214array('brother','sister'),
215array('his','her'),
216array('he','she'),
217array('him','her'),
218array('sir','madam'),
219array(' men ',' women'),
220array(' brotha','sista'),
221array('buddy','lady'),
222array(' sir ',' madam'),
223array(' boy','girl'),
224array(' brothers','sisters'),
225array('boy','girl'),
226array(' man','woman'),
227array(' brother','sister'),
228array(' men','women'),
229array(' sir','miss'),
230array(' fella','lady'),
231array(' his','her'),
232array('himself','herself'),
233array('father','mother'),
234array(' succubus','infernal'),
235array('lad','lass'),
236array(' guy','girl'),
237array(' brother ',' sister'),
238array('priest','priestess'),
239array('laddy','lassy'),
240array('brothers','sisters'),
241array('man','lady'),
242array(' him ',' her'),
243array(' lad','missy'),
244array(' boy ',' girl'),
245array(' him','her'),
246array('king','queen'),
247array(' man ',' woman'),
248array('dad','mon'),
249array(' mr. ',' ms.'),
250array(' fellow ',' sister'),
251array(' lord','lady'),
252array('mister','missy'),
253array('her','him'),
254array(' he','she'),
255array(' female','male'),
256array(' his ',' her'),
257array('kráľa','kráľovnej'),
258array(' bratře ',' sestro'),
259array('pomáhal','pomáhala'),
260array('přiložil','přiložila'),
261array('mohl','mohla'),
262array('našel','našla'),
263array('zabil','zabila'),
264array('ukázal','ukázala'),
265array('vedl','vedla'),
266array('přinesl','přinesla'),
267array('získal','získala'),
268array('ochotný','ochotná'),
269array('byl jsi','byla jsi'),
270array('dokázal','dokázala'),
271array('nasbíral','nasbírala'),
272array('udělal','udělala'),
273array('počul','počula'),
274array('hotový','hotová'),
275array('chlapče','dievča'),
276array('išiel','išla'),
277array('našiel','našla'),
278array('urobil','urobila'),
279array('postaral','postarala'),
280array(' pane ',' madam'),
281array(' boyo ',' girly'),
282array(' son ',' daughter'),
283array(' mister ',' miss'),
284array(' jackson ',' princess'),
285array(' mister','miss'),
286array('waiter','waitress'),
287array('laddie ',' lassie'),
288array('lad ',' lass'),
289array('boyo ',' girlie'),
290array('boy ',' girl'),
291array(' mon ',' sis'),
292array(' master','mistress'),
293array('he\'s ',' she\'s'),
294array(' guy ',' lady'),
295array(' sonny','missy'),
296array(' hero ',' heroine'),
297array('pal','sugar'),
298array(' mladíku ',' děvče'),
299array(' mladíku','děvče'),
300array('kamaráde','miláčku'),
301array('mal','mala'),
302array(' bratr ',' sestra'),
303);
304
305
306?>
Note: See TracBrowser for help on using the repository browser.