mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Use "%s" instead of "%h" in format strings
Use the standard string type specifier instead of "%h" in format strings. Both specifiers are treated equally in __() so we shouldn't break anything here. This also allows us to replace the hacky substitution algorithm in __() by vsprintf(). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
72b657eb17
commit
ee4b398033
4 changed files with 10 additions and 10 deletions
|
@ -25,7 +25,7 @@ $dbh = db_connect();
|
|||
|
||||
<?php
|
||||
echo __(
|
||||
'Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.',
|
||||
'Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU Guidelines%s 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">',
|
||||
|
@ -37,7 +37,7 @@ echo __(
|
|||
|
||||
<?php
|
||||
echo __(
|
||||
'Contributed PKGBUILDs %hmust%h conform to the %hArch Packaging Standards%h otherwise they will be deleted!',
|
||||
'Contributed PKGBUILDs %smust%s conform to the %sArch Packaging Standards%s otherwise they will be deleted!',
|
||||
'<b>', '</b>',
|
||||
'<a href="http://wiki.archlinux.org/index.php/Arch_Packaging_Standards">',
|
||||
'</a>'
|
||||
|
|
|
@ -122,7 +122,7 @@ html_header(__("Password Reset"));
|
|||
<?php
|
||||
} else {
|
||||
?>
|
||||
<p><?php echo __('If you have forgotten the e-mail address you used to register, please send a message to the %haur-general%h mailing list.',
|
||||
<p><?php echo __('If you have forgotten the e-mail address you used to register, please send a message to the %saur-general%s mailing list.',
|
||||
'<a href="http://mailman.archlinux.org/mailman/listinfo/aur-general">',
|
||||
'</a>'); ?></p>
|
||||
<form action="" method="post">
|
||||
|
|
|
@ -273,7 +273,7 @@ if ($uid):
|
|||
$error = __( "Could not create directory %s.", $incoming_pkgdir);
|
||||
}
|
||||
} 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 %s%s%s package.", "<b>", $pkg_name, "</b>");
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
|
@ -233,7 +233,7 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="",
|
|||
if ($result) {
|
||||
$row = mysql_fetch_array($result);
|
||||
if ($row[0]) {
|
||||
$error = __("The username, %h%s%h, is already in use.",
|
||||
$error = __("The username, %s%s%s, is already in use.",
|
||||
"<b>", htmlspecialchars($U,ENT_QUOTES), "</b>");
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="",
|
|||
if ($result) {
|
||||
$row = mysql_fetch_array($result);
|
||||
if ($row[0]) {
|
||||
$error = __("The address, %h%s%h, is already in use.",
|
||||
$error = __("The address, %s%s%s, is already in use.",
|
||||
"<b>", htmlspecialchars($E,ENT_QUOTES), "</b>");
|
||||
}
|
||||
}
|
||||
|
@ -273,12 +273,12 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="",
|
|||
"VALUES (1, 0, '" . implode("', '", $escaped) . "')";
|
||||
$result = db_query($q, $dbh);
|
||||
if (!$result) {
|
||||
print __("Error trying to create account, %h%s%h: %s.",
|
||||
print __("Error trying to create account, %s%s%s: %s.",
|
||||
"<b>", htmlspecialchars($U,ENT_QUOTES), "</b>", mysql_error($dbh));
|
||||
} else {
|
||||
# account created/modified, tell them so.
|
||||
#
|
||||
print __("The account, %h%s%h, has been successfully created.",
|
||||
print __("The account, %s%s%s, has been successfully created.",
|
||||
"<b>", htmlspecialchars($U,ENT_QUOTES), "</b>");
|
||||
print "<p>\n";
|
||||
print __("Click on the Home link above to login.");
|
||||
|
@ -310,10 +310,10 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="",
|
|||
$q.= " WHERE ID = ".intval($UID);
|
||||
$result = db_query($q, $dbh);
|
||||
if (!$result) {
|
||||
print __("Error trying to modify account, %h%s%h: %s.",
|
||||
print __("Error trying to modify account, %s%s%s: %s.",
|
||||
"<b>", htmlspecialchars($U,ENT_QUOTES), "</b>", mysql_error($dbh));
|
||||
} else {
|
||||
print __("The account, %h%s%h, has been successfully modified.",
|
||||
print __("The account, %s%s%s, has been successfully modified.",
|
||||
"<b>", htmlspecialchars($U,ENT_QUOTES), "</b>");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue