diff options
author | Loui Chang <louipc.ist@gmail.com> | 2008-11-04 03:52:07 +0100 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2008-11-04 03:52:07 +0100 |
commit | a6147ab5ab297728adefdb97aaeedc93114b896d (patch) | |
tree | 49b508439ab2aa0cf4bd039d3b2d2d53e8860df0 /web | |
parent | c85dfacc747387b9be6c53b4518ac680b505e0f7 (diff) | |
parent | 100451a9665cb387eeae2cb06cc22870cfd57c82 (diff) | |
download | aur-a6147ab5ab297728adefdb97aaeedc93114b896d.tar.gz aur-a6147ab5ab297728adefdb97aaeedc93114b896d.tar.xz |
Merge branch 'testing'
Conflicts:
web/html/pkgsubmit.php
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
87 files changed, 1663 insertions, 2000 deletions
diff --git a/web/README.txt b/web/README index 69bec044..b0e6c39f 100644 --- a/web/README.txt +++ b/web/README @@ -55,6 +55,9 @@ Setup on Arch Linux: PEAR's path may vary depending on your set up. 6) Configure MySQL + - Start the MySQL service. Example: + # /etc/rc.d/mysqld start + - Connect to the mysql client # mysql -uroot @@ -74,8 +77,8 @@ Setup on Arch Linux: (give password 'aur' at the prompt) 7) Copy the config.inc.proto file to config.inc. Modify as needed. - cd ~/aur/web/lib/ - cp config.inc.profo config.inc + # cd ~/aur/web/lib/ + # cp config.inc.profo config.inc 8) Point your browser to http://aur @@ -92,6 +95,9 @@ Directory Layout: ./template - Where most of the html markup resides and minimal amount of PHP scripting. + There is also a template to model the site's top pages in + template.phps + Scripts: -------- diff --git a/web/html/addvote.php b/web/html/addvote.php index 8e4df795..449bbb0d 100644 --- a/web/html/addvote.php +++ b/web/html/addvote.php @@ -2,7 +2,7 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); -include("pkgfuncs_po.inc"); +include("tu_po.inc"); include("aur.inc"); set_lang(); check_sid(); @@ -25,23 +25,23 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $check = mysql_num_rows(db_query($qcheck, $dbh)); if ($check == 0) { - $error.= "<div style='color: red; font-weight: bold'>Username does not exist.</div>"; + $error.= "<div style='color: red; font-weight: bold'>" . __("Username does not exist.") . "</div>"; } else { $qcheck = "SELECT * FROM TU_VoteInfo WHERE User = '" . mysql_real_escape_string($_POST['user']) . "'"; $qcheck.= " AND End > UNIX_TIMESTAMP()"; $check = mysql_num_rows(db_query($qcheck, $dbh)); if ($check != 0) { - $error.= "<div style='color: red; font-weight: bold'>" . htmlentities($_POST['user']) . " already has proposal running for them.</div>"; + $error.= "<div style='color: red; font-weight: bold'>" . __("%s already has proposal running for them.", htmlentities($_POST['user'])) . "</div>"; } } } if (!empty($_POST['length'])) { if (!is_numeric($_POST['length'])) { - $error.= "<div style='color: red; font-weight: bold'>Length must be a number.</div>"; + $error.= "<div style='color: red; font-weight: bold'>" . __("Length must be a number.") . "</div>"; } else if ($_POST['length'] < 1) { - $error.= "<div style='color: red; font-weight: bold'>Length must be at least 1.</div>"; + $error.= "<div style='color: red; font-weight: bold'>" . __("Length must be at least 1.") . "</div>"; } else { $len = (60*60*24)*$_POST['length']; } @@ -50,7 +50,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") { } if (empty($_POST['agenda'])) { - $error.= "<div style='color: red; font-weight: bold'>Proposal cannot be empty.</div>"; + $error.= "<div style='color: red; font-weight: bold'>" . __("Proposal cannot be empty.") . "</div>"; } } @@ -62,21 +62,21 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $q.= ", " . uid_from_sid($_COOKIE["AURSID"]) . ")"; db_query($q, $dbh); - print "<p>New proposal submitted.</p>\n"; + print "<p>" . __("New proposal submitted.") . "</p>\n"; } else { ?> -<p>Submit a proposal to vote on.</p> +<p><?php print __("Submit a proposal to vote on.") ?></p> <?php if (!empty($error)) { print $error . "<br />"; } ?> <form action='addvote.php' method='post'> -<b>Applicant/TU:</b> +<b><?php print __("Applicant/TU:") ?></b> <input type='text' name='user' value='<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>'> -(empty if not applicable) +<?php print __("(empty if not applicable)") ?> <br /> -<b>Length in days:</b> +<b><?php print __("Length in days:") ?></b> <input type='text' name='length' value='<?php if (!empty($_POST['length'])) { print htmlentities($_POST['length'], ENT_QUOTES); } ?>'> -(defaults to 7 if empty) +<?php print __("(defaults to 7 if empty)") ?> <br /> -<b>Proposal:</b><br /> +<b><?php print __("Proposal:") ?></b><br /> <textarea name='agenda' rows='10' cols='50'><?php if (!empty($_POST['agenda'])) { print htmlentities($_POST['agenda']); } ?></textarea><br /> <input type='hidden' name='addVote' value='1'> <input type='submit' class='button' value='Submit'> @@ -84,9 +84,9 @@ if ($atype == "Trusted User" OR $atype == "Developer") { <br /> <?php } - print "<a href='tu.php'>Back</a>"; + print "<a href='tu.php'>" . __("Back") . "</a>"; } else { - print "You are not allowed to access this area.\n"; + print __("You are not allowed to access this area."); } html_footer(AUR_VERSION); diff --git a/web/html/css/fonts.css b/web/html/css/fonts.css index dc65070e..baa75609 100644 --- a/web/html/css/fonts.css +++ b/web/html/css/fonts.css @@ -99,5 +99,9 @@ a:hover { h1, h2, h3, h4 { font-size: 16pt; } -span.important { color: #f00; } + +.important { + font-weight: bold; + color: #f00; +} diff --git a/web/html/guidelines.html b/web/html/guidelines.html deleted file mode 100644 index c2acd772..00000000 --- a/web/html/guidelines.html +++ /dev/null @@ -1,273 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>AUR Guidelines</title> - - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <link rel="stylesheet" type="text/css" href="http://archlinux.org/docs/css/arch-styles.css"></head> - - - - <body> - <h1>AUR Guidelines</h1> - - <div class="date">Jun 08, 2005</div> - <div class="version">1.1.0</div> - - <address> - Ben Mazer - <a class="email" href="mailto:blm@groknil.org">blm@groknil.org</a> - </address> - <address> - The Trusted Users - <a class="email" href="mailto:aur-general@archlinux.org">aur-general@archlinux.org</a> - </address> - - <h2 id="summary">Summary</h2> - <p> - Basic guidelines for the Arch User Repository. - </p> - - <h2 id="toc">Table Of Contents</h2> - <div class="toc"> - <ol> - <li><a href="#purpose">Purpose</a></li> - <li><a href="#user">The User</a> - <ol> - <li><a href="#usersub">Submitting Packages</a></li> - - </ol> - </li> - <li><a href="#tu">The TU</a> - <ol> - <li><a href="#tuaddition">Adding a TU</a></li> - <li><a href="#turemoval">Removing a TU</a></li> - <li><a href="#otherduties">Other Duties</a></li> -<li><a href="#tuguidelines">Guidelines for Package Maintenance</a> - <ol> - <li><a href="#accessing">Accessing the Repo</a></li> - <li><a href="#adopting">Adopting a package</a></li> - <li><a href="#disowning">Disowning a package</a></li> - <li><a href="#pkgguidelines">Packaging Etiquette</a></li> - </ol> - </li> - - - </ol> </li> - <li><a href="#faq">Frequently Asked Questions</a></li> - </ol> - </div> - - <h2 id="purpose">Purpose</h2> - <p> - The <acronym title="Arch User Repository">AUR</acronym> -is a community of Arch users, where packages outside of the core Arch -distribution are maintained. The AUR Community Repo is a supplement to -the EXTRA and CURRENT repositories; less popular packages will be -maintained as a service to the general Arch-using population. Packages -in the AUR will depend on EXTRA and CURRENT. <br><br> The AUR was -created to lift the burden on the developers. They should be allowed to -focus on adding new features, rather than doing the mundane job of -package maintenance. Therefore, all packages start inside the AUR, and -as developers consider them crucial to the distribution, they will be -adopted into EXTRA/CURRENT. The AUR was also created to allow easy -participation. Arch is completely volunteer-based, and needs help from -its users. Lastly, the AUR helps to further the Arch philosophy of -KISS. The Arch Core (EXTRA/CURRENT/UNSTABLE) is a complete -distribution, but it does not attempt to provide every single package. -The AUR helps by maintaining less popular packages; but the AUR also -follows KISS, and only popular packages from UNSUPPORTED will make it -into the official AUR repository. </p> - <h2 id="user">The User</h2> - <p> Users of the -AUR can do many things, the main function being to download and use -packages. One can access the AUR by adding this to their pacman.conf -file:<br><br> - <code>[community]<br>Server = ftp://ftp.archlinux.org/community/os/i686/</code><br><br> -But a user can also help with package maintenance, by: submitting -packages (and then maintaining them while they remain in UNSUPPORTED), -filing bug reports, reporting out-of-date packages, helping with other -user-submitted PKGBUILDs, and voting for packages that should be -maintained by the TUs. Once a user account has been created, all -functions can be performed inside the web interface. </p><h3 id="usersub">Submitting Packages</h3> - <p> -Inside the web interface, a user can submit a tarball (tar.gz) of a -directory containing build files for a package. The directory inside -the tarball should contain a PKGBUILD, any .install files, patches, etc -(<b>no binaries</b>). Examples of what a directory looks like can be seen inside /var/abs. <br><br> - When submitting a package, observe the following rules: - </p><ul> - <li>Check -EXTRA, CURRENT, UNSTABLE, UNSUPPORTED, and AUR for the package. If it -is inside any of those repositories in any form, do not submit the -package (if the package is broken in some way, file a bug report). </li> - <li>Verify -carefully that what you are uploading is correct. Follow the -TU/Developer Package Building Guidelines exactly. Broken packages make -the AUR messy, and prevent the TUs from doing their other duties. </li> - <li>If -you are unsure about the package (or the build/submission process) in -any way, submit the PKGBUILD to the AUR Mailing List for public review -before adding it to the AUR.</li> - <li>Make sure the package -is useful. Will anyone else want to use this package? Is it extremely -specialized? If more than a few people would find this package useful, -it is appropriate for submission. </li> - <li>Gain some experience before submitting packages. Build a few packages to learn the process and then submit. </li> - <li>Do -not abandon packages. While in UNSUPPORTED, it is the user's job to -maintain the package. If you do not want to maintain the package for -some reason, post a message to the AUR Mailing List. </li> - </ul> - - - <h2 id="tu">The TU</h2> - <p> -The TU -or Trusted User- is a member of the community charged with -keeping the AUR in working order. He maintains popular packages, and -votes in administrative matters. A TU is elected from active community -members by current TUs in a democratic process. TUs are the only -members who have a final say in the direction of the AUR. </p> - <h3 id="tuaddition">Adding a TU</h3> - <p> -TUs are only added as needed, and applications will only be accepted at -certain times. Check the AUR website for details on whether -applications are being accepted. <br><br> -TUs are elected democratically. If you would like to become a TU, a -sponsor (another TU) is needed. You must solicit requests for a sponsor -privately before posting on the mailing list. After this is received, a -request must be made on the AUR Mailing List by the sponsor. Ideally, a -TU should have a specific subset of packages he wishes to maintain. <br><br> -Four other votes must be received from other TUs or developers for an -applicant to be accepted. Once these have been received, the user will -be given the proper passwords, and a TU will upgrade the user's status -on the web interface. <br><br> -Once an application has been published on the mailing list, it is open -for voting for 3 weeks. If the applicant does not receive enough votes -within that time period, he must wait 3 months to submit another -application, with vote tallies being reset. <br> - - </p> - <h3 id="turemoval">Sanctioning/Removing a TU</h3> - <p> -There is a basic sanctioning system for TUs. If a TU breaks a rule, -either official or through "community standards" when he was already -aware of this rule, one can request a sanction. If two other votes from -TUs are received, a sanction will be added. After two sanctions, the TU -will automatically come up for a removal vote. <br><br> If a TU is not working out, for any reason, one can -request him to be expelled. Someone requesting a removal of a TU must -state a valid reason, and why immediate removal is necessary. Almost -always, previous sanctions will be needed. With four additional votes, -that TU will be immediately removed and his packages will have to be -adopted by a different TU. </p> - <h3 id="otherduties">Other Duties</h3> - <p> -All other duties (changing rules, adding new regulations, new features, -etc) should be discussed openly on the AUR Mailing List and voted on. -Various pieces of documentation and code can have specified -"maintainers" that can perform basic updates (typo/bug fixes) without a -vote, but any changes should be reported on the mailing list. Any major -changes should receive a simple majority vote. </p> - <h3 id="tuguidelines">Guidelines for Package Maintenance</h3> - <p> - </p> - <h4 id="accessing">Accessing the Repo</h4> - <p> - Follow these instructions for uploading/modifying packages once you have become a TU: - </p><ol> - <li>Install the "aurtools" package.</li> - <li>Email Jason (<a class="email" href="mailto:jason@archlinux.org">jason@archlinux.org</a>) for a CVS account.</li> - <li>Run the following commands to checkout the AUR CVS:<br> - <kbd> - export CVSROOT=":pserver:<userid>@cvs.archlinux.org:/home/cvs-community"<br> - cvs login<br> - cvs co community</kbd></li> - <li>To add a PKGBUILD and other build files:<br> - <kbd> - cvs add <directory><br> - cd <directory><br> - cvs add PKGBUILD<br> - .<br> - .<br> - cvs commit</kbd></li> - <li>To upload a binary package: - <kbd>tupkg --user <userid> --password <password> <packagefile.pkg.tar.gz></kbd></li> - <li>After uploading a package and committing the build files, tag the files with this command: - <kbd>cvs tag -cFR CURRENT <newpackagebuilddir></kbd></li> - <li>Package -changes should be available within 10 minutes. Verify everything was -uploaded properly, then select the newly added or updated package in -the web interface and set yourself as the maintainer.</li> - </ol> - - <h4 id="adopting">Adopting Packages</h4> - <p> -A TU may adopt any package at any time. But because the TU's time is -limited, he should try to only adopt popular packages. The voting -mechanism in the AUR allows a TU to quickly gage which packages users -want. <br><br> -If a package receives 25 votes, it may be adopted by a TU. A maintainer -should adopt it via the web interface. That maintainer is then -responsible for bug fixes and new version updates. Packages must be -properly cleaned and fixed after adoption. </p> - - <h4 id="disowning">Disowning packages</h4> - <p> -If a TU can't or doesn't want to maintain a package any longer, a -notice should be posted to the AUR Mailing List, so another TU can -maintain it. A package can still be disowned even if no other TU wants -to maintain it, but the TUs should try not to drop many packages (they -shouldn't take on more than they have time for). If a package has -become obsolete or isn't used any longer, it can be removed completely -as well. <br><br> -If a package has been removed completely, it can be uploaded once again -(fresh) to UNSUPPORTED, where a regular user can maintain the package -instead of the TU. </p> - <h4 id="pkgguidelines">Packaging Etiquette</h4> - <p> - Adhere to the following rules when building/maintaining packages: - <br> - </p><ul> - <li>Follow all rules in the <a href="http://www.archlinux.org/docs/en/guide/install/arch-install-guide.html#build">Arch Packaging Guidelines</a>.</li> - <li>Always run Namcap on all packages and PKGBUILDs.</li> - <li>All -important messages should be echoed inside the .install file. For -example, if a package needs extra setup to work, directions should be -echoed. </li> - <li>Any optional dependencies that aren't -needed to run the package or have it generally function shouldn't be -included, but a warning message inside the .install file should echo -something like: "To enable SMB support, download the Samba package."</li> - - <li>Always look at current packages for ideas on how various problems should be handled. Most problems have already been solved. </li> - <li>Dependencies -are the most common packaging error. Namcap can help detect them, but -it is not always correct. Verify dependencies by looking at source -documentation and the program website. </li> - <li>All packages should be buildable as a user, under fakeroot. </li> - <li>New user creation should only be done when absolutely necessary. </li> - <li>Always -fill out all applicable fields in the PKGBUILD (never forget a URL, -md5sum, etc). The LICENSE variable is not currently used, but will be -very shortly. </li> - <li>All custom variables should begin with an underscore (_). </li> - <li>A PKGBUILD should never modify any files outside of the build directory. </li> - </ul> - - <h2 id="faq">Frequently Asked Questions</h2> - <p> - Q: What is the difference between the AUR, COMMUNITY, and TUR? Why don't packages I upload to the AUR show up in pacman?<br><br> -A: The TUR, or Trusted User Repository, was the old system used to -manage user submissions. It had a number of flaws, so was discontinued. -The TUR website is still up, but is dead and will be removed shortly. -AUR is the official replacement for the TUR. It is a web system that -allows users to submit their own PKGBUILDs for both the TUs and the -general community to see. COMMUNITY is a new Arch repository, run by -the TUs, that is available via pacman.<br><br> -User submitted PKGBUILDs are available from the AUR, but because they -have not been reviewed, packages are not available. If a PKGBUILD is -reviewed, and receives many votes, it may "graduate" into the COMMUNITY -repo. There it will easily be retrievable from pacman.<br><br> -If you are a new user, it is safe to use the COMMUNITY repo, as -packages have been verified. Any PKGBUILDs in the UNSUPPORTED section -of the AUR have not been tested, and could be dangerous or broken. Use -at your own risk. </p> - </body></html> diff --git a/web/html/index.php b/web/html/index.php index 7a95abfc..c7847f25 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -5,66 +5,13 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR # Add to handle the i18n of My Packages include("pkgfuncs_po.inc"); include("aur.inc"); +include('stats.inc'); set_lang(); check_sid(); html_header( __("Home") ); - -# Newest packages -$q = "SELECT * FROM Packages WHERE DummyPkg != 1 ORDER BY GREATEST(SubmittedTS,ModifiedTS) DESC LIMIT 0 , 10"; -$newest_packages = db_query($q, $dbh); - -# AUR statistics -$q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported'"; -$result = db_query($q, $dbh); -$row = mysql_fetch_row($result); -$unsupported_count = $row[0]; - -$q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'community'"; -$result = db_query($q, $dbh); -$row = mysql_fetch_row($result); -$community_count = $row[0]; - -$q = "SELECT count(*) from Users"; -$result = db_query($q, $dbh); -$row = mysql_fetch_row($result); -$user_count = $row[0]; - -$q = "SELECT count(*) from Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND AccountTypes.AccountType = 'Trusted User'"; -$result = db_query($q, $dbh); -$row = mysql_fetch_row($result); -$tu_count = $row[0]; - -$targstamp = intval(strtotime("-7 days")); -$q = "SELECT count(*) from Packages WHERE (Packages.SubmittedTS >= $targstamp OR Packages.ModifiedTS >= $targstamp)"; -$result = db_query($q, $dbh); -$row = mysql_fetch_row($result); -$update_count = $row[0]; - -$user = username_from_sid($_COOKIE["AURSID"]); - -if (!empty($user)) { - $q = "SELECT count(*) FROM Packages,PackageLocations,Users WHERE Packages.MaintainerUID = Users.ID AND Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported' AND Users.Username='".mysql_real_escape_string($user)."'"; - $result = db_query($q, $dbh); - $row = mysql_fetch_row($result); - $maintainer_unsupported_count = $row[0]; - - $q = "SELECT count(*) FROM Packages,Users WHERE Packages.OutOfDate = 1 AND Packages.MaintainerUID = Users.ID AND Users.Username='".mysql_real_escape_string($user)."'"; - $result = db_query($q, $dbh); - $row = mysql_fetch_row($result); - $flagged_outdated = $row[0]; - - # If the user is a TU calculate the number of the packages - $atype = account_from_sid($_COOKIE["AURSID"]); - - if ($atype == 'Trusted User') { - $q = "SELECT count(*) FROM Packages,PackageLocations,Users WHERE Packages.MaintainerUID = Users.ID AND Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'community' AND Users.Username='".mysql_real_escape_string($user)."'"; - $result = db_query($q, $dbh); - $row = mysql_fetch_row($result); - $maintainer_community_count = $row[0]; - } -} +$dbh = db_connect(); ?> @@ -73,167 +20,64 @@ if (!empty($user)) { <span class="f3">AUR <?php print __("Home"); ?></span> </div> <div class="frontpgboxbody"> -<table border='0' cellpadding='0' cellspacing='3' width='90%'> -<tr> -<td class='boxSoft' valign='top' colspan='2'> <p> <?php -print __( 'Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.' - , '<a href="http://wiki.archlinux.org/index.php/AUR_User_Guidelines">' - , '</a>' - , '<a href="http://wiki.archlinux.org/index.php/AUR_Trusted_User_Guidelines">' - , '</a>' +echo __( + 'Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.', + '<a href="http://wiki.archlinux.org/index.php/AUR_User_Guidelines">', + '</a>', + '<a href="http://wiki.archlinux.org/index.php/AUR_Trusted_User_Guidelines">', + '</a>' ); ?> -<br> +<br /> <?php -print __( 'Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!' - , '<a href="http://wiki.archlinux.org/index.php/Arch_Packaging_Standards">' - , '</a>' +echo __( + 'Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!', + '<b>', '</b>', + '<a href="http://wiki.archlinux.org/index.php/Arch_Packaging_Standards">', + '</a>' ); ?> </p> <p> -<?php print __("Remember to vote for your favourite packages!"); ?> -<br> -<?php print __("The most popular packages will be provided as binary packages in [community]."); ?> +<?php echo __('Remember to vote for your favourite packages!'); ?> +<br /> +<?php echo __('Some packages may be provided as binaries in [community].'); ?> </p> -</td> -</tr> +<table border='0' cellpadding='0' cellspacing='3' width='90%'> <tr> <td class='boxSoft' valign='top'> -<table class="boxSoft"> -<tr> -<th colspan="2" class="boxSoftTitle" style="text-align: right"> -<a href="/rss2.php"><img src="/images/rss.gif"></a> <span class="f3"><?php print __("Recent Updates") ?><span class="f5"></span></span> -</th> -</tr> - -<?php while ($row = mysql_fetch_assoc($newest_packages)): ?> - -<tr> -<td class="boxSoft"> -<span class="f4"><span class="blue"><a href="/packages.php?ID=<?php print intval($row["ID"]); ?>"> -<?php print $row["Name"] . ' ' . $row["Version"]; ?> -</a></span> +<?php updates_table($dbh); ?> </td> -<td class="boxSoft"> - +<td class='boxSoft' valign='top'> <?php -$mod_int = intval($row["ModifiedTS"]); -$sub_int = intval($row["SubmittedTS"]); - -if ($mod_int != 0): - $modstring = gmdate("r", $mod_int); -elseif ($sub_int != 0): - $modstring = '<img src="/images/new.gif"/> ' . gmdate("r", $sub_int); -else: - $modstring = '(unknown)'; -endif; -?> - -<span class="f4"><?php print $modstring; ?></span> -</td> -</tr> +$user = username_from_sid($_COOKIE["AURSID"]); +if (!empty($user)) { + user_table($user, $dbh); + echo '<br />'; +} -<?php endwhile; ?> +general_stats_table($dbh); +?> </td> </tr> </table> -<td class='boxSoft' valign='top'> - -<?php if (!empty($user)): ?> - -<table class='boxSoft'> -<tr> -<th colspan='2' class='boxSoftTitle'> -<span class='f3'><?php print __("My Statistics"); ?></span> -</th> -</tr> -<tr> -<td class='boxSoft'> -<span class='f4'><?php print __("Packages in unsupported"); ?></span> -</td> -<td class='boxSoft'> -<span class='f4'><?php print $maintainer_unsupported_count; ?></span> -</td> -</tr> -<?php if ($atype == 'Trusted User'): ?> - -<tr> -<td class='boxSoft'> -<span class='f4'><?php print __("Packages in [community]"); ?></span> -</td> -<td class='boxSoft'> -<span class='f4'><?php print $maintainer_community_count; ?></span> -</td> -</tr> - -<?php endif; ?> - -<tr> -<td class='boxSoft'> -<span class='f4'><?php print __("Out-of-date"); ?></span> -</td> -<td class='boxSoft'> -<span class='f4'><?php print $flagged_outdated ?></span> -</td> -</tr> -</table> <br /> +<div class="important"><?php +echo __('DISCLAIMER') . ':<br />'; +echo __('Unsupported PKGBUILDs are user produced content. Any use of files is at your own risk.'); +?></div> -<?php endif; ?> - -<table class='boxSoft'> -<tr> -<th colspan='2' class='boxSoftTitle'> -<span class='f3'><?php print __("Statistics") ?></span> -</th> -</tr> -<tr> -<td class='boxSoft'> -<span class='f4'><?php print __("Packages in unsupported"); ?></span> -</td> -<td class='boxSoft'><span class='f4'><?php print $unsupported_count; ?></span></td> -</tr> -<tr> -<td class='boxSoft'> -<span class='f4'><?php print __("Packages in [community]"); ?></span> -</td> -<td class='boxSoft'><span class='f4'><?php print $community_count; ?></span></td> -</tr> -<tr> -<td class='boxSoft'> -<span class='f4'><?php print __("Packages added or 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='blue'><span class='f4'><?php print __("Registered Users"); ?></span></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 $tu_count; ?></span></td> -</tr> -</table> -</td> -</tr> -</table> -<br /><span class='important'><?php print __("DISCLAIMER"); ?></span> </div> </div> <?php html_footer(AUR_VERSION); -?> + diff --git a/web/html/packages.php b/web/html/packages.php index 4cfe9c48..91b0e6e0 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -22,7 +22,7 @@ if (isset($_GET['ID'])) { $title = __("Packages"); } -html_header($title); # print out the HTML header +html_header($title); # get login privileges # @@ -37,396 +37,37 @@ if (isset($_COOKIE["AURSID"])) { # grab the list of Package IDs to be operated on # isset($_POST["IDs"]) ? $ids = $_POST["IDs"] : $ids = array(); -#isset($_REQUEST["All_IDs"]) ? -# $all_ids = explode(":", $_REQUEST["All_IDs"]) : -# $all_ids = array(); - # determine what button the visitor clicked # if ($_POST['action'] == "do_Flag" || isset($_POST['do_Flag'])) { - if (!$atype) { - print __("You must be logged in before you can flag packages."); - print "<br />\n"; - - } else { - - if (!empty($ids)) { - $dbh = db_connect(); - - # Flag the packages in $ids array - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if ($first) { - $first = 0; - $flag = $pid; - } else { - $flag .= ", ".$pid; - } - } - $q = "UPDATE Packages SET OutOfDate = 1 "; - $q.= "WHERE ID IN (" . $flag . ")"; - db_query($q, $dbh); - - print "<p>\n"; - print __("The selected packages have been flagged out-of-date."); - print "</p>\n"; - - # notification by tardo. - $f_name = username_from_sid($_COOKIE['AURSID']); - $f_email = email_from_sid($_COOKIE['AURSID']); - $f_uid = uid_from_sid($_COOKIE['AURSID']); - $q = "SELECT Packages.Name, Users.Email, Packages.ID "; - $q.= "FROM Packages, Users "; - $q.= "WHERE Packages.ID IN (" . $flag .") "; - $q.= "AND Users.ID = Packages.MaintainerUID "; - $q.= "AND Users.ID != " . $f_uid; - $result = db_query($q, $dbh); - if (mysql_num_rows($result)) { - while ($row = mysql_fetch_assoc($result)) { - # construct email - $body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . ". You may view your package at:\nhttp://aur.archlinux.org/packages.php?do_Details=1&ID=" . $row['ID']; - $body = wordwrap($body, 70); - $headers = "To: ".$row['Email']."\nReply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n"; - @mail(' ', "AUR Out-of-date Notification for ".$row['Name'], $body, $headers); - } - } - - } else { - print "<p>\n"; - print __("You did not select any packages to flag."); - print "</p>\n"; - } - } - + print "<p>"; + print pkg_flag($atype, $ids, True); + print "</p>"; } elseif ($_POST['action'] == "do_UnFlag" || isset($_POST['do_UnFlag'])) { - if (!$atype) { - print __("You must be logged in before you can unflag packages."); - print "<br />\n"; - - } else { - - if (!empty($ids)) { - $dbh = db_connect(); - - # Un-Flag the packages in $ids array - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if ($first) { - $first = 0; - $unflag = $pid; - } else { - $unflag .= ", ".$pid; - } - } - $q = "UPDATE Packages SET OutOfDate = 0 "; - $q.= "WHERE ID IN (" . $unflag . ")"; - db_query($q, $dbh); - - print "<p>\n"; - print __("The selected packages have been unflagged."); - print "</p>\n"; - } else { - print "<p>\n"; - print __("You did not select any packages to unflag."); - print "</p>\n"; - } - - - } - + print "<p>"; + print pkg_flag($atype, $ids, False); + print "</p>"; } elseif ($_POST['action'] == "do_Disown" || isset($_POST['do_Disown'])) { - if (!$atype) { - print __("You must be logged in before you can disown packages."); - print "<br />\n"; - - } else { - # Disown the packages in $ids array - # - if (!empty($ids)) { - $dbh = db_connect(); - - # Disown the packages in $ids array - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if ($first) { - $first = 0; - $disown = $pid; - } else { - $disown .= ", ".$pid; - } - } - - $field = "MaintainerUID"; - $q = "UPDATE Packages "; - $q.= "SET ".$field." = 0 "; - $q.= "WHERE ID IN (" . $disown . ") "; - # If a user is a TU or dev they can disown any package - if ($atype == "User") { - $q.= "AND ".$field." = ".uid_from_sid($_COOKIE["AURSID"]); - } - db_query($q, $dbh); - - print "<p>\n"; - print __("The selected packages have been disowned."); - print "</p>\n"; - } else { - print "<p>\n"; - print __("You did not select any packages to disown."); - print "</p>\n"; - } - - - } - - + print "<p>"; + print pkg_adopt($atype, $ids, False); + print "</p>"; } elseif ($_POST['action'] == "do_Delete" || isset($_POST['do_Delete'])) { - if (!$atype) { - print __("You must be logged in before you can disown packages."); - print "<br />\n"; - } else { - # Delete the packages in $ids array (but only if they are Unsupported) - # - if (!empty($ids)) { - $dbh = db_connect(); - - # Delete the packages in $ids array - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if ($first) { - $first = 0; - $delete = $pid; - } else { - $delete .= ", ".$pid; - } - } - - $field = "MaintainerUID"; - - # Only grab Unsupported packages that "we" own or are not owned at all - # - $ids_to_delete = array(); - $q = "SELECT Packages.ID FROM Packages, PackageLocations "; - $q.= "WHERE Packages.ID IN (" . $delete . ") "; - $q.= "AND Packages.LocationID = PackageLocations.ID "; - $q.= "AND PackageLocations.Location = 'unsupported' "; - # If they're a TU or dev, can always delete, otherwise check ownership - # - if ($atype == "Trusted User" || $atype == "Developer") { - $result = db_query($q, $dbh); - } - if ($result != Null && mysql_num_rows($result) > 0) { - while ($row = mysql_fetch_assoc($result)) { - $ids_to_delete[] = $row['ID']; - } - } - if (!empty($ids_to_delete)) { - # These are the packages that are safe to delete - # - foreach ($ids_to_delete as $id) { - # delete from PackageVotes - $q = "DELETE FROM PackageVotes WHERE PackageID = " . $id; - $result = db_query($q, $dbh); - - # delete from PackageDepends - $q = "DELETE FROM PackageDepends WHERE PackageID = " . $id; - $result = db_query($q, $dbh); - - # delete from PackageSources - $q = "DELETE FROM PackageSources WHERE PackageID = " . $id; - $result = db_query($q, $dbh); - - # delete from PackageComments - $q = "DELETE FROM PackageComments WHERE PackageID = " . $id; - $result = db_query($q, $dbh); - - # delete from Packages - $q = "DELETE FROM Packages WHERE ID = " . $id; - $result = db_query($q, $dbh); - - # delete from CommentNotify - $q = "DELETE FROM CommentNotify WHERE PkgID = " . $id; - $result = db_query($q, $dbh); - - # Print the success message - print "<p>\n"; - print __("The selected packages have been deleted."); - print "</p>\n"; - } - } else { - print "<p>\n"; - print __("None of the selected packages could be deleted."); - print "</p>\n"; - } # end if (!empty($ids_to_delete)) - } else { - print "<p>\n"; - print __("You did not select any packages to delete."); - print "</p>\n"; - } # end if (!empty($ids)) - } # end if (!atype) - + print "<p>"; + print pkg_delete($atype, $ids, False); + print "</p>"; } elseif ($_POST['action'] == "do_Adopt" || isset($_POST['do_Adopt'])) { - if (!$atype) { - print __("You must be logged in before you can adopt packages."); - print "<br />\n"; - - } else { - # Adopt the packages in $ids array - # - if (!empty($ids)) { - $dbh = db_connect(); - - # Adopt the packages in $ids array - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if ($first) { - $first = 0; - $adopt = $pid; - } else { - $adopt .= ", ".$pid; - } - } - - $field = "MaintainerUID"; - # NOTE: Only "orphaned" packages can be adopted at a particular - # user class (TU/Dev or User). - # - $q = "UPDATE Packages "; - $q.= "SET ".$field." = ".uid_from_sid($_COOKIE["AURSID"])." "; - $q.= "WHERE ID IN (" . $adopt . ") "; - if ($atype == "User") - { - # Regular users may only adopt orphan packages from unsupported - # FIXME: We assume that LocationID for unsupported is "2" - $q.= "AND ".$field." = 0"; - $q.= " AND LocationID = 2"; - } - db_query($q, $dbh); - - print "<p>\n"; - print __("The selected packages have been adopted."); - print "</p>\n"; - } else { - print "<p>\n"; - print __("You did not select any packages to adopt."); - print "</p>\n"; - } - } - - + print "<p>"; + print pkg_adopt($atype, $ids, True); + print "</p>"; } elseif ($_POST['action'] == "do_Vote" || isset($_POST['do_Vote'])) { - if (!$atype) { - print __("You must be logged in before you can vote for packages."); - print "<br />\n"; - - } else { - # vote on the packages in $ids array. - # - if (!empty($ids)) { - $dbh = db_connect(); - $my_votes = pkgvotes_from_sid($_COOKIE["AURSID"]); - $uid = uid_from_sid($_COOKIE["AURSID"]); - # $vote_ids will contain the string of Package.IDs that - # the visitor hasn't voted for already - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if (!isset($my_votes[$pid])) { - # cast a vote for this package - # - if ($first) { - $first = 0; - $vote_ids = $pid; - $vote_clauses = "(".$uid.", ".$pid.")"; - } else { - $vote_ids .= ", ".$pid; - $vote_clauses .= ", (".$uid.", ".$pid.")"; - } - } - } - # only vote for packages the user hasn't already voted for - # - $q = "UPDATE Packages SET NumVotes = NumVotes + 1 "; - $q.= "WHERE ID IN (".$vote_ids.")"; - db_query($q, $dbh); - - $q = "INSERT INTO PackageVotes (UsersID, PackageID) VALUES "; - $q.= $vote_clauses; - db_query($q, $dbh); - - # Update the LastVoted field for this user - # - $q = "UPDATE Users SET LastVoted = UNIX_TIMESTAMP() "; - $q.= "WHERE ID = ".$uid; - db_query($q, $dbh); - - print "<p>\n"; - print __("Your votes have been cast for the selected packages."); - print "</p>\n"; - - } else { - print "<p>\n"; - print __("You did not select any packages to vote for."); - print "</p>\n"; - } - } - - + print "<p>"; + print pkg_vote($atype, $ids, True); + print "</p>"; } elseif ($_POST['action'] == "do_UnVote" || isset($_POST['do_UnVote'])) { - if (!$atype) { - print __("You must be logged in before you can un-vote for packages."); - print "<br />\n"; - - } else { - # un-vote on the packages in $ids array. - # - if (!empty($ids)) { - $dbh = db_connect(); - $my_votes = pkgvotes_from_sid($_COOKIE["AURSID"]); - $uid = uid_from_sid($_COOKIE["AURSID"]); - # $unvote_ids will contain the string of Package.IDs that - # the visitor has voted for and wants to unvote. - # - $first = 1; - while (list($pid, $v) = each($ids)) { - if (isset($my_votes[$pid])) { - # cast a un-vote for this package - # - if ($first) { - $first = 0; - $unvote_ids = $pid; - } else { - $unvote_ids .= ", ".$pid; - } - } - } - # only un-vote for packages the user has already voted for - # - $q = "UPDATE Packages SET NumVotes = NumVotes - 1 "; - $q.= "WHERE ID IN (".$unvote_ids.")"; - db_query($q, $dbh); - - $q = "DELETE FROM PackageVotes WHERE UsersID = ".$uid." "; - $q.= "AND PackageID IN (".$unvote_ids.")"; - db_query($q, $dbh); - - print "<p>\n"; - print __("Your votes have been removed from the selected packages."); - print "</p>\n"; - - } else { - print "<p>\n"; - print __("You did not select any packages to un-vote for."); - print "</p>\n"; - } - } - - + print "<p>"; + print pkg_vote($atype, $ids, False); + print "</p>"; } elseif (isset($_GET["ID"])) { if (!intval($_GET["ID"])) { diff --git a/web/html/pkgedit.php b/web/html/pkgedit.php index 610113a5..974f14bd 100644 --- a/web/html/pkgedit.php +++ b/web/html/pkgedit.php @@ -91,7 +91,7 @@ if ($_REQUEST["add_Comment"]) { #TODO: native language emails for users, based on their prefs # Simply making these strings translatable won't work, users would be # getting emails in the language that the user who posted the comment was in - $body = "A comment has been added to ".$row['Name'].", you may view it at:\nhttp://aur.archlinux.org/packages.php?ID=".$_REQUEST["ID"]."\n\n\n---\nYou received this e-mail because you chose to recieve notifications of new comments on this package, if you no longer wish to recieve notifications about this package, please go the the above package page and click the UnNotify button."; + $body = "A comment has been added to ".$row['Name']." by " . username_from_sid($_COOKIE["AURSID"]) . ", you may view it at:\nhttp://aur.archlinux.org/packages.php?ID=".$_REQUEST["ID"]."\n\n\"" . $_POST['comment'] . "\"\n\n---\nYou received this e-mail because you chose to receive notifications of new comments on this package, if you no longer wish to recieve notifications about this package, please go the the above package page and click the UnNotify button."; $body = wordwrap($body, 70); $bcc = implode(', ', $bcc); $headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n"; diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index abd66140..c38e224d 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -12,25 +12,14 @@ include("pkgfuncs.inc"); # package functions set_lang(); # this sets up the visitor's language check_sid(); # see if they're still logged in -html_header("Submit"); - -?> - -<div class="pgbox"> - <div class="pgboxtitle"> - <span class="f3"><?php print __("Submit"); ?></span> - </div> - <div class="pgboxbody"> - -<?php if ($_COOKIE["AURSID"]): - + # Track upload errors $error = ""; if ($_REQUEST["pkgsubmit"]) { - + # Before processing, make sure we even have a file if ($_FILES['pfile']['size'] == 0){ $error = __("Error - No file uploaded"); @@ -48,30 +37,30 @@ if ($_COOKIE["AURSID"]): $error = __("Could not change directory to %s.", array($tempdir)); } else { - if ($_FILES['pfile']['name'] == "PKGBUILD") { - move_uploaded_file($_FILES['pfile']['tmp_name'], $tempdir . "/PKGBUILD"); - } else { - $tar = new Archive_Tar($_FILES['pfile']['tmp_name']); - $extract = $tar->extract(); - - if (!$extract) { - $error = __("Unknown file format for uploaded file."); - } - } + if ($_FILES['pfile']['name'] == "PKGBUILD") { + move_uploaded_file($_FILES['pfile']['tmp_name'], $tempdir . "/PKGBUILD"); + } else { + $tar = new Archive_Tar($_FILES['pfile']['tmp_name']); + $extract = $tar->extract(); + + if (!$extract) { + $error = __("Unknown file format for uploaded file."); + } + } } } } # Find the PKGBUILD if (!$error) { - $pkgbuild = File_Find::search('PKGBUILD', $tempdir); - - if (count($pkgbuild)) { - $pkgbuild = $pkgbuild[0]; - $pkg_dir = dirname($pkgbuild); - } else { - $error = __("Error trying to unpack upload - PKGBUILD does not exist."); - } + $pkgbuild = File_Find::search('PKGBUILD', $tempdir); + + if (count($pkgbuild)) { + $pkgbuild = $pkgbuild[0]; + $pkg_dir = dirname($pkgbuild); + } else { + $error = __("Error trying to unpack upload - PKGBUILD does not exist."); + } } # if no error, get list of directory contents and process PKGBUILD @@ -121,7 +110,7 @@ if ($_COOKIE["AURSID"]): fclose($fp); # Now process the lines and put any var=val lines into the - # 'pkgbuild' array. Also check to make sure it has the build() + # 'pkgbuild' array. Also check to make sure it has the build() # function. # $seen_build_function = 0; @@ -136,13 +125,13 @@ if ($_COOKIE["AURSID"]): $lparts[1]{strlen($lparts[1])-1} == '"') { $pkgbuild[$lparts[0]] = substr($lparts[1], 1, -1); } - elseif + elseif ($lparts[1]{0} == "'" && $lparts[1]{strlen($lparts[1])-1} == "'") { $pkgbuild[$lparts[0]] = substr($lparts[1], 1, -1); } else { $pkgbuild[$lparts[0]] = $lparts[1]; - } + } } else { $pkgbuild[$lparts[0]] = str_replace(array("(",")","\"","'"), "", $lparts[1]); @@ -163,20 +152,20 @@ if ($_COOKIE["AURSID"]): if (!$seen_build_function) { $error = __("Missing build function in PKGBUILD."); } - + $req_vars = array("md5sums", "source", "url", "pkgdesc", "license", "pkgrel", "pkgver", "arch", "pkgname"); foreach ($req_vars as $var) { - if (!array_key_exists($var, $pkgbuild)) { - $error = __("Missing " . $var . " variable in PKGBUILD."); - } - } + if (!array_key_exists($var, $pkgbuild)) { + $error = __("Missing " . $var . " variable in PKGBUILD."); + } + } } # TODO This is where other additional error checking can be - # performed. Examples: #md5sums == #sources?, md5sums of any + # performed. Examples: #md5sums == #sources?, md5sums of any # included files match?, install scriptlet file exists? # - + # Check for http:// or other protocol in url # if (!$error) { @@ -185,7 +174,7 @@ if ($_COOKIE["AURSID"]): $error = __("Package URL is missing a protocol (ie. http:// ,ftp://)"); } } - + # Now, run through the pkgbuild array and do any $pkgname/$pkgver # substituions. # @@ -208,9 +197,9 @@ if ($_COOKIE["AURSID"]): $pkg_name = str_replace("'", "", $pkgbuild['pkgname']); $pkg_name = escapeshellarg($pkg_name); $pkg_name = str_replace("'", "", $pkg_name); - + $presult = preg_match("/^[a-z0-9][a-z0-9\.+_-]*$/", $pkg_name); - + if (!$presult) { $error = __("Invalid name: only lowercase letters are allowed."); } @@ -226,18 +215,14 @@ if ($_COOKIE["AURSID"]): } if (!@mkdir(INCOMING_DIR . $pkg_name)) { - $error = __( "Could not create directory %s." - , INCOMING_DIR . $pkg_name - ); + $error = __( "Could not create directory %s.", + INCOMING_DIR . $pkg_name); } - rename($pkg_dir, INCOMING_DIR . $pkg_name . "/" . $pkg_name); + rename($pkg_dir, INCOMING_DIR . $pkg_name . "/" . $pkg_name); } else { - $error = __( "You are not allowed to overwrite the %h%s%h package." - , "<b>" - , $pkg_name - , "</b>" - ); + $error = __( "You are not allowed to overwrite the %h%s%h package.", + "<b>", $pkg_name, "</b>"); } } @@ -248,16 +233,16 @@ if ($_COOKIE["AURSID"]): array(INCOMING_DIR . $pkg_name)); } } - + if (!$error) { - $tar = new Archive_Tar($pkg_name . '.tar.gz'); - $create = $tar->create(array($pkg_name)); - + $tar = new Archive_Tar($pkg_name . '.tar.gz'); + $create = $tar->create(array($pkg_name)); + if (!$create) { $error = __("Could not re-tar"); } } - + # Whether it failed or not we can clean this out if (file_exists($tempdir)) { rm_rf($tempdir); @@ -265,13 +250,13 @@ if ($_COOKIE["AURSID"]): # Update the backend database if (!$error) { - + $dbh = db_connect(); - + # This is an overwrite of an existing package, the database ID - # needs to be preserved so that any votes are retained. However, + # needs to be preserved so that any votes are retained. However, # PackageDepends and PackageSources can be purged. - + $q = "SELECT * FROM Packages WHERE Name = '" . mysql_real_escape_string($new_pkgbuild['pkgname']) . "'"; $result = db_query($q, $dbh); $pdata = mysql_fetch_assoc($result); @@ -286,53 +271,52 @@ if ($_COOKIE["AURSID"]): # If the package was a dummy, undummy it if ($pdata['DummyPkg']) { - $q = sprintf( "UPDATE Packages SET DummyPkg = 0, SubmitterUID = %d, MaintainerUID = %d, SubmittedTS = UNIX_TIMESTAMP() WHERE ID = %d" - , uid_from_sid($_COOKIE["AURSID"]) - , uid_from_sid($_COOKIE["AURSID"]) - , $pdata["ID"] - ); + $q = sprintf( "UPDATE Packages SET DummyPkg = 0, SubmitterUID = %d, MaintainerUID = %d, SubmittedTS = UNIX_TIMESTAMP() WHERE ID = %d", + uid_from_sid($_COOKIE["AURSID"]), + uid_from_sid($_COOKIE["AURSID"]), + $pdata["ID"]); - db_query($q, $dbh); + db_query($q, $dbh); } - + # If a new category was chosen, change it to that if ($_POST['category'] > 1) { - $q = sprintf( "UPDATE Packages SET CategoryID = %d WHERE ID = %d" - , mysql_real_escape_string($_REQUEST['category']) - , $pdata["ID"] - ); - - db_query($q, $dbh); - } - + $q = sprintf( "UPDATE Packages SET CategoryID = %d WHERE ID = %d", + mysql_real_escape_string($_REQUEST['category']), + $pdata["ID"]); + + db_query($q, $dbh); + } + # Update package data - $q = sprintf( "UPDATE Packages SET ModifiedTS = UNIX_TIMESTAMP(), Name = '%s', Version = '%s-%s', License = '%s', Description = '%s', URL = '%s', LocationID = 2, FSPath = '%s', URLPath = '%s', OutOfDate = 0 WHERE ID = %d" - , mysql_real_escape_string($new_pkgbuild['pkgname']) - , mysql_real_escape_string($new_pkgbuild['pkgver']) - , mysql_real_escape_string($new_pkgbuild['pkgrel']) - , mysql_real_escape_string($new_pkgbuild['license']) - , mysql_real_escape_string($new_pkgbuild['pkgdesc']) - , mysql_real_escape_string($new_pkgbuild['url']) - , mysql_real_escape_string(INCOMING_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz") - , mysql_real_escape_string(URL_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz") - , $pdata["ID"] - ); - + $q = sprintf("UPDATE Packages SET ModifiedTS = UNIX_TIMESTAMP(), Name = '%s', Version = '%s-%s', License = '%s', Description = '%s', URL = '%s', LocationID = 2, FSPath = '%s', URLPath = '%s', OutOfDate = 0 WHERE ID = %d", + mysql_real_escape_string($new_pkgbuild['pkgname']), + mysql_real_escape_string($new_pkgbuild['pkgver']), + mysql_real_escape_string($new_pkgbuild['pkgrel']), + mysql_real_escape_string($new_pkgbuild['license']), + mysql_real_escape_string($new_pkgbuild['pkgdesc']), + mysql_real_escape_string($new_pkgbuild['url']), + mysql_real_escape_string(INCOMING_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz"), + mysql_real_escape_string(URL_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz"), + $pdata["ID"]); + db_query($q, $dbh); # Update package depends $depends = explode(" ", $new_pkgbuild['depends']); - foreach ($depends as $dep) { + foreach ($depends as $dep) { $q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES ("; $deppkgname = preg_replace("/[<>]?=.*/", "", $dep); - $depcondition = str_replace($deppkgname, "", $dep); - - if ($deppkgname == "#") { break; } - + $depcondition = str_replace($deppkgname, "", $dep); + + if ($deppkgname == "#") { + break; + } + $deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']); - $q .= $pdata["ID"] . ", " . $deppkgid . ", '" . mysql_real_escape_string($depcondition) . "')"; + $q .= $pdata["ID"] . ", " . $deppkgid . ", '" . mysql_real_escape_string($depcondition) . "')"; - db_query($q, $dbh); + db_query($q, $dbh); } # Insert sources @@ -341,24 +325,25 @@ if ($_COOKIE["AURSID"]): $q = "INSERT INTO PackageSources (PackageID, Source) VALUES ("; $q .= $pdata["ID"] . ", '" . mysql_real_escape_string($src) . "')"; db_query($q, $dbh); - } - + } + + header('Location: packages.php?ID=' . $pdata['ID']); + } else { - + # This is a brand new package - $q = sprintf( "INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, LocationID, SubmittedTS, SubmitterUID, MaintainerUID, FSPath, URLPath) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', 2, UNIX_TIMESTAMP(), %d, %d, '%s', '%s')" - , mysql_real_escape_string($new_pkgbuild['pkgname']) - , mysql_real_escape_string($new_pkgbuild['license']) - , mysql_real_escape_string($new_pkgbuild['pkgver']) - , mysql_real_escape_string($new_pkgbuild['pkgrel']) - , mysql_real_escape_string($_REQUEST['category']) - , mysql_real_escape_string($new_pkgbuild['pkgdesc']) - , mysql_real_escape_string($new_pkgbuild['url']) - , uid_from_sid($_COOKIE["AURSID"]) - , uid_from_sid($_COOKIE["AURSID"]) - , mysql_real_escape_string(INCOMING_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz") - , mysql_real_escape_string(URL_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz") - ); + $q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, LocationID, SubmittedTS, SubmitterUID, MaintainerUID, FSPath, URLPath) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', 2, UNIX_TIMESTAMP(), %d, %d, '%s', '%s')", + mysql_real_escape_string($new_pkgbuild['pkgname']), + mysql_real_escape_string($new_pkgbuild['license']), + mysql_real_escape_string($new_pkgbuild['pkgver']), + mysql_real_escape_string($new_pkgbuild['pkgrel']), + mysql_real_escape_string($_REQUEST['category']), + mysql_real_escape_string($new_pkgbuild['pkgdesc']), + mysql_real_escape_string($new_pkgbuild['url']), + uid_from_sid($_COOKIE["AURSID"]), + uid_from_sid($_COOKIE["AURSID"]), + mysql_real_escape_string(INCOMING_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz"), + mysql_real_escape_string(URL_DIR . $pkg_name . "/" . $pkg_name . ".tar.gz")); $result = db_query($q, $dbh); $packageID = mysql_insert_id($dbh); @@ -369,12 +354,14 @@ if ($_COOKIE["AURSID"]): $q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES ("; $deppkgname = preg_replace("/[<>]?=.*/", "", $dep); $depcondition = str_replace($deppkgname, "", $dep); - - if ($deppkgname == "#") { break; } - - $deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']); - $q .= $packageID . ", " . $deppkgid . ", '" . mysql_real_escape_string($depcondition) . "')"; - + + if ($deppkgname == "#") { + break; + } + + $deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']); + $q .= $packageID . ", " . $deppkgid . ", '" . mysql_real_escape_string($depcondition) . "')"; + db_query($q, $dbh); } @@ -384,15 +371,29 @@ if ($_COOKIE["AURSID"]): $q = "INSERT INTO PackageSources (PackageID, Source) VALUES ("; $q .= $packageID . ", '" . mysql_real_escape_string($src) . "')"; db_query($q, $dbh); - } - + } + + header('Location: packages.php?ID=' . $packageID); + } } chdir($_SERVER['DOCUMENT_ROOT']); } +# Logic over, let's do some output + +html_header("Submit"); +?> + +<div class="pgbox"> + <div class="pgboxtitle"> + <span class="f3"><?php print __("Submit"); ?></span> + </div> + <div class="pgboxbody"> + +<?php if (!$_REQUEST["pkgsubmit"] || $error): # User is not uploading, or there were errors uploading - then # give the visitor the default upload form @@ -405,15 +406,7 @@ if ($_COOKIE["AURSID"]): <?php endif; - if ($warning): -?> - -<br><span class='error'><?php print $warning; ?></span><br /> -<br /> -<?php - endif; - $pkg_categories = pkgCategories(); $pkg_locations = pkgLocations(); ?> @@ -461,17 +454,6 @@ if ($_COOKIE["AURSID"]): <?php endif; - else: - print __("Package upload successful."); - - if ($warning): -?> - -<span class='warning'><?php print $warning; ?></span><br /> -<br /> - -<?php - endif; endif; else: # Visitor is not logged in @@ -479,15 +461,14 @@ else: ?> <br /> - + <?php endif; ?> - </div> + </div> </div> <?php html_footer(AUR_VERSION); -?> diff --git a/web/html/testpo.php b/web/html/testpo.php deleted file mode 100644 index a8a63375..00000000 --- a/web/html/testpo.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); - -# This is a sample script to demonstrate how the AUR will -# handle i18n. Note: When the PHP script is finished, and -# has the proper include file (see below), and the __() -# function has been used (see below), use the web/utils/genpopo -# script to parse the PHP script and pull out the text -# that requires translation and puts the mapping into the -# include file. -# - -# Each AUR PHP script that requires i18n support, needs to -# define an 'xxx_po.inc' file where the i18n mapping will -# reside. -# -include("test_po.inc"); - - -# Use the __() function to identify text that requires -# translation to other languages. The examples below -# show how to use %-substitution. -# -print "<html><body bgcolor='white'>\n"; - -print "<p>\n"; -print __("Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h.", - array("<a href='".$_SERVER['PHP_SELF']."?LANG=en'>","English","</a>", - "<a href='".$_SERVER['PHP_SELF']."?LANG=es'>","Espa�ol","</a>", - "<a href='".$_SERVER['PHP_SELF']."?LANG=de'>","Deutsch","</a>", - "<a href='".$_SERVER['PHP_SELF']."?LANG=fr'>","Fran�ais","</a>")); -print "</p>\n"; - -print "<p>\n"; -print __("My current language tag is: '%s'.", array($LANG)); -print "</p>\n"; - -print "<ul>\n"; -print __("Hello, world!")."<br />\n"; -print __("Hello, again!")."<br />\n"; -print "</ul>\n"; -print "</body>\n</html>"; - -?> diff --git a/web/html/tu.php b/web/html/tu.php index 524e14d8..67ac3f2f 100644 --- a/web/html/tu.php +++ b/web/html/tu.php @@ -2,50 +2,36 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); -include("pkgfuncs_po.inc"); +include("tu_po.inc"); include("aur.inc"); set_lang(); check_sid(); html_header(); -# get login privileges -# +# Default votes per page +$pp = 5; + +$atype = ""; if (isset($_COOKIE["AURSID"])) { - # Only logged in users can do stuff - # $atype = account_from_sid($_COOKIE["AURSID"]); -} else { - $atype = ""; } if ($atype == "Trusted User" OR $atype == "Developer") { - # Show the TU interface - # - - # Temp value for results per page $pp = 5; - if (isset($_REQUEST['id'])) { - # Show application details - # depending on action and time frame will show either - # sponsor button, comments and vote buttons - # - - if (intval($_REQUEST['id'])) { + if (isset($_GET['id'])) { + if (is_numeric($_GET['id'])) { $q = "SELECT * FROM TU_VoteInfo "; - $q.= "WHERE ID = " . $_REQUEST['id']; + $q.= "WHERE ID = " . $_GET['id']; $dbh = db_connect(); $results = db_query($q, $dbh); $row = mysql_fetch_assoc($results); if (empty($row)) { - print "Could not retrieve proposal details.\n"; + print __("Could not retrieve proposal details."); } else { - # Print out application details, thanks again AUR - # - $isrunning = $row['End'] > time() ? 1 : 0; $qvoted = "SELECT * FROM TU_Votes WHERE "; @@ -53,30 +39,27 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $qvoted.= "UserID = " . uid_from_sid($_COOKIE["AURSID"]); $hasvoted = mysql_num_rows(db_query($qvoted, $dbh)); - # Can this person vote? - # - $canvote = 1; // we assume they can - $errorvote = ""; // error message to give + $canvote = 1; + $errorvote = ""; if ($isrunning == 0) { $canvote = 0; - $errorvote = "Voting is closed for this proposal."; + $errorvote = __("Voting is closed for this proposal."); } else if ($row['User'] == username_from_sid($_COOKIE["AURSID"])) { $canvote = 0; - $errorvote = "You cannot vote in an proposal regarding you."; + $errorvote = __("You cannot vote in an proposal about you."); } else if ($hasvoted != 0) { $canvote = 0; - $errorvote = "You've already voted in this proposal."; + $errorvote = __("You've already voted in this proposal."); } - # have to put this here so results are correct immediately after voting if ($canvote == 1) { if (isset($_POST['doVote'])) { if (isset($_POST['voteYes'])) { - $myvote = "Yes"; + $myvote = __("Yes"); } else if (isset($_POST['voteNo'])) { - $myvote = "No"; + $myvote = __("No"); } else if (isset($_POST['voteAbstain'])) { - $myvote = "Abstain"; + $myvote = __("Abstain"); } $qvote = "UPDATE TU_VoteInfo SET " . $myvote . " = " . ($row[$myvote] + 1) . " WHERE ID = " . $row['ID']; @@ -87,7 +70,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") { # Can't vote anymore # $canvote = 0; - $errorvote = "You've already voted for this proposal."; + $errorvote = __("You've already voted for this proposal."); # Update if they voted $hasvoted = mysql_num_rows(db_query($qvoted, $dbh)); @@ -95,357 +78,76 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $row = mysql_fetch_assoc($results); } } - - # I think I understand why MVC is good for this stuff.. - echo "<div class=\"pgbox\">\n"; - echo " <div class=\"pgboxtitle\"><span class=\"f3\">Proposal Details</span></div>\n"; - echo " <div class=\"pgboxbody\">\n"; - - if ($isrunning == 1) { - print "<div style='text-align: center; font-weight: bold; color: red'>This vote is still running.</div>"; - print "<br />"; - } - - print "User: <b>"; - - if (!empty($row['User'])) { - print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>" . $row['User'] . "</a>"; - } else { - print "N/A"; - } - - print "</b><br />\n"; - - print "Submitted: <b>" . gmdate("r", $row['Submitted']) . "</b> by "; - print "<b>" . username_from_id($row['SubmitterID']) . "</b><br />\n"; - - if ($isrunning == 0) { - print "Ended: "; - } else { - print "Ends: "; - } - print "<b>" . gmdate("r", $row['End']) . "</b><br />\n"; - - print "<br />\n"; - - $row['Agenda'] = htmlentities($row['Agenda']); - # str_replace seems better than <pre> because it still maintains word wrapping - print str_replace("\n", "<br />\n", $row['Agenda']); - - print "<br />\n"; - print "<br />\n"; - - print "<center>\n"; - print "<table cellspacing='3' class='boxSoft' style='width: 50%'>\n"; - print "</tr>\n"; - print "<tr>\n"; - print " <td class='boxSoft'>\n"; - print "<table width='100%' cellspacing='0' cellpadding='2'>\n"; - - print "<tr>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Yes"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "No"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Abstain"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Total"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Voted?"; - print "</span></th>\n"; - print "</tr>\n"; - - $c = "data1"; - - print "<tr>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print $row['Yes']; - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print $row['No']; - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print $row['Abstain']; - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print ($row['Yes'] + $row['No'] + $row['Abstain']); - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - - if ($hasvoted == 0) { - print "<span style='color: red; font-weight: bold'>No</span>"; - } else { - print "<span style='color: green; font-weight: bold'>Yes</span>"; - } - - print "</span></span></td>\n"; - print "</tr>\n"; - - print "</table>\n"; - print "</table>\n"; - - echo "</div></div>\n"; - - # Actions, vote buttons - # - print "<br />\n"; - print "<div class='pgbox'>\n"; - print "<div class='pgboxtitle'><span class='f3'>Vote Actions</span></div>\n"; - print "<div class='pgboxbody'>\n"; - - if ($canvote == 1) { - print "<center><form action='tu.php?id=" . $row['ID'] . "' method='post'>\n"; - print "<input type='submit' class='button' name='voteYes' value='Yes'>\n"; - print "<input type='submit' class='button' name='voteNo' value='No'>\n"; - print "<input type='submit' class='button' name='voteAbstain' value='Abstain'>\n"; - print "<input type='hidden' name='doVote' value='1'>\n"; - print "</form></center>\n"; - } else { - print "<center>$errorvote</center>"; - } - - print "</div></div>\n"; - print "<br /><center><a href='tu.php'>Back</a></center>\n"; - + include("tu_details.php"); } - } else { - print "Vote ID not valid.\n"; + print __("Vote ID not valid."); } } else { - # page listing applications being discussed, voted on and all those finished - # - - # I guess there should be a function since I use this a few times - function gen_results($offset, $limit, $sort, $by, $type="normal") { - - $dbh = db_connect(); - - if (!empty($offset) AND is_numeric($offset)) { - if ($offset >= 1) { - $off = $offset; - } else { - $off = 0; - } - } else { - $off = 0; - } - - $q = "SELECT * FROM TU_VoteInfo"; - - if ($type == "new") { - $q.= " WHERE End > " . time(); - $application = "Current Votes"; - } else { - $application = "All Votes"; - } - - $order = ($by == 'down') ? 'DESC' : 'ASC'; - - # not much to sort, I'm unsure how to sort by username - # when we only store the userid, someone come up with a nifty - # way to do this - # - switch ($sort) { - case 'sub': - $q.= " ORDER BY Submitted $order"; - break; - default: - $q.= " ORDER BY Submitted $order"; - break; - } - - if ($limit != 0) { - $q.= " LIMIT " . $off . ", ". $limit; - } - - $result = db_query($q, $dbh); - - if ($by == "down") { - $by_next = "up"; - } else { - $by_next = "down"; - } - - print "<center>\n"; - print "<table cellspacing='3' class='boxSoft'>\n"; - print "<tr>\n"; - print " <td class='boxSoftTitle' align='right'>\n"; - print " <span class='f3'>$application</span>\n"; - print " </td>\n"; - print "</tr>\n"; - print "<tr>\n"; - print " <td class='boxSoft'>\n"; - print "<table width='100%' cellspacing='0' cellpadding='2'>\n"; - - print "<tr>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Proposal"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "<a href='?off=$off&sort=sub&by=$by_next'>Start</a>"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "End"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "User"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Yes"; - print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "No"; - print "</span></th>\n"; -# I'm not sure if abstains are necessary inthis view, it's just extra clutter -# print " <th style='border-bottom: #666 1px solid; vertical-align:"; -# print " bottom'><span class='f2'>"; -# print "Abstain"; -# print "</span></th>\n"; - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>"; - print "Voted?"; - print "</span></th>\n"; - print "</tr>\n"; - - if (mysql_num_rows($result) == 0) { - print "<tr><td align='center' colspan='0'>No results found.</td></tr>\n"; - } else { - for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { - # Thankyou AUR - - # alright, I'm going to just have a "new" table and the - # "old" table can just have every vote, works just as well - # and probably saves on doing some crap - # - - (($i % 2) == 0) ? $c = "data1" : $c = "data2"; - print "<tr>\n"; - print " <td class='".$c."'><span class='f4'><span class='blue'>"; - - $prev_Len = 100; - - if (strlen($row["Agenda"]) >= $prev_Len) { - $row["Agenda"] = htmlentities(substr($row["Agenda"], 0, $prev_Len)) . "... -"; - } else { - $row["Agenda"] = htmlentities($row["Agenda"]) . " -"; - } - - print $row["Agenda"]; - print " <a href='/tu.php?id=" . $row['ID'] . "'>[More]</a>"; - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - # why does the AUR use gmdate with formatting that includes the offset - # to GMT?! - print gmdate("j M y", $row["Submitted"]); - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print gmdate("j M y", $row["End"]); - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f6'><span class='blue'>"; - - if (!empty($row['User'])) { - print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>"; - print $row['User'] . "</a>"; - } else { - print "N/A"; - } - - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print $row['Yes']; - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - print $row['No']; - print "</span></span></td>\n"; - print " <td class='".$c."'><span class='f5'><span class='blue'>"; - # See above - # print $row['Abstain']; - # print "</span></span></td>\n"; - # print " <td class='".$c."'><span class='f5'><span class='blue'>"; - - $qvoted = "SELECT * FROM TU_Votes WHERE "; - $qvoted.= "VoteID = " . $row['ID'] . " AND "; - $qvoted.= "UserID = " . uid_from_sid($_COOKIE["AURSID"]); - $hasvoted = mysql_num_rows(db_query($qvoted, $dbh)); - - if ($hasvoted == 0) { - print "<span style='color: red; font-weight: bold'>No</span>"; - } else { - print "<span style='color: green; font-weight: bold'>Yes</span>"; - } - - print "</span></span></td>\n"; - print "</tr>\n"; - } - } + $dbh = db_connect(); - print "</table>\n"; - print "</table>\n"; + $offset = $_GET['off']; + $limit = $pp; + $by = $_GET['by']; - if ($type == "old" AND $limit != 0) { - $qnext = "SELECT ID FROM TU_VoteInfo"; - $nextresult = db_query($qnext, $dbh); + if (!empty($offset) AND is_numeric($offset)) { + if ($offset >= 1) { + $off = $offset; + } else { + $off = 0; + } + } else { + $off = 0; + } - print "<table style='width: 90%'>\n"; + $order = ($by == 'down') ? 'DESC' : 'ASC'; + $lim = ($limit > 0) ? " LIMIT " . $off . ", " . $limit : ""; + $by_next = ($by == "down") ? "up" : "down"; - if (mysql_num_rows($result)) { - $sort = htmlentities($sort, ENT_QUOTES); - $by = htmlentities($by, ENT_QUOTES); + $prev_Len = 100; - print "<tr>\n"; - print "<td align='left'>\n"; - if ($off != 0) { - $back = (($off - $limit) <= 0) ? 0 : $off - $limit; - print "<a href='tu.php?off=$back&sort=" . $sort . "&by=" . $by . "'>Back</a>"; - } - print "</td>\n"; + $q = "SELECT * FROM TU_VoteInfo WHERE End > " . time() . " ORDER BY Submitted " . $order; + $result = db_query($q, $dbh); - print "<td align='right'>\n"; - if (($off + $limit) < mysql_num_rows($nextresult)) { - $forw = $off + $limit; - print "<a href='tu.php?off=$forw&sort=" . $sort . "&by=" . $by . "'>Next</a>"; - } - print "</td>\n"; - print "</tr>\n"; - } - print "</table>\n"; - } + $type = __("Current Votes"); + include("tu_list.php"); +?> - print "</center>\n"; - } +<center> + <a href='addvote.php'><?php print __("Add") ?></a> +</center><br /> - # stop notices, ythanku Xilon - if (empty($_REQUEST['sort'])) { $_REQUEST['sort'] = ""; } - if (empty($_REQUEST['by'])) { $_REQUEST['by'] = ""; } - if (empty($_REQUEST['off'])) { $_REQUEST['off'] = ""; } +<?php + $q = "SELECT * FROM TU_VoteInfo ORDER BY Submitted " . $order . $lim; + $result = db_query($q, $dbh); - gen_results(0, 0, $_REQUEST['sort'], $_REQUEST['by'], "new"); - print "<center><a href='addvote.php'>Add</a></center><br />"; - gen_results($_REQUEST['off'], $pp, $_REQUEST['sort'], $_REQUEST['by'], "old"); + $type = __("All Votes"); + include("tu_list.php"); + $qnext = "SELECT ID FROM TU_VoteInfo"; + $nextresult = db_query($qnext, $dbh); +?> +<table style='width: 90%'> + <?php if (mysql_num_rows($result)) { $by = htmlentities($by, ENT_QUOTES); ?> + <tr> + <td align='left'> + <?php if ($off != 0) { $back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?> + <a href='tu.php?off=<?php print $back ?>&by=<?php print $by ?>'><?php print __("Back") ?></a> + <?php } ?> + </td> + <td align='right'> + <?php if (($off + $limit) < mysql_num_rows($nextresult)) { $forw = $off + $limit; ?> + <a href='tu.php?off=<?php print $forw ?>&by=<?php print $by ?>'><?php print __("Next") ?></a> + <?php } ?> + </td> + </tr> + <?php } ?> +</table> +<?php } } else { - print "You are not allowed to access this area.\n"; + print __("You are not allowed to access this area."); } html_footer(AUR_VERSION); - -?> diff --git a/web/lang/account_po.inc b/web/lang/account_po.inc index 86c015be..81a8e7fa 100644 --- a/web/lang/account_po.inc +++ b/web/lang/account_po.inc @@ -26,5 +26,5 @@ include_once("es/account_po.inc"); include_once("de/account_po.inc"); include_once("ru/account_po.inc"); +include_once("tr/account_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/acctfuncs_po.inc b/web/lang/acctfuncs_po.inc index 3e0471c9..cd53a5c7 100644 --- a/web/lang/acctfuncs_po.inc +++ b/web/lang/acctfuncs_po.inc @@ -28,5 +28,6 @@ include_once("de/acctfuncs_po.inc"); include_once("ru/acctfuncs_po.inc"); include_once("fr/acctfuncs_po.inc"); +include_once("tr/acctfuncs_po.inc"); + -?>
\ No newline at end of file diff --git a/web/lang/aur_po.inc b/web/lang/aur_po.inc index 631f4cf4..ce89bec1 100644 --- a/web/lang/aur_po.inc +++ b/web/lang/aur_po.inc @@ -28,5 +28,5 @@ include_once("de/aur_po.inc"); include_once("ru/aur_po.inc"); include_once("fr/aur_po.inc"); +include_once("tr/aur_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/ca/index_po.inc b/web/lang/ca/index_po.inc index cd930a29..ca6c1ac3 100644 --- a/web/lang/ca/index_po.inc +++ b/web/lang/ca/index_po.inc @@ -39,7 +39,7 @@ $_t["ca"]["Error trying to generate session id."] = "S'ha produït un error en i $_t["ca"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "Benvingut a l'AUR! Si us plau llegiu la %hGuia d'usuari de l'AUR%h i la %hGuia de TU de l'AUR%h per a més informació."; -$_t["ca"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Els PKGBUILDs enviats han de seguir els %hEstàndards d'empaquetament d'Arch%h sinó seran esborrats!"; +$_t["ca"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Els PKGBUILDs enviats %hhan%h de seguir els %hEstàndards d'empaquetament d'Arch%h sinó seran esborrats!"; $_t["ca"]["Login"] = "Entra"; @@ -55,4 +55,3 @@ $_t["ca"]["Logged-in as: %h%s%h"] = "Identificat com: %h%s%h"; $_t["ca"]["Incorrect password for username, %s."] = "Contrasenya incorrecta per a l'usuari, %s."; -?> diff --git a/web/lang/ca/template_po.inc b/web/lang/ca/template_po.inc deleted file mode 100644 index 5ea5ee69..00000000 --- a/web/lang/ca/template_po.inc +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# Catalan (Català) translation -# Translator: Sergio Jovani Guzman <moret.sjg@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["ca"]["Hi, this is worth reading!"] = "Hola, val la pena llegir açò!"; - -?>
\ No newline at end of file diff --git a/web/lang/ca/test_po.inc b/web/lang/ca/test_po.inc deleted file mode 100644 index 3f5ddadd..00000000 --- a/web/lang/ca/test_po.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -# Catalan (Català) translation -# Translator: Sergio Jovani Guzman <moret.sjg@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["ca"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Seleccioneu el vostre idioma ací: %h%s%h, %h%s%h, %h%s%h, %h%s%h"; - -$_t["ca"]["Hello, world!"] = "Hola, món!"; - -$_t["ca"]["Hello, again!"] = "Hola, altre cop!"; - -$_t["ca"]["My current language tag is: '%s'."] = "La meua etiqueta actual d'idioma és: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/common_po.inc b/web/lang/common_po.inc index f4752ca6..e1073d9d 100644 --- a/web/lang/common_po.inc +++ b/web/lang/common_po.inc @@ -28,5 +28,5 @@ include_once("de/common_po.inc"); include_once("ru/common_po.inc"); include_once("fr/common_po.inc"); +include_once("tr/common_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/de/index_po.inc b/web/lang/de/index_po.inc index 1b55775d..377a669c 100644 --- a/web/lang/de/index_po.inc +++ b/web/lang/de/index_po.inc @@ -39,7 +39,7 @@ $_t["de"]["Error trying to generate session id."] = "Fehler beim Erstellen der S $_t["de"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "Willkommen beim AUR! Für weitergehende Informationen lies bitte das %hAUR Benutzerhandbuch%h und die %hAUR TU Richtlinien%h."; -$_t["de"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Deine PKGBUILDs <strong>müssen</strong> dem %hArch Paket Standard%h entsprechen. Andernfalls werden sie gelöscht!"; +$_t["de"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Deine PKGBUILDs %hmüssen%h dem %hArch Paket Standard%h entsprechen. Andernfalls werden sie gelöscht!"; $_t["de"]["Login"] = "Anmelden"; diff --git a/web/lang/de/template_po.inc b/web/lang/de/template_po.inc deleted file mode 100644 index 024d7673..00000000 --- a/web/lang/de/template_po.inc +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# German (Deutsch) translation -# Translators: Pierre Schmitz <pierre@archlinux.de>, Matthias Gorissen <siquame@web.de>, Lukas Kropatschek, Niclas Pfeifer - -include_once("translator.inc"); -global $_t; - -$_t["de"]["Hi, this is worth reading!"] = "Hallo - es lohnt sich, dies zu lesen!"; - -?>
\ No newline at end of file diff --git a/web/lang/de/test_po.inc b/web/lang/de/test_po.inc deleted file mode 100644 index a957522b..00000000 --- a/web/lang/de/test_po.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -# German (Deutsch) translation -# Translators: Pierre Schmitz <pierre@archlinux.de>, Matthias Gorissen <siquame@web.de>, Lukas Kropatschek, Niclas Pfeifer - -include_once("translator.inc"); -global $_t; - -$_t["de"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Wähle hier deine Sprache aus: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["de"]["Hello, world!"] = "Hallo, Welt!"; - -$_t["de"]["Hello, again!"] = "Nochmals Hallo!"; - -$_t["de"]["My current language tag is: '%s'."] = "Meine momentan gewählte Sprache ist: '%s'"; - -?>
\ No newline at end of file diff --git a/web/lang/en/index_po.inc b/web/lang/en/index_po.inc index bdeb87fb..eb626eb9 100644 --- a/web/lang/en/index_po.inc +++ b/web/lang/en/index_po.inc @@ -25,6 +25,8 @@ $_t["en"]["Password:"] = "Password:"; $_t["en"]["Username:"] = "Username:"; +$_t["en"]["Remember me"] = "Remember me"; + $_t["en"]["Welcome to the AUR! If you're a newcomer, you may want to read the %hGuidelines%h."] = "Welcome to the AUR! If you're a newcomer, you may want to read the %hGuidelines%h."; $_t["en"]["This is where the intro text will go."] = "This is where the intro text will go."; diff --git a/web/lang/en/test_po.inc b/web/lang/en/test_po.inc deleted file mode 100644 index 28c0e104..00000000 --- a/web/lang/en/test_po.inc +++ /dev/null @@ -1,22 +0,0 @@ -<?php -# INSTRUCTIONS TO TRANSLATORS -# -# This file contains the i18n translations for a subset of the -# Arch Linux User-community Repository (AUR). This is a PHP -# script, and as such, you MUST pay great attention to the syntax. -# If your text contains any double-quotes ("), you MUST escape -# them with the backslash character (\). -# - -include_once("translator.inc"); -global $_t; - -$_t["en"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["en"]["Hello, world!"] = "Hello, world!"; - -$_t["en"]["Hello, again!"] = "Hello, again!"; - -$_t["en"]["My current language tag is: '%s'."] = "My current language tag is: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/es/index_po.inc b/web/lang/es/index_po.inc index 77e5ee95..821c09d2 100644 --- a/web/lang/es/index_po.inc +++ b/web/lang/es/index_po.inc @@ -39,7 +39,7 @@ $_t["es"]["Error trying to generate session id."] = "Error al intentar crear un $_t["es"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "¡Bienvenido al AUR! Por favor lea la %hGuía AUR del Usuario%h y la %hGuía TU del AUR%h para más información."; -$_t["es"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "¡Los PKGBUILDS enviados <b>deben</b> cumplir las %hNormas de empaquetado de Arch%h sino serán eliminados!"; +$_t["es"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "¡Los PKGBUILDS enviados %hdeben%h cumplir las %hNormas de empaquetado de Arch%h sino serán eliminados!"; $_t["es"]["Login"] = "Entrar"; diff --git a/web/lang/es/template_po.inc b/web/lang/es/template_po.inc deleted file mode 100644 index 21e45fce..00000000 --- a/web/lang/es/template_po.inc +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# Spanish (Español) translation -# Translator: Víctor Martínez Romanos <vmromanos@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["es"]["Hi, this is worth reading!"] = "Hola, ¡vale la pena llegar hasta aquí!"; - -?>
\ No newline at end of file diff --git a/web/lang/es/test_po.inc b/web/lang/es/test_po.inc deleted file mode 100644 index 83bc7dcf..00000000 --- a/web/lang/es/test_po.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -# Spanish (Español) translation -# Translator: Víctor Martínez Romanos <vmromanos@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["es"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Seleccione su idioma aquí: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["es"]["Hello, world!"] = "¡Hola, mundo!"; - -$_t["es"]["Hello, again!"] = "¡Hola, otra vez!"; - -$_t["es"]["My current language tag is: '%s'."] = "Mi identificador actual del idioma es: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/fr/index_po.inc b/web/lang/fr/index_po.inc index 7c67bf4d..3e522a24 100644 --- a/web/lang/fr/index_po.inc +++ b/web/lang/fr/index_po.inc @@ -40,7 +40,7 @@ $_t["fr"]["Error trying to generate session id."] = "Erreur en essayant de gén� $_t["fr"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "Bienvenue sur AUR ! Lisez, s'il vous plaît, le %hGuide Utilisateur AUR%h et le %hGuide des Utilisateurs de Confiance%h pour plus d'informations."; -$_t["fr"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Les PKGBUILDs proposés <b>doivent</b> se conformer aux %hStandards de l'empaquetage Arch%h sans quoi ils seront supprimés!"; +$_t["fr"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Les PKGBUILDs proposés %hdoivent%h se conformer aux %hStandards de l'empaquetage Arch%h sans quoi ils seront supprimés!"; $_t["fr"]["Login"] = "Se connecter"; diff --git a/web/lang/fr/template_po.inc b/web/lang/fr/template_po.inc deleted file mode 100644 index 2084c164..00000000 --- a/web/lang/fr/template_po.inc +++ /dev/null @@ -1,11 +0,0 @@ -<?php -# French (Français) translation -# Translator: Morgan LEFIEUX <comete@archlinuxfr.org> -# Translator: Cilyan Olowen <gaknar@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["fr"]["Hi, this is worth reading!"] = "Salut, ceci vaut la peine d'être lu !"; - -?> diff --git a/web/lang/fr/test_po.inc b/web/lang/fr/test_po.inc deleted file mode 100644 index f53af143..00000000 --- a/web/lang/fr/test_po.inc +++ /dev/null @@ -1,17 +0,0 @@ -<?php -# French (Français) translation -# Translator: Morgan LEFIEUX <comete@archlinuxfr.org> -# Translator: Cilyan Olowen <gaknar@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["fr"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Choisissez votre langue ici: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["fr"]["Hello, world!"] = "Salut tout le monde !"; - -$_t["fr"]["Hello, again!"] = "Salut encore !"; - -$_t["fr"]["My current language tag is: '%s'."] = "Mon choix actuel de langue est: '%s'."; - -?> diff --git a/web/lang/hacker_po.inc b/web/lang/hacker_po.inc index 67885215..01b60ad5 100644 --- a/web/lang/hacker_po.inc +++ b/web/lang/hacker_po.inc @@ -28,5 +28,5 @@ include_once("de/hacker_po.inc"); include_once("ru/hacker_po.inc"); include_once("fr/hacker_po.inc"); +include_once("tr/hacker_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/index_po.inc b/web/lang/index_po.inc index ecf02b4a..606c6a34 100644 --- a/web/lang/index_po.inc +++ b/web/lang/index_po.inc @@ -28,5 +28,5 @@ include_once("de/index_po.inc"); include_once("ru/index_po.inc"); include_once("fr/index_po.inc"); +include_once("tr/index_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/it/acctfuncs_po.inc b/web/lang/it/acctfuncs_po.inc index b4be9956..859cfb6b 100644 --- a/web/lang/it/acctfuncs_po.inc +++ b/web/lang/it/acctfuncs_po.inc @@ -83,22 +83,3 @@ $_t["it"]["Developer"] = "Sviluppatore"; $_t["it"]["View this user's packages"] = "Visualizza i pacchetti di quest'utente"; -$_t["it"]["start and end with a letter or number"] = "inizia e finisce con una lettera o un numero"; - -$_t["it"]["Your password must be at least "] = "La password deve essere di almeno "; - -$_t["it"]["The username is invalid."] = "Il nome utente non è valido."; - -$_t["it"]["It must be "] = "Deve essere "; - -$_t["it"]["can contain only one period, underscore or hyphen."] = "può contenere solo un punto, un trattino basso o un trattino."; - -$_t["it"]["It must be between %s and %s characters long"] = "Deve contenere un minimo di %s ed un massimo di %s caratteri"; - -$_t["it"]["Your password must be at least %s characters."] = "La password deve contenere almeno %s caratteri."; - -$_t["it"]["Can contain only one period, underscore or hyphen."] = "Può contenere solo un punto, un trattino basso o un trattino."; - -$_t["it"]["Start and end with a letter or number"] = "Inizia e finisce con una lettera o un numero"; - -?>
\ No newline at end of file diff --git a/web/lang/it/aur_po.inc b/web/lang/it/aur_po.inc index ac24bb97..5717d970 100644 --- a/web/lang/it/aur_po.inc +++ b/web/lang/it/aur_po.inc @@ -23,20 +23,3 @@ $_t["it"]["Bugs"] = "Bug"; $_t["it"]["My Packages"] = "I miei pacchetti"; -$_t["it"]["You must supply a password."] = "Devi inserire una password."; - -$_t["it"]["You must supply a username."] = "Devi inserire un nome utente."; - -$_t["it"]["Your account has been suspended."] = "Il tuo account è stato sospeso."; - -$_t["it"]["Error trying to generate session id."] = "Si è verificato un errore durante la generazione dell'id della sessione."; - -$_t["it"]["Error looking up username, %s."] = "Si è verificato un errore durante la ricerca del nome utente %s."; - -$_t["it"]["Incorrect password for username, %s."] = "Password errata per il nome utente %s."; - -$_t["it"]["Login failure: Bad user or pass."] = "Autenticazione fallita: nome utente o password errata. "; - -$_t["it"]["Trusted User"] = "Trusted User"; - -?>
\ No newline at end of file diff --git a/web/lang/it/index_po.inc b/web/lang/it/index_po.inc index f1e54eb4..17704706 100644 --- a/web/lang/it/index_po.inc +++ b/web/lang/it/index_po.inc @@ -19,6 +19,8 @@ $_t["it"]["Password:"] = "Password:"; $_t["it"]["Username:"] = "Nome utente:"; +$_t["it"]["Remember me"] = "Ricordami" ; + $_t["it"]["Welcome to the AUR! If you're a newcomer, you may want to read the %hGuidelines%h."] = "Benvenuto in AUR! Se sei un nuovo utente, dovresti leggere le %hGuidelines%h."; $_t["it"]["This is where the intro text will go."] = "Qui ci andrà il testo di introduzione."; @@ -29,16 +31,12 @@ $_t["it"]["For now, it's just a place holder."] = "Per adesso, è solo un segnap $_t["it"]["It's more important to get the login functionality finished."] = "È più importante avere la funzionalità di autenticazione completata."; -$_t["it"]["Error looking up username, %s."] = "Errore durante la ricerca del nome utente %s."; - $_t["it"]["Login"] = "Entra"; $_t["it"]["Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience."] = "Nonostante che non possiamo assicurarvi il loro contenuto, mettiamo a disposizione una %hlista di repositories degli utenti%h per vostra comodità"; $_t["it"]["If you have feedback about the AUR, please leave it in %hFlyspray%h."] = "Se avete delle osservazioni da fare in merito al sistema AUR, potete lasciarle nel %hFlyspray%h."; -$_t["it"]["Incorrect password for username, %s."] = "Password errata per il nome utente %s."; - $_t["it"]["Latest Packages:"] = "Ultimi pacchetti:"; $_t["it"]["Discussion about the AUR takes place on the %sTUR Users List%s."] = "Le discussioni su AUR avvengono nella %sTUR Users List%s."; @@ -47,8 +45,6 @@ $_t["it"]["Email discussion about the AUR takes place on the %sTUR Users List%s. $_t["it"]["Recent Updates"] = "Aggiornamenti recenti"; -$_t["it"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information. Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Benvenuto in AUR! Per ottenere maggiori informazioni, leggi le %hAUR User Guidelines%h e %hAUR TU Guidelines%h. I PKGBUILD inviati <b>devono</b> essere conformi agli %hArch Packaging Standards%h altrimenti saranno cancellati!"; - $_t["it"]["Community"] = "Community"; $_t["it"]["Package Counts"] = "Conteggio dei pacchetti"; @@ -57,16 +53,26 @@ $_t["it"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR $_t["it"]["Unsupported"] = "Unsupported"; -$_t["it"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "I PKGBUILD inviati <b>devono</b> essere conformi agli %hArch Packaging Standards%h altrimenti saranno cancellati!"; +$_t["it"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "I PKGBUILD inviati %hdevono%h essere conformi agli %hArch Packaging Standards%h altrimenti saranno cancellati!"; $_t["it"]["Statistics"] = "Statistiche"; +$_t["it"]["My Statistics"] = "Le mie statistiche"; + +$_t["it"]["Flagged as safe by me"] = "Pacchetti verificati"; + +$_t["it"]["Flagged as safe"] = "Considerato sicuro"; + +$_t["it"]["User Statistics"] = "Statistiche Utente"; + $_t["it"]["Registered Users"] = "Utenti registrati"; $_t["it"]["Trusted Users"] = "Trusted Users"; $_t["it"]["Packages in unsupported"] = "Pacchetti in unsupported"; +$_t["it"]["Packages in unsupported and flagged as safe"] = "Pacchetti in unsupported considerati sicuri"; + $_t["it"]["Packages in [community]"] = "Pacchetti in [community]"; $_t["it"]["Remember to vote for your favourite packages! The most popular packages are provided as binary packages in [community]."] = "Ricorda di votare i tuoi pacchetti preferiti! I pacchetti più votati saranno disponibili in [community] come precompilati."; @@ -77,22 +83,11 @@ $_t["it"]["The most popular packages will be provided as binary packages in [com $_t["it"]["Packages added or updated in the past 7 days"] = "Pacchetti aggiunti o aggiornati negli ultimi 7 giorni"; -$_t["it"]["Packages in unsupported and flagged as safe"] = "Pacchetti in unsupported considerati sicuri"; - -$_t["it"]["Safe"] = "Sicuri"; - $_t["it"]["Out-of-date"] = "Non aggiornati"; -$_t["it"]["User Statistics"] = "Statistiche dell'utente"; - -$_t["it"]["Flagged as safe by me"] = "Pacchetti verificati"; - -$_t["it"]["Flagged as safe"] = "Considerato sicuro"; - -$_t["it"]["My Statistics"] = "Le mie statistiche"; +$_t["it"]["DISCLAIMER"] = "AVVISO"; -$_t["it"]["Home"] = "Inizio"; +$_t["it"]["Unsupported PKGBUILDs are user produced content. Any use of files is at your own risk."] = "i PKGBUILD presenti in unsupported sono stati inviati dagli utenti e, scaricandoli, accetti di usarli a tuo rischio e pericolo."; -$_t["it"]["DISCLAIMER"] = "Avviso: i PKGBUILD presenti in unsupported sono stati inviati dagli utenti e, scaricandoli, accetti di usarli a tuo rischio e pericolo."; +$_t["it"]["Login failure: Bad user or pass."] = "Autenticazione fallita: nome utente o password errata. "; -?>
\ No newline at end of file diff --git a/web/lang/it/pkgfuncs_po.inc b/web/lang/it/pkgfuncs_po.inc index 2cf98a74..e3c5186c 100644 --- a/web/lang/it/pkgfuncs_po.inc +++ b/web/lang/it/pkgfuncs_po.inc @@ -57,7 +57,7 @@ $_t["it"]["orphan"] = "orfano"; $_t["it"]["Un-Vote"] = "Rimuovi il voto"; -$_t["it"]["change category"] = "Cambia categoria"; +$_t["it"]["change category"] = "cambia categoria"; $_t["it"]["UnNotify"] = "Togli la notifica"; @@ -75,6 +75,12 @@ $_t["it"]["Manage"] = "Organizza"; $_t["it"]["Sort by"] = "Ordina per"; +$_t["it"]["Sort order"] = "Ordina in modo"; + +$_t["it"]["Ascending"] = "Ascendente"; + +$_t["it"]["Descending"] = "Discendente"; + $_t["it"]["Actions"] = "Azioni"; $_t["it"]["Sources"] = "Sorgenti"; @@ -83,7 +89,7 @@ $_t["it"]["Search Criteria"] = "Criteri di ricerca"; $_t["it"]["Notify"] = "Notifica"; -$_t["it"]["O%hut-of-Date"] = "N%hon aggiornato"; +$_t["it"]["Out-of-Date"] = "Non aggiornato"; $_t["it"]["Vote"] = "Vota"; @@ -125,82 +131,27 @@ $_t["it"]["First Submitted"] = "Data di primo invio"; $_t["it"]["Last Updated"] = "Ultimo aggiornamento"; -$_t["it"]["Sort order"] = "Ordina in modo"; - -$_t["it"]["Ascending"] = "Ascendente"; - -$_t["it"]["Descending"] = "Discendente"; - $_t["it"]["Search by"] = "Cerca per"; $_t["it"]["Submitter"] = "Contributore"; -$_t["it"]["Leave the password fields blank to keep your same password."] = "Lascia vuoti i campi relativi alla password per mantenerla invariata."; - -$_t["it"]["You have been successfully logged out."] = "Disconnesso."; - -$_t["it"]["You must log in to view user information."] = "Devi autenticarti per visualizzare queste informazioni."; - -$_t["it"]["Could not retrieve information for the specified user."] = "Non è stato possibile trovare le informazioni sull'utente specificato."; - -$_t["it"]["You do not have permission to edit this account."] = "Non disponi dei permessi necessari per modificare questo account."; - -$_t["it"]["Use this form to search existing accounts."] = "Utilizza questo modulo per cercare account esistenti."; - -$_t["it"]["Use this form to create an account."] = "Utilizza questo modulo per creare un account."; - -$_t["it"]["Use this form to update your account."] = "Utilizza questo modulo per aggiornare il vostro account."; +$_t["it"]["All"] = "Tutti"; -$_t["it"]["You are not allowed to access this area."] = "Non disponi dei permessi necessari per accedere."; +$_t["it"]["Unsafe"] = "Non sicuri"; $_t["it"]["Status"] = "Stato"; -$_t["it"]["unknown"] = "sconosciuta"; - $_t["it"]["License"] = "Licenza"; -$_t["it"]["All"] = "Tutti"; - -$_t["it"]["Unsafe"] = "Non sicuri"; - -$_t["it"]["Accounts"] = "Account"; +$_t["it"]["unknown"] = "sconosciuta"; -$_t["it"]["This package has been flagged out of date."] = "Questo pacchetto è stato contrassegnato come non aggiornato."; +$_t["it"]["Required by"] = "Richiesto da"; $_t["it"]["The above files have been verified (by %h%s%h) and are safe to use."] = "I file sono stati verificati (da %h%s%h) ed il loro utilizzo è da considerarsi sicuro."; -$_t["it"]["Required by"] = "Richiesto da"; +$_t["it"]["This package has been flagged out of date."] = "Questo pacchetto è stato contrassegnato come non aggiornato."; -$_t["it"]["Out of Date"] = "Non aggiornati"; +$_t["it"]["Toggle Notify"] = "Rimuovi la notifica"; $_t["it"]["Showing results %s - %s of %s"] = "Risultati: %s - %s di %s"; -$_t["it"]["Toggle Notify"] = "Blocca la notifica"; - -$_t["it"]["Statistics"] = "Statistiche"; - -$_t["it"]["Remember to vote for your favourite packages!"] = "Ricorda di votare i tuoi pacchetti preferiti!"; - -$_t["it"]["Packages in unsupported"] = "Pacchetti in unsupported"; - -$_t["it"]["The most popular packages will be provided as binary packages in [community]."] = "I pacchetti più votati saranno disponibili in [community] come precompilati."; - -$_t["it"]["Trusted Users"] = "Trusted Users"; - -$_t["it"]["Packages added or updated in the past 7 days"] = "Pacchetti aggiunti o aggiornati negli ultimi 7 giorni"; - -$_t["it"]["Recent Updates"] = "Aggiornamenti recenti"; - -$_t["it"]["Out-of-date"] = "Non aggiornati"; - -$_t["it"]["Packages in [community]"] = "Pacchetti in [community]"; - -$_t["it"]["My Statistics"] = "Le mie statistiche"; - -$_t["it"]["Registered Users"] = "Utenti registrati"; - -$_t["it"]["Home"] = "Inizio"; - -$_t["it"]["DISCLAIMER"] = "Avviso"; - -?>
\ No newline at end of file diff --git a/web/lang/it/search_po.inc b/web/lang/it/search_po.inc index 8d976d05..e475a4d1 100644 --- a/web/lang/it/search_po.inc +++ b/web/lang/it/search_po.inc @@ -69,12 +69,3 @@ $_t["it"]["The selected packages have been unflagged safe."] = "I pacchetti sele $_t["it"]["Couldn't unflag package safe."] = "Impossibile contrassegnare il pacchetto come non sicuro."; -$_t["it"]["Packages"] = "Pacchetti"; - -$_t["it"]["You have been removed from the comment notification list for %s."] = "Sei stato rimosso dalla lista delle notifiche dei commenti di %s."; - -$_t["it"]["My Packages"] = "I miei pacchetti"; - -$_t["it"]["You have been added to the comment notification list for %s."] = "Sei stato aggiunto alla lista delle notifiche dei commenti di %s."; - -?>
\ No newline at end of file diff --git a/web/lang/it/submit_po.inc b/web/lang/it/submit_po.inc index 9b5c439e..c510ff4a 100644 --- a/web/lang/it/submit_po.inc +++ b/web/lang/it/submit_po.inc @@ -85,8 +85,7 @@ $_t["it"]["Could not re-tar"] = "Impossibile riarchiviare"; $_t["it"]["Binary packages and filelists are not allowed for upload."] = "Non è consentito inviare pacchetti contenenti binari e filelist."; -$_t["it"]["Missing license variable in PKGBUILD."] = "Nel PKGBUILD manca la variabile license."; - $_t["it"]["Missing arch variable in PKGBUILD."] = "Nel PKGBUILD manca la variabile arch."; -?>
\ No newline at end of file +$_t["it"]["Missing license variable in PKGBUILD."] = "Nel PKGBUILD manca la variabile license."; + diff --git a/web/lang/it/template_po.inc b/web/lang/it/template_po.inc deleted file mode 100644 index defe7ac5..00000000 --- a/web/lang/it/template_po.inc +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# Italian (Italiano) translation -# Translators: Giovanni Scafora <linuxmania@gmail.com> and Pierluigi Picciau <pierluigi88@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["it"]["Hi, this is worth reading!"] = "Ciao, questo vale la pena di leggerlo!"; - -?>
\ No newline at end of file diff --git a/web/lang/it/test_po.inc b/web/lang/it/test_po.inc deleted file mode 100644 index 55c0a4c4..00000000 --- a/web/lang/it/test_po.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -# Italian (Italiano) translation -# Translators: Giovanni Scafora <linuxmania@gmail.com> and Pierluigi Picciau <pierluigi88@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["it"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Scegli la tua lingua: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["it"]["Hello, world!"] = "Ciao, mondo!"; - -$_t["it"]["Hello, again!"] = "Ciao, di nuovo!"; - -$_t["it"]["My current language tag is: '%s'."] = "Il tag della mia lingua corrente è: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/logout_po.inc b/web/lang/logout_po.inc index 41adfc8b..31f261e7 100644 --- a/web/lang/logout_po.inc +++ b/web/lang/logout_po.inc @@ -26,5 +26,5 @@ include_once("es/logout_po.inc"); include_once("de/logout_po.inc"); include_once("ru/logout_po.inc"); +include_once("tr/logout_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/pkgedit_po.inc b/web/lang/pkgedit_po.inc index 49e7ae49..240b72e5 100644 --- a/web/lang/pkgedit_po.inc +++ b/web/lang/pkgedit_po.inc @@ -28,5 +28,5 @@ include_once("de/pkgedit_po.inc"); include_once("ru/pkgedit_po.inc"); include_once("fr/pkgedit_po.inc"); +include_once("tr/pkgedit_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/pkgfuncs_po.inc b/web/lang/pkgfuncs_po.inc index 32259527..ca00af2c 100644 --- a/web/lang/pkgfuncs_po.inc +++ b/web/lang/pkgfuncs_po.inc @@ -28,5 +28,5 @@ include_once("de/pkgfuncs_po.inc"); include_once("ru/pkgfuncs_po.inc"); include_once("fr/pkgfuncs_po.inc"); +include_once("tr/pkgfuncs_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/pl/index_po.inc b/web/lang/pl/index_po.inc index a93c6903..889a841b 100644 --- a/web/lang/pl/index_po.inc +++ b/web/lang/pl/index_po.inc @@ -24,7 +24,7 @@ $_t["pl"]["You must supply an email address."] = "Musisz podać adres e-mail."; $_t["pl"]["Incorrect password for email address, %s."] = "Nieprawidłowe hasło dla adresu %s."; $_t["pl"]["Incorrect password for username, %s."] = "Nieprawidłowe hasło dla użytkownika %s."; $_t["pl"]["Logged in as: %h%s%h"] = "Zalogowany jako: %h%s%h"; -$_t["pl"]["Logged-in as: %h%s%h"] = "Zalogowany jako: %h%s%h"; + $_t["pl"]["Error looking up username, %s."] = "Błąd podczas wyszukiwania użytkownika %s."; $_t["pl"]["Welcome to the AUR! If you're a newcomer, you may want to read the %hGuidelines%h."] = "Witamy w AUR! Jeżeli jesteś tu po raz pierwszy, być może zechcesz przeczytać %hInstrukcję%h."; $_t["pl"]["If you have feedback about the AUR, please leave it in %hFlyspray%h."] = "Jeżeli masz uwagi lub pomysły odnośnie AUR, %hFlyspray%h jest odpowiednim miejscem do ich pozostawienia."; @@ -52,7 +52,7 @@ $_t["pl"]["Packages in [community]"] = "Pakietów w [community]"; $_t["pl"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "Witamy w AUR! Aby uzyskać więcej informacji, przeczytaj %hInstrukcję Użytkownika%h oraz %hInstrukcję Zaufanego Użytkownika%h."; -$_t["pl"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Pliki PKGBUILD <b>muszą</b> być zgodne ze %hStandardami Pakietów Archa%h, inaczej będą usuwane!"; +$_t["pl"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Pliki PKGBUILD %hmuszą%h być zgodne ze %hStandardami Pakietów Archa%h, inaczej będą usuwane!"; $_t["pl"]["Registered Users"] = "Zarejestrowanych użytkowników"; @@ -72,4 +72,3 @@ $_t["pl"]["Home"] = "Start"; $_t["pl"]["DISCLAIMER"] = "ZRZECZENIE"; -?>
\ No newline at end of file diff --git a/web/lang/pl/template_po.inc b/web/lang/pl/template_po.inc deleted file mode 100644 index c4e56864..00000000 --- a/web/lang/pl/template_po.inc +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# Polish (Polski) translation -# Translator: Jaroslaw Swierczynski <swiergot@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["pl"]["Hi, this is worth reading!"] = "Witaj, warto to przeczytać!"; - -?>
\ No newline at end of file diff --git a/web/lang/pl/test_po.inc b/web/lang/pl/test_po.inc deleted file mode 100644 index 847a0abf..00000000 --- a/web/lang/pl/test_po.inc +++ /dev/null @@ -1,13 +0,0 @@ -<?php -# Polish (Polski) translation -# Translator: Jaroslaw Swierczynski <swiergot@gmail.com> - -include_once("translator.inc"); -global $_t; - -$_t["pl"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Wybierz swój język: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; -$_t["pl"]["Hello, world!"] = "Witaj, świecie!"; -$_t["pl"]["Hello, again!"] = "Witaj, ponownie!"; -$_t["pl"]["My current language tag is: '%s'."] = "Etykieta mojego obecnego języka to: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/pt/index_po.inc b/web/lang/pt/index_po.inc index 7fe4283e..66de4242 100644 --- a/web/lang/pt/index_po.inc +++ b/web/lang/pt/index_po.inc @@ -53,8 +53,6 @@ $_t["pt"]["Email discussion about the AUR takes place on the %sTUR Users List%s. $_t["pt"]["Recent Updates"] = "Atualizações Recentes"; -$_t["pt"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information. Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Bem-vindo ao AUR! Por favor leia as %hregras de usuário do AUR%h e as %hregras de TU do AUR%h para maiores informações.PKGBUILDs contribuídos <b>devem</b> seguir os %hpadrões Arch de Empacotamento%h caso contrário, eles serão excluídos!"; - $_t["pt"]["Community"] = "Comunidade"; $_t["pt"]["Package Counts"] = "Contagem de Pacotes"; @@ -63,7 +61,7 @@ $_t["pt"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR $_t["pt"]["Unsupported"] = "Sem Suporte"; -$_t["pt"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "PKGBUILDs contribuídos <b>devem</b> seguir os %hpadrões Arch de Empacotamento%h caso contrário, eles serão excluídos!"; +$_t["pt"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "PKGBUILDs contribuídos %hdevem%h seguir os %hpadrões Arch de Empacotamento%h caso contrário, eles serão excluídos!"; $_t["pt"]["Statistics"] = "Estatísticas"; @@ -93,4 +91,3 @@ $_t["pt"]["My Statistics"] = "Minhas Estatísticas"; $_t["pt"]["Flagged as safe by me"] = "Pacotes que marquei como seguros"; -?>
\ No newline at end of file diff --git a/web/lang/pt/test_po.inc b/web/lang/pt/test_po.inc deleted file mode 100644 index 040e736c..00000000 --- a/web/lang/pt/test_po.inc +++ /dev/null @@ -1,22 +0,0 @@ -<?php -# INSTRUCTIONS TO TRANSLATORS -# -# This file contains the i18n translations for a subset of the -# Arch Linux User-community Repository (AUR). This is a PHP -# script, and as such, you MUST pay great attention to the syntax. -# If your text contains any double-quotes ("), you MUST escape -# them with the backslash character (\). -# - -include_once("translator.inc"); -global $_t; - -$_t["pt"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Selecione seu idioma aqui: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["pt"]["Hello, world!"] = "Olá, mundo!"; - -$_t["pt"]["Hello, again!"] = "Olá, novamente!"; - -$_t["pt"]["My current language tag is: '%s'."] = "Meu identificador atual de idioma é: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/ru/index_po.inc b/web/lang/ru/index_po.inc index 45b2d402..1a464a0a 100644 --- a/web/lang/ru/index_po.inc +++ b/web/lang/ru/index_po.inc @@ -39,7 +39,7 @@ $_t["ru"]["Error trying to generate session id."] = "Ошибка генерац $_t["ru"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "Добро пожаловать в AUR! Пожалуйста прочитайте %hAUR User Guidelines%h и %hAUR TU Guidelines%h, чтобы получить больше информации."; -$_t["ru"]["Contributed PKGBUILDs <b>must</b> conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Присланые PKGBUILD <b>должны</b> соответствовать %hArch Packaging Standards%h или будут удалены!"; +$_t["ru"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Присланые PKGBUILD %hдолжны%h соответствовать %hArch Packaging Standards%h или будут удалены!"; $_t["ru"]["Login"] = "Войти"; @@ -69,4 +69,3 @@ $_t["ru"]["My Statistics"] = "Моя статистика"; $_t["ru"]["Home"] = "Заглавная страница"; -?>
\ No newline at end of file diff --git a/web/lang/ru/template_po.inc b/web/lang/ru/template_po.inc deleted file mode 100644 index 86c3e9b2..00000000 --- a/web/lang/ru/template_po.inc +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# Russian (Русский) translation -# Translator: Sergej Pupykin <ps@lx-ltd.ru> - -include_once("translator.inc"); -global $_t; - -$_t["ru"]["Hi, this is worth reading!"] = "Привет, это стоит почитать!"; - -?>
\ No newline at end of file diff --git a/web/lang/ru/test_po.inc b/web/lang/ru/test_po.inc deleted file mode 100644 index 381abe32..00000000 --- a/web/lang/ru/test_po.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -# Russian (Русский) translation -# Translator: Sergej Pupykin <ps@lx-ltd.ru> - -include_once("translator.inc"); -global $_t; - -$_t["ru"]["Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h."] = "Выберите ваш язык здесь: %h%s%h, %h%s%h, %h%s%h, %h%s%h."; - -$_t["ru"]["Hello, world!"] = "Всем привет!"; - -$_t["ru"]["Hello, again!"] = "Привет еще раз!"; - -$_t["ru"]["My current language tag is: '%s'."] = "Мой текущий язык: '%s'."; - -?>
\ No newline at end of file diff --git a/web/lang/search_po.inc b/web/lang/search_po.inc index f9272b99..9230ea38 100644 --- a/web/lang/search_po.inc +++ b/web/lang/search_po.inc @@ -28,5 +28,5 @@ include_once("de/search_po.inc"); include_once("ru/search_po.inc"); include_once("fr/search_po.inc"); +include_once("tr/search_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/submit_po.inc b/web/lang/submit_po.inc index d9e7a1cb..6d3ec857 100644 --- a/web/lang/submit_po.inc +++ b/web/lang/submit_po.inc @@ -28,5 +28,5 @@ include_once("de/submit_po.inc"); include_once("ru/submit_po.inc"); include_once("fr/submit_po.inc"); +include_once("tr/submit_po.inc"); -?>
\ No newline at end of file diff --git a/web/lang/template_po.inc b/web/lang/template_po.inc deleted file mode 100644 index 8d65fc0d..00000000 --- a/web/lang/template_po.inc +++ /dev/null @@ -1,32 +0,0 @@ -<?php -# INSTRUCTIONS TO TRANSLATORS -# -# This file contains the i18n translations for a subset of the -# Arch Linux User-community Repository (AUR). This is a PHP -# script, and as such, you MUST pay great attention to the syntax. -# If your text contains any double-quotes ("), you MUST escape -# them with the backslash character (\). -# - -include_once("translator.inc"); -global $_t; - -include_once("en/template_po.inc"); - -include_once("pl/template_po.inc"); - -include_once("it/template_po.inc"); - -include_once("ca/template_po.inc"); - -include_once("pt/template_po.inc"); - -include_once("es/template_po.inc"); - -include_once("de/template_po.inc"); - -include_once("ru/template_po.inc"); - -include_once("fr/template_po.inc"); - -?>
\ No newline at end of file diff --git a/web/lang/tr/account_po.inc b/web/lang/tr/account_po.inc new file mode 100644 index 00000000..3ae5d3cc --- /dev/null +++ b/web/lang/tr/account_po.inc @@ -0,0 +1,29 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Use this form to update your account."] = "Hesap bilgilerinizi güncellemek için bu formu kullanın."; + +$_t["tr"]["Leave the password fields blank to keep your same password."] = "Şifrenizi değiştirmek istemiyorsanız şifre kısmını boş bırakın."; + +$_t["tr"]["You are not allowed to access this area."] = "Bu kısma erişim izniniz yok."; + +$_t["tr"]["Could not retrieve information for the specified user."] = "Kullanıcı verileri alınamadı."; + +$_t["tr"]["Use this form to search existing accounts."] = "Mevcut hesaplar içinde arama yapmak için bu formu kullanın."; + +$_t["tr"]["You do not have permission to edit this account."] = "Bu hesap üzerinde değişiklik yapma izniniz yok."; + +$_t["tr"]["Use this form to create an account."] = "Yeni bir hesap oluşturmak için bu formu kullanın."; + +$_t["tr"]["You must log in to view user information."] = "Kullanıcı bilgilerini görmek için giriş yapmalısınız."; + diff --git a/web/lang/tr/acctfuncs_po.inc b/web/lang/tr/acctfuncs_po.inc new file mode 100644 index 00000000..89f60cdb --- /dev/null +++ b/web/lang/tr/acctfuncs_po.inc @@ -0,0 +1,91 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Missing a required field."] = "Gerekli bir alan doldurulmamış."; + +$_t["tr"]["Search"] = "Ara"; + +$_t["tr"]["The account, %h%s%h, has been successfully created."] = "Hesap %h%s%h başarıyla oluşturuldu."; + +$_t["tr"]["Error trying to modify account, %h%s%h: %s."] = "Hesap %h%s%h düzenlenirken hata oluştu."; + +$_t["tr"]["The email address is invalid."] = "Eposta adresi geçerli dğeil."; + +$_t["tr"]["Error trying to create account, %h%s%h: %s."] = "Hesap %h%s%h oluşturulurken hata oluştu: %s."; + +$_t["tr"]["The username, %h%s%h, is already in use."] = "%h%s%h kullanıcı adı kullanımda."; + +$_t["tr"]["Account Type"] = "Hesap Türü"; + +$_t["tr"]["The account, %h%s%h, has been successfully modified."] = "Hesap %h%s%h başarıyla düzenlendi."; + +$_t["tr"]["Account Suspended"] = "Hesap Donduruldu"; + +$_t["tr"]["Status"] = "Durum"; + +$_t["tr"]["New Package Notify"] = "Yeni Paket Bildirimi"; + +$_t["tr"]["IRC Nick"] = "IRC Nick"; + +$_t["tr"]["Trusted user"] = "Güvenilen kullanıcı"; + +$_t["tr"]["No results matched your search criteria."] = "Uygun sonuç bulunamadı."; + +$_t["tr"]["Normal user"] = "Normal kullanıcı"; + +$_t["tr"]["Never"] = "Hiç"; + +$_t["tr"]["User"] = "Kullanıcı"; + +$_t["tr"]["Active"] = "Aktif"; + +$_t["tr"]["Last Voted"] = "Son Oylanan"; + +$_t["tr"]["Real Name"] = "Gerçek İsim"; + +$_t["tr"]["Edit Account"] = "Hesap Bilgilerini Düzenle"; + +$_t["tr"]["Password fields do not match."] = "Şifreler birbirinin aynı değil."; + +$_t["tr"]["Language"] = "Dil"; + +$_t["tr"]["A Trusted User cannot assign Developer status."] = "Güvenilen Kullanıcı Geliştirici durumu belirleyemez."; + +$_t["tr"]["The address, %h%s%h, is already in use."] = "%h%s%h adresi kullanımda."; + +$_t["tr"]["No more results to display."] = "Gösterilecek daha fazla sonuç yok."; + +$_t["tr"]["Type"] = "Tür"; + +$_t["tr"]["Click on the Home link above to login."] = "Giriş yapmak için aşağıdaki Ev bağlantısını tıklayın.."; + +$_t["tr"]["Sort by"] = "Sıralama kriteri"; + +$_t["tr"]["Re-type password"] = "Şifreyi tekrarlayın"; + +$_t["tr"]["Language is not currently supported."] = "Dil henüz desteklenmiyor."; + +$_t["tr"]["Any type"] = "Herhangi bir tür"; + +$_t["tr"]["Last vote"] = "Last vote"; + +$_t["tr"]["Suspended"] = "Donduruldu"; + +$_t["tr"]["Trusted User"] = "Güvenilen Kullanıcı"; + +$_t["tr"]["Missing User ID"] = "Kullanıcı kimliği eksik"; + +$_t["tr"]["Developer"] = "Geliştirici"; + +$_t["tr"]["View this user's packages"] = "Bu kullanıcı tarafından hazırlanan paketleri göster"; + diff --git a/web/lang/tr/aur_po.inc b/web/lang/tr/aur_po.inc new file mode 100644 index 00000000..7d766cb3 --- /dev/null +++ b/web/lang/tr/aur_po.inc @@ -0,0 +1,31 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Home"] = "Ev"; + +$_t["tr"]["%s: An ArchLinux project"] = "%s: Bir ArchLinux projesi"; + +$_t["tr"]["Packages"] = "Paketler"; + +$_t["tr"]["Accounts"] = "Hesaplar"; + +$_t["tr"]["Logout"] = "Çıkış"; + +$_t["tr"]["%s: %sAn ArchLinux project%s"] = "%s: %sBir ArchLinux projesi%s"; + +$_t["tr"]["Discussion"] = "Tartışma"; + +$_t["tr"]["Bugs"] = "Hatalar"; + +$_t["tr"]["Trusted User"] = "Güvenilen Kullanıcı"; + diff --git a/web/lang/tr/common_po.inc b/web/lang/tr/common_po.inc new file mode 100644 index 00000000..ebddd873 --- /dev/null +++ b/web/lang/tr/common_po.inc @@ -0,0 +1,35 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Reset"] = "Sıfırla"; + +$_t["tr"]["Username"] = "Kullanıcı Adı"; + +$_t["tr"]["Email Address"] = "Eposta adresi"; + +$_t["tr"]["Less"] = "Önceki"; + +$_t["tr"]["Clear"] = "Temizle"; + +$_t["tr"]["required"] = "gerekli"; + +$_t["tr"]["Update"] = "Güncelle"; + +$_t["tr"]["Submit"] = "Gönder"; + +$_t["tr"]["Password"] = "Şifre"; + +$_t["tr"]["Create"] = "Oluştur"; + +$_t["tr"]["More"] = "Sonraki"; + diff --git a/web/lang/en/template_po.inc b/web/lang/tr/hacker_po.inc index db437be1..a0bdfd13 100644 --- a/web/lang/en/template_po.inc +++ b/web/lang/tr/hacker_po.inc @@ -11,6 +11,7 @@ include_once("translator.inc"); global $_t; -$_t["en"]["Hi, this is worth reading!"] = "Hi, this is worth reading!"; +$_t["tr"]["Your session id is invalid."] = "Session kimliğiniz geçerli değil."; + +$_t["tr"]["If this problem persists, please contact the site administrator."] = "Bu sorun devam ederse, sistem yöneticisi ile iletişime geçin."; -?>
\ No newline at end of file diff --git a/web/lang/tr/index_po.inc b/web/lang/tr/index_po.inc new file mode 100644 index 00000000..dd85b91b --- /dev/null +++ b/web/lang/tr/index_po.inc @@ -0,0 +1,91 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["You must supply a password."] = "Bir parola belirlemelisiniz."; + +$_t["tr"]["You must supply a username."] = "Bir kullanıcı adı belirlemelisiniz."; + +$_t["tr"]["After that, this can be filled in with more meaningful text."] = "After that, this can be filled in with more meaningful text."; + +$_t["tr"]["Logged-in as: %h%s%h"] = "%h%s%h olarak giriş yapıldı"; + +$_t["tr"]["Your account has been suspended."] = "Hesabınız donduruldu."; + +$_t["tr"]["Password:"] = "Şifre:"; + +$_t["tr"]["Username:"] = "Kullanıcı Adı:"; + +$_t["tr"]["Welcome to the AUR! If you're a newcomer, you may want to read the %hGuidelines%h."] = "AUR'a hoş geldiniz! Yeni katıldıysanız, belki de %hKılavuz%h 'a bir göz atmak istersiniz."; + +$_t["tr"]["This is where the intro text will go."] = ""; + +$_t["tr"]["Error trying to generate session id."] = "Session kimliği oluşturulmaya çalışılırken hata."; + +$_t["tr"]["For now, it's just a place holder."] = ""; + +$_t["tr"]["It's more important to get the login functionality finished."] = ""; + +$_t["tr"]["Login"] = "Giriş"; + +$_t["tr"]["Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience."] = "T"; + +$_t["tr"]["If you have feedback about the AUR, please leave it in %hFlyspray%h."] = "AUR ile ilgili geribilidirim yapmak için lütfen %hFlyspray%h 'i kullanın."; + +$_t["tr"]["Latest Packages:"] = "Son paketler:"; + +$_t["tr"]["Discussion about the AUR takes place on the %sTUR Users List%s."] = "AUR ile ilgili tartışmalar %sTUR Kullanıcı Listesi%s 'nde."; + +$_t["tr"]["Email discussion about the AUR takes place on the %sTUR Users List%s."] = "Email discussion about the AUR takes place on the %sTUR Users List%s."; + +$_t["tr"]["Recent Updates"] = "Son Güncellemeler"; + +$_t["tr"]["Community"] = "Topluluk"; + +$_t["tr"]["Package Counts"] = "Paket Sayıları"; + +$_t["tr"]["Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information."] = "AUR'a hoşgeldiniz! Ayrıntılı bilgi için lütfen %hAUR Kullanıcı Kılavuzu%h ve %hAUR GK Kulavuzu%hnu okuyun."; + +$_t["tr"]["Unsupported"] = "Desteklenmiyor"; + +$_t["tr"]["Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!"] = "Eklenen PKGBUILDler %hArch Paket Standartları%hna %huymalı%h aksi takdirde silinecektir!"; + +$_t["tr"]["Statistics"] = "İstatistikler"; + +$_t["tr"]["My Statistics"] = "İstatistiklerim"; + +$_t["tr"]["Flagged as safe by me"] = "Tarafımdan güvenli olarak işaretlenmiş"; + +$_t["tr"]["Flagged as safe"] = "Güvenli olarak işaretmiş"; + +$_t["tr"]["User Statistics"] = "Kullanıcı İstatistikleri"; + +$_t["tr"]["Registered Users"] = "Kayıtlı Kullanıcılar"; + +$_t["tr"]["Trusted Users"] = "Güvenilen Kullanıcılar"; + +$_t["tr"]["Packages in unsupported"] = "Desteklenmeyen paketler"; + +$_t["tr"]["Packages in unsupported and flagged as safe"] = "Desteklenmeyen ve güvenli olarak olarak işaretlenen paketler"; + +$_t["tr"]["Packages in [community]"] = "[community] 'deki paketler"; + +$_t["tr"]["Remember to vote for your favourite packages!"] = "Beğendiğiniz paketleri oylamayı unutmayın!"; + +$_t["tr"]["Packages added or updated in the past 7 days"] = "Son 7 günde eklenen ya da güncellenen paketler"; + +$_t["tr"]["Out-of-date"] = "Güncelliğini yitirmiş"; + +$_t["tr"]["DISCLAIMER"] = "DISCLAIMER"; + +$_t["tr"]["Login failure: Bad user or pass."] = "Giriş hatası: Hatalı kullanıcı adı veya parola"; + diff --git a/web/lang/pt/template_po.inc b/web/lang/tr/logout_po.inc index ed4a1d04..bdd31f02 100644 --- a/web/lang/pt/template_po.inc +++ b/web/lang/tr/logout_po.inc @@ -11,6 +11,5 @@ include_once("translator.inc"); global $_t; -$_t["pt"]["Hi, this is worth reading!"] = "Olá, vale a pena ler isso!"; +$_t["tr"]["You have been successfully logged out."] = "Başarıyla çıkış yaptınız."; -?>
\ No newline at end of file diff --git a/web/lang/tr/pkgedit_po.inc b/web/lang/tr/pkgedit_po.inc new file mode 100644 index 00000000..1406dcb1 --- /dev/null +++ b/web/lang/tr/pkgedit_po.inc @@ -0,0 +1,35 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Missing package ID."] = ""; + +$_t["tr"]["Invalid category ID."] = "Geçersiz kategori."; + +$_t["tr"]["Enter your comment below."] = "Enter your comment below."; + +$_t["tr"]["You are not allowed to delete this comment."] = "Bu yorumu silme yetkiniz yok."; + +$_t["tr"]["Missing comment ID."] = "Missing comment ID."; + +$_t["tr"]["Package category updated."] = "Paket katgorisi güncellendi."; + +$_t["tr"]["You must be logged in before you can edit package information."] = "Paket bilgilerini güncellemek için giriş yapmalısınız."; + +$_t["tr"]["Comment has been deleted."] = "Yorum silindi."; + +$_t["tr"]["You've found a bug if you see this...."] = ""; + +$_t["tr"]["Comment has been added."] = "Yorum eklendi."; + +$_t["tr"]["Select new category"] = "Yeni kategori seçin"; + diff --git a/web/lang/tr/pkgfuncs_po.inc b/web/lang/tr/pkgfuncs_po.inc new file mode 100644 index 00000000..8f2c9928 --- /dev/null +++ b/web/lang/tr/pkgfuncs_po.inc @@ -0,0 +1,163 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Category"] = "Kategori"; + +$_t["tr"]["Votes"] = "Oy"; + +$_t["tr"]["Comment by: %h%s%h on %h%s%h"] = "Yorum sahibi: %h%s%h on %h%s%h"; + +$_t["tr"]["Location"] = "Yer"; + +$_t["tr"]["Delete comment"] = "Yorumu sil"; + +$_t["tr"]["Go"] = "Git"; + +$_t["tr"]["Unflag Out-of-date"] = "Güncel Değil İşaretini Kaldır"; + +$_t["tr"]["Go back to %hpackage details view%h."] = "Go back to %hpackage details view%h."; + +$_t["tr"]["Error retrieving package details."] = "Paket bilgileri alınırken hata oluştu."; + +$_t["tr"]["Description"] = "Açıklama"; + +$_t["tr"]["My Packages"] = "Paketlerim"; + +$_t["tr"]["Keywords"] = "Anahtar kelimeler"; + +$_t["tr"]["Dependencies"] = "Bağımlılıklar"; + +$_t["tr"]["Disown Packages"] = "Paketleri sahiplenmeyi bırak"; + +$_t["tr"]["Package details could not be found."] = "Paket ayrıntıları bulunamadı."; + +$_t["tr"]["Package Details"] = "Paket Ayrıntıları"; + +$_t["tr"]["Error retrieving package list."] = "Paket listesi alınırken hata oluştu."; + +$_t["tr"]["Files"] = "Dosyalar"; + +$_t["tr"]["None"] = "None"; + +$_t["tr"]["Name"] = "Name"; + +$_t["tr"]["Per page"] = "Her sayfa"; + +$_t["tr"]["Go back to %hsearch results%h."] = "%hArama sonuçları%h'na dön."; + +$_t["tr"]["No packages matched your search criteria."] = "Eşleşen paket bulunamadı."; + +$_t["tr"]["O%hrphan"] = ""; + +$_t["tr"]["orphan"] = "sahipsiz"; + +$_t["tr"]["Un-Vote"] = ""; + +$_t["tr"]["change category"] = "kategori değiştir"; + +$_t["tr"]["UnNotify"] = ""; + +$_t["tr"]["Delete Packages"] = "Paketleri Sil"; + +$_t["tr"]["Maintainer"] = "Destekçi"; + +$_t["tr"]["Add Comment"] = "Yorum Ekle"; + +$_t["tr"]["Tarball"] = "Tarball"; + +$_t["tr"]["Flag Out-of-date"] = "Güncelliğini yitirmiş olarak işaretle"; + +$_t["tr"]["Manage"] = "Yönet"; + +$_t["tr"]["Sort by"] = ""; + +$_t["tr"]["Sort order"] = "Sıralama kriteri"; + +$_t["tr"]["Ascending"] = "Artan"; + +$_t["tr"]["Descending"] = "Azalan"; + +$_t["tr"]["Actions"] = "Eylemler"; + +$_t["tr"]["Sources"] = "Kaynaklar"; + +$_t["tr"]["Search Criteria"] = "Arama Kriteri"; + +$_t["tr"]["Notify"] = "Bilgilendir"; + +$_t["tr"]["Out of Date"] = "Güncel Değil"; + +$_t["tr"]["Vote"] = "Oy ver"; + +$_t["tr"]["Adopt Packages"] = "Paketleri Sahiplen"; + +$_t["tr"]["Yes"] = "Evet"; + +$_t["tr"]["Package Listing"] = "Paket Listeleme"; + +$_t["tr"]["Orphans"] = "Sahipsiz"; + +$_t["tr"]["Any"] = "Tümü"; + +$_t["tr"]["Voted"] = "Oylanan"; + +$_t["tr"]["No New Comment Notification"] = "Yeni Yorum Bildirim Yok"; + +$_t["tr"]["New Comment Notification"] = "Yeni Yorum Bildirimi"; + +$_t["tr"]["Comments"] = "Yorumlar"; + +$_t["tr"]["The above files have been verified (by %s) and are safe to use."] = "Yukarıdaki dosyalar doğrulandı (by %s) ve güvenli olarak işaretlendi."; + +$_t["tr"]["Be careful! The above files may contain malicious code that can damage your system."] = "Dikkat! Yukarıdaki dosyalar sisteminize zarar verebilecek nitelikte olabilir."; + +$_t["tr"]["Flag Safe"] = "Güvenli Olarak İşaretle"; + +$_t["tr"]["Flag Package Safe To Use"] = "Paketi Güvenli Olarak İşaretle"; + +$_t["tr"]["Unflag Safe"] = "Güvenilirlik İşaretini Kaldır"; + +$_t["tr"]["Unflag Package Safe To Use"] = "Paketin Güvenilirlik İşaretini Kaldır"; + +$_t["tr"]["Safe"] = "Güvenli"; + +$_t["tr"]["Age"] = "Yaş"; + +$_t["tr"]["First Submitted"] = "İlk Gönderim"; + +$_t["tr"]["Last Updated"] = "Son Güncelleme"; + +$_t["tr"]["Search by"] = ""; + +$_t["tr"]["Submitter"] = "Gönderen"; + +$_t["tr"]["All"] = "Tümü"; + +$_t["tr"]["Unsafe"] = "Güvensiz"; + +$_t["tr"]["Status"] = "Durum"; + +$_t["tr"]["License"] = "Lisans"; + +$_t["tr"]["unknown"] = "bilinmiyor"; + +$_t["tr"]["Required by"] = ""; + +$_t["tr"]["The above files have been verified (by %h%s%h) and are safe to use."] = "The above files have been verified (by %h%s%h) and are safe to use."; + +$_t["tr"]["This package has been flagged out of date."] = "Bu paket 'güncel değil' olarak işaretlendi."; + +$_t["tr"]["Toggle Notify"] = "Toggle Notify"; + +$_t["tr"]["Showing results %s - %s of %s"] = "%s - %s görüntüleniyor, %s sonuç arasından"; + diff --git a/web/lang/tr/search_po.inc b/web/lang/tr/search_po.inc new file mode 100644 index 00000000..6eaf51b0 --- /dev/null +++ b/web/lang/tr/search_po.inc @@ -0,0 +1,77 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["None of the selected packages could be deleted."] = "None of the selected packages could be deleted."; + +$_t["tr"]["Your votes have been removed from the selected packages."] = "Your votes have been removed from the selected packages."; + +$_t["tr"]["You did not select any packages to un-vote for."] = "You did not select any packages to un-vote for."; + +$_t["tr"]["The selected packages have been unflagged."] = "The selected packages have been unflagged."; + +$_t["tr"]["You did not select any packages to adopt."] = "You did not select any packages to adopt."; + +$_t["tr"]["You must be logged in before you can flag packages."] = "You must be logged in before you can flag packages."; + +$_t["tr"]["You must be logged in before you can get notifications on comments."] = "You must be logged in before you can get notifications on comments."; + +$_t["tr"]["You must be logged in before you can vote for packages."] = "You must be logged in before you can vote for packages."; + +$_t["tr"]["The selected packages have been flagged out-of-date."] = "The selected packages have been flagged out-of-date."; + +$_t["tr"]["The selected packages have been deleted."] = "The selected packages have been deleted."; + +$_t["tr"]["You did not select any packages to vote for."] = "You did not select any packages to vote for."; + +$_t["tr"]["You must be logged in before you can disown packages."] = "You must be logged in before you can disown packages."; + +$_t["tr"]["Error trying to retrieve package details."] = "Error trying to retrieve package details."; + +$_t["tr"]["The selected packages have been adopted."] = "The selected packages have been adopted."; + +$_t["tr"]["You have been removed from the comment notification list for %s."] = "You have been removed from the comment notification list for %s."; + +$_t["tr"]["Your votes have been cast for the selected packages."] = "Your votes have been cast for the selected packages."; + +$_t["tr"]["You must be logged in before you can cancel notification on comments."] = "You must be logged in before you can cancel notification on comments."; + +$_t["tr"]["You must be logged in before you can adopt packages."] = "You must be logged in before you can adopt packages."; + +$_t["tr"]["You have been added to the comment notification list for %s."] = "You have been added to the comment notification list for %s."; + +$_t["tr"]["You did not select any packages to disown."] = "You did not select any packages to disown."; + +$_t["tr"]["You must be logged in before you can un-vote for packages."] = "You must be logged in before you can un-vote for packages."; + +$_t["tr"]["You must be logged in before you can unflag packages."] = "You must be logged in before you can unflag packages."; + +$_t["tr"]["You did not select any packages to unflag."] = "You did not select any packages to unflag."; + +$_t["tr"]["You did not select any packages to delete."] = "You did not select any packages to delete."; + +$_t["tr"]["Couldn't add to notification list."] = "Couldn't add to notification list."; + +$_t["tr"]["You did not select any packages to flag."] = "You did not select any packages to flag."; + +$_t["tr"]["The selected packages have been disowned."] = "The selected packages have been disowned."; + +$_t["tr"]["Couldn't remove from notification list."] = "Couldn't remove from notification list."; + +$_t["tr"]["The selected packages have been flagged safe."] = "The selected packages have been flagged safe."; + +$_t["tr"]["Couldn't flag package safe."] = "Couldn't flag package safe."; + +$_t["tr"]["The selected packages have been unflagged safe."] = "The selected packages have been unflagged safe."; + +$_t["tr"]["Couldn't unflag package safe."] = "Couldn't unflag package safe."; + diff --git a/web/lang/tr/submit_po.inc b/web/lang/tr/submit_po.inc new file mode 100644 index 00000000..e8f63eb5 --- /dev/null +++ b/web/lang/tr/submit_po.inc @@ -0,0 +1,97 @@ +<?php +# INSTRUCTIONS TO TRANSLATORS +# +# This file contains the i18n translations for a subset of the +# Arch Linux User-community Repository (AUR). This is a PHP +# script, and as such, you MUST pay great attention to the syntax. +# If your text contains any double-quotes ("), you MUST escape +# them with the backslash character (\). +# + +include_once("translator.inc"); +global $_t; + +$_t["tr"]["Missing build function in PKGBUILD."] = "PKGBUILD içinde build fonksiyonu bulunmadı."; + +$_t["tr"]["Could not change directory to %s."] = "%s dizinine geçilemedi."; + +$_t["tr"]["No"] = "Hayır"; + +$_t["tr"]["Missing pkgdesc variable in PKGBUILD."] = "PKGBUILD içinde pkgdesc değişkeni bulunamadı."; + +$_t["tr"]["Error trying to upload file - please try again."] = "Dosya yüklenirken hata - lütfen tekrar deneyin."; + +$_t["tr"]["Error exec'ing the mv command."] = "mv komutu işlenirken hata oluştu."; + +$_t["tr"]["You must create an account before you can upload packages."] = "Paket yükleyebilmek için bir hesap oluşturmalısınız."; + +$_t["tr"]["Package upload successful."] = "Paket başarıyla yüklendi."; + +$_t["tr"]["Overwrite existing package?"] = "Mevcut paketin üzerine yazılsın mı?"; + +$_t["tr"]["You did not specify a package name."] = "Bir paket adı belirlemediniz."; + +$_t["tr"]["Error trying to unpack upload - PKGBUILD does not exist."] = "Yüklenen dosya açılırken hata - PKGBUILD mevcut değil."; + +$_t["tr"]["Could not create incoming directory: %s."] = "Gelen dizin oluşturulamadı: %s."; + +$_t["tr"]["Upload package file"] = "Paket yükle"; + +$_t["tr"]["Package Location"] = "Paket Konumu"; + +$_t["tr"]["Missing url variable in PKGBUILD."] = "PKGBUILD içinde url değişkeni bulunamadı."; + +$_t["tr"]["Package names do not match."] = "Paket isimleri uyuşmuyor."; + +$_t["tr"]["Package Category"] = "Paket Kategorisi"; + +$_t["tr"]["Could not change to directory %s."] = "%s dizinine geçilemedi."; + +$_t["tr"]["You did not tag the 'overwrite' checkbox."] = "'üzerine yaz' kutusunu işaretlemediniz."; + +$_t["tr"]["Invalid name: only lowercase letters are allowed."] = "Geçersiz isim: yalnızca küçük harf kullanılabilir."; + +$_t["tr"]["Missing pkgver variable in PKGBUILD."] = "PKGBUILD içinde pkgver değişkeni bulunamadı."; + +$_t["tr"]["Package name"] = "Paket adı"; + +$_t["tr"]["Upload"] = "Yükle"; + +$_t["tr"]["Missing md5sums variable in PKGBUILD."] = "PKGBUILD içinde md5sums değişkeni bulunamadı."; + +$_t["tr"]["Missing pkgrel variable in PKGBUILD."] = "PKGBUILD içinde pkgrel değişkeni bulunamadı."; + +$_t["tr"]["Missing pkgname variable in PKGBUILD."] = "PKGBUILD içinde pkgname değişkeni bulunamadı."; + +$_t["tr"]["Error - No file uploaded"] = "Hata - Yüklenecek dosya yok"; + +$_t["tr"]["You are not allowed to overwrite the %h%s%h package."] = "%h%s%h paketi üzerinde değişiklik yapma yetkiniz yok."; + +$_t["tr"]["Select Location"] = "Konum Seçin"; + +$_t["tr"]["Select Category"] = "Kategori Seçin"; + +$_t["tr"]["Comment"] = "Yorum"; + +$_t["tr"]["Could not create directory %s."] = "%s dizini oluşturulamadı."; + +$_t["tr"]["Unknown file format for uploaded file."] = "Yüklenen dosya biçimi bilinmiyor."; + +$_t["tr"]["Missing source variable in PKGBUILD."] = "PKGBUILD içinde source değişkeni bulunamadı."; + +$_t["tr"]["Sorry, uploads are not permitted by this server."] = "Üzgünüm, bu sunucu üzerinden yükleme kabul edilmiyor."; + +$_t["tr"]["You must supply a comment for this upload/change."] = "Bu yükleme/değişiklik için bir yorum belirtmelisiniz."; + +$_t["tr"]["Yes"] = "Evet"; + +$_t["tr"]["Package URL is missing a protocol (ie. http:// ,ftp://)"] = "Paket URL'si protokolü hayalı (ör. http:// ,ftp://)"; + +$_t["tr"]["Could not re-tar"] = "Yeniden tarlanamadı"; + +$_t["tr"]["Binary packages and filelists are not allowed for upload."] = "İkili paket ve dosya listesi yüklemelerine izin verilmiyor."; + +$_t["tr"]["Missing arch variable in PKGBUILD."] = "PKGBUILD içinde arch değişkeni bulunamadı."; + +$_t["tr"]["Missing license variable in PKGBUILD."] = "PKGBUILD içinde license değişkeni bulunamadı."; + diff --git a/web/lang/test_po.inc b/web/lang/tr/timeout_po.inc index a2c5c5c3..c28ae7de 100644 --- a/web/lang/test_po.inc +++ b/web/lang/tr/timeout_po.inc @@ -11,22 +11,7 @@ include_once("translator.inc"); global $_t; -include_once("en/test_po.inc"); +$_t["tr"]["Click on the Home link above to log in."] = "Giriş yapmak için yukarıdaki Ev bağlantısını tıklayın."; -include_once("pl/test_po.inc"); +$_t["tr"]["Your session has timed out. You must log in again."] = "Zaman aşımı. Tekrar giriş yapmalısınız."; -include_once("it/test_po.inc"); - -include_once("ca/test_po.inc"); - -include_once("pt/test_po.inc"); - -include_once("es/test_po.inc"); - -include_once("de/test_po.inc"); - -include_once("ru/test_po.inc"); - -include_once("fr/test_po.inc"); - -?>
\ No newline at end of file diff --git a/web/lang/tu_po.inc b/web/lang/tu_po.inc new file mode 100644 index 00000000..00f603a3 --- /dev/null +++ b/web/lang/tu_po.inc @@ -0,0 +1,4 @@ +<?php + +include_once("translator.inc"); +global $_t; diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc index bbd6b740..73db2708 100644 --- a/web/lib/acctfuncs.inc +++ b/web/lib/acctfuncs.inc @@ -644,7 +644,12 @@ function try_login() { if ($logged_in) { # set our SID cookie - setcookie("AURSID", $new_sid, 0, "/"); + if ($_POST['remember_me'] == "on") + # Set cookies for 30 days. + $cookie_time = time() + (60 * 60 * 24 * 30); + else + $cookie_time = 0; + setcookie("AURSID", $new_sid, $cookie_time, "/"); # header("Location: /index.php"); header("Location: " . $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']); $login_error = ""; diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 81ffde26..a126bb94 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -311,12 +311,11 @@ function set_lang() { $LANG = $row[0]; } $update_cookie = 1; - } else { - $LANG = "en"; } + # Set $LANG to default if nothing is valid. if (!array_key_exists($LANG, $SUPPORTED_LANGS)) { - $LANG = "en"; # default to English + $LANG = DEFAULT_LANG; } if ($update_cookie) { @@ -336,7 +335,7 @@ function html_header($title="") { global $SUPPORTED_LANGS; $login = try_login(); - $login_error = $login['error']; + $login_error = $login['error']; $title = htmlspecialchars($title, ENT_QUOTES); @@ -375,19 +374,10 @@ function can_submit_pkg($name="", $sid="") { # recursive delete directory # function rm_rf($dirname="") { - $d = dir($dirname); - while ($f = $d->read()) { - if ($f != "." && $f != "..") { - if (is_dir($dirname."/".$f)) { - rm_rf($dirname."/".$f); - } - if (is_file($dirname."/".$f) || is_link($dirname."/".$f)) { - unlink($dirname."/".$f); - } - } + if ($dirname != "") { + exec('rm -rf ' . escapeshellcmd($dirname)); } - $d->close(); - rmdir($dirname); + return; } @@ -410,4 +400,3 @@ function uid_from_username($username="") return $row[0]; } -?> diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index 953f5aba..6ff9b0f2 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib/aurjson.class.php @@ -22,6 +22,8 @@ if (!extension_loaded('json')) class AurJSON { private $dbh = false; private $exposed_methods = array('search','info'); + private $fields = array('ID','Name','Version','Description', + 'URL','URLPath','License','NumVotes','OutOfDate'); /** * Handles post data, and routes the request. @@ -42,7 +44,9 @@ class AurJSON { // do the routing if ( in_array($http_data['type'], $this->exposed_methods) ) { // ugh. this works. I hate you php. - $json = call_user_func_array(array(&$this,$http_data['type']),$http_data['arg']); + $json = call_user_func_array(array(&$this,$http_data['type']), + $http_data['arg']); + // allow rpc callback for XDomainAjax if ( isset($http_data['callback']) ) { return $http_data['callback'] . "({$json})"; @@ -87,22 +91,22 @@ class AurJSON { } $keyword_string = mysql_real_escape_string($keyword_string, $this->dbh); - $query = sprintf( - "SELECT Name,ID FROM Packages WHERE ( Name LIKE '%%%s%%' OR Description LIKE '%%%s%%' ) AND DummyPkg=0", - $keyword_string, $keyword_string ); + + $query = "SELECT " . implode(',', $this->fields) . + " FROM Packages WHERE DummyPkg=0 AND "; + $query .= sprintf("( Name LIKE '%%%s%%' OR Description LIKE '%%%s%%' )", + $keyword_string, $keyword_string); $result = db_query($query, $this->dbh); if ( $result && (mysql_num_rows($result) > 0) ) { $search_data = array(); while ( $row = mysql_fetch_assoc($result) ) { - $elem = array( - 'Name' => $row['Name'], - 'ID' => $row['ID'] ); - array_push($search_data,$elem); - } + array_push($search_data, $row); + } + mysql_free_result($result); - return $this->json_results('search',$search_data); + return $this->json_results('search', $search_data); } else { return $this->json_error('No results found'); @@ -115,7 +119,8 @@ class AurJSON { * @return mixed Returns an array of value data containing the package data **/ private function info($pqdata) { - $base_query = "SELECT ID,Name,Version,Description,URL,URLPath,License,NumVotes,OutOfDate FROM Packages WHERE DummyPkg=0 AND "; + $base_query = "SELECT " . implode(',', $this->fields) . + " FROM Packages WHERE DummyPkg=0 AND "; if ( is_numeric($pqdata) ) { // just using sprintf to coerce the pqd to an int @@ -127,7 +132,8 @@ class AurJSON { if(get_magic_quotes_gpc()) { $pqdata = stripslashes($pqdata); } - $query_stub = sprintf("Name=\"%s\"",mysql_real_escape_string($pqdata)); + $query_stub = sprintf("Name=\"%s\"", + mysql_real_escape_string($pqdata)); } $result = db_query($base_query.$query_stub, $this->dbh); @@ -135,11 +141,11 @@ class AurJSON { if ( $result && (mysql_num_rows($result) > 0) ) { $row = mysql_fetch_assoc($result); mysql_free_result($result); - return $this->json_results('info',$row); + return $this->json_results('info', $row); } else { return $this->json_error('No result found'); } } } -?> + diff --git a/web/lib/config.inc.proto b/web/lib/config.inc.proto index 7a0a155d..7248b930 100644 --- a/web/lib/config.inc.proto +++ b/web/lib/config.inc.proto @@ -16,18 +16,24 @@ define( "USERNAME_MAX_LEN", 16 ); define( "PASSWD_MIN_LEN", 4 ); define( "PASSWD_MAX_LEN", 128 ); -$LOGIN_TIMEOUT = 7200; # number of idle seconds before timeout +# Language that messages are initially written in. +# This should never change. +define("DEFAULT_LANG", "en"); -$SUPPORTED_LANGS = array( # what languages we have translations for +# Languages we have translations for +$SUPPORTED_LANGS = array( + "ca" => "Català", + "de" => "Deutsch", "en" => "English", - "pl" => "Polski", + "es" => "Español", + "fr" => "Français", "it" => "Italiano", - "ca" => "Català", + "pl" => "Polski", "pt" => "Português", - "es" => "Español", - "de" => "Deutsch", "ru" => "Русский", - "fr" => "Français" + "tr" => "Türkçe" ); -?> +# Idle seconds before timeout +$LOGIN_TIMEOUT = 7200; + diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 77b0ab11..7fe3f317 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -128,6 +128,7 @@ function package_required($pkgid=0) { $q.= "WHERE PackageDepends.PackageID = Packages.ID "; $q.= "AND PackageDepends.DepPkgID = "; $q.= mysql_real_escape_string($pkgid); + $q.= " ORDER BY Name"; $result = db_query($q, $dbh); if (!$result) {return array();} while ($row = mysql_fetch_row($result)) { @@ -512,14 +513,12 @@ function package_details($id=0, $SID="") { if ($row["MaintainerUID"] == 0) { echo "<input type='submit' class='button' name='do_Adopt'"; echo " value='".__("Adopt Packages")."'>\n"; - } - - if ($row["MaintainerUID"] == uid_from_sid($SID) || - account_from_sid($SID) == "Trusted User" || - account_from_sid($SID) == "Developer") { + } else if ($row["MaintainerUID"] == uid_from_sid($SID) || + account_from_sid($SID) == "Trusted User" || + account_from_sid($SID) == "Developer") { echo "<input type='submit' class='button' name='do_Disown'"; echo " value='".__("Disown Packages")."'>\n"; - } + } if (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer") { @@ -986,4 +985,284 @@ function pkg_search_page($SID="") { return; } -?> +function pkg_flag ($atype, $ids, $action = True) { + if (!$atype) { + if ($action) { + return __("You must be logged in before you can flag packages."); + } else { + return __("You must be logged in before you can unflag packages."); + } + } + + if (empty($ids)) { + if ($action) { + return __("You did not select any packages to flag."); + } else { + return __("You did not select any packages to unflag."); + } + } + + foreach ($ids as $pid => $v) { + if (!is_numeric($pid)) { + if ($action) { + return __("You did not select any packages to flag."); + } else { + return __("You did not select any packages to unflag."); + } + } + } + + $dbh = db_connect(); + + $first = 1; + foreach ($ids as $pid => $v) { + if ($first) { + $first = 0; + $flag = $pid; + } else { + $flag .= ", " . $pid; + } + } + + $ood = $action ? 1 : 0; + $q = "UPDATE Packages SET OutOfDate = " . $ood; + $q.= " WHERE ID IN (" . $flag . ")"; + + db_query($q, $dbh); + + if ($action) { + # Notify of flagging by email + $f_name = username_from_sid($_COOKIE['AURSID']); + $f_email = email_from_sid($_COOKIE['AURSID']); + $f_uid = uid_from_sid($_COOKIE['AURSID']); + $q = "SELECT Packages.Name, Users.Email, Packages.ID "; + $q.= "FROM Packages, Users "; + $q.= "WHERE Packages.ID IN (" . $flag .") "; + $q.= "AND Users.ID = Packages.MaintainerUID "; + $q.= "AND Users.ID != " . $f_uid; + $result = db_query($q, $dbh); + if (mysql_num_rows($result)) { + while ($row = mysql_fetch_assoc($result)) { + # construct email + $body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . ". You may view your package at:\nhttp://aur.archlinux.org/packages.php?ID=" . $row['ID']; + $body = wordwrap($body, 70); + $headers = "To: ".$row['Email']."\nReply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n"; + @mail(' ', "AUR Out-of-date Notification for ".$row['Name'], $body, $headers); + } + } + } + + if ($action) { + return __("The selected packages have been flagged out-of-date."); + } else { + return __("The selected packages have been unflagged."); + } +} + +function pkg_delete ($atype, $ids) { + if (!$atype) { + return __("You must be logged in before you can disown packages."); + } + + if (empty($ids)) { + return __("You did not select any packages to delete."); + } + + # Delete the packages in $ids array (but only if they are Unsupported) + # + $dbh = db_connect(); + + # Delete the packages in $ids array + # + $first = 1; + foreach ($ids as $pid => $v) { + if ($first) { + $first = 0; + $delete = $pid; + } else { + $delete .= ", ".$pid; + } + } + + $field = "MaintainerUID"; + + # Only grab Unsupported packages that "we" own or are not owned at all + $ids_to_delete = array(); + $q = "SELECT Packages.ID FROM Packages, PackageLocations "; + $q.= "WHERE Packages.ID IN (" . $delete . ") "; + $q.= "AND Packages.LocationID = PackageLocations.ID "; + $q.= "AND PackageLocations.Location = 'unsupported' "; + + # If they're a TU or dev, can delete + if ($atype == "Trusted User" || $atype == "Developer") { + $result = db_query($q, $dbh); + } + + if ($result != Null && mysql_num_rows($result) > 0) { + while ($row = mysql_fetch_assoc($result)) { + $ids_to_delete[] = $row['ID']; + } + } + + if (empty($ids_to_delete)) { + return __("None of the selected packages could be deleted."); + } + + # These are the packages that are safe to delete + foreach ($ids_to_delete as $id) { + $q = "DELETE FROM PackageVotes WHERE PackageID = " . $id; + $result = db_query($q, $dbh); + + $q = "DELETE FROM PackageDepends WHERE PackageID = " . $id; + $result = db_query($q, $dbh); + + $q = "DELETE FROM PackageSources WHERE PackageID = " . $id; + $result = db_query($q, $dbh); + + $q = "DELETE FROM PackageComments WHERE PackageID = " . $id; + $result = db_query($q, $dbh); + + $q = "DELETE FROM Packages WHERE ID = " . $id; + $result = db_query($q, $dbh); + + $q = "DELETE FROM CommentNotify WHERE PkgID = " . $id; + $result = db_query($q, $dbh); + } + + return __("The selected packages have been deleted."); +} + +function pkg_adopt ($atype, $ids, $action = True) { + if (!$atype) { + if ($action) { + return __("You must be logged in before you can adopt packages."); + } else { + return __("You must be logged in before you can disown packages."); + } + } + + if (empty($ids)) { + if ($action) { + return __("You did not select any packages to adopt."); + } else { + return __("You did not select any packages to disown."); + } + } + + $dbh = db_connect(); + + $first = 1; + foreach ($ids as $pid => $v) { + if ($first) { + $first = 0; + $pkg = $pid; + } else { + $pkg .= ", ".$pid; + } + } + + $field = "MaintainerUID"; + $q = "UPDATE Packages "; + + if ($action) { + $user = uid_from_sid($_COOKIE["AURSID"]); + } else { + $user = 0; + } + + $q.= "SET $field = $user "; + $q.= "WHERE ID IN ($pkg) "; + + if ($action && $atype == "User") { + # Regular users may only adopt orphan packages from unsupported + $q.= "AND $field = 0 "; + $q.= "AND LocationID = 2 "; + } else if ($atype == "User") { + $q.= "AND $field = " . uid_from_sid($_COOKIE["AURSID"]); + } + + db_query($q, $dbh); + + if ($action) { + return __("The selected packages have been adopted."); + } else { + return __("The selected packages have been disowned."); + } +} + +function pkg_vote ($atype, $ids, $action = True) { + if (!$atype) { + if ($action) { + return __("You must be logged in before you can vote for packages."); + } else { + return __("You must be logged in before you can un-vote for packages."); + } + } + + if (empty($ids)) { + if ($action) { + return __("You did not select any packages to vote for."); + } else { + return __("Your votes have been removed from the selected packages."); + } + } + + $dbh = db_connect(); + $my_votes = pkgvotes_from_sid($_COOKIE["AURSID"]); + $uid = uid_from_sid($_COOKIE["AURSID"]); + + $first = 1; + foreach ($ids as $pid => $v) { + if ($action) { + $check = !isset($my_votes[$pid]); + } else { + $check = isset($my_votes[$pid]); + } + + if ($check) { + if ($first) { + $first = 0; + $vote_ids = $pid; + if ($action) { + $vote_clauses = "($uid, $pid)"; + } + } else { + $vote_ids .= ", $pid"; + if ($action) { + $vote_clauses .= ", ($uid, $pid)"; + } + } + } + } + + # only vote for packages the user hasn't already voted for + # + $op = $action ? "+" : "-"; + $q = "UPDATE Packages SET NumVotes = NumVotes $op 1 "; + $q.= "WHERE ID IN ($vote_ids)"; + + db_query($q, $dbh); + + if ($action) { + $q = "INSERT INTO PackageVotes (UsersID, PackageID) VALUES "; + $q.= $vote_clauses; + } else { + $q = "DELETE FROM PackageVotes WHERE UsersID = $uid "; + $q.= "AND PackageID IN ($vote_ids)"; + } + + db_query($q, $dbh); + + if ($action) { + $q = "UPDATE Users SET LastVoted = UNIX_TIMESTAMP() "; + $q.= "WHERE ID = $uid"; + + db_query($q, $dbh); + } + + if ($action) { + return __("Your votes have been cast for the selected packages."); + } else { + return __("Your votes have been removed from the selected packages."); + } +} diff --git a/web/lib/stats.inc b/web/lib/stats.inc new file mode 100644 index 00000000..6fbc0334 --- /dev/null +++ b/web/lib/stats.inc @@ -0,0 +1,72 @@ +<?php + +include_once('aur.inc'); + +function updates_table($dbh) +{ + $q = 'SELECT * FROM Packages WHERE DummyPkg != 1 ORDER BY GREATEST(SubmittedTS,ModifiedTS) DESC LIMIT 0 , 10'; + $newest_packages = db_query($q, $dbh); + include('stats/updates_table.php'); +} + +function user_table($user, $dbh) +{ + + $base_q = 'SELECT count(*) FROM Packages,PackageLocations,Users WHERE Packages.MaintainerUID = Users.ID AND Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = "%s" AND Users.Username="' . + mysql_real_escape_string($user).'"'; + + $result = db_query(sprintf($base_q, 'unsupported'), $dbh); + $row = mysql_fetch_row($result); + $maintainer_unsupported_count = $row[0]; + + $q = "SELECT count(*) FROM Packages,Users WHERE Packages.OutOfDate = 1 AND Packages.MaintainerUID = Users.ID AND Users.Username='" . + mysql_real_escape_string($user)."'"; + + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $flagged_outdated = $row[0]; + + # If the user is a TU calculate the number of the packages + $atype = account_from_sid($_COOKIE["AURSID"]); + + if (($atype == 'Trusted User') || ($atype == 'Developer')) { + $result = db_query(sprintf($base_q, 'community'), $dbh); + $row = mysql_fetch_row($result); + $maintainer_community_count = $row[0]; + } + + include('stats/user_table.php'); +} + +function general_stats_table($dbh) +{ + # AUR statistics + $q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported'"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $unsupported_count = $row[0]; + + $q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'community'"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $community_count = $row[0]; + + $q = "SELECT count(*) from Users"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $user_count = $row[0]; + + $q = "SELECT count(*) from Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND AccountTypes.AccountType = 'Trusted User'"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $tu_count = $row[0]; + + $targstamp = intval(strtotime("-7 days")); + $q = "SELECT count(*) from Packages WHERE (Packages.SubmittedTS >= $targstamp OR Packages.ModifiedTS >= $targstamp)"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $update_count = $row[0]; + + include('stats/general_stats_table.php'); +} + diff --git a/web/lib/translator.inc b/web/lib/translator.inc index 41ece89b..fb9ed635 100644 --- a/web/lib/translator.inc +++ b/web/lib/translator.inc @@ -25,7 +25,6 @@ include_once("common_po.inc"); - function __() { global $_t; global $LANG; @@ -37,14 +36,20 @@ function __() { # First argument is always string to be translated $tag = $args[0]; - $translated = $_t[$LANG][$tag]; + if (empty($LANG) || $LANG == DEFAULT_LANG) + $translated = $tag; + else + $translated = $_t[$LANG][$tag]; + if (empty($translated)) { # if it's a supported language, but there isn't a translation, # alert the visitor to the missing translation. # - $translated = "<b style=\"color: red\">_${tag}_</b>"; + $translated = "_${tag}_"; } + $translated = htmlspecialchars($translated, ENT_QUOTES); + # This condition is to reorganise the arguments in case of # deprecated usage. __("string", array("string","string")) if (!empty($args[1]) && is_array($args[1])) { @@ -60,7 +65,7 @@ function __() { $translated = preg_replace("/\%[sh]/", $args[$i], $translated, 1); } } + return $translated; } -?> diff --git a/web/lib/version.inc b/web/lib/version.inc index dcc2f3c2..9ef059f2 100644 --- a/web/lib/version.inc +++ b/web/lib/version.inc @@ -1,3 +1,3 @@ <?php -define( "AUR_VERSION", "<b>v1.5.2</b>" ); +define( "AUR_VERSION", "v1.5.2" ); diff --git a/web/template/footer.php b/web/template/footer.php index 9d85c7da..fe8f89cd 100644 --- a/web/template/footer.php +++ b/web/template/footer.php @@ -3,7 +3,7 @@ <br /> <?php if ($ver) { - print "<p style=\"text-align: right; font-size: 14px;\">$ver</p>\n"; + print "<p style=\"text-align: right; font-size: 14px;\"><b>$ver</b></p>\n"; } ?> </div> diff --git a/web/template/header.php b/web/template/header.php index 88fd6f65..f60acb4f 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -46,7 +46,6 @@ <?php if (isset($_COOKIE["AURSID"])) { ?> - <li><a href="/logout.php"><?php print __("Logout"); ?></a></li> <li><a href="/pkgsubmit.php"><?php print __("Submit"); ?></a></li> <li><a href="/packages.php?SeB=m&K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li> <?php diff --git a/web/template/login_form.php b/web/template/login_form.php index b2ed066f..727afd0a 100644 --- a/web/template/login_form.php +++ b/web/template/login_form.php @@ -2,6 +2,9 @@ <?php if (isset($_COOKIE["AURSID"])) { print __("Logged-in as: %h%s%h", array("<b>", username_from_sid($_COOKIE["AURSID"]), "</b>")); +?> +<br /><a href="/logout.php"><?php print __("Logout"); ?></a> +<?php } else { if ($login_error) { @@ -16,6 +19,7 @@ } ?>" /> <label><?php print __("Password:"); ?></label> <input type="password" name="passwd" size="30" maxlength="<?php print PASSWD_MAX_LEN; ?>" /> + <input type="checkbox" name="remember_me" /><?php print __("Remember me"); ?> <input type="submit" class="button" value="<?php print __("Login"); ?>" /> </form> <?php } ?> diff --git a/web/template/stats/general_stats_table.php b/web/template/stats/general_stats_table.php new file mode 100644 index 00000000..254b6b64 --- /dev/null +++ b/web/template/stats/general_stats_table.php @@ -0,0 +1,38 @@ +<table class='boxSoft'> +<tr> +<th colspan='2' class='boxSoftTitle'> +<span class='f3'><?php print __("Statistics") ?></span> +</th> +</tr> +<tr> +<td class='boxSoft'> +<span class='f4'><?php print __("Packages in unsupported"); ?></span> +</td> +<td class='boxSoft'><span class='f4'><?php print $unsupported_count; ?></span></td> +</tr> +<tr> +<td class='boxSoft'> +<span class='f4'><?php print __("Packages in [community]"); ?></span> +</td> +<td class='boxSoft'><span class='f4'><?php print $community_count; ?></span></td> +</tr> +<tr> +<td class='boxSoft'> +<span class='f4'><?php print __("Packages added or 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='blue'><span class='f4'><?php print __("Registered Users"); ?></span></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 $tu_count; ?></span></td> +</tr> +</table> + diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php new file mode 100644 index 00000000..e1eb888e --- /dev/null +++ b/web/template/stats/updates_table.php @@ -0,0 +1,40 @@ +<table class="boxSoft"> +<tr> +<th colspan="2" class="boxSoftTitle" style="text-align: right"> +<a href="rss2.php"><img src="images/rss.gif"></a> +<span class="f3"><?php print __("Recent Updates") ?><span class="f5"></span></span> +</th> +</tr> + +<?php while ($row = mysql_fetch_assoc($newest_packages)): ?> + +<tr> +<td class="boxSoft"> +<span class="f4"><span class="blue"> +<a href="packages.php?ID=<?php print intval($row["ID"]); ?>"> +<?php print $row["Name"] . ' ' . $row["Version"]; ?> +</a></span> +</td> +<td class="boxSoft"> + +<?php +$mod_int = intval($row["ModifiedTS"]); +$sub_int = intval($row["SubmittedTS"]); + +if ($mod_int != 0): + $modstring = gmdate("r", $mod_int); +elseif ($sub_int != 0): + $modstring = '<img src="images/new.gif" /> ' . gmdate("r", $sub_int); +else: + $modstring = '(unknown)'; +endif; +?> + +<span class="f4"><?php print $modstring; ?></span> +</td> +</tr> + +<?php endwhile; ?> + +</table> + diff --git a/web/template/stats/user_table.php b/web/template/stats/user_table.php new file mode 100644 index 00000000..ec719996 --- /dev/null +++ b/web/template/stats/user_table.php @@ -0,0 +1,38 @@ +<table class='boxSoft'> +<tr> +<th colspan='2' class='boxSoftTitle'> +<span class='f3'><?php print __("My Statistics"); ?></span> +</th> +</tr> +<tr> +<td class='boxSoft'> +<span class='f4'><?php print __("Packages in unsupported"); ?></span> +</td> +<td class='boxSoft'> +<span class='f4'><?php print $maintainer_unsupported_count; ?></span> +</td> +</tr> + +<?php if (($atype == 'Trusted User') || ($atype == 'Developer')) : ?> + +<tr> +<td class='boxSoft'> +<span class='f4'><?php print __("Packages in [community]"); ?></span> +</td> +<td class='boxSoft'> +<span class='f4'><?php print $maintainer_community_count; ?></span> +</td> +</tr> + +<?php endif; ?> + +<tr> +<td class='boxSoft'> +<span class='f4'><?php print __("Out-of-date"); ?></span> +</td> +<td class='boxSoft'> +<span class='f4'><?php print $flagged_outdated ?></span> +</td> +</tr> +</table> + diff --git a/web/html/template.php b/web/template/template.phps index 11e05e0b..7a866861 100644 --- a/web/html/template.php +++ b/web/template/template.phps @@ -1,5 +1,7 @@ <?php +# This template shows how a front page script is commonly coded. + set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); include("aur.inc"); # access AUR common functions @@ -10,11 +12,10 @@ html_header(); # print out the HTML header # Any text you print out to the visitor, use the __() function -# for i18n support. See 'testpo.php' for more details. +# for i18n support. See web/lib/translator.inc for more info. # 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 new file mode 100644 index 00000000..b1d69f6e --- /dev/null +++ b/web/template/tu_details.php @@ -0,0 +1,62 @@ +<div class="pgbox"> +<div class="pgboxtitle"><span class="f3"><?php print __("Proposal Details") ?></span></div> +<div class="pgboxbody"> +<?php if ($isrunning == 1) { ?> +<div style='text-align: center; font-weight: bold; color: red'><?php print __("This vote is still running.") ?></div> +<br /> +<?php } ?> +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><br /><br /> +<?php print str_replace("\n", "<br />\n", htmlentities($row['Agenda'])) ?><br /><br /> +<center> +<table cellspacing='3' class='boxSoft' style='width: 50%'> +</tr> +<tr> +<td class='boxSoft'> +<table 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> +</tr> +<tr> +<td class='data1'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td> +<td class='data1'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td> +<td class='data1'><span class='f5'><span class='blue'><?php print $row['Abstain'] ?></span></span></td> +<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> +<?php } else { ?> +<span style='color: green; font-weight: bold'><?php print __("Yes") ?></span> +<?php } ?> +</span></span></td> +</tr> +</table> +</table> +</div></div> +<br /> +<div class='pgbox'> +<div class='pgboxtitle'><span class='f3'><?php print __("Vote Actions") ?></span></div> +<div class='pgboxbody'> +<?php if ($canvote == 1) { ?> +<center><form action='tu.php?id=<?php print $row['ID'] ?>' method='post'> +<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'> +</form></center> +<?php } else { ?> +<center><?php print $errorvote ?></center> +<?php } ?> +</div></div> +<br /><center><a href='tu.php'><?php print __("Back") ?></a></center> diff --git a/web/template/tu_list.php b/web/template/tu_list.php new file mode 100644 index 00000000..bec29850 --- /dev/null +++ b/web/template/tu_list.php @@ -0,0 +1,68 @@ +<center> +<table cellspacing='3' class='boxSoft'> + <tr> + <td class='boxSoftTitle' align='right'> + <span class='f3'><?php print $type ?></span> + </td> + </tr> + <tr> + <td class='boxSoft'> + <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'> + <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> + </tr> + <?php if (mysql_num_rows($result) == 0) { ?> + <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'> + <?php + if (strlen($row["Agenda"]) >= $prev_Len) { + $row["Agenda"] = htmlentities(substr($row["Agenda"], 0, $prev_Len)) . "... - "; + } else { + $row["Agenda"] = htmlentities($row["Agenda"]) . " - "; + } + ?> + <?php print $row["Agenda"] ?><a href='/tu.php?id=<?php print $row['ID'] ?>'>[<?php print __("More") ?>]</a></span></span> + </td> + <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("j M y", $row["Submitted"]) ?></span></span></td> + <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("j M y", $row["End"]) ?></span></span></td> + <td class='<?php print $c ?>'><span class='f6'><span class='blue'> + <?php + if (!empty($row['User'])) { + print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>" . $row['User'] . "</a>"; + } else { + print "N/A"; + } + ?> + </span></span></td> + <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td> + <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td> + <td class='<?php print $c ?>'> + <?php + $q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]); + $hasvoted = mysql_num_rows(db_query($q, $dbh)); + ?> + <span class='f5'><span class='blue'> + <?php if ($hasvoted == 0) { ?> + <span style='color: red; font-weight: bold'><?php print __("No") ?></span> + <?php } else { ?> + <span style='color: green; font-weight: bold'><?php print __("Yes") ?></span> + <?php } ?> + </span></span> + </td> + </tr> + <?php } } ?> + </table> + </td> + </tr> +</table> +</center> diff --git a/web/testing/xmms-skins.tar.gz b/web/testing/xmms-skins.tar.gz Binary files differdeleted file mode 100644 index 1b313f8c..00000000 --- a/web/testing/xmms-skins.tar.gz +++ /dev/null diff --git a/web/testing/xmms-skins/PKGBUILD b/web/testing/xmms-skins/PKGBUILD deleted file mode 100644 index 83d934b6..00000000 --- a/web/testing/xmms-skins/PKGBUILD +++ /dev/null @@ -1,57 +0,0 @@ -# $Id: PKGBUILD,v 1.5 2004/05/24 18:09:09 eric Exp $ -# Maintainer: eric <eric@archlinux.org> -# Contributor: Damir Perisa <damir.perisa@bluewin.ch> -# 0.2 Upgrade: Lukas Sabota <punkrockguy318@comcast.net> - -pkgname=xmms-skins -pkgver=0.2 -pkgrel=2 -pkgdesc="An assortment of skins for XMMS" -url="http://www.xmms.org/skins.php http://www.spacefem.com/xmms.shtml" -depends=('xmms' 'unzip') -install=$pkgname.install -source=(http://spacefem.com/skins/ChalkItUp.tar.gz \ - http://www.xmms.org/files/Skins/Winamp_X_XMMS_1.01.tar.gz \ - http://www.xmms.org/files/Skins/arctic_Xmms.zip \ - http://www.xmms.org/files/Skins/chaos_XMMS.zip \ - http://www.xmms.org/files/Skins/detone_green.zip \ - http://gd.tuwien.ac.at/mm/xmms/Skins/titanium.zip \ - http://www.xmms.org/files/Skins/xmms-256.zip \ - http://themes.freshmeat.net/redir/acquaxmms/33610/url_tgz/acquaxmms-default-1.0.tar.gz \ - http://themes.freshmeat.net/redir/4dweorng/31359/url_tgz/4dweorng-default-1.0.tar.gz \ - http://themes.freshmeat.net/redir/bhxmms/29592/url_tgz/bhxmms-1.0.tar.gz \ - http://themes.freshmeat.net/redir/chaos2-xmms/34064/url_tgz/chaos2-xmms-default-1.4.tar.gz \ - http://www.xmms.org/files/Skins/Eclipse.tar.gz \ - http://themes.freshmeat.net/redir/jvcamp/34423/url_zip/jvcamp.zip \ - http://themes.freshmeat.net/redir/kenwood/34424/url_zip/kenwood1.zip \ - http://themes.freshmeat.net/redir/myxmms/45828/url_tgz/myxmms-default-1.01.tar.gz \ - http://themes.freshmeat.net/redir/ojxmms/29453/url_tgz/ojxmms-1.0.tar.gz \ - http://themes.freshmeat.net/redir/philipsxmms/34426/url_zip/radical.zip \ - http://themes.freshmeat.net/redir/pioneerlite/34425/url_zip/pioneerlite.zip \ - http://themes.freshmeat.net/redir/succubamp/35024/url_tgz/succubamp-default-1.0.tar.gz \ - http://themes.freshmeat.net/redir/ultraclean-xmms/46461/url_tgz/ultraclean-xmms-default.tar.gz \ - http://gd.tuwien.ac.at/mm/xmms/Skins/xmms_skin-0.9.zip \ - http://havardk.xmms.org/skins/xmmsskins-1.0.tar.gz) - -md5sums=('1a541ca4fbcbd60eaffac97a8e01a514' '60b5249618067baba41093d566f56c9f' \ - '2eef6028cb492eb6c61e3d4833f050d1' 'ae60e6fd170737af35caf219ddf859ec' \ - 'd3d5e43860db73a73b37a4949eebfe4f' 'a38d448ac059f42bd32e52f3999a6ca5' \ - '93891ba6259280d07a8781cd89234703' '92dd1ae652c43ea514764460b852f42c' \ - '9f79f309e5859b878b0cdcfb3d97a8b0' '55b6ada4b963132bb561156eddd47615' \ - '880be0a9dbbd9a3a458739063c6e0904' '89c7acb342bee6c7977047669ba195d7' \ - '7caaa4977c73c23e70c758a94c4104ef' '96340dd2f5634a6d49c9a314c1db7ad1' \ - '83f2cdc3d2cd2fbd5f3a4f92eba8d932' '108266865bcf9509edea839ca0a76d57' \ - '2b2fee8ce2ba18074dc202a50372ce95' 'acb8bf4189ad7d00a36ca74514686f8e' \ - 'a770f9e537a0cec3818b331696d7ffff' 'b90c21851264fd273bb06196fb157a7a' \ - 'aaaed9cd81b233e4fe5f896e9353443e' 'f625e06f82d8132209ed947c6d8502a4') - -build() { - cd $startdir/src/ - /bin/mkdir -p $startdir/pkg/usr/share/xmms/Skins - /bin/cp *.zip $startdir/pkg/usr/share/xmms/Skins - /bin/cp *.gz $startdir/pkg/usr/share/xmms/Skins - /bin/rm $startdir/pkg/usr/share/xmms/Skins/ultraclean-xmms-default.tar.gz - /bin/rm $startdir/pkg/usr/share/xmms/Skins/xmmsskins-1.0.tar.gz -} -# vim: ts=2 sw=2 et ft=sh - diff --git a/web/testing/xmms-skins/xmms-skins.install b/web/testing/xmms-skins/xmms-skins.install deleted file mode 100644 index 643d98bf..00000000 --- a/web/testing/xmms-skins/xmms-skins.install +++ /dev/null @@ -1,29 +0,0 @@ -# arg 1: the new package version -post_install() { - echo "=> If you are upgrading from SpamAssassin 2.x, please see the notes" - echo "=> at http://spamassassin.apache.org/full/3.0.x/dist/UPGRADE" - echo "=> In particular, you may need to update your bayes db with:" - echo "=> sa-learn --sync" - echo "=> Also, you may want to set your LANG environment variable to" - echo "=> a non-utf8 value such as LANG=en_US prior to calling SA" -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - /bin/true -} - -# arg 1: the old package version -pre_remove() { - /bin/true -} - -# arg 1: the old package version -post_remove() { - /bin/true -} - -op=$1 -shift -$op $* diff --git a/web/utils/genpopo b/web/utils/genpopo index bfe3492e..67c02284 100755 --- a/web/utils/genpopo +++ b/web/utils/genpopo @@ -232,7 +232,7 @@ else: if term not in existing_terms: f.write("\n"); f.write('$_t["en"]["%s"] = "%s";\n' % (term, term)) - f.write("\n?>"); + f.write("\n"); f.close() # Print out warnings for unused and little-used common entries. diff --git a/web/utils/translation_tool b/web/utils/translation_tool index ae9ae1de..6967139a 100755 --- a/web/utils/translation_tool +++ b/web/utils/translation_tool @@ -172,7 +172,7 @@ if force: f = open(po,'w') f.write(INC_HEADER) f.write('\ninclude_once(\"en/%s\");\n' % po) - f.write('\n?>') + f.write('\n') f.close() f = open(trans_dir+"/"+po,'w') @@ -183,7 +183,6 @@ if force: trans = raw_input(term+" = ") f.write('$_t["%s"]["%s"] = "%s";\n' % (trans_abbrv, term, trans)) f.write("\n"); - f.write("?>"); f.close() else: # need to leave existing file intact, and only append on terms that are new @@ -216,13 +215,13 @@ else: f = open(po,'w') f.write("".join(contents)) f.write('\ninclude_once(\"%s/%s\");\n' % (trans_abbrv, po)) - f.write("\n?>"); + f.write("\n"); f.close() else: f = open(po,'w') f.write(INC_HEADER) f.write('\ninclude_once(\"%s/%s\");\n' % (trans_abbrv, po)) - f.write('\n?>') + f.write('\n') f.close() # first read in file contents so we can hash what already exists # @@ -264,7 +263,7 @@ else: f.write("\n"); trans = raw_input(term+" = ") f.write('$_t["%s"]["%s"] = "%s";\n' % (trans_abbrv, term, trans)) - f.write("\n?>"); + f.write("\n"); f.close() # Print out warnings for unused and little-used common entries. |