diff options
-rw-r--r-- | locale/Makefile | 3 | ||||
-rwxr-xr-x | locale/escape_special_chars.php | 71 | ||||
-rw-r--r-- | pages/account/38.php | 29 | ||||
-rw-r--r-- | pages/account/40.php | 7 | ||||
-rw-r--r-- | pages/index/13.php | 13 | ||||
-rw-r--r-- | pages/wot/14.php | 6 | ||||
-rw-r--r-- | www/advertising.php | 6 | ||||
-rw-r--r-- | www/wot.php | 9 |
8 files changed, 109 insertions, 35 deletions
diff --git a/locale/Makefile b/locale/Makefile index b703fb2..1517066 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -112,8 +112,7 @@ $(LANGS:%=$(MO_FILE_TEMPLATE)): $(MO_FILE_TEMPLATE): $(PO_FILE_TEMPLATE) $(LANGS:%=$(PO_FILE_TEMPLATE)): mkdir -p $(@D) wget --output-document - '$(@:$(PO_FILE_TEMPLATE)=$(PO_URL_TEMPLATE))' | \ - # convert UTF-8 characters to HTML entities \ - php -r 'while (!feof(STDIN)) echo mb_convert_encoding(fgets(STDIN), "HTML-ENTITIES", "UTF-8");' \ + php -f escape_special_chars.php \ > $@ diff --git a/locale/escape_special_chars.php b/locale/escape_special_chars.php new file mode 100755 index 0000000..32de390 --- /dev/null +++ b/locale/escape_special_chars.php @@ -0,0 +1,71 @@ +#!/usr/bin/php -q +<?php +/* +LibreSSL - CAcert web application +Copyright (C) 2004-2012 CAcert Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Convert special characters in UTF-8 encoded PO files to HTML entities */ + +define('MSGSTR', 'msgstr'); +define('MSGSTR_LEN', strlen(MSGSTR)); +define('MSGID', 'msgid'); +define('MSGID_LEN', strlen(MSGID)); + +function is_msgstr($line) { + if (strlen($line) < MSGSTR_LEN) { + return false; + } + + return substr_compare($line, MSGSTR, 0, MSGSTR_LEN) === 0; +} + +function is_msgid($line) { + if (strlen($line) < MSGID_LEN) { + return false; + } + + return substr_compare($line, MSGID, 0, MSGID_LEN) === 0; +} + +// Skip the metadata (first msgid/msgstr pair) +while (!feof(STDIN)) { + $line = fgets(STDIN); + + echo $line; + + if (is_msgstr($line)) { + break; + } +} + +// determines if the current line belongs to a msgid or a msgstr +$msgstr = false; + +while (!feof(STDIN)) { + $line = fgets(STDIN); + + if (is_msgstr($line)) { + $msgstr = true; + } elseif (is_msgid($line)) { + $msgstr = false; + } + + if ($msgstr) { + $line = htmlentities($line, ENT_NOQUOTES, "UTF-8"); + } + echo $line; +} diff --git a/pages/account/38.php b/pages/account/38.php index f311bf5..7caddb0 100644 --- a/pages/account/38.php +++ b/pages/account/38.php @@ -14,31 +14,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ ?> -<H3><?=_("Donations")?></H3><br> +*/ -<h4><?=_("If I'd like to donate to CAcert Inc., how can I do it?")?></h4> - -<p> -<? -printf(_("CAcert Inc. is a non-profit association which is legally able to accept donations. CAcert adheres to %sstrict guidelines%s about how this money can to be used. If you'd like to make a donation, you can do so via"), - '<a href="//wiki.cacert.org/FAQ/DonationsGuideline">', '</a>'); -?> - -<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> -<input type="hidden" name="cmd" value="_s-xclick"> -<input type="image" src="/images/payment2.png" border="0" name="submit" alt="<?=_("CAcert Donation through PayPal")?>"> -<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3V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cxMDI1WjAjBgkqhkiG9w0BCQQxFgQU8tPwGUvNb8eYe8Pfhe9YutgXm/YwDQYJKoZIhvcNAQEBBQAEgYBpwhhgz5ED5qxBosfMaifzIr2anV5ScQqqQbC1hphWBQ4e2PT5+TQWCcQkrTh2UTp3vC81Y8vYZ+fussa+zPBE8DmeFDfzpLJo+TQHZUiKxWUDu6drv3o3mV3VjAkaqIhAdubhEOxj2bbKND3IRT1lfIVVSUipndKzRjukZJK39A==-----END PKCS7-----"> -</form> - -<p><?=_("If you are located in Australia, please use bank transfer instead:")?></p> - -<pre> -Account Name: CAcert Inc -BSB: 032073 -Account No.: 180264 -</pre> - -<p><?=_("ANY amount will be appreciated - the more funding CAcert receives, the sooner it can achieve the goals of the community.")?></p> - -<p><?=_("Thank you very much for your support, your donations help CAcert to continue to operate.")?></p> +require_once(dirname(__FILE__)."/../index/13.php"); diff --git a/pages/account/40.php b/pages/account/40.php index 499bf4d..fa0c52f 100644 --- a/pages/account/40.php +++ b/pages/account/40.php @@ -74,7 +74,12 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s </form> <p><b><?=_("Security Issues")?></b></p> -<p><?=_("Please use any of the following ways to report security issues: You can use the above contact form for sensitive information. You can email us to support@cacert.org. You can file a bugreport on <a href='https://bugs.cacert.org/'>bugs.cacert.org</a> and mark it as private.")?></p> +<p><? sprintf(_("Please use any of the following ways to report security ". + "issues: You can use the above contact form for sensitive information. ". + "You can email us to %s. You can file a bugreport on %s and mark it as ". + "private."), + "<a href='mailto:support@cacert.org'>support@cacert.org</a>", + "<a href='https://bugs.cacert.org/'>bugs.cacert.org</a>")?></p> <p><b><?=_("Snail Mail")?></b></p> <p><?=_("Alternatively you can get in contact with us via the following methods:")?></p> diff --git a/pages/index/13.php b/pages/index/13.php index 68ee5ed..f2ea173 100644 --- a/pages/index/13.php +++ b/pages/index/13.php @@ -42,3 +42,16 @@ Account No.: 180264 <p><?=_("ANY amount will be appreciated - the more funding CAcert receives, the sooner it can achieve the goals of the community.")?></p> <p><?=_("Thank you very much for your support, your donations help CAcert to continue to operate.")?></p> + + +<h3><?=_("Using Our Affiliate Partners")?></h3> + +<h4>Booking.com</h4> + +<p><?=_("If you do any trips where you need accommodation why not book via booking.com?")?></p> + +<p><?php + printf(_("For any booking done over %s started from this page CAcert gets a share of the provision. You do not pay more but you will support CAcert."), + '<a href="//www.booking.com/index.html?aid=346253">booking.com</a>'); + ?></p> + diff --git a/pages/wot/14.php b/pages/wot/14.php index 21c5873..a827ee4 100644 --- a/pages/wot/14.php +++ b/pages/wot/14.php @@ -20,7 +20,11 @@ <p><?=sprintf(_("If you have a %sSignaturecard%s (also called 'Buergerkarte'), you can digitally sign your assurance request here, and get 50 CAcert points:"),"<a href='http://www.buergerkarte.at/'>","</a>")?><br /></p> -<p><?=sprintf(_("To get assured with your Signaturecard, you need the Software from <a href='http://www.buergerkarte.at/bku/'>http://www.buergerkarte.at/bku/</a>. To activate your E-Card, please go to <a href='https://www.sozialversicherung.at/signon2-Registrierung/'>https://www.sozialversicherung.at/signon2-Registrierung/</a>."))?></p> +<p><?=sprintf(_("To get assured with your Signaturecard, you need the ". + "Software from %s. To activate your E-Card, please go to %s."), + "<a href='http://www.buergerkarte.at/bku/'>http://www.buergerkarte.at/bku/</a>", + "<a href='https://www.sozialversicherung.at/signon2-Registrierung/'>https://www.sozialversicherung.at/signon2-Registrierung/</a>" + )?></p> <pre><?=sanitizeHTML($_REQUEST['XMLResponse'])?></pre> diff --git a/www/advertising.php b/www/advertising.php index e987461..43e4f93 100644 --- a/www/advertising.php +++ b/www/advertising.php @@ -47,7 +47,7 @@ if($months < 1 || $months > 12) { $id = 1; - $errmsg .= _("You can only place an advertisement for up to 12 months.<br />"); + $errmsg .= _("You can only place an advertisement for up to 12 months.")."<br />"; $process=""; $oldid=0; } @@ -55,7 +55,7 @@ if(strlen($title) <= 5) { $id = 1; - $errmsg .= _("Link title was too short.<br />"); + $errmsg .= _("Link title was too short.")."<br />"; $process=""; $oldid=0; } @@ -63,7 +63,7 @@ if(strlen($link) <= 10) { $id = 1; - $errmsg .= _("Link URI was too short.<br />"); + $errmsg .= _("Link URI was too short.")."<br />"; $process=""; $oldid=0; } diff --git a/www/wot.php b/www/wot.php index 66bf7cb..bf5d301 100644 --- a/www/wot.php +++ b/www/wot.php @@ -444,7 +444,14 @@ $iecho= "c"; { sendmail($user['email'], "[CAcert.org] ".$_REQUEST['subject'], $_REQUEST['message'], $_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']); - show_page("ContactAssurer",_("Your email has been sent to")." ".$user['fname'].".<br />[ <a href='javascript:history.go(-2)'>"._("Go Back")."</a> ]",""); + + showheader(_("My CAcert.org Account!"));?> + <p> + <? printf(_("Your email has been sent to %s."), $user['fname']); ?> + </p> + <p>[ <a href='javascript:history.go(-2)'><?= _("Go Back") ?></a> ]</p> + <? + showfooter(); exit; } else { show_page(0,"",_("Sorry, I was unable to locate that user.")); |