Browse Source

added __("text") function for the gettext class

Victor De la Rocha 18 years ago
parent
commit
fda0b65799
5 changed files with 70 additions and 70 deletions
  1. 20 20
      admin/admin.php
  2. 5 5
      admin/ajax.php
  3. 7 7
      admin/close.php
  4. 26 26
      admin/index.php
  5. 12 12
      login.php

+ 20 - 20
admin/admin.php View File

25
 	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
25
 	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
 	<html xmlns="http://www.w3.org/1999/xhtml">
26
 	<html xmlns="http://www.w3.org/1999/xhtml">
27
 	<head>
27
 	<head>
28
-		<title>gelato :: admin users</title>
28
+		<title>gelato :: <?=__("admin users")?></title>
29
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
30
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
30
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
31
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
31
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
49
 	</head>
49
 	</head>
50
 	
50
 	
51
 	<body>
51
 	<body>
52
-		<div id="div-process" style="display:none;">Processing request...</div>
52
+		<div id="div-process" style="display:none;"><?=__("Processing request...")?></div>
53
 		<div id="cont">
53
 		<div id="cont">
54
 			<div id="head">
54
 			<div id="head">
55
-				<h1><a href="<?php echo $conf->urlGelato;?>/admin/index.php" title="gelato :: home">gelato cms</a></h1>
55
+				<h1><a href="<?php echo $conf->urlGelato;?>/admin/index.php" title="gelato :: <?=__("home")?>">gelato cms</a></h1>
56
 				<ul id="nav">
56
 				<ul id="nav">
57
-					<li><a href="<?php echo $conf->urlGelato;?>/" title="Take me to the tumblelog">View Tumblelog</a></li>
58
-					<li><a href="close.php" title="Log off" onclick="return exit('div-process','<?php echo $conf->urlGelato;?>/admin/ajax.php?action=close');">Log out</a></li>
57
+					<li><a href="<?php echo $conf->urlGelato;?>/" title="Take me to the tumblelog"><?=__("View Tumblelog")?></a></li>
58
+					<li><a href="close.php" title="Log off" onclick="return exit('div-process','<?php echo $conf->urlGelato;?>/admin/ajax.php?action=close');"><?=__("Log out")?></a></li>
59
 			  	</ul>
59
 			  	</ul>
60
 			</div>
60
 			</div>
61
 			<div id="main">				
61
 			<div id="main">				
63
 				<div class="box">
63
 				<div class="box">
64
 					<ul class="menu manage">
64
 					<ul class="menu manage">
65
 					<h3>Manage</h3>
65
 					<h3>Manage</h3>
66
-					<li><a href="<?php echo $conf->urlGelato;?>/admin/settings.php">Settings</a></li>
67
-					<li><a href="<?php echo $conf->urlGelato;?>/admin/index.php">Posts</a></li>
68
-					<li><a href="<?php echo $conf->urlGelato;?>/admin/user.php">Add user</a></li>
69
-					<li class="selected"><a>Users</a></li>
66
+					<li><a href="<?php echo $conf->urlGelato;?>/admin/settings.php"><?=__("Settings")?></a></li>
67
+					<li><a href="<?php echo $conf->urlGelato;?>/admin/index.php"><?=__("Posts")?></a></li>
68
+					<li><a href="<?php echo $conf->urlGelato;?>/admin/user.php"><?=__("Add user"?></a></li>
69
+					<li class="selected"><a><?=__("Users")?></a></li>
70
 					</ul>
70
 					</ul>
71
 					<p>&nbsp;</p>
71
 					<p>&nbsp;</p>
72
 <?php				
72
 <?php				
73
 						if (isset($_GET["added"])) {
73
 						if (isset($_GET["added"])) {
74
 							if ($_GET["added"]=="true") {
74
 							if ($_GET["added"]=="true") {
75
-								echo "<div class=\"exito\" id=\"divMessages\">The user has been added successfully.</div>";
75
+								echo "<div class=\"exito\" id=\"divMessages\">".__("The user has been added successfully.")."</div>";
76
 							}
76
 							}
77
 						}
77
 						}
78
 						
78
 						
79
 						if (isset($_GET["delete"])) {
79
 						if (isset($_GET["delete"])) {
80
 							if ($_GET["delete"]=="true") {
80
 							if ($_GET["delete"]=="true") {
81
-								echo "<div class=\"exito\" id=\"divMessages\">The user has been eliminated successfully.</div>";
81
+								echo "<div class=\"exito\" id=\"divMessages\">".__("The user has been eliminated successfully.")."</div>";
82
 							}
82
 							}
83
 						}
83
 						}
84
 						
84
 						
85
 						if (isset($_GET["modified"])) {
85
 						if (isset($_GET["modified"])) {
86
 							if ($_GET["modified"]=="true") {
86
 							if ($_GET["modified"]=="true") {
87
-								echo "<div class=\"exito\" id=\"divMessages\">The user has been modified successfully.</div>";
87
+								echo "<div class=\"exito\" id=\"divMessages\">".__("The user has been modified successfully.")."</div>";
88
 							}
88
 							}
89
 						}
89
 						}
90
 						
90
 						
91
 						if (isset($_GET["error"])) {
91
 						if (isset($_GET["error"])) {
92
 							if ($_GET["error"]==1) {
92
 							if ($_GET["error"]==1) {
93
-								echo "<div class=\"error\" id=\"divMessages\">The username is not available.</div>";
93
+								echo "<div class=\"error\" id=\"divMessages\">".__("The username is not available.")."</div>";
94
 							} elseif ($_GET["error"]==2) {
94
 							} elseif ($_GET["error"]==2) {
95
-								echo "<div class=\"error\" id=\"divMessages\"><strong>Error on the database server: </strong>".$_GET["des"]."</div>";
95
+								echo "<div class=\"error\" id=\"divMessages\"><strong>".__("Error on the database server:.")." </strong>".$_GET["des"]."</div>";
96
 							}
96
 							}
97
 						}
97
 						}
98
 ?>						
98
 ?>						
100
 						<table class="sortable" id="admin-table">
100
 						<table class="sortable" id="admin-table">
101
 							<thead>
101
 							<thead>
102
 								<tr>
102
 								<tr>
103
-									<th scope="col">Login</th>
104
-									<th scope="col">Name</th>
105
-									<th colspan="2" scope="col" class="unsortable">Actions</th>
103
+									<th scope="col"><?=__("Login")?></th>
104
+									<th scope="col"><?=__("Name")?></th>
105
+									<th colspan="2" scope="col" class="unsortable"><?=__("Actions")?></th>
106
 								</tr>
106
 								</tr>
107
 							</thead>
107
 							</thead>
108
 							<tbody>
108
 							<tbody>
120
 									<?php echo $register["name"]."\n"; ?>
120
 									<?php echo $register["name"]."\n"; ?>
121
 								</td>
121
 								</td>
122
 								<td>
122
 								<td>
123
-									<a href="user.php?edit=<?php echo $register["id_user"]; ?>">Edit</a>
123
+									<a href="user.php?edit=<?php echo $register["id_user"]; ?>"><?=__("Edit")?></a>
124
 								</td>
124
 								</td>
125
 								<td>
125
 								<td>
126
-									<a href="user.php?delete=<?php echo $register["id_user"]; ?>">Delete</a>	
126
+									<a href="user.php?delete=<?php echo $register["id_user"]; ?>"><?=__("Delete")?></a>
127
 								</td>
127
 								</td>
128
 							</tr>
128
 							</tr>
129
 <?php
129
 <?php
132
 					else {
132
 					else {
133
 ?>
133
 ?>
134
 						<tr> 
134
 						<tr> 
135
-							<td colspan="4"><div class="exito">No users available.</div></td>
135
+							<td colspan="4"><div class="exito"><?=__("No users available.")?></div></td>
136
 						</tr>
136
 						</tr>
137
 <?php
137
 <?php
138
 					}
138
 					}

+ 5 - 5
admin/ajax.php View File

20
 			if ($_GET["action"] == "close") {
20
 			if ($_GET["action"] == "close") {
21
 				session_start();
21
 				session_start();
22
 				if ($user->closeSession()) {
22
 				if ($user->closeSession()) {
23
-					echo "&nbsp;ending session...";
23
+					echo __("&nbsp;ending session...");
24
 				} else {
24
 				} else {
25
-					echo "&nbsp;failure ending session...";
25
+					echo __("&nbsp;failure ending session...");
26
 				}
26
 				}
27
 			}	// $_GET["action"] == "close"
27
 			}	// $_GET["action"] == "close"
28
 			
28
 			
29
 			if ($_GET["action"] == "verify") {
29
 			if ($_GET["action"] == "verify") {
30
 				if ($_GET["login"]=="") {
30
 				if ($_GET["login"]=="") {
31
-					echo "<div class=\"error\">Required field cannot be left blank.</div>";
31
+					echo "<div class=\"error\">".__("Required field cannot be left blank.")."</div>";
32
 				} else {
32
 				} else {
33
 					if (!$user->userExist($_GET["login"])) {
33
 					if (!$user->userExist($_GET["login"])) {
34
-						echo "<div class=\"exito\">Username available.</div>";
34
+						echo "<div class=\"exito\">".__("Username available.")."</div>";
35
 					} else {
35
 					} else {
36
-						echo "<div class=\"error\">The username is not available.</div>";
36
+						echo "<div class=\"error\">".__("The username is not available.")."</div>";
37
 					}
37
 					}
38
 				}
38
 				}
39
 			}	// $_GET["action"] == "verify"			
39
 			}	// $_GET["action"] == "verify"			

+ 7 - 7
admin/close.php View File

24
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
25
 	<html xmlns="http://www.w3.org/1999/xhtml">
25
 	<html xmlns="http://www.w3.org/1999/xhtml">
26
 	<head>
26
 	<head>
27
-		<title>gelato :: logout</title>
27
+		<title>gelato :: <?=__("logout")?></title>
28
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
28
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
29
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
30
 		<meta http-equiv="Refresh" content="3;URL=../login.php" />
30
 		<meta http-equiv="Refresh" content="3;URL=../login.php" />
36
 <body>
36
 <body>
37
 <div id="cont">
37
 <div id="cont">
38
 			<div id="head">
38
 			<div id="head">
39
-				<h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: home">gelato cms</a></h1>
39
+				<h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: <?=__("home")?>">gelato cms</a></h1>
40
 				<ul id="nav">
40
 				<ul id="nav">
41
-					<li><a href="<?php echo $conf->urlGelato;?>/" title="Take me to the tumblelog">Back to the Tumblelog</a></li>
41
+					<li><a href="<?php echo $conf->urlGelato;?>/" title="<?=__("Take me to the tumblelog")?>"><?=__("Back to the Tumblelog")?></a></li>
42
 			  	</ul>
42
 			  	</ul>
43
 			</div>
43
 			</div>
44
 			<div id="main">				
44
 			<div id="main">				
45
 				
45
 				
46
 				<div class="box">
46
 				<div class="box">
47
 					<ul class="menu manage">
47
 					<ul class="menu manage">
48
-					<h3>Closing session</h3>
49
-					<li class="selected"><a>logoff</a></li>
48
+					<h3><?=__("Closing session")?></h3>
49
+					<li class="selected"><a><?=__("logoff")?></a></li>
50
 					</ul>
50
 					</ul>
51
 				
51
 				
52
 					<div class="tabla">
52
 					<div class="tabla">
54
 <?php
54
 <?php
55
 						if (@session_destroy()) {
55
 						if (@session_destroy()) {
56
 ?>		
56
 ?>		
57
-							<h2>Ending session...</h2>
57
+							<h2><?=__("Ending session...")?></h2>
58
 <?php
58
 <?php
59
 						} else {	
59
 						} else {	
60
 ?>
60
 ?>
61
-							<h2>Has happened an error when closing the session.</h2>
61
+							<h2><?=__("Has happened an error when closing the session.")?></h2>
62
 <?php
62
 <?php
63
 						}	
63
 						}	
64
 ?> 
64
 ?> 

+ 26 - 26
admin/index.php View File

101
 	<head>
101
 	<head>
102
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
102
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
103
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
103
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
104
-		<title>gelato :: control panel</title>
104
+		<title>gelato :: <?=__("control panel")?></title>
105
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
105
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
106
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
106
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
107
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
107
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
138
 	</head>
138
 	</head>
139
 	
139
 	
140
 	<body>
140
 	<body>
141
-		<div id="div-process" style="display:none;">Processing request...</div>
141
+		<div id="div-process" style="display:none;"><?=__("Processing request...")?></div>
142
 		<div id="cont">
142
 		<div id="cont">
143
 			<div id="head">
143
 			<div id="head">
144
-				<h1><a href="<?php echo $conf->urlGelato;?>/admin/index.php" title="gelato :: home">gelato cms</a></h1>
144
+				<h1><a href="<?php echo $conf->urlGelato;?>/admin/index.php" title="gelato :: <?=__("home")?>">gelato cms</a></h1>
145
 				<ul id="nav">
145
 				<ul id="nav">
146
-					<li><a href="<?php echo $conf->urlGelato;?>/" title="Take me to the tumblelog">View Tumblelog</a></li>
147
-					<li><a href="close.php" title="Log off" onclick="return exit('div-process','<?php echo $conf->urlGelato;?>/admin/ajax.php?action=close');">Log out</a></li>
146
+					<li><a href="<?php echo $conf->urlGelato;?>/" title="<?=__("Take me to the tumblelog")?>"><?=__("View Tumblelog")?></a></li>
147
+					<li><a href="close.php" title="Log off" onclick="return exit('div-process','<?php echo $conf->urlGelato;?>/admin/ajax.php?action=close');"><?=__("Log out")?></a></li>
148
 			  	</ul>
148
 			  	</ul>
149
 			</div>
149
 			</div>
150
 			<div id="main">
150
 			<div id="main">
151
 				<div class="box">
151
 				<div class="box">
152
 					<ul class="menu">
152
 					<ul class="menu">
153
-					<h3>New Post</h3>					
154
-					<li<?php echo ($_GET["new"]=="conversation") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=conversation"><img src="css/images/comments.png" alt="New chat" /> Chat</a></li>
155
-					<li<?php echo ($_GET["new"]=="quote") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=quote"><img src="css/images/quote.png" alt="New qoute" /> Quote</a></li>
156
-					<li<?php echo ($_GET["new"]=="url") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=url"><img src="css/images/world.png" alt="New link" /> Link</a></li>
157
-					<li<?php echo ($_GET["new"]=="mp3") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=mp3"><img src="css/images/music.png" alt="New audio" /> Audio</a></li>
158
-					<li<?php echo ($_GET["new"]=="video") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=video"><img src="css/images/film.png" alt="New video" /> Video</a></li>
159
-					<li<?php echo ($_GET["new"]=="photo") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=photo"><img src="css/images/image.png" alt="New picture" /> Picture</a></li>
160
-					<li<?php echo ($_GET["new"]=="post") ? " class=\"selected\"" : ""; echo (!isset($_GET["new"])) ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=post"><img src="css/images/page.png" alt="New post" /> Regular</a></li>
153
+					<h3><?=__("New Post")?></h3>					
154
+					<li<?php echo ($_GET["new"]=="conversation") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=conversation"><img src="css/images/comments.png" alt="New chat" /> <?=__("Chat")?></a></li>
155
+					<li<?php echo ($_GET["new"]=="quote") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=quote"><img src="css/images/quote.png" alt="New qoute" /> <?=__("Quote")?></a></li>
156
+					<li<?php echo ($_GET["new"]=="url") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=url"><img src="css/images/world.png" alt="New link" /> <?=__("Link")?></a></li>
157
+					<li<?php echo ($_GET["new"]=="mp3") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=mp3"><img src="css/images/music.png" alt="New audio" /> <?=__("Audio")?></a></li>
158
+					<li<?php echo ($_GET["new"]=="video") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=video"><img src="css/images/film.png" alt="New video" /> <?=__("Video")?></a></li>
159
+					<li<?php echo ($_GET["new"]=="photo") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=photo"><img src="css/images/image.png" alt="New picture" /> <?=__("Picture")?></a></li>
160
+					<li<?php echo ($_GET["new"]=="post") ? " class=\"selected\"" : ""; echo (!isset($_GET["new"])) ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=post"><img src="css/images/page.png" alt="New post" /> <?=__("Regular")?></a></li>
161
 					</ul>
161
 					</ul>
162
 					<p>&nbsp;</p>					
162
 					<p>&nbsp;</p>					
163
 <?php			
163
 <?php			
164
 					$present = version();
164
 					$present = version();
165
 					$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
165
 					$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
166
 					if ($present < $lastest) {
166
 					if ($present < $lastest) {
167
-						echo "<div class=\"information\" id=\"update\">A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.</div><br />";
167
+						echo "<div class=\"information\" id=\"update\">".__("A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.")."</div><br />";
168
 					}
168
 					}
169
 					
169
 					
170
 					if (isset($_GET["deleted"])) {
170
 					if (isset($_GET["deleted"])) {
171
 						if ($_GET["deleted"]=="true") {
171
 						if ($_GET["deleted"]=="true") {
172
-							echo "<div class=\"exito\" id=\"divMessages\">The post has been eliminated successfully.</div>";
172
+							echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been eliminated successfully.")."</div>";
173
 						}
173
 						}
174
 					}
174
 					}
175
 					
175
 					
176
 					if (isset($_GET["modified"])) {
176
 					if (isset($_GET["modified"])) {
177
 						if ($_GET["modified"]=="true") {
177
 						if ($_GET["modified"]=="true") {
178
-							echo "<div class=\"exito\" id=\"divMessages\">The post has been modified successfully.</div>";
178
+							echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been modified successfully.")."</div>";
179
 						}
179
 						}
180
 					}
180
 					}
181
 					
181
 					
182
 					if (isset($_GET["added"])) {
182
 					if (isset($_GET["added"])) {
183
 						if ($_GET["added"]=="true") {
183
 						if ($_GET["added"]=="true") {
184
-							echo "<div class=\"exito\" id=\"divMessages\">The post has been added successfully.</div>";
184
+							echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been added successfully.")."</div>";
185
 						}
185
 						}
186
 					}
186
 					}
187
 					
187
 					
188
 					if (isset($_GET["error"])) {
188
 					if (isset($_GET["error"])) {
189
 						if ($_GET["error"]==2) {
189
 						if ($_GET["error"]==2) {
190
-							echo "<div class=\"error\"><strong>Error on the database server: </strong>".$_GET["des"]."</div>";
190
+							echo "<div class=\"error\"><strong>".__("Error on the database server:")." </strong>".$_GET["des"]."</div>";
191
 						}
191
 						}
192
 					}
192
 					}
193
 					
193
 					
194
 					if (isset($_GET["mp3"])) {
194
 					if (isset($_GET["mp3"])) {
195
 						if ($_GET["mp3"]=="false") {
195
 						if ($_GET["mp3"]=="false") {
196
-							echo "<div class=\"error\" id=\"divMessages\">Not an MP3 file or an upload problem.</div>";
196
+							echo "<div class=\"error\" id=\"divMessages\">".__("Not an MP3 file or an upload problem.")."</div>";
197
 						}
197
 						}
198
 					}
198
 					}
199
 					
199
 					
200
 					if (isset($_GET["photo"])) {
200
 					if (isset($_GET["photo"])) {
201
 						if ($_GET["photo"]=="false") {
201
 						if ($_GET["photo"]=="false") {
202
-							echo "<div class=\"error\" id=\"divMessages\">Not a photo file or an upload problem.</div>";
202
+							echo "<div class=\"error\" id=\"divMessages\">".__("Not a photo file or an upload problem.")."</div>";
203
 						}
203
 						}
204
 					}					
204
 					}					
205
 ?>					
205
 ?>					
302
 							}
302
 							}
303
 ?>
303
 ?>
304
 								<p>
304
 								<p>
305
-									<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;"><a href="http://hobix.com/textile/">Textile</a> syntax is supported.</span>
305
+									<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;"><a href="http://hobix.com/textile/">Textile</a> <?=__("syntax is supported.")?></span>
306
 								</p>
306
 								</p>
307
 								<p>
307
 								<p>
308
 									<input class="btn" type="submit" name="btnAdd" value="<?php echo ($isEdition) ? "Modify" : "Create"; ?> post" />
308
 									<input class="btn" type="submit" name="btnAdd" value="<?php echo ($isEdition) ? "Modify" : "Create"; ?> post" />
318
 				<div class="box">
318
 				<div class="box">
319
 					<ul class="menu manage">
319
 					<ul class="menu manage">
320
 					<h3>Manage</h3>
320
 					<h3>Manage</h3>
321
-					<li><a href="<?php echo $conf->urlGelato;?>/admin/settings.php">Settings</a></li>
322
-					<li><a href="<?php echo $conf->urlGelato;?>/admin/options.php">Options</a></li>
323
-					<li><a href="<?php echo $conf->urlGelato;?>/admin/admin.php">Users</a></li>
324
-					<li class="selected"><a>Posts</a></li>
321
+					<li><a href="<?php echo $conf->urlGelato;?>/admin/settings.php"><?=__("Settings")?></a></li>
322
+					<li><a href="<?php echo $conf->urlGelato;?>/admin/options.php"><?=__("Options")?></a></li>
323
+					<li><a href="<?php echo $conf->urlGelato;?>/admin/admin.php"><?=__("Users")?></a></li>
324
+					<li class="selected"><a><?=__("Posts")?></a></li>
325
 					</ul>
325
 					</ul>
326
 
326
 
327
 <?php
327
 <?php
424
 			
424
 			
425
 			
425
 			
426
 					} else {
426
 					} else {
427
-						$template->renderizaEtiqueta("No posts in this tumblelog.", "div","error");
427
+						$template->renderizaEtiqueta(__("No posts in this tumblelog."), "div","error");
428
 					}			
428
 					}			
429
 					
429
 					
430
 ?>				
430
 ?>				

+ 12 - 12
login.php View File

16
 include(dirname(__FILE__)."/classes/functions.php");
16
 include(dirname(__FILE__)."/classes/functions.php");
17
 include(dirname(__FILE__)."/classes/user.class.php");
17
 include(dirname(__FILE__)."/classes/user.class.php");
18
 require_once(dirname(__FILE__)."/classes/configuration.class.php");
18
 require_once(dirname(__FILE__)."/classes/configuration.class.php");
19
-
19
+ 
20
 $user = new user();
20
 $user = new user();
21
 $conf = new configuration();
21
 $conf = new configuration();
22
 if ($user->isAdmin()) {
22
 if ($user->isAdmin()) {
34
 	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
34
 	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
35
 	<html xmlns="http://www.w3.org/1999/xhtml">
35
 	<html xmlns="http://www.w3.org/1999/xhtml">
36
 	<head>
36
 	<head>
37
-		<title>gelato :: login screen</title>
37
+		<title>gelato :: <?=__("login screen")?></title>
38
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
38
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
39
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
39
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
40
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
40
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
46
 	</head>
46
 	</head>
47
 	
47
 	
48
 	<body>
48
 	<body>
49
-		<div id="div-process" style="display:none;">Processing request...</div>
49
+		<div id="div-process" style="display:none;"><?=__("Processing request...")?></div>
50
 		<div id="cont">
50
 		<div id="cont">
51
 			<div id="head">
51
 			<div id="head">
52
-				<h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: home">gelato cms</a></h1>
52
+				<h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: <?=__("home")?>">gelato cms</a></h1>
53
 				<ul id="nav">
53
 				<ul id="nav">
54
-					<li><a href="<?php echo $conf->urlGelato;?>/" title="Take me to the tumblelog">Back to the Tumblelog</a></li>
54
+					<li><a href="<?php echo $conf->urlGelato;?>/" title="<?=__("Take me to the tumblelog")?>"><?=__("Back to the Tumblelog")?></a></li>
55
 			  	</ul>
55
 			  	</ul>
56
 			</div>
56
 			</div>
57
 			<div id="main">				
57
 			<div id="main">				
58
 				
58
 				
59
 				<div class="box">
59
 				<div class="box">
60
 					<ul class="menu manage">
60
 					<ul class="menu manage">
61
-					<h3>Start session</h3>
62
-					<li class="selected"><a>Login</a></li>
61
+					<h3><?=__("Start session")?></h3>
62
+					<li class="selected"><a><?=__("Login")?></a></li>
63
 					</ul>
63
 					</ul>
64
 				
64
 				
65
 					<div class="tabla">
65
 					<div class="tabla">
67
 								<form action="login.php" method="post" id="valida" autocomplete="off" class="newpost">
67
 								<form action="login.php" method="post" id="valida" autocomplete="off" class="newpost">
68
 									<fieldset>
68
 									<fieldset>
69
 									<ul>
69
 									<ul>
70
-										<li><label for="login">User:</label>
70
+										<li><label for="login"><?=__("User:")?></label>
71
 											<input id="login" name="login" type="text" class="txt" /></li>
71
 											<input id="login" name="login" type="text" class="txt" /></li>
72
-										<li><label for="pass">Password:</label>
72
+										<li><label for="pass"><?=__("Password:")?></label>
73
 											<input id="pass" name="pass" type="password" class="txt" /></li>
73
 											<input id="pass" name="pass" type="password" class="txt" /></li>
74
-										<li><label for="save_pass">Remember me:</label>
74
+										<li><label for="save_pass"><?=__("Remember me:")?></label>
75
 											<input id="save_pass" name="save_pass" type="checkbox" /></li>
75
 											<input id="save_pass" name="save_pass" type="checkbox" /></li>
76
 										<li><input name="btnLogin" type="submit" value="Login" /></li>
76
 										<li><input name="btnLogin" type="submit" value="Login" /></li>
77
 									</ul>
77
 									</ul>
82
 									if ($_GET["error"]==1) {
82
 									if ($_GET["error"]==1) {
83
 ?>
83
 ?>
84
 								<div class="error">
84
 								<div class="error">
85
-									&nbsp;You must be registered to use gelato.
85
+									<?=__("&nbsp;You must be registered to use gelato.")?>
86
 								</div>
86
 								</div>
87
 <?php
87
 <?php
88
 									}
88
 									}
89
 									elseif ($_GET["error"]==2) {
89
 									elseif ($_GET["error"]==2) {
90
 ?>
90
 ?>
91
 								<div class="error">
91
 								<div class="error">
92
-									&nbsp;You must be logged on the system.
92
+									<?=__("&nbsp;You must be logged on the system.")?>
93
 								</div>
93
 								</div>
94
 <?php
94
 <?php
95
 									}									
95
 									}