diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-06-22 20:57:07 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-06-22 20:57:07 +0200 |
commit | 58907e0bffb5a7d2d0bfc05cec28f366432bb3e8 (patch) | |
tree | d0567e509e8769d2b1363af45c1b48cf18563715 /web/template | |
parent | adbb59308024bfb6386eaa4a9d1a2eb6591b8456 (diff) | |
download | aur-gettext.tar.gz aur-gettext.tar.xz |
use php's gettext modulegettext
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/actions_form.php | 20 | ||||
-rw-r--r-- | web/template/header.php | 16 | ||||
-rw-r--r-- | web/template/login_form.php | 14 | ||||
-rw-r--r-- | web/template/pkg_comment_form.php | 8 | ||||
-rw-r--r-- | web/template/pkg_comments.php | 6 | ||||
-rw-r--r-- | web/template/pkg_details.php | 28 | ||||
-rw-r--r-- | web/template/pkg_search_form.php | 30 | ||||
-rw-r--r-- | web/template/pkg_search_results.php | 52 | ||||
-rw-r--r-- | web/template/search_accounts_form.php | 36 | ||||
-rw-r--r-- | web/template/stats/general_stats_table.php | 18 | ||||
-rw-r--r-- | web/template/stats/updates_table.php | 2 | ||||
-rw-r--r-- | web/template/stats/user_table.php | 6 | ||||
-rw-r--r-- | web/template/template.phps | 4 | ||||
-rw-r--r-- | web/template/tu_details.php | 32 | ||||
-rw-r--r-- | web/template/tu_list.php | 20 |
15 files changed, 146 insertions, 146 deletions
diff --git a/web/template/actions_form.php b/web/template/actions_form.php index 058002f8..97177313 100644 --- a/web/template/actions_form.php +++ b/web/template/actions_form.php @@ -12,10 +12,10 @@ if ($result) { if (!mysql_num_rows($result)) { echo " <input type='submit' class='button' name='do_Vote'"; - echo " value='".__("Vote")."' /> "; + echo " value='"._("Vote")."' /> "; } else { echo "<input type='submit' class='button' name='do_UnVote'"; - echo " value='".__("UnVote")."' /> "; + echo " value='"._("UnVote")."' /> "; } } @@ -27,35 +27,35 @@ if ($result) { if (!mysql_num_rows($result)) { echo "<input type='submit' class='button' name='do_Notify'"; - echo " value='".__("Notify")."' title='".__("New Comment Notification")."' /> "; + echo " value='"._("Notify")."' title='"._("New Comment Notification")."' /> "; } else { echo "<input type='submit' class='button' name='do_UnNotify'"; - echo " value='".__("UnNotify")."' title='".__("No New Comment Notification")."' /> "; + echo " value='"._("UnNotify")."' title='"._("No New Comment Notification")."' /> "; } } if ($row["OutOfDateTS"] === NULL) { echo "<input type='submit' class='button' name='do_Flag'"; - echo " value='".__("Flag Out-of-date")."' />\n"; + echo " value='"._("Flag Out-of-date")."' />\n"; } else { echo "<input type='submit' class='button' name='do_UnFlag'"; - echo " value='".__("UnFlag Out-of-date")."' />\n"; + echo " value='"._("UnFlag Out-of-date")."' />\n"; } if ($row["MaintainerUID"] === NULL) { echo "<input type='submit' class='button' name='do_Adopt'"; - echo " value='".__("Adopt Packages")."' />\n"; + echo " value='"._("Adopt Packages")."' />\n"; } else if ($uid == $row["MaintainerUID"] || $atype == "Trusted User" || $atype == "Developer") { echo "<input type='submit' class='button' name='do_Disown'"; - echo " value='".__("Disown Packages")."' />\n"; + echo " value='"._("Disown Packages")."' />\n"; } if ($atype == "Trusted User" || $atype == "Developer") { echo "<input type='submit' class='button' name='do_Delete'"; - echo " value='".__("Delete Packages")."' />\n"; + echo " value='"._("Delete Packages")."' />\n"; echo "<input type='checkbox' name='confirm_Delete' value='1' /> "; - echo __("Confirm")."\n"; + echo _("Confirm")."\n"; } ?> </fieldset> diff --git a/web/template/header.php b/web/template/header.php index 8313bb36..8c102339 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -31,15 +31,15 @@ <div id="archdev-navbar"> <ul> - <li><a href="index.php">AUR <?php print __("Home"); ?></a></li> - <li><a href="account.php"><?php print __("Accounts"); ?></a></li> - <li><a href="packages.php"><?php print __("Packages"); ?></a></li> - <li><a href="http://bugs.archlinux.org/index.php?tasks=all&project=2"><?php print __("Bugs"); ?></a></li> - <li><a href="http://archlinux.org/mailman/listinfo/aur-general"><?php print __("Discussion"); ?></a></li> + <li><a href="index.php">AUR <?php print _("Home"); ?></a></li> + <li><a href="account.php"><?php print _("Accounts"); ?></a></li> + <li><a href="packages.php"><?php print _("Packages"); ?></a></li> + <li><a href="http://bugs.archlinux.org/index.php?tasks=all&project=2"><?php print _("Bugs"); ?></a></li> + <li><a href="http://archlinux.org/mailman/listinfo/aur-general"><?php print _("Discussion"); ?></a></li> <?php if (isset($_COOKIE['AURSID'])): ?> - <?php if (check_user_privileges()): ?><li><a href="tu.php"><?php print __("Trusted User"); ?></a></li><?php endif; ?> - <li><a href="packages.php?SeB=m&K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li> - <li><a href="pkgsubmit.php"><?php print __("Submit"); ?></a></li> + <?php if (check_user_privileges()): ?><li><a href="tu.php"><?php print _("Trusted User"); ?></a></li><?php endif; ?> + <li><a href="packages.php?SeB=m&K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print _("My Packages"); ?></a></li> + <li><a href="pkgsubmit.php"><?php print _("Submit"); ?></a></li> <?php endif; ?> </ul> </div><!-- #archdev-navbar --> diff --git a/web/template/login_form.php b/web/template/login_form.php index ca81e0e7..b6d26ebc 100644 --- a/web/template/login_form.php +++ b/web/template/login_form.php @@ -1,9 +1,9 @@ <div id="login_bar" class="pgbox"> <?php if (isset($_COOKIE["AURSID"])) { - print __("Logged-in as: %s", '<b>' . username_from_sid($_COOKIE["AURSID"]) . '</b>'); + printf(_("Logged-in as: %s"), '<b>' . username_from_sid($_COOKIE["AURSID"]) . '</b>'); ?> - <a href="logout.php">[<?php print __("Logout"); ?>]</a> + <a href="logout.php">[<?php print _("Logout"); ?>]</a> <?php } else { @@ -13,17 +13,17 @@ else { ?> <form method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>"> <div> - <label for="user"><?php print __('Username') . ':'; ?></label> + <label for="user"><?php print _('Username') . ':'; ?></label> <input type="text" name="user" id="user" size="30" maxlength="<?php print USERNAME_MAX_LEN; ?>" value="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" /> - <label for="passwd"><?php print __('Password') . ':'; ?></label> + <label for="passwd"><?php print _('Password') . ':'; ?></label> <input type="password" name="passwd" id="passwd" size="30" maxlength="<?php print PASSWD_MAX_LEN; ?>" /> <input type="checkbox" name="remember_me" id="remember_me" /> - <label for="remember_me"><?php print __("Remember me"); ?></label> - <input type="submit" class="button" value="<?php print __("Login"); ?>" /> - <a href="passreset.php">[<?php echo __('Forgot Password') ?>]</a> + <label for="remember_me"><?php print _("Remember me"); ?></label> + <input type="submit" class="button" value="<?php print _("Login"); ?>" /> + <a href="passreset.php">[<?php echo _('Forgot Password') ?>]</a> </div> </form> <?php } ?> diff --git a/web/template/pkg_comment_form.php b/web/template/pkg_comment_form.php index e52c92d2..26207c87 100644 --- a/web/template/pkg_comment_form.php +++ b/web/template/pkg_comment_form.php @@ -54,14 +54,14 @@ if (isset($_REQUEST['comment'])) { <div style="padding: 1%"> <?php if (isset($_REQUEST['comment'])) { - echo '<b>' . __('Comment has been added.') . '</b>'; + echo '<b>' . _('Comment has been added.') . '</b>'; } ?> <input type='hidden' name='ID' value="<?php echo intval($_REQUEST['ID']) ?>" /> - <?php echo __('Enter your comment below.') ?><br /> + <?php echo _('Enter your comment below.') ?><br /> <textarea name='comment' cols='80' rows='10' style="width: 100%"></textarea><br /> - <input type='submit' value="<?php echo __("Submit") ?>" /> - <input type='reset' value="<?php echo __("Reset") ?>" /> + <input type='submit' value="<?php echo _("Submit") ?>" /> + <input type='reset' value="<?php echo _("Reset") ?>" /> </div> </form> </div> diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index aed9ca8b..f62308d6 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -8,7 +8,7 @@ while (list($indx, $carr) = each($comments)) { ?> $carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&ID={$carr['UsersID']}\">{$carr['UserName']}</a>"; } - $commentHeader = '<p style="display:inline;">' . __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])) . '</p>'; + $commentHeader = '<p style="display:inline;">' . sprintf(_('Comment by: %s on %s'), $carr['UserName'], gmdate('r', $carr['CommentTS'])) . '</p>'; if (canDeleteCommentArray($carr, $atype, $uid)) { $durl = '<form method="post" action="packages.php?ID='.$row['ID'].'">'; @@ -16,7 +16,7 @@ while (list($indx, $carr) = each($comments)) { ?> $durl.= '<input type="hidden" name="action" value="do_DeleteComment" />'; $durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'" />'; $durl.= '<input type="image" src="images/x.png" '; - $durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" '; + $durl.= ' alt="'._("Delete comment").'" name="submit" value="1" '; $durl.= ' /> '; $durl.= '</fieldset>'; @@ -39,7 +39,7 @@ while (list($indx, $carr) = each($comments)) { ?> $count = package_comments_count($_GET['ID']); if ($count > 10 && !isset($_GET['comments'])) { echo '<div class="pgbox">'; - echo '<a href="'. $_SERVER['REQUEST_URI'] . '&comments=all">'. __('Show all %s comments', $count) . '</a>'; + echo '<a href="'. $_SERVER['REQUEST_URI'] . '&comments=all">'. sprintf(_('Show all %s comments'), $count) . '</a>'; echo '</div>'; } ?> diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 06580639..2f14c41e 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -46,13 +46,13 @@ if ($row["MaintainerUID"]) { $maintainer = "None"; } -$votes = __('Votes') . ': ' . $row['NumVotes']; +$votes = _('Votes') . ': ' . $row['NumVotes']; if ($atype == "Developer" or $atype == "Trusted User") { $votes = "<a href=\"voters.php?ID=$pkgid\">$votes</a>"; } # In case of wanting to put a custom message -$msg = __('unknown'); +$msg = _('unknown'); $license = empty($row['License']) ? $msg : $row['License']; # Print the timestamps for last updates @@ -62,7 +62,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[ ?> <div class="pgbox"> - <div class="pgboxtitle"><span class="f3"><?php echo __("Package Details") ?></span></div> + <div class="pgboxtitle"><span class="f3"><?php echo _("Package Details") ?></span></div> <div class="pgboxbody"> <p> @@ -74,28 +74,28 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[ <?php echo $edit_cat ?> <p> - <span class='f3'><?php echo __('Submitter') .': ' . $submitter ?></span><br /> - <span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br /> + <span class='f3'><?php echo _('Submitter') .': ' . $submitter ?></span><br /> + <span class='f3'><?php echo _('Maintainer') .': ' . $maintainer ?></span><br /> <span class='f3'><?php echo $votes ?></span> </p> - <p><span class='f3'><?php echo __('License') . ': ' . htmlspecialchars($license) ?></span></p> + <p><span class='f3'><?php echo _('License') . ': ' . htmlspecialchars($license) ?></span></p> <p> <span class='f3'> - <?php echo __('Last Updated') . ': ' . $updated_time ?><br /> - <?php echo __('First Submitted') . ': '. $submitted_time ?> + <?php echo _('Last Updated') . ': ' . $updated_time ?><br /> + <?php echo _('First Submitted') . ': '. $submitted_time ?> </span> </p> <p><span class='f3'> <?php $urlpath = URL_DIR . $row['Name']; - print "<a href='$urlpath/" . $row['Name'] . ".tar.gz'>".__("Tarball")."</a> :: "; - print "<a href='$urlpath/PKGBUILD'>".__("PKGBUILD")."</a></span>"; + print "<a href='$urlpath/" . $row['Name'] . ".tar.gz'>"._("Tarball")."</a> :: "; + print "<a href='$urlpath/PKGBUILD'>"._("PKGBUILD")."</a></span>"; if ($row["OutOfDateTS"] !== NULL) { - echo "<br /><span class='f6'>".__("This package has been flagged out of date.")." (${out_of_date_time})</span>"; + echo "<br /><span class='f6'>"._("This package has been flagged out of date.")." (${out_of_date_time})</span>"; } ?> </p> @@ -109,7 +109,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[ } if (count($deps) > 0) { - echo "<span class='boxSoftTitle'><span class='f3'>". __("Dependencies")."</span></span>"; + echo "<span class='boxSoftTitle'><span class='f3'>". _("Dependencies")."</span></span>"; while (list($k, $darr) = each($deps)) { # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist @@ -126,7 +126,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[ } if (count($requiredby) > 0) { - echo "<span class='boxSoftTitle'><span class='f3'>". __("Required by")."</span></span>"; + echo "<span class='boxSoftTitle'><span class='f3'>". _("Required by")."</span></span>"; while (list($k, $darr) = each($requiredby)) { # darr: (PackageName, PackageID) @@ -145,7 +145,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[ if (count($sources) > 0) { ?> - <div class='boxSoftTitle'><span class='f3'><?php echo __('Sources') ?></span></div> + <div class='boxSoftTitle'><span class='f3'><?php echo _('Sources') ?></span></div> <div> <?php while (list($k, $src) = each($sources)) { diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php index 53d34fe3..8b4191a0 100644 --- a/web/template/pkg_search_form.php +++ b/web/template/pkg_search_form.php @@ -3,14 +3,14 @@ <div class='pgbox'> <form action='packages.php' method='get'> <div class='pgboxtitle'> - <span class='f3'><?php print __("Search Criteria"); ?></span> + <span class='f3'><?php print _("Search Criteria"); ?></span> <input type='hidden' name='O' value='0' /> <input type='text' name='K' size='30' value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength='35' /> - <input type='submit' style='min-width:80px' class='button' name='do_Search' value='<?php print __("Go"); ?>' /> + <input type='submit' style='min-width:80px' class='button' name='do_Search' value='<?php print _("Go"); ?>' /> <?php if (!empty($_GET['detail'])): ?> - <input type='submit' style='min-width:80px' class='button' name='do_Orphans' value='<?php print __("Orphans"); ?>' /> + <input type='submit' style='min-width:80px' class='button' name='do_Orphans' value='<?php print _("Orphans"); ?>' /> <?php endif; ?> - <a href="?<?php print mkurl('detail=' . ((!empty($_GET['detail'])) ? 0 : 1) ) ?>"><?php print __("Advanced"); ?></a> + <a href="?<?php print mkurl('detail=' . ((!empty($_GET['detail'])) ? 0 : 1) ) ?>"><?php print _("Advanced"); ?></a> </div> <?php if (!empty($_GET['detail'])): ?> @@ -18,9 +18,9 @@ <input type="hidden" name="detail" value="1" /> <ul> <li> - <label><?php print __("Category"); ?></label> + <label><?php print _("Category"); ?></label> <select name='C'> - <option value='0'><?php print __("Any"); ?></option> + <option value='0'><?php print _("Any"); ?></option> <?php foreach (pkgCategories() as $id => $cat): if (isset($_REQUEST['C']) && $_REQUEST['C'] == $id): @@ -35,10 +35,10 @@ </select> </li> <li> - <label><?php print __("Search by"); ?></label> + <label><?php print _("Search by"); ?></label> <select name='SeB'> <?php - $searchby = array('nd' => __('Name, Description'), 'n' => __('Name Only'), 'x' => __('Exact name'), 'm' => __('Maintainer'), 's' => __('Submitter')); + $searchby = array('nd' => _('Name, Description'), 'n' => _('Name Only'), 'x' => _('Exact name'), 'm' => _('Maintainer'), 's' => _('Submitter')); foreach ($searchby as $k => $v): if (isset($_REQUEST['SeB']) && $_REQUEST['SeB'] == $k): ?> @@ -52,10 +52,10 @@ </select> </li> <li> - <label><?php print __("Sort by"); ?></label> + <label><?php print _("Sort by"); ?></label> <select name='SB'> <?php - $sortby = array('n' => __('Name'), 'c' => __('Category'), 'v' => __('Votes'), 'w' => __('Voted'), 'o' => __('Notify'), 'm' => __('Maintainer'), 'a' => __('Age')); + $sortby = array('n' => _('Name'), 'c' => _('Category'), 'v' => _('Votes'), 'w' => _('Voted'), 'o' => _('Notify'), 'm' => _('Maintainer'), 'a' => _('Age')); foreach ($sortby as $k => $v): if (isset($_REQUEST['SB']) && $_REQUEST['SB'] == $k): ?> @@ -69,10 +69,10 @@ </select> </li> <li> - <label><?php print __("Sort order"); ?></label> + <label><?php print _("Sort order"); ?></label> <select name='SO'> <?php - $orderby = array('a' => __('Ascending'), 'd' => __('Descending')); + $orderby = array('a' => _('Ascending'), 'd' => _('Descending')); foreach ($orderby as $k => $v): if (isset($_REQUEST['SO']) && $_REQUEST['SO'] == $k): ?> @@ -86,7 +86,7 @@ </select> </li> <li> - <label><?php print __("Per page"); ?></label> + <label><?php print _("Per page"); ?></label> <select name='PP'> <?php $pages = array(50, 100, 250); @@ -103,10 +103,10 @@ </select> </li> <li> - <label><?php echo __('Out of Date'); ?></label> + <label><?php echo _('Out of Date'); ?></label> <select name='outdated'> <?php - $outdated_flags = array('' => __('All'), 'on' => __('Flagged'), 'off' => __('Not Flagged')); + $outdated_flags = array('' => _('All'), 'on' => _('Flagged'), 'off' => _('Not Flagged')); foreach ($outdated_flags as $k => $v): if (isset($_REQUEST['outdated']) && $_REQUEST['outdated'] == $k): ?> diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index d32b6c4a..f204295f 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -1,12 +1,12 @@ <?php if (!$result) { ?> - <div class='pgboxbody'><?php print __("Error retrieving package list.") ?></div> + <div class='pgboxbody'><?php print _("Error retrieving package list.") ?></div> <?php } elseif ($total == 0) { ?> - <div class='pgboxbody'><?php print __("No packages matched your search criteria.") ?></div> + <div class='pgboxbody'><?php print _("No packages matched your search criteria.") ?></div> <?php } else { ?> <form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'> <div class="pgbox"> <div class="pgboxtitle"> - <span class='f3'><?php print __("Package Listing") ?></span> + <span class='f3'><?php print _("Package Listing") ?></span> </div> @@ -19,26 +19,26 @@ <?php endif; ?> <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> - <a href='?<?php print mkurl('SB=c&SO=' . $SO_next) ?>'><?php print __("Category") ?></a> + <a href='?<?php print mkurl('SB=c&SO=' . $SO_next) ?>'><?php print _("Category") ?></a> </span></th> <th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'> - <a href='?<?php print mkurl('SB=n&SO=' . $SO_next) ?>'><?php print __("Name") ?></a> + <a href='?<?php print mkurl('SB=n&SO=' . $SO_next) ?>'><?php print _("Name") ?></a> </span></th> <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> - <a href='?<?php print mkurl('SB=v&SO=' . $SO_next) ?>'><?php print __("Votes") ?></a> + <a href='?<?php print mkurl('SB=v&SO=' . $SO_next) ?>'><?php print _("Votes") ?></a> </span></th> <?php if ($SID): ?> <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> - <a href='?<?php print mkurl('SB=w&SO=' . $SO_next) ?>'><?php print __("Voted") ?></a> + <a href='?<?php print mkurl('SB=w&SO=' . $SO_next) ?>'><?php print _("Voted") ?></a> </span></th> <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> - <a href='?<?php print mkurl('SB=o&SO=' . $SO_next) ?>'><?php print __("Notify") ?></a> + <a href='?<?php print mkurl('SB=o&SO=' . $SO_next) ?>'><?php print _("Notify") ?></a> </span></th> <?php endif; ?> - <th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'><?php print __("Description") ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'><?php print _("Description") ?></span></th> <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> - <a href='?<?php print mkurl('SB=m&SO=' . $SO_next) ?>'><?php print __("Maintainer") ?></a> + <a href='?<?php print mkurl('SB=m&SO=' . $SO_next) ?>'><?php print _("Maintainer") ?></a> </span></th> </tr> @@ -62,13 +62,13 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { <?php if ($SID): ?> <td class='<?php print $c ?>'><span class='f5'><span class='blue'> <?php if (isset($row["Voted"])): ?> - <?php print __("Yes") ?></span></span></td> + <?php print _("Yes") ?></span></span></td> <?php else: ?> </span></span></td> <?php endif; ?> <td class='<?php print $c ?>'><span class='f5'><span class='blue'> <?php if (isset($row["Notify"])): ?> - <?php print __("Yes") ?></span></span></td> + <?php print _("Yes") ?></span></span></td> <?php else: ?> </span></span></td> <?php endif; ?> @@ -79,7 +79,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { <?php if (isset($row["Maintainer"])): ?> <a href='packages.php?K=<?php print htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&SeB=m'><?php print htmlspecialchars($row['Maintainer']) ?></a> <?php else: ?> - <span style='color: blue; font-style: italic;'><?php print __("orphan") ?></span> + <span style='color: blue; font-style: italic;'><?php print _("orphan") ?></span> <?php endif; ?> </span></span></td> </tr> @@ -92,33 +92,33 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { <div class="pgbox pkg_search_results_footer"> <div class="legend_and_actions"> <div class="legend"> - <span class='f3'><?php echo __('Legend') ?></span> - <span class="outofdate"><?php print __('Out of Date') ?></span> + <span class='f3'><?php echo _('Legend') ?></span> + <span class="outofdate"><?php print _('Out of Date') ?></span> </div> <?php if ($SID): ?> <div> <select name='action'> - <option><?php print __("Actions") ?></option> - <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option> - <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option> - <option value='do_Adopt'><?php print __("Adopt Packages") ?></option> - <option value='do_Disown'><?php print __("Disown Packages") ?></option> + <option><?php print _("Actions") ?></option> + <option value='do_Flag'><?php print _("Flag Out-of-date") ?></option> + <option value='do_UnFlag'><?php print _("Unflag Out-of-date") ?></option> + <option value='do_Adopt'><?php print _("Adopt Packages") ?></option> + <option value='do_Disown'><?php print _("Disown Packages") ?></option> <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> - <option value='do_Delete'><?php print __("Delete Packages") ?></option> + <option value='do_Delete'><?php print _("Delete Packages") ?></option> <?php endif; ?> - <option value='do_Notify'><?php print __("Notify") ?></option> - <option value='do_UnNotify'><?php print __("UnNotify") ?></option> + <option value='do_Notify'><?php print _("Notify") ?></option> + <option value='do_UnNotify'><?php print _("UnNotify") ?></option> </select> <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> - <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> + <input type='checkbox' name='confirm_Delete' value='1' /> <?php print _("Confirm") ?> <?php endif; ?> - <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' /> + <input type='submit' class='button' style='width: 80px' value='<?php print _("Go") ?>' /> </div> <?php endif; # if ($SID) ?> </div> <!-- .legend_and_actions --> <div class="page_links"> <div class="f4 blue"> - <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> + <?php printf(_("Showing results %s - %s of %s"), $first, $last, $total) ?> </div> <div class="page_nav"> <?php foreach($templ_pages as $pagenr => $pagestart) { ?> diff --git a/web/template/search_accounts_form.php b/web/template/search_accounts_form.php index 9d6c40d0..7ac958e2 100644 --- a/web/template/search_accounts_form.php +++ b/web/template/search_accounts_form.php @@ -3,61 +3,61 @@ <table border='0' cellpadding='0' cellspacing='0' width='80%' style="margin:0 auto;"> <tr> - <td align='left'><?php print __("Username"); ?>:</td> + <td align='left'><?php print _("Username"); ?>:</td> <td align='left'> <input type='text' size='30' maxlength='64' name='U' /> </td> </tr> <tr> - <td align='left'><?php print __("Account Type"); ?>:</td> + <td align='left'><?php print _("Account Type"); ?>:</td> <td align='left'> <select name="T"> - <option value=''><?php print __("Any type"); ?></option> - <option value='u'><?php print __("Normal user"); ?></option> - <option value='t'><?php print __("Trusted user"); ?></option> - <option value='d'><?php print __("Developer"); ?></option> + <option value=''><?php print _("Any type"); ?></option> + <option value='u'><?php print _("Normal user"); ?></option> + <option value='t'><?php print _("Trusted user"); ?></option> + <option value='d'><?php print _("Developer"); ?></option> </select> </td> </tr> <tr> - <td align='left'><?php print __("Account Suspended"); ?>:</td> + <td align='left'><?php print _("Account Suspended"); ?>:</td> <td align='left'> <input type='checkbox' name='S' /> </td> </tr> <tr> - <td align='left'><?php print __("Email Address"); ?>:</td> + <td align='left'><?php print _("Email Address"); ?>:</td> <td align='left'> <input type='text' size='30' maxlength='64' name='E' /> </td> </tr> <tr> - <td align='left'><?php print __("Real Name"); ?>:</td> + <td align='left'><?php print _("Real Name"); ?>:</td> <td align='left'> <input type='text' size='30' maxlength='32' name='R' /> </td> </tr> <tr> - <td align='left'><?php print __("IRC Nick"); ?>:</td> + <td align='left'><?php print _("IRC Nick"); ?>:</td> <td align='left'> <input type='text' size='30' maxlength='32' name='I' /> </td> </tr> <tr> - <td align='left'><?php print __("Sort by"); ?>:</td> + <td align='left'><?php print _("Sort by"); ?>:</td> <td align='left'> <select name="SB"> - <option value='u'><?php print __("Username"); ?></option> - <option value='t'><?php print __("Account Type"); ?></option> - <option value='r'><?php print __("Real Name"); ?></option> - <option value='i'><?php print __("IRC Nick"); ?></option> - <option value='v'><?php print __("Last vote"); ?></option> + <option value='u'><?php print _("Username"); ?></option> + <option value='t'><?php print _("Account Type"); ?></option> + <option value='r'><?php print _("Real Name"); ?></option> + <option value='i'><?php print _("IRC Nick"); ?></option> + <option value='v'><?php print _("Last vote"); ?></option> </select> </td> </tr> @@ -67,8 +67,8 @@ <td align='left'> <br /> <input type='hidden' name='Action' value='SearchAccounts' /> - <input type='submit' class='button' value="<?php print __("Search"); ?>" /> - <input type='reset' class='button' value="<?php print __("Reset"); ?>" /> + <input type='submit' class='button' value="<?php print _("Search"); ?>" /> + <input type='reset' class='button' value="<?php print _("Reset"); ?>" /> </td> </tr> diff --git a/web/template/stats/general_stats_table.php b/web/template/stats/general_stats_table.php index a100dfee..3d9cb7a7 100644 --- a/web/template/stats/general_stats_table.php +++ b/web/template/stats/general_stats_table.php @@ -1,37 +1,37 @@ <table class='boxSoft'> <tr> - <th colspan='2' class='boxSoftTitle'><span class='f3'><?php print __("Statistics") ?></span></th> + <th colspan='2' class='boxSoftTitle'><span class='f3'><?php print _("Statistics") ?></span></th> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Packages"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Packages"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $unsupported_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Orphan Packages"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Orphan Packages"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $orphan_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Packages added in the past 7 days"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Packages added in the past 7 days"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $add_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Packages updated in the past 7 days"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Packages updated in the past 7 days"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $update_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Packages updated in the past year"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Packages updated in the past year"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $update_year_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Packages never updated"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Packages never updated"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $never_update_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Registered Users"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Registered Users"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $user_count; ?></span></td> </tr> <tr> - <td class='boxSoft'><span class='f4'><?php print __("Trusted Users"); ?></span></td> + <td class='boxSoft'><span class='f4'><?php print _("Trusted Users"); ?></span></td> <td class='boxSoft'><span class='f4'><?php print $tu_count; ?></span></td> </tr> </table> diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php index a8cdf5aa..623b4c06 100644 --- a/web/template/stats/updates_table.php +++ b/web/template/stats/updates_table.php @@ -1,7 +1,7 @@ <table class="boxSoft"> <tr> <th colspan="2" class="boxSoftTitle" style="text-align: right"> -<span class="f3"><?php print __("Recent Updates") ?><span class="f5"></span></span> +<span class="f3"><?php print _("Recent Updates") ?><span class="f5"></span></span> <a href="rss.php"><img src="images/feed-icon-14x14.png" alt="RSS Feed" /></a> </th> </tr> diff --git a/web/template/stats/user_table.php b/web/template/stats/user_table.php index 36a6b10c..992f7370 100644 --- a/web/template/stats/user_table.php +++ b/web/template/stats/user_table.php @@ -4,13 +4,13 @@ <table class='boxSoft'> <tr> <th colspan='2' class='boxSoftTitle'> -<span class='f3'><?php print __("My Statistics"); ?></span> +<span class='f3'><?php print _("My Statistics"); ?></span> </th> </tr> <tr> <td class='boxSoft'> <span class='f4'><a href="packages.php?SeB=m&L=2&K=<?php echo $username; ?>"> -<?php print __("Packages in unsupported"); ?></a></span> +<?php print _("Packages in unsupported"); ?></a></span> </td> <td class='boxSoft'> <span class='f4'><?php print $maintainer_unsupported_count; ?></span> @@ -20,7 +20,7 @@ <tr> <td class='boxSoft'> <span class='f4'><a href="packages.php?SeB=m&outdated=on&K=<?php echo $username; ?>"> -<?php print __("Out of Date"); ?></a></span> +<?php print _("Out of Date"); ?></a></span> </td> <td class='boxSoft'> <span class='f4'> diff --git a/web/template/template.phps b/web/template/template.phps index 841277b8..8f112967 100644 --- a/web/template/template.phps +++ b/web/template/template.phps @@ -10,10 +10,10 @@ check_sid(); # see if they're still logged in html_header(); # print out the HTML header -# Any text you print out to the visitor, use the __() function +# Any text you print out to the visitor, use the _() function # for i18n support. See web/lib/translator.inc.php for more info. # -print __("Hi, this is worth reading!")."<br />\n"; +print _("Hi, this is worth reading!")."<br />\n"; html_footer(AUR_VERSION); diff --git a/web/template/tu_details.php b/web/template/tu_details.php index 7d6c305d..b926615a 100644 --- a/web/template/tu_details.php +++ b/web/template/tu_details.php @@ -1,24 +1,24 @@ <div class="pgbox"> -<div class="pgboxtitle"><span class="f3"><?php print __("Proposal Details") ?></span></div> +<div class="pgboxtitle"><span class="f3"><?php print _("Proposal Details") ?></span></div> <div class="pgboxbody"> <?php if ($isrunning == 1) { ?> <p style='font-weight: bold; color: red'> -<?php print __("This vote is still running.") ?> +<?php print _("This vote is still running.") ?> </p> <?php } ?> <p> -<?php echo __('User') ?>: <b> +<?php echo _('User') ?>: <b> <?php if (!empty($row['User'])) { ?> <a href='packages.php?K=<?php print $row['User'] ?>&SeB=m'><?php print $row['User'] ?></a> <?php } else { ?> N/A <?php } ?> </b><br /> -<?php print __("Submitted: %s by %s", "<b>" . gmdate("r", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?><br /> -<?php print __('End') ?>: <b><?php print gmdate("r", $row['End']) ?></b></p> +<?php printf(_("Submitted: %s by %s"), "<b>" . gmdate("r", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?><br /> +<?php print _('End') ?>: <b><?php print gmdate("r", $row['End']) ?></b></p> <p> <?php print str_replace("\n", "<br />\n", htmlspecialchars($row['Agenda'])) ?> @@ -26,11 +26,11 @@ N/A <table class="boxSoft" width='100%' cellspacing='0' cellpadding='2'> <tr> -<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Yes") ?></span></th> -<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("No") ?></span></th> -<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Abstain") ?></span></th> -<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Total") ?></span></th> -<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __('Voted') ?></span></th> +<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("Yes") ?></span></th> +<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("No") ?></span></th> +<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("Abstain") ?></span></th> +<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("Total") ?></span></th> +<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _('Voted') ?></span></th> </tr> <tr> <td class='data1'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td> @@ -39,9 +39,9 @@ N/A <td class='data1'><span class='f5'><span class='blue'><?php print ($row['Yes'] + $row['No'] + $row['Abstain']) ?></span></span></td> <td class='data1'><span class='f5'><span class='blue'> <?php if ($hasvoted == 0) { ?> -<span style='color: red; font-weight: bold'><?php print __("No") ?></span> +<span style='color: red; font-weight: bold'><?php print _("No") ?></span> <?php } else { ?> -<span style='color: green; font-weight: bold'><?php print __("Yes") ?></span> +<span style='color: green; font-weight: bold'><?php print _("Yes") ?></span> <?php } ?> </span></span></td> </tr> @@ -52,7 +52,7 @@ N/A if (!$isrunning) { ?> <div class="pgbox"> <div class="pgboxtitle"> - <span class="f3"><?php echo __('Voters'); ?></span> + <span class="f3"><?php echo _('Voters'); ?></span> </div> <div class="pgboxbody"> <?php echo $whovoted; ?> @@ -66,9 +66,9 @@ if (!$isrunning) { ?> <?php if ($canvote == 1) { ?> <form action='tu.php?id=<?php print $row['ID'] ?>' method='post'> <fieldset> -<input type='submit' class='button' name='voteYes' value='<?php print __("Yes") ?>' /> -<input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>' /> -<input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>' /> +<input type='submit' class='button' name='voteYes' value='<?php print _("Yes") ?>' /> +<input type='submit' class='button' name='voteNo' value='<?php print _("No") ?>' /> +<input type='submit' class='button' name='voteAbstain' value='<?php print _("Abstain") ?>' /> <input type='hidden' name='doVote' value='1' /> </fieldset> </form> diff --git a/web/template/tu_list.php b/web/template/tu_list.php index 75d9414e..9775d1ae 100644 --- a/web/template/tu_list.php +++ b/web/template/tu_list.php @@ -4,18 +4,18 @@ </div> <table width='100%' cellspacing='0' cellpadding='2'> <tr> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Proposal") ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("Proposal") ?></span></th> <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> - <a href='?off=<?php print $off ?>&by=<?php print $by_next ?>'><?php print __("Start") ?></a> + <a href='?off=<?php print $off ?>&by=<?php print $by_next ?>'><?php print _("Start") ?></a> </span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("End") ?></span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("User") ?></span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Yes") ?></span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("No") ?></span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __('Voted') ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("End") ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("User") ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("Yes") ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _("No") ?></span></th> + <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print _('Voted') ?></span></th> </tr> <?php if (mysql_num_rows($result) == 0) { ?> - <tr><td align='center' colspan='0'><?php print __("No results found.") ?></td></tr> + <tr><td align='center' colspan='0'><?php print _("No results found.") ?></td></tr> <?php } else { for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { (($i % 2) == 0) ? $c = "data1" : $c = "data2"; ?> <tr> <td class='<?php print $c ?>'><span class='f4'><span class='blue'> @@ -50,9 +50,9 @@ ?> <span class='f5'><span class='blue'> <?php if ($hasvoted == 0) { ?> - <span style='color: red; font-weight: bold'><?php print __("No") ?></span> + <span style='color: red; font-weight: bold'><?php print _("No") ?></span> <?php } else { ?> - <span style='color: green; font-weight: bold'><?php print __("Yes") ?></span> + <span style='color: green; font-weight: bold'><?php print _("Yes") ?></span> <?php } ?> </span></span> </td> |