From 253868b38d089521b071d9e7debaa6732f5824d7 Mon Sep 17 00:00:00 2001
From: Alexander Shestakov <ashestakov@etersoft.ru>
Date: Sun, 11 Jul 2010 19:11:11 +0400
Subject: [PATCH] Localization index.php

---
 index.php |   48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/index.php b/index.php
index 147045f..2c06ac2 100644
--- a/index.php
+++ b/index.php
@@ -11,17 +11,17 @@
 require("path.php");
 require(BASE."include/incl.php");
 
-apidb_header("Wine Application Database");
+apidb_header(_("Wine Application Database"));
 ?>
     <img style="float:right;" src="images/appdb_montage.jpg" width=391 height=266 alt="Wine AppDB">
 
 <div class='default_container'>    
-<h1>Welcome</h1>
+<h1><?php echo _("Welcome"); ?></h1>
 
-<p>This is the Wine Application Database (AppDB). Here you can get information on application
-compatibility with Wine.</p>
+<p><?php echo _("This is the Wine Application Database (AppDB). Here you can get information on application
+compatibility with Wine."); ?></p>
 <?php
-$str_benefits="
+$str_benefits=_('
     <ul>
         <li>Ability to <a href=\"".BASE."help/?sTopic=voting\" title=\"help on voting\" style=\"cursor: help\">vote</a> on your favorite applications</li>
         <li>Ability to customize the layout and behavior of the AppDB and comments system</li>
@@ -31,27 +31,27 @@ $str_benefits="
         <li>Submit new applications and versions</li>
         <li>Submit new screenshots</li>
     </ul>
-";
+');        
 if(!$_SESSION['current']->isLoggedIn()) 
 {
-    echo "
+    printf (_('
     <p>Most of the features of the Application Database require that you have a user account and
     are logged in. Some of the benefits of membership are:<p>
 
-    $str_benefits
+    %s
 
     <p>So, what are you waiting for? [<a href=\"".login_url()."\">Log in</a>]
     or [<a href=\"account.php?sCmd=new\">register</a>] now! Your help in
-    stomping out Wine issues will be greatly appreciated.</p>";
+    stomping out Wine issues will be greatly appreciated.</p>'), $str_benefits);
 } else 
 {
-    echo "
+    printf (_('
     <p>As an Application Database member you enjoy some exclusive benefits like:<p>
 
     $str_benefits
 
     <p>We&#8217;d like to thank you for being a member and being logged in to the system. Your help in
-    stomping out Wine issues will be greatly appreciated.</p>";
+    stomping out Wine issues will be greatly appreciated.</p>'), $str_benefits);
 
 }
 
@@ -66,7 +66,7 @@ if(!$_SESSION['current']->isLoggedIn())
     $hResult = query_parameters($voteQuery);
     $oRow = query_fetch_object($hResult);
 
-    echo "There are <b>$iNumApps</b> applications currently in the database,";
+    printf (_("There are <b>%s</b> applications currently in the database,"), $iNumApps);
 
     // don't mention the top application if there are no votes yet
     if( !empty($oRow) )
@@ -89,14 +89,14 @@ if(!$_SESSION['current']->isLoggedIn())
 <div class="topx_style platinum">
   <div class="rating_header">
     <div class="rating_title">
-      Top-10 <a href="objectManager.php?sClass=application&sTitle=Browse+Applications&iappVersion-ratingOp0=5&sappVersion-ratingData0=Platinum&sOrderBy=appName&bAscending=true">Platinum</a> List
+      <?php echo _("Top-10 <a href='objectManager.php?sClass=application&sTitle=Browse+Applications&iappVersion-ratingOp0=5&sappVersion-ratingData0=Platinum&sOrderBy=appName&bAscending=true'>Platinum</a> List"); ?>
     </div>
-    Applications which install and run flawlessly on an out-of-the-box Wine installation
+   <?php echo _("Applications which install and run flawlessly on an out-of-the-box Wine installation"); ?>
   </div>
   <div>
     <table class="platinum">
       <tr class="rowtitle">
-        <th>Application</th><th>Description</th><th>Screenshot</th>
+       <th><?php echo _("Application</th><th>Description</th><th>Screenshot</th>"); ?>
       </tr>
       <?php
       outputTopXRowAppsFromRating('Platinum', 10);
@@ -109,14 +109,14 @@ if(!$_SESSION['current']->isLoggedIn())
 <div class="topx_style gold">
   <div class="rating_header">
     <div class="rating_title">
-      Top-10 <a href="objectManager.php?sClass=application&sTitle=Browse+Applications&iappVersion-ratingOp0=5&sappVersion-ratingData0=Gold&sOrderBy=appName&bAscending=true">Gold</a> List
+      <?php echo _("Top-10 <a href='objectManager.php?sClass=application&sTitle=Browse+Applications&iappVersion-ratingOp0=5&sappVersion-ratingData0=Gold&sOrderBy=appName&bAscending=true'>Gold</a> List"); ?>
     </div>
-    Applications that work flawlessly with some special configuration
+    <?php echo _("Applications that work flawlessly with some special configuration"); ?>
   </div>
   <div>
     <table class="gold">
       <tr class="rowtitle">
-        <th>Application</th><th>Description</th><th>Screenshot</th>
+       <th><?php echo _("Application</th><th>Description</th><th>Screenshot</th>"); ?>
       </tr>
       <?php
       outputTopXRowAppsFromRating('Gold', 10);
@@ -129,14 +129,14 @@ if(!$_SESSION['current']->isLoggedIn())
 <div class="topx_style silver">
   <div class="rating_header">
     <div class="rating_title">
-      Top-10 <a href="objectManager.php?sClass=application&sTitle=Browse+Applications&iappVersion-ratingOp0=5&sappVersion-ratingData0=Silver&sOrderBy=appName&bAscending=true">Silver</a> List
+      <?php echo _("Top-10 <a href='objectManager.php?sClass=application&sTitle=Browse+Applications&iappVersion-ratingOp0=5&sappVersion-ratingData0=Silver&sOrderBy=appName&bAscending=true'>Silver</a> List"); ?>
     </div>
-    Applications with minor issues that do not affect typical usage
+    <?php echo _("Applications with minor issues that do not affect typical usage"); ?>
   </div>
   <div>
     <table class="silver">
       <tr class="rowtitle">
-        <th>Application</th><th>Description</th><th>Screenshot</th>
+        <th><?php echo _("Application</th><th>Description</th><th>Screenshot</th>"); ?>
       </tr>
       <?php
       outputTopXRowAppsFromRating('Silver', 10);
@@ -147,10 +147,10 @@ if(!$_SESSION['current']->isLoggedIn())
 
 <br><br>
 
-<h2>Other Wine Application Compatibility Sites</h2>
+<h2><?php echo _("Other Wine Application Compatibility Sites"); ?></h2>
 <p>
-<a href="http://www.wine-reviews.net/"><b>Wine-Reviews</b></a>: Is a Wine application and game
-Blog, with tips and how-to's on getting listed applications and games to run. 
+<a href="http://www.wine-reviews.net/"><b>Wine-Reviews</b></a>:<?php echo _("Is a Wine application and game
+Blog, with tips and how-to's on getting listed applications and games to run."); ?> 
 </p>
 </div>
 
-- 
1.6.5.2