Merge lp:~alexharrington/xibo/1.1-fix-translations into lp:~dangarner/xibo/translate-xibo

Proposed by Alex Harrington
Status: Merged
Approved by: Dan Garner
Approved revision: 53
Merged at revision: not available
Proposed branch: lp:~alexharrington/xibo/1.1-fix-translations
Merge into: lp:~dangarner/xibo/translate-xibo
Diff against target: None lines
To merge this branch: bzr merge lp:~alexharrington/xibo/1.1-fix-translations
Reviewer Review Type Date Requested Status
Dan Garner Approve
Review via email: mp+5905@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dan Garner (dangarner) wrote :

Looks fine to me, will merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'server/config/config.class.php'
--- server/config/config.class.php 2009-04-05 19:44:26 +0000
+++ server/config/config.class.php 2009-04-26 15:11:53 +0000
@@ -120,182 +120,149 @@
120 $output .= '<div class="checks">';120 $output .= '<div class="checks">';
121 121
122 // Check for PHP version122 // Check for PHP version
123 $message = 'PHP Version 5.0.2 or later';123 $message = __('PHP Version 5.0.2 or later');
124124
125 if ($this->CheckPHP()) 125 if ($this->CheckPHP())
126 {126 {
127 $output .= $imgGood.$message.'<br />';127 $output .= $imgGood.' '.$message.'<br />';
128 }128 }
129 else129 else
130 {130 {
131 $this->envFault = true;131 $this->envFault = true;
132 132
133 $output .= $imgBad.$message.'<br />';133 $output .= $imgBad.' '.$message.'<br />';
134 $output .= <<<END134 $output .= '<div class="check_explain"> <p>' . __("Xibo requires PHP version 5.0.2 or later.") . '</p></div>';
135 <div class="check_explain">
136 <p>Xibo requires PHP version 5.0.2 or later.</p>
137 </div>
138END;
139 }135 }
140 136
141 // Check for file system permissions137 // Check for file system permissions
142 $message = 'Filesystem Permissions';138 $message = __('Filesystem Permissions');
143139
144 if ($this->CheckFsPermissions()) 140 if ($this->CheckFsPermissions())
145 {141 {
146 $output .= $imgGood.$message.'<br />';142 $output .= $imgGood.' '.$message.'<br />';
147 }143 }
148 else144 else
149 {145 {
150 $this->envFault = true;146 $this->envFault = true;
151 147
152 $output .= $imgBad.$message.'<br />';148 $output .= $imgBad.' '.$message.'<br />';
149 $output .= '<div class="check_explain"><p>' . __("Xibo needs to be able to write to the following:");
153 $output .= <<<END150 $output .= <<<END
154 <div class="check_explain">
155 <p>Xibo needs to be able to write to the following
156 <ul>151 <ul>
157 <li> settings.php152 <li> settings.php
158 <li> install.php153 <li> install.php
159 <li> upgrade.php154 <li> upgrade.php
160 </ul>155 </ul>
161 Please fix this, and retest.</p>
162 </div>
163END;156END;
157 $output .= __('Please fix this, and retest.') . '</p></div>';
164 }158 }
165 159
166 // Check for MySQL160 // Check for MySQL
167 $message = 'MySQL';161 $message = __('MySQL Extension');
168162
169 if ($this->CheckMySQL()) 163 if ($this->CheckMySQL())
170 {164 {
171 $output .= $imgGood.$message.'<br />';165 $output .= $imgGood.' '.$message.'<br />';
172 }166 }
173 else167 else
174 {168 {
175 $this->envFault = true;169 $this->envFault = true;
176 170
177 $output .= $imgBad.$message.'<br />';171 $output .= $imgBad.' '.$message.'<br />';
178 $output .= <<<END172 $output .= '<div class="check_explain"><p>' . __('Xibo requires a MySQL database. Ensure PHP MySQL client extension is installed') . '</p></div>';
179 <div class="check_explain">
180 <p>Xibo requires a MySQL database.</p>
181 </div>
182END;
183 }173 }
184 174
185 // Check for JSON175 // Check for JSON
186 $message = 'JSON Extension';176 $message = __('JSON Extension');
187177
188 if ($this->CheckJson()) 178 if ($this->CheckJson())
189 {179 {
190 $output .= $imgGood.$message.'<br />';180 $output .= $imgGood.' '.$message.'<br />';
191 }181 }
192 else182 else
193 {183 {
194 $this->envFault = true;184 $this->envFault = true;
195 185
196 $output .= $imgBad.$message.'<br />';186 $output .= $imgBad.' '.$message.'<br />';
197 $output .= <<<END187 $output .= '<div class="check_explain"><p>' . __('Xibo needs the PHP JSON extension to function.') . '</p></div>';
198 <div class="check_explain">
199 <p>Xibo needs the PHP JSON extension to function.</p>
200 </div>
201END;
202 }188 }
203 189
204 // Check for GD (graphics)190 // Check for GD (graphics)
205 $message = 'GD Extension';191 $message = __('GD Extension');
206192
207 if ($this->CheckGd()) 193 if ($this->CheckGd())
208 {194 {
209 $output .= $imgGood.$message.'<br />';195 $output .= $imgGood.' '.$message.'<br />';
210 }196 }
211 else197 else
212 {198 {
213 $this->envFault = true;199 $this->envFault = true;
214 200
215 $output .= $imgBad.$message.'<br />';201 $output .= $imgBad.' '.$message.'<br />';
216 $output .= <<<END202 $output .= '<div class="check_explain"><p>' . __('Xibo needs the PHP GD extension to function.') . '</p></div>';
217 <div class="check_explain">
218 <p>Xibo needs the PHP GD extension to function.</p>
219 </div>
220END;
221 }203 }
222 204
223 205
224 // Check for Calendar206 // Check for Calendar
225 $message = 'Calendar Extension';207 $message = __('Calendar Extension');
226208
227 if ($this->CheckCal()) 209 if ($this->CheckCal())
228 {210 {
229 $output .= $imgGood.$message.'<br />';211 $output .= $imgGood.' '.$message.'<br />';
230 }212 }
231 else213 else
232 {214 {
233 $this->envFault = true;215 $this->envFault = true;
234 216
235 $output .= $imgBad.$message.'<br />';217 $output .= $imgBad.' '.$message.'<br />';
236 $output .= <<<END218 $output .= '<div class="check_explain"><p>' . __('Xibo needs the PHP Calendar extension to function.') . '</p></div>';
237 <div class="check_explain">
238 <p>Xibo needs the PHP Calendar extension to function.</p>
239 </div>
240END;
241 }219 }
242 220
243 // Check for DOM221 // Check for DOM
244 $message = 'DOM Extension';222 $message = __('DOM Extension');
245223
246 if ($this->CheckDom()) 224 if ($this->CheckDom())
247 {225 {
248 $output .= $imgGood.$message.'<br />';226 $output .= $imgGood.' '.$message.'<br />';
249 }227 }
250 else228 else
251 {229 {
252 $this->envFault = true;230 $this->envFault = true;
253 231
254 $output .= $imgBad.$message.'<br />';232 $output .= $imgBad.' '.$message.'<br />';
255 $output .= <<<END233 $output .= '<div class="check_explain"><p>' . __('Xibo needs the PHP DOM core functionality enabled.') . '</p></div>';
256 <div class="check_explain">
257 <p>Xibo needs the PHP DOM core functionality enabled.</p>
258 </div>
259END;
260 }234 }
261 235
262 // Check for DOM XML236 // Check for DOM XML
263 $message = 'DOM XML Extension';237 $message = __('DOM XML Extension');
264238
265 if ($this->CheckDomXml()) 239 if ($this->CheckDomXml())
266 {240 {
267 $output .= $imgGood.$message.'<br />';241 $output .= $imgGood.' '.$message.'<br />';
268 }242 }
269 else243 else
270 {244 {
271 $this->envFault = true;245 $this->envFault = true;
272 246
273 $output .= $imgBad.$message.'<br />';247 $output .= $imgBad.' '.$message.'<br />';
274 $output .= <<<END248 $output .= '<div class="check_explain"><p>' . __('Xibo needs the PHP DOM XML extension to function.') . '</p></div>';
275 <div class="check_explain">
276 <p>Xibo needs the PHP DOM XML extension to function.</p>
277 </div>
278END;
279 }249 }
280 250
281 // Check to see if we are allowed to open remote URL's (homecall will not work otherwise)251 // Check to see if we are allowed to open remote URLs (homecall will not work otherwise)
282 $message = 'Allow PHP to open external URL\'s';252 $message = __("Allow PHP to open external URLs");
283253
284 if (ini_get('allow_url_fopen')) 254 if (ini_get('allow_url_fopen'))
285 {255 {
286 $output .= $imgGood.$message.'<br />';256 $output .= $imgGood.' '.$message.'<br />';
287 }257 }
288 else258 else
289 {259 {
290 $this->envFault = true;260 // Not a fault as this will not block installation/upgrade. Informational.
261 $this->envFault = false;
291 262
292 $output .= $imgBad.$message.'<br />';263 $output .= $imgBad.' '.$message.'<br />';
293 $output .= <<<END264 $output .= '<div class="check_explain"><p>' . __('You must have allow_url_fopen = On in your PHP.ini file for statistics gathering to function.') . '<br />';
294 <div class="check_explain">265 $output .= __('If you do not intend to enable homecall you need not worry about this problem.') . '</p></div>';
295 <p>You must have allow_url_fopen = On in your PHP.ini file for homecall to function.<br />
296 If you do not intend to enable homecall you need not worry about this problem.</p>
297 </div>
298END;
299 }266 }
300 267
301 $output .= '</div>';268 $output .= '</div>';
@@ -394,4 +361,4 @@
394 }361 }
395}362}
396363
397?>
398\ No newline at end of file364\ No newline at end of file
365?>
399366
=== modified file 'server/install.php'
--- server/install.php 2009-04-08 18:54:13 +0000
+++ server/install.php 2009-04-26 15:11:53 +0000
@@ -19,13 +19,6 @@
19 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.19 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.
20 */ 20 */
21 21
22// Start default to fr_FR
23$locale = "fr_FR";
24if (isset($_GET["locale"])) $locale = $_GET["locale"];
25putenv("LC_ALL=$locale");
26setlocale(LC_ALL, $locale);
27bindtextdomain("default", "./locale");
28textdomain("default");
2922
30DEFINE('XIBO', true);23DEFINE('XIBO', true);
3124
@@ -37,6 +30,10 @@
37include('install/header.inc');30include('install/header.inc');
38include('config/config.class.php');31include('config/config.class.php');
39include('config/db_config.php');32include('config/db_config.php');
33
34// Setup the translations for gettext
35require_once("lib/app/translationengine.class.php");
36TranslationEngine::InitLocale($db);
4037
41$fault = false;38$fault = false;
4239
@@ -65,113 +62,6 @@
65 <?php62 <?php
66 echo $cObj->CheckEnvironment();63 echo $cObj->CheckEnvironment();
67 if ($cObj->EnvironmentFault()) {64 if ($cObj->EnvironmentFault()) {
68## Filesystem Permissions
69 if (checkFsPermissions()) {
70 ?>
71 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("Filesystem Permissions"); ?><br />
72 <?php
73 }
74 else {
75 $fault = true;
76 ?>
77 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("Filesystem Permissions"); ?></br>
78 <div class="check_explain">
79 <?php echo __("Xibo needs to be able to write to the following"); ?>
80 <ul>
81 <li> settings.php
82 <li> install.php
83 <li> upgrade.php
84 </ul>
85 <?php echo __("Please fix this, and retest."); ?><br />
86 </div>
87 <?php
88 }
89## PHP5
90 if (checkPHP()) {
91 ?>
92 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP Version"); ?><br />
93 <?php
94 }
95 else {
96 $fault = true;
97 ?>
98 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP Version"); ?><br />
99 <div class="check_explain">
100 <?php echo __("Xibo requires PHP version 5 or later."); ?><br />
101 <?php echo __("Please fix this, and retest."); ?><br />
102 </div>
103 <?php
104 }
105## MYSQL
106 if (checkMySQL()) {
107 ?>
108 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP MySQL Extension"); ?><br />
109 <?php
110 }
111 else {
112 $fault = true;
113 ?>
114 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP MySQL Extension"); ?><br />
115 <div class="check_explain">
116 <?php echo __("Xibo needs to access a MySQL database to function."); ?><br />
117 <?php echo __("Please install MySQL and the appropriate MySQL extension and retest."); ?><br />
118 </div>
119 <?php
120 }
121## JSON
122 if (checkJson()) {
123 ?>
124 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP JSON Extension"); ?><br />
125 <?php
126 }
127 else {
128 $fault = true;
129 ?>
130 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP JSON Extension"); ?><br />
131 <div class="check_explain">
132 <?php echo __("Xibo needs the PHP JSON extension to function."); ?><br />
133 <?php echo __("Please install the PHP JSON extension and retest."); ?><br />
134 </div>
135 <?php
136 }
137## GD
138 if (checkGd()) {
139 ?>
140 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP GD Extension"); ?><br />
141 <?php
142 }
143 else {
144 $fault = true;
145 ?>
146 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP GD Extension"); ?><br />
147 <div class="check_explain">
148 <?php echo __("Xibo needs to manipulate images to function."); ?><br />
149 <?php echo __("Please install the GD libraries and extension and retest."); ?><br />
150 </div>
151 <?php
152 }
153## Calendar
154 if (checkCal()) {
155 ?>
156 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP Calendar Extension"); ?><br />
157 <?php
158 }
159 else {
160 $fault = true;
161 ?>
162 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP Calendar Extension"); ?><br />
163 <div class="check_explain">
164 <?php echo __("Xibo needs the calendar extension to function."); ?><br />
165 <?php echo __("Please install the calendar extension and retest."); ?><br />
166 </div>
167 <?php
168 }
169 ?>
170 <br /><br />
171 </div>
172 <?php
173 if ($fault) {
174>>>>>>> MERGE-SOURCE
175 ?>65 ?>
176 <form action="install.php" method="POST">66 <form action="install.php" method="POST">
177 <input type="hidden" name="xibo_step" value="1" />67 <input type="hidden" name="xibo_step" value="1" />
17868
=== modified file 'server/upgrade.php'
--- server/upgrade.php 2009-04-08 18:56:00 +0000
+++ server/upgrade.php 2009-04-26 15:11:53 +0000
@@ -19,20 +19,20 @@
19 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.19 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.
20 */ 20 */
2121
22// Start default to fr_FR22DEFINE('XIBO', true);
23$locale = "fr_FR";23
24if (isset($_GET["locale"])) $locale = $_GET["locale"];24if (! checkPHP()) {
25putenv("LC_ALL=$locale");25 die(__("Xibo requires PHP 5.0.2 or later"));
26setlocale(LC_ALL, $locale);26}
27bindtextdomain("default", "./locale");
28textdomain("default");
29
30DEFINE('XIBO', true);
3127
32include('lib/app/kit.class.php');28include('lib/app/kit.class.php');
33include('config/db_config.php');29include('config/db_config.php');
34include('config/config.class.php');30include('config/config.class.php');
35require('settings.php');31require('settings.php');
32
33// Setup the translations for gettext
34require_once("lib/app/translationengine.class.php");
35TranslationEngine::InitLocale($db);
3636
37// Once we've calculated the upgrade in step 2 below, we need37// Once we've calculated the upgrade in step 2 below, we need
38// to have included the appropriate upgrade php files38// to have included the appropriate upgrade php files
@@ -129,112 +129,6 @@
129 $cObj = new Config($db);129 $cObj = new Config($db);
130 echo $cObj->CheckEnvironment();130 echo $cObj->CheckEnvironment();
131 if ($cObj->EnvironmentFault()) {131 if ($cObj->EnvironmentFault()) {
132## Filesystem Permissions
133 if (checkFsPermissions()) {
134 ?>
135 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("Filesystem Permissions"); ?><br />
136 <?php
137 }
138 else {
139 $fault = true;
140 ?>
141 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("Filesystem Permissions"); ?></br>
142 <div class="check_explain">
143 <?php echo __("Xibo needs to be able to write to the following"); ?>
144 <ul>
145 <li> settings.php
146 <li> install.php
147 <li> upgrade.php
148 </ul>
149 <?php echo __("Please fix this, and retest."); ?><br />
150 </div>
151 <?php
152 }
153## PHP5
154 if (checkPHP()) {
155 ?>
156 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP Version"); ?><br />
157 <?php
158 }
159 else {
160 $fault = true;
161 ?>
162 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP Version"); ?><br />
163 <div class="check_explain">
164 <?php echo __("Xibo requires PHP version 5.02 or later."); ?><br />
165 <?php echo __("Please fix this, and retest."); ?><br />
166 </div>
167 <?php
168 }
169## MYSQL
170 if (checkMySQL()) {
171 ?>
172 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP MySQL Extension"); ?><br />
173 <?php
174 }
175 else {
176 $fault = true;
177 ?>
178 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP MySQL Extension"); ?><br />
179 <div class="check_explain">
180 <?php echo __("Xibo needs to access a MySQL database to function."); ?><br />
181 <?php echo __("Please install MySQL and the appropriate MySQL extension and retest."); ?><br />
182 </div>
183 <?php
184 }
185## JSON
186 if (checkJson()) {
187 ?>
188 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP JSON Extension"); ?><br />
189 <?php
190 }
191 else {
192 $fault = true;
193 ?>
194 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP JSON Extension"); ?><br />
195 <div class="check_explain">
196 <?php echo __("Xibo needs the PHP JSON extension to function."); ?><br />
197 <?php echo __("Please install the PHP JSON extension and retest."); ?><br />
198 </div>
199 <?php
200 }
201## GD
202 if (checkGd()) {
203 ?>
204 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP GD Extension"); ?><br />
205 <?php
206 }
207 else {
208 $fault = true;
209 ?>
210 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP GD Extension"); ?><br />
211 <div class="check_explain">
212 <?php echo __("Xibo needs to manipulate images to function."); ?><br />
213 <?php echo __("Please install the GD libraries and extension and retest."); ?><br />
214 </div>
215 <?php
216 }
217## Calendar
218 if (checkCal()) {
219 ?>
220 <img src="install/dot_green.gif" align="absmiddle">&nbsp;<?php echo __("PHP Calendar Extension"); ?><br />
221 <?php
222 }
223 else {
224 $fault = true;
225 ?>
226 <img src="install/dot_red.gif" align="absmiddle">&nbsp;<?php echo __("PHP Calendar Extension"); ?><br />
227 <div class="check_explain">
228 <?php echo __("Xibo needs the calendar extension to function."); ?><br />
229 <?php echo __("Please install the calendar extension and retest."); ?><br />
230 </div>
231 <?php
232 }
233 ?>
234 <br /><br />
235 </div>
236 <?php
237 if ($fault) {
238 $_SESSION['step'] = 1;132 $_SESSION['step'] = 1;
239 ?>133 ?>
240 <form action="upgrade.php" method="POST">134 <form action="upgrade.php" method="POST">
@@ -704,4 +598,4 @@
704 }598 }
705}599}
706600
707?>
708\ No newline at end of file601\ No newline at end of file
602?>

Subscribers

People subscribed via source and target branches

to all changes: