"Move from translingo to pootle"
This commit is contained in:
parent
a0070c6cd2
commit
2679d75dfc
45 changed files with 304 additions and 145839 deletions
|
@ -16,6 +16,7 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
require_once("../includes/loggedin.php");
|
||||
require_once("../includes/lib/l10n.php");
|
||||
|
||||
loadem("account");
|
||||
|
||||
|
@ -2351,7 +2352,7 @@
|
|||
{
|
||||
csrf_check("mainlang");
|
||||
$lang = mysql_real_escape_string($_REQUEST['lang']);
|
||||
foreach($_SESSION['_config']['translations'] as $key => $val)
|
||||
foreach(L10n::$translations as $key => $val)
|
||||
{
|
||||
if($key == $lang)
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
require_once($_SESSION['_config']['filepath']."/includes/mysql.php");
|
||||
require_once($_SESSION['_config']['filepath'].'/includes/lib/account.php');
|
||||
require_once($_SESSION['_config']['filepath'].'/includes/lib/l10n.php');
|
||||
|
||||
if(array_key_exists('HTTP_HOST',$_SERVER) &&
|
||||
$_SERVER['HTTP_HOST'] != $_SESSION['_config']['normalhostname'] &&
|
||||
|
@ -70,122 +71,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
$lang = "";
|
||||
if(array_key_exists("lang",$_REQUEST))
|
||||
$lang=mysql_escape_string(substr(trim($_REQUEST['lang']), 0, 5));
|
||||
if($lang != "")
|
||||
$_SESSION['_config']['language'] = $lang;
|
||||
|
||||
//if($_SESSION['profile']['id'] == 1 && 1 == 2)
|
||||
// echo $_SESSION['_config']['language'];
|
||||
|
||||
$_SESSION['_config']['translations'] = array(
|
||||
"ar_JO" => "العربية",
|
||||
"bg_BG" => "Български",
|
||||
"cs_CZ" => "Čeština",
|
||||
"da_DK" => "Dansk",
|
||||
"de_DE" => "Deutsch",
|
||||
"el_GR" => "Ελληνικά",
|
||||
"en_AU" => "English",
|
||||
"eo_EO" => "Esperanto",
|
||||
"es_ES" => "Español",
|
||||
"fa_IR" => "Farsi",
|
||||
"fi_FI" => "Suomi",
|
||||
"fr_FR" => "Français",
|
||||
"he_IL" => "עברית",
|
||||
"hr_HR" => "Hrvatski",
|
||||
"hu_HU" => "Magyar",
|
||||
"is_IS" => "Íslenska",
|
||||
"it_IT" => "Italiano",
|
||||
"ja_JP" => "日本語",
|
||||
"ka_GE" => "Georgian",
|
||||
"nl_NL" => "Nederlands",
|
||||
"pl_PL" => "Polski",
|
||||
"pt_PT" => "Português",
|
||||
"pt_BR" => "Português Brasileiro",
|
||||
"ru_RU" => "Русский",
|
||||
"ro_RO" => "Română",
|
||||
"sv_SE" => "Svenska",
|
||||
"tr_TR" => "Türkçe",
|
||||
"zh_CN" => "中文(简体)");
|
||||
|
||||
$value=array();
|
||||
|
||||
if(!(array_key_exists('language',$_SESSION['_config']) && $_SESSION['_config']['language'] != ""))
|
||||
{
|
||||
$bits = explode(",", strtolower(str_replace(" ", "", mysql_real_escape_string(array_key_exists('HTTP_ACCEPT_LANGUAGE',$_SERVER)?$_SERVER['HTTP_ACCEPT_LANGUAGE']:""))));
|
||||
foreach($bits as $lang)
|
||||
{
|
||||
$b = explode(";", $lang);
|
||||
if(count($b)>1 && substr($b[1], 0, 2) == "q=")
|
||||
$c = floatval(substr($b[1], 2));
|
||||
else
|
||||
$c = 1;
|
||||
$value["$c"] = trim($b[0]);
|
||||
}
|
||||
|
||||
krsort($value);
|
||||
|
||||
reset($value);
|
||||
|
||||
foreach($value as $key => $val)
|
||||
{
|
||||
$val = substr(escapeshellarg($val), 1, -1);
|
||||
$short = substr($val, 0, 2);
|
||||
if($val == "en" || $short == "en")
|
||||
{
|
||||
$_SESSION['_config']['language'] = "en";
|
||||
break;
|
||||
}
|
||||
if(file_exists($_SESSION['_config']['filepath']."/locale/$val/LC_MESSAGES/messages.mo"))
|
||||
{
|
||||
$_SESSION['_config']['language'] = $val;
|
||||
break;
|
||||
}
|
||||
if(file_exists($_SESSION['_config']['filepath']."/locale/$short/LC_MESSAGES/messages.mo"))
|
||||
{
|
||||
$_SESSION['_config']['language'] = $short;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!array_key_exists('_config',$_SESSION) || !array_key_exists('language',$_SESSION['_config']) || strlen($_SESSION['_config']['language']) != 5)
|
||||
{
|
||||
$lang = array_key_exists('language',$_SESSION['_config'])?$_SESSION['_config']['language']:"";
|
||||
$_SESSION['_config']['language'] = "en_AU";
|
||||
foreach($_SESSION['_config']['translations'] as $key => $val)
|
||||
{
|
||||
if(substr($lang, 0, 2) == substr($key, 0, 2))
|
||||
{
|
||||
$_SESSION['_config']['language'] = $val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['_config']['recode'] = "html..latin-1";
|
||||
if($_SESSION['_config']['language'] == "zh_CN")
|
||||
{
|
||||
$_SESSION['_config']['recode'] = "html..gb2312";
|
||||
} else if($_SESSION['_config']['language'] == "pl_PL" || $_SESSION['_config']['language'] == "hu_HU") {
|
||||
$_SESSION['_config']['recode'] = "html..ISO-8859-2";
|
||||
} else if($_SESSION['_config']['language'] == "ja_JP") {
|
||||
$_SESSION['_config']['recode'] = "html..SHIFT-JIS";
|
||||
} else if($_SESSION['_config']['language'] == "ru_RU") {
|
||||
$_SESSION['_config']['recode'] = "html..ISO-8859-5";
|
||||
} else if($_SESSION['_config']['language'] == "lt_LT") {
|
||||
$_SESSION['_config']['recode'] = "html..ISO-8859-13";
|
||||
}
|
||||
|
||||
putenv("LANG=".$_SESSION['_config']['language']);
|
||||
setlocale(LC_ALL, $_SESSION['_config']['language']);
|
||||
$domain = 'messages';
|
||||
bindtextdomain($domain, $_SESSION['_config']['filepath']."/locale");
|
||||
textdomain($domain);
|
||||
|
||||
//if($_SESSION['profile']['id'] == -1)
|
||||
// echo $_SESSION['_config']['language']." - ".$_SESSION['_config']['filepath']."/locale";
|
||||
|
||||
L10n::detect_language();
|
||||
L10n::init_gettext();
|
||||
|
||||
if(array_key_exists('profile',$_SESSION) && is_array($_SESSION['profile']) && array_key_exists('id',$_SESSION['profile']) && $_SESSION['profile']['id'] > 0)
|
||||
{
|
||||
|
@ -632,14 +519,6 @@
|
|||
return(utf8_decode($data));
|
||||
}
|
||||
|
||||
function screenshot($img)
|
||||
{
|
||||
if(file_exists("../screenshots/".$_SESSION['_config']['language']."/$img"))
|
||||
return("/screenshots/".$_SESSION['_config']['language']."/$img");
|
||||
else
|
||||
return("/screenshots/en/$img");
|
||||
}
|
||||
|
||||
function signmail($to, $subject, $message, $from, $replyto = "")
|
||||
{
|
||||
if($replyto == "")
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
require_once($_SESSION['_config']['filepath'].'/includes/lib/l10n.php');
|
||||
|
||||
if(!function_exists("showheader"))
|
||||
{
|
||||
function showbodycontent($title = "CAcert.org", $title2 = "")
|
||||
|
@ -60,7 +62,7 @@ google_color_border = "FFFFFF";
|
|||
<? include("about_menu.php"); ?>
|
||||
<div class="relatedLinks">
|
||||
<h3 class="pointer" onclick="explode('trans')">+ <?=_("Translations")?></h3>
|
||||
<ul class="menu" id="trans"><? foreach($_SESSION['_config']['translations'] as $key => $val) { ?><li><a href="<?=$_SERVER['SCRIPT_NAME']?>?id=<?=intval(array_key_exists('id',$_REQUEST)?$_REQUEST['id']:0)?>&lang=<?=$key?>"><?=$val?></a></li><? } ?></ul>
|
||||
<ul class="menu" id="trans"><? foreach(L10n::$translations as $key => $val) { ?><li><a href="<?=$_SERVER['SCRIPT_NAME']?>?id=<?=intval(array_key_exists('id',$_REQUEST)?$_REQUEST['id']:0)?>&lang=<?=$key?>"><?=$val?></a></li><? } ?></ul>
|
||||
</div>
|
||||
<? if(array_key_exists('mconn',$_SESSION) && $_SESSION['mconn']) { ?>
|
||||
<div class="relatedLinks">
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
include_once("../includes/lib/general.php");
|
||||
require_once("../includes/lib/l10n.php");
|
||||
|
||||
if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] && $_SESSION['profile']['id'] > 0 && $_SESSION['profile']['loggedin'] != 0)
|
||||
{
|
||||
|
@ -110,18 +111,12 @@
|
|||
|
||||
if($_SESSION['profile']['language'] == "")
|
||||
{
|
||||
$query = "update `users` set `language`='".$_SESSION['_config']['language']."'
|
||||
$query = "update `users` set `language`='".L10n::get_translation()."'
|
||||
where `id`='".$_SESSION['profile']['id']."'";
|
||||
mysql_query($query);
|
||||
} else {
|
||||
$_SESSION['_config']['language'] = $_SESSION['profile']['language'];
|
||||
|
||||
putenv("LANG=".$_SESSION['_config']['language']);
|
||||
setlocale(LC_ALL, $_SESSION['_config']['language']);
|
||||
|
||||
$domain = 'messages';
|
||||
bindtextdomain("$domain", $_SESSION['_config']['filepath']."/locale");
|
||||
textdomain("$domain");
|
||||
L10n::set_translation($_SESSION['profile']['language']);
|
||||
L10n::init_gettext();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
3
locale/.gitignore
vendored
3
locale/.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
# Language files are imported from translingo
|
||||
# => Ignore them
|
||||
# Use make.php if you need new ones
|
||||
# Use make if you need new ones
|
||||
*.po
|
||||
*.pot
|
||||
*.mo
|
||||
|
|
184
locale/Makefile
Normal file
184
locale/Makefile
Normal file
|
@ -0,0 +1,184 @@
|
|||
#
|
||||
# This Makefile will download the translations from our translation server (if
|
||||
# they don't exist yet) and compile them. Try target help for more information
|
||||
#
|
||||
|
||||
################################################################################
|
||||
### Download ###
|
||||
################################################################################
|
||||
|
||||
DOWNLOAD_SERVER := translations.cacert.org
|
||||
PO_URL_TEMPLATE := http://$(DOWNLOAD_SERVER)/export/cacert/%/messages.po
|
||||
|
||||
# Only use languages that have 10% or more of translated strings
|
||||
AUTO_LANGS := \
|
||||
en \
|
||||
de \
|
||||
nl \
|
||||
pt_BR \
|
||||
fr \
|
||||
sv \
|
||||
it \
|
||||
es \
|
||||
hu \
|
||||
fi \
|
||||
ja \
|
||||
bg \
|
||||
pt \
|
||||
da \
|
||||
pl \
|
||||
zh_CN \
|
||||
ru \
|
||||
lv \
|
||||
cs \
|
||||
zh_TW \
|
||||
el \
|
||||
tr \
|
||||
ar \
|
||||
|
||||
LANGS := \
|
||||
ar \
|
||||
bg \
|
||||
cs \
|
||||
da \
|
||||
de \
|
||||
el \
|
||||
en \
|
||||
es \
|
||||
fa \
|
||||
fi \
|
||||
fr \
|
||||
he \
|
||||
hr \
|
||||
hu \
|
||||
id \
|
||||
is \
|
||||
it \
|
||||
ja \
|
||||
ka \
|
||||
ko \
|
||||
lv \
|
||||
nb \
|
||||
nl \
|
||||
pl \
|
||||
pt \
|
||||
pt_BR \
|
||||
ro \
|
||||
ru \
|
||||
sl \
|
||||
sv \
|
||||
th \
|
||||
tr \
|
||||
uk \
|
||||
zh_CN \
|
||||
zh_TW \
|
||||
|
||||
|
||||
PO_FILE_TEMPLATE := %/messages.po
|
||||
MO_FILE_TEMPLATE := %/LC_MESSAGES/messages.mo
|
||||
|
||||
|
||||
# target: all - Build locales downloading po files
|
||||
.PHONY: all
|
||||
all: $(AUTO_LANGS)
|
||||
|
||||
|
||||
# target: help - Display callable targets
|
||||
.PHONY: help
|
||||
help:
|
||||
@egrep "^# target:" [Mm]akefile
|
||||
|
||||
|
||||
# target: clean - remove the build directories
|
||||
RM := rm -rf
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-$(RM) $(LANGS:%=%/)
|
||||
|
||||
|
||||
# target: <lang> - build this particular language
|
||||
.PHONY: $(LANGS)
|
||||
$(LANGS): %: $(MO_FILE_TEMPLATE)
|
||||
|
||||
|
||||
$(LANGS:%=$(MO_FILE_TEMPLATE)): $(MO_FILE_TEMPLATE): $(PO_FILE_TEMPLATE)
|
||||
mkdir -p $(@D)
|
||||
#filter obsolete translations
|
||||
grep --invert-match '^#~ ' $< | \
|
||||
msgfmt --check --output-file $@ -
|
||||
|
||||
|
||||
.PHONY: $(LANGS:%=$(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");' \
|
||||
> $@
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### Upload ###
|
||||
################################################################################
|
||||
|
||||
UPLOAD_SERVER := $(DOWNLOAD_SERVER)
|
||||
SSH_USER := critical
|
||||
SSH_OPTIONS :=
|
||||
SCP_OPTIONS := $(SSH_OPTIONS)
|
||||
|
||||
FILE_OWNER := www-data
|
||||
|
||||
POT_UPLOAD_PATH := /var/www/Pootle/po/cacert/templates/messages.pot
|
||||
MANAGE_PY := /var/www/Pootle/manage.py
|
||||
|
||||
VERSION := Production
|
||||
DESCRITPION := LibreSSL - CAcert web application (localisation files)
|
||||
COPYRIGHT_YEAR := 2004-$(shell date +\%Y)
|
||||
PACKAGE := LibreSSL
|
||||
|
||||
GETTEXT_FILE_PATTERN := \
|
||||
../CommModule/client.pl \
|
||||
../includes/*.php \
|
||||
../includes/*/*.php \
|
||||
../pages/*/*.php \
|
||||
../scripts/*.php \
|
||||
../www/*.php \
|
||||
../www/*/*.php \
|
||||
# ../tverify/*.php \
|
||||
# ../tverify/*/*.php \
|
||||
|
||||
GETTEXT_FILES := $(wildcard $(GETTEXT_FILE_PATTERN))
|
||||
|
||||
# target: template - create the gettext template file, if you want to upload it
|
||||
# target: onto the translation server you can directly use the
|
||||
# target: target "upload"
|
||||
.PHONY: template
|
||||
template: messages.pot
|
||||
|
||||
# target: template.clean - remove anything that was created during the build of
|
||||
# target: the template file
|
||||
.PHONY: template.clean
|
||||
template.clean:
|
||||
-$(RM) messages.pot
|
||||
|
||||
|
||||
# target: upload - upload the template to the translation server
|
||||
.PHONY: upload
|
||||
upload: messages.pot
|
||||
scp $(SCP_OPTIONS) messages.pot $(SSH_USER)@$(UPLOAD_SERVER):$(POT_UPLOAD_PATH)
|
||||
ssh $(SSH_OPTIONS) $(SSH_USER)@$(UPLOAD_SERVER) "sudo -u $(FILE_OWNER) pootle-update cacert"
|
||||
|
||||
# target: upload.clean - remove anything that was created during the upload
|
||||
.PHONY: upload.clean
|
||||
upload.clean: template.clean
|
||||
|
||||
messages.pot: $(GETTEXT_FILES)
|
||||
xgettext --output - --sort-by-file --copyright-holder "CAcert Inc." \
|
||||
--package-name "CAcert" --package-version "$(VERSION)" \
|
||||
--msgid-bugs-address "translations-admin@cacert.org" $^ | \
|
||||
# replace place holders in the lines before the first msgid\
|
||||
sed '1,/^msgid/ { s/SOME DESCRIPTIVE TITLE/$(DESCRITPION)/; s/YEAR/$(COPYRIGHT_YEAR)/; s/PACKAGE/$(PACKAGE)/ }' \
|
||||
> $@
|
||||
|
5212
locale/ar.po
5212
locale/ar.po
File diff suppressed because it is too large
Load diff
5212
locale/bg.po
5212
locale/bg.po
File diff suppressed because one or more lines are too long
5212
locale/cs.po
5212
locale/cs.po
File diff suppressed because it is too large
Load diff
5212
locale/da.po
5212
locale/da.po
File diff suppressed because it is too large
Load diff
5087
locale/de.po
5087
locale/de.po
File diff suppressed because it is too large
Load diff
5212
locale/el.po
5212
locale/el.po
File diff suppressed because it is too large
Load diff
5083
locale/es.po
5083
locale/es.po
File diff suppressed because it is too large
Load diff
5212
locale/fa.po
5212
locale/fa.po
File diff suppressed because it is too large
Load diff
5212
locale/fi.po
5212
locale/fi.po
File diff suppressed because it is too large
Load diff
5212
locale/fr.po
5212
locale/fr.po
File diff suppressed because it is too large
Load diff
5212
locale/he.po
5212
locale/he.po
File diff suppressed because it is too large
Load diff
5212
locale/hr.po
5212
locale/hr.po
File diff suppressed because it is too large
Load diff
5212
locale/hu.po
5212
locale/hu.po
File diff suppressed because it is too large
Load diff
5212
locale/is.po
5212
locale/is.po
File diff suppressed because it is too large
Load diff
5212
locale/it.po
5212
locale/it.po
File diff suppressed because it is too large
Load diff
5212
locale/ja.po
5212
locale/ja.po
File diff suppressed because it is too large
Load diff
5212
locale/ka.po
5212
locale/ka.po
File diff suppressed because it is too large
Load diff
5212
locale/ko.po
5212
locale/ko.po
File diff suppressed because it is too large
Load diff
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/php -q
|
||||
<?
|
||||
$lang = array( "bg" => "bg_BG", "da" => "da_DK", "de" => "de_DE", "es" => "es_ES",
|
||||
"fr" => "fr_FR", "fi" => "fi_FI", "he" => "he_IL", "hr" => "hr_HR",
|
||||
"hu" => "hu_HU", "it" => "it_IT", "ja" => "ja_JP", "nl" => "nl_NL",
|
||||
"pt" => "pt_PT", "ro" => "ro_RO", "ru" => "ru_RU", "fa" => "fa_IR",
|
||||
"sv" => "sv_SE", "tr" => "tr_TR", "zh" => "zh_CN", "ar" => "ar_SY",
|
||||
"el" => "el_GR", "tl" => "tl_PH", "pl" => "pl_PL", "cs" => "cs_CZ",
|
||||
"ka" => "ka_GE", "is" => "is_IS", "ko" => "ko_KR", "nb" => "nb_NO");
|
||||
|
||||
if($argc > 1)
|
||||
{
|
||||
foreach($argv as $key)
|
||||
{
|
||||
$val = $lang[$key];
|
||||
if($val != "")
|
||||
{
|
||||
$do = `wget -O $key.po "http://translingo.cacert.org/export2.php?pid=1&editlanguage=$val" 2>&1`;
|
||||
echo $do;
|
||||
echo `mkdir -p $key/LC_MESSAGES/`;
|
||||
$do = `msgfmt -o $key/LC_MESSAGES/messages.mo $key.po 2>&1`;
|
||||
echo $do;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach($lang as $key => $val)
|
||||
{
|
||||
$do = `wget -O $key.po "http://translingo.cacert.org/export2.php?pid=1&editlanguage=$val" 2>&1`;
|
||||
echo $do;
|
||||
echo `mkdir -p $key/LC_MESSAGES/`;
|
||||
$do = `msgfmt -o $key/LC_MESSAGES/messages.mo $key.po 2>&1`;
|
||||
echo $do;
|
||||
}
|
||||
}
|
||||
?>
|
5212
locale/nb.po
5212
locale/nb.po
File diff suppressed because it is too large
Load diff
5083
locale/nl.po
5083
locale/nl.po
File diff suppressed because it is too large
Load diff
5212
locale/pl.po
5212
locale/pl.po
File diff suppressed because it is too large
Load diff
5212
locale/pt.po
5212
locale/pt.po
File diff suppressed because it is too large
Load diff
5212
locale/ro.po
5212
locale/ro.po
File diff suppressed because it is too large
Load diff
5212
locale/ru.po
5212
locale/ru.po
File diff suppressed because it is too large
Load diff
5212
locale/sv.po
5212
locale/sv.po
File diff suppressed because it is too large
Load diff
5212
locale/tl.po
5212
locale/tl.po
File diff suppressed because it is too large
Load diff
5212
locale/tr.po
5212
locale/tr.po
File diff suppressed because it is too large
Load diff
5212
locale/zh.po
5212
locale/zh.po
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,11 @@
|
|||
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
|
||||
*/ ?>
|
||||
*/
|
||||
|
||||
require_once($_SESSION['_config']['filepath'].'/includes/lib/l10n.php');
|
||||
?>
|
||||
|
||||
<form method="post" action="account.php">
|
||||
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">
|
||||
<tr>
|
||||
|
@ -24,11 +28,10 @@
|
|||
<td class="DataTD"><?=_("My prefered language")?>:</td>
|
||||
<td class="DataTD"><select name="lang">
|
||||
<?
|
||||
echo $_SESSION['_config']['language'];
|
||||
foreach($_SESSION['_config']['translations'] as $key => $val)
|
||||
foreach(L10n::$translations as $key => $val)
|
||||
{
|
||||
echo "<option value='$key'";
|
||||
if($key == $_SESSION['_config']['language'])
|
||||
if($key == L10n::get_translation())
|
||||
echo " selected";
|
||||
echo ">$val</option>\n";
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
include_once("../includes/shutdown.php");
|
||||
require_once("../includes/lib/l10n.php");
|
||||
?>
|
||||
<?
|
||||
if(array_key_exists('error',$_SESSION['_config']) && $_SESSION['_config']['error'] != "")
|
||||
|
@ -32,8 +33,8 @@
|
|||
<select name="reminder-lang">
|
||||
<?
|
||||
if($_SESSION['_config']['reminder-lang'] == "")
|
||||
$_SESSION['_config']['reminder-lang'] = $_SESSION['profile']['language'];
|
||||
foreach($_SESSION['_config']['translations'] as $key => $val)
|
||||
$_SESSION['_config']['reminder-lang'] = L10n::get_translation();
|
||||
foreach(L10n::$translations as $key => $val)
|
||||
{
|
||||
echo "<option value='$key'";
|
||||
if($key == $_SESSION['_config']['reminder-lang'])
|
||||
|
|
|
@ -14,8 +14,11 @@
|
|||
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
|
||||
*/ ?>
|
||||
<?
|
||||
*/
|
||||
|
||||
require_once($_SESSION['_config']['filepath'].'/includes/lib/l10n.php');
|
||||
|
||||
|
||||
$res = mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."' and `listme`='1'");
|
||||
if(mysql_num_rows($res) <= 0)
|
||||
{
|
||||
|
@ -47,7 +50,7 @@
|
|||
<? if($userlang != "") { ?>
|
||||
<tr>
|
||||
<td class="DataTD"><?=_("Language")?>:</td>
|
||||
<td class="DataTD" align="left"><? printf(_("%s prefers to be contacted in %s"), $user['fname'], $_SESSION['_config']['translations'][$userlang]) ?></td>
|
||||
<td class="DataTD" align="left"><? printf(_("%s prefers to be contacted in %s"), $user['fname'], L10n::$translations[$userlang]) ?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<?
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
include_once("/home/cacert/www/includes/mysql.php");
|
||||
require_once('/home/cacert/www/includes/lib/l10n.php');
|
||||
|
||||
$query = "select * from `users` where `users`.`verified`=0 and
|
||||
(UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`users`.`created`)) >= 172800";
|
||||
|
@ -67,9 +68,7 @@
|
|||
|
||||
if($data['language'] != "")
|
||||
{
|
||||
$userlang = $data['language'];
|
||||
putenv("LANG=".$userlang);
|
||||
setlocale(LC_ALL, $userlang);
|
||||
L10n::set_translation($data['language']);
|
||||
}
|
||||
|
||||
$body = _("You are receiving this email because you had a temporary increase to 200 points. This has since expired and you have been reduced to 150 points.")."\n\n";
|
||||
|
|
60
www/cap.php
60
www/cap.php
|
@ -15,7 +15,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
if($_SESSION['_config']['language'] != "ja_JP")
|
||||
if($_SESSION['_config']['language'] != "ja")
|
||||
{
|
||||
define('FPDF_FONTPATH','/usr/share/fpdf/font/');
|
||||
require_once('/usr/share/ufpdf/fpdf.php');
|
||||
|
@ -35,7 +35,7 @@
|
|||
{
|
||||
$this->Image((array_key_exists('bw',$_REQUEST) && $_REQUEST['bw'])?'images/CAcert-logo-mono-1000.png':'images/CAcert-logo-colour-1000.png',8,8,100);
|
||||
$this->SetFont('Arial','B',14);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',14);
|
||||
$this->Cell(100);
|
||||
$this->Cell(40,20,recode($_SESSION['_config']['recode'], _("CAcert Assurance Programme")));
|
||||
|
@ -46,12 +46,12 @@
|
|||
|
||||
$this->SetY(36);
|
||||
$this->SetFont('Arial','I',8);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','I',8);
|
||||
$this->Cell(0,0,'CAcert Inc. - P.O. Box 4107 - Denistone East NSW 2112 - Australia - http://www.CAcert.org',0,0,'C');
|
||||
$this->Ln(3);
|
||||
$this->SetFont('Arial','',6);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',6);
|
||||
$this->Cell(0,0, recode($_SESSION['_config']['recode'], _("CAcert's Root Certificate fingerprints")).": A6:1B:37:5E:39:0D:9C:36:54:EE:BD:20:31:46:1F:6B "._("and")." 135C EC36 F49C B8E9 3B1A B270 CD80 8846 76CE 8F33",0,0,'C');
|
||||
$this->SetLineWidth(0.05);
|
||||
|
@ -71,7 +71,7 @@
|
|||
// Show text blurb at top of page
|
||||
$this->SetY(45);
|
||||
$this->SetFont('Arial','',10);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',10);
|
||||
$this->Write(4,sprintf(recode($_SESSION['_config']['recode'], _("To the Assurer: The CAcert Assurance Programme (CAP) aims to verify the identities of Internet users through face-to-face witnessing of government issued identity documents. The Applicant asks you to verify to CAcert.org that you have met them and verified their identity against one or more original, trusted, government photo identity documents. If you have ANY doubts or concerns about the Applicant's identity, DO NOT COMPLETE OR SIGN this form. For more information about the CAcert Assurance Programme, including detailed guides for CAcert Assurers, please visit: %s")), "http://www.CAcert.org"));
|
||||
$this->Ln(10);
|
||||
|
@ -84,21 +84,21 @@
|
|||
$this->Rect(11, $top, $this->w - 25, 60, "D"); //50 -> 60
|
||||
$this->SetXY(11, $top + 5);
|
||||
$this->SetFont("Arial", "BUI", "20");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','BUI',20);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Applicant's Statement")));
|
||||
$this->Rect(13, $top + 10, $this->w - 29, 6, "D");
|
||||
$this->Line(80, $top + 10, 80, $top + 16);
|
||||
$this->SetXY(15, $top + 13);
|
||||
$this->SetFont("Arial", "B", "12");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',12);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Names")).":");
|
||||
if($name)
|
||||
{
|
||||
$this->SetXY(82, $top + 13);
|
||||
$this->SetFont("Arial", '', "11");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',11);
|
||||
$this->Write(0, $name);
|
||||
}
|
||||
|
@ -106,18 +106,18 @@
|
|||
$this->Line(80, $top + 16, 80, $top + 22);
|
||||
$this->SetXY(15, $top + 19);
|
||||
$this->SetFont("Arial", "B", "12");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',12);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Date of Birth")).": ");
|
||||
$this->SetFont("Arial", "", "8");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',8);
|
||||
$this->Write(0, "(".recode($_SESSION['_config']['recode'], _("YYYY-MM-DD")).")");
|
||||
if($dob)
|
||||
{
|
||||
$this->SetXY(82, $top + 19);
|
||||
$this->SetFont("Arial", "", "11");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',11);
|
||||
$this->Write(0, $dob);
|
||||
}
|
||||
|
@ -125,26 +125,26 @@
|
|||
$this->Line(80, $top + 22, 80, $top + 28);
|
||||
$this->SetXY(15, $top + 25);
|
||||
$this->SetFont("Arial", "B", "12");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',12);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Email Address")).":");
|
||||
if($email)
|
||||
{
|
||||
$this->SetXY(82, $top + 25);
|
||||
$this->SetFont("Arial", "", "11");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',11);
|
||||
$this->Write(0, $email);
|
||||
}
|
||||
$this->SetXY(13, $top + 32);
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->MultiCell($this->w - 29, 3, recode($_SESSION['_config']['recode'], _("I hereby confirm that the information stated above is both true and correct, and request the CAcert Assurer (identified below) to verify me according to CAcert Assurance Policy.")));
|
||||
// new da start
|
||||
$this->SetXY(13, $top + 42);
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->MultiCell($this->w - 29, 3, recode($_SESSION['_config']['recode'], _("I agree to the CAcert Community Agreement.")." ( http://www.cacert.org/policy/CAcertCommunityAgreement.php )"));
|
||||
// new da end
|
||||
|
@ -157,7 +157,7 @@
|
|||
$this->Write(0, "20___-___-___");
|
||||
} else {
|
||||
$this->SetFont("Arial", "U", "10");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','U',10);
|
||||
$this->Write(0, str_pad($date, 13, " "));
|
||||
}
|
||||
|
@ -167,18 +167,18 @@
|
|||
$this->Rect(11, $top, $this->w - 25, 83, "D"); //63->93
|
||||
$this->SetXY(11, $top + 5);
|
||||
$this->SetFont("Arial", "BUI", "20");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','BUI',20);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("CAcert Assurer")));
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 15);
|
||||
if($assurer)
|
||||
{
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Assurer's Name")).": ");
|
||||
$this->SetFont("Arial", "", "10");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','U',10);
|
||||
// $this->MultiCell($this->w - 70, 2, recode($_SESSION['_config']['recode'], $assurer));
|
||||
$this->Write(0, str_pad($assurer, 50, " "));
|
||||
|
@ -187,7 +187,7 @@
|
|||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Assurer's Name")).": ________________________________________________________________");
|
||||
}
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 22);
|
||||
$this->MultiCell($this->w - 34, 3, recode($_SESSION['_config']['recode'], _("Photo ID Shown: (ID types, not numbers. eg Drivers license, Passport)")));
|
||||
|
@ -198,12 +198,12 @@
|
|||
} else {
|
||||
$this->Write(0, "1. ");
|
||||
$this->SetFont("Arial", "U", "10");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','U',10);
|
||||
$this->Write(0, str_pad($document1, 90, " "));
|
||||
}
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 35);
|
||||
if($document2 == "")
|
||||
|
@ -212,12 +212,12 @@
|
|||
} else {
|
||||
$this->Write(0, "2. ");
|
||||
$this->SetFont("Arial", "U", "10");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','U',10);
|
||||
$this->Write(0, str_pad($document2, 90, " "));
|
||||
}
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 45);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Location of Face-to-face Meeting")).": ");
|
||||
|
@ -226,12 +226,12 @@
|
|||
$this->Write(0, "_____________________________________________");
|
||||
} else {
|
||||
$this->SetFont("Arial", "U", "10");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','U',10);
|
||||
$this->Write(0, str_pad($location, 70, " "));
|
||||
}
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 50);
|
||||
if($maxpoints > 0)
|
||||
|
@ -241,7 +241,7 @@
|
|||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Points Allocated")).": ______________");
|
||||
}
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 54);
|
||||
$this->MultiCell($this->w - 33, 3, recode($_SESSION['_config']['recode'], _("I, the Assurer, hereby confirm that I have verified the Member according to CAcert Assurance Policy.")));
|
||||
|
@ -249,7 +249,7 @@
|
|||
$this->MultiCell($this->w - 33, 3, recode($_SESSION['_config']['recode'], _("I am a CAcert Community Member, have passed the Assurance Challenge, and have been assured with at least 100 Assurance Points.")));
|
||||
|
||||
$this->SetFont("Arial", "", "9");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',9);
|
||||
$this->SetXY(13, $top + 74); //22->67
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], _("Assurer's signature")).": __________________________________");
|
||||
|
@ -260,7 +260,7 @@
|
|||
$this->Write(0, "20___-___-___");
|
||||
} else {
|
||||
$this->SetFont("Arial", "U", "10");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','U',10);
|
||||
$this->Write(0, str_pad($date, 13, " "));
|
||||
}
|
||||
|
@ -277,7 +277,7 @@
|
|||
$maxpoints = 0;
|
||||
|
||||
$pdf = new PDF('P', 'mm', $format);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$pdf->AddSJISFont();
|
||||
$pdf->Open();
|
||||
$pdf->AddPage();
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// $Id: capnew.php,v 1.3 2011/06/10 18:30:41 wytze Exp $
|
||||
define('REV', '$Revision: 1.3 $');
|
||||
// $Id: capnew.php,v 1.4 2012/01/24 14:26:05 root Exp $
|
||||
define('REV', '$Revision: 1.4 $');
|
||||
|
||||
/*
|
||||
** Created from old cap.php 2003, which used the now obsoleted ftpdf package
|
||||
|
@ -168,7 +168,7 @@ define('REV', '$Revision: 1.3 $');
|
|||
** $_GET['format'] paper format required A0-A6,Letter, Folio, B0-B6 (dflt A4)
|
||||
** $_GET['watermark'] watermark on the page
|
||||
** $_GET['orientation'] paper orientation default 'portrait'
|
||||
** $_SESSION['_config']['language'] for 'ja_JP' japanese default != ja_JP
|
||||
** $_SESSION['_config']['language'] for 'ja' japanese default != ja
|
||||
** $_SESSION['_config']['recode'] = 'format' recode() uses it: needed ?
|
||||
** recode() is aliased to php lib function recode_string()
|
||||
** $_REQUEST['bw'] if exists use black/white, default use colour
|
||||
|
@ -336,7 +336,7 @@ define('DFL_FORMAT', 'html..utf-8');
|
|||
// Japanese is not supported?
|
||||
if( array_key_exists('_config', $_SESSION) ) {
|
||||
if( isset($_SESSION['_config']['language']) ) {
|
||||
if($_SESSION['_config']['language'] == 'ja_JP')
|
||||
if($_SESSION['_config']['language'] == 'ja')
|
||||
define('FONT','SJIS');
|
||||
else define( 'FONT', 'freesans');
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ function utf8_is_ascii_ctrl($str) {
|
|||
// extend TCPF with custom functions
|
||||
class CAPPDF extends TCPDF {
|
||||
|
||||
// do cap form version numbering automatically '$Revision: 1.3 $'
|
||||
// do cap form version numbering automatically '$Revision: 1.4 $'
|
||||
/*public*/ function Version() {
|
||||
strtok(REV, ' ');
|
||||
return(strtok(' '));
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
// $Id: coapnew.php,v 1.3 2011/06/10 18:30:42 wytze Exp $
|
||||
define('REV', '$Revision: 1.3 $');
|
||||
// $Id: coapnew.php,v 1.4 2012/01/24 14:26:05 root Exp $
|
||||
define('REV', '$Revision: 1.4 $');
|
||||
|
||||
/*
|
||||
** Created from old cap.php 2003, which used the now obsoleted ftpdf package
|
||||
|
@ -179,7 +179,7 @@ define('REV', '$Revision: 1.3 $');
|
|||
** $_GET['format'] paper format required A0-A6,Letter, Folio, B0-B6 (dflt A4)
|
||||
** $_GET['watermark'] watermark on the page
|
||||
** $_GET['orientation'] paper orientation default "landscape" default 2-up (new)
|
||||
** $_SESSION['_config']['language'] for "ja_JP" japanese default != ja_JP
|
||||
** $_SESSION['_config']['language'] for "ja" japanese default != ja
|
||||
** $_SESSION['_config']['recode'] = "format" recode() uses it: needed ?
|
||||
** recode() is aliased to php lib function recode_string()
|
||||
** $_REQUEST[bw] if exists use black/white, default use colour
|
||||
|
@ -371,7 +371,7 @@ define('DFL_FORMAT', 'html..utf-8');
|
|||
// Japanese is not supported?
|
||||
if( array_key_exists('_config', $_SESSION) ) {
|
||||
if( isset($_SESSION['_config']['language']) ) {
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
define('FONT','SJIS');
|
||||
else define( 'FONT', 'freesans');
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ function utf8_is_ascii_ctrl($str) {
|
|||
// extend TCPF with custom functions
|
||||
class COAPPDF extends TCPDF {
|
||||
|
||||
// do cap form version numbering automatically "$Revision: 1.3 $"
|
||||
// do cap form version numbering automatically "$Revision: 1.4 $"
|
||||
/*public*/ function Version() {
|
||||
strtok(REV, " ");
|
||||
return(strtok(" "));
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
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
|
||||
*/ ?>
|
||||
<?
|
||||
*/
|
||||
|
||||
require_once('../includes/lib/l10n.php');
|
||||
|
||||
$id = 0; if(array_key_exists("id",$_REQUEST)) $id=intval($_REQUEST['id']);
|
||||
$oldid = 0; if(array_key_exists("oldid",$_REQUEST)) $oldid=intval($_REQUEST['oldid']);
|
||||
|
@ -310,18 +311,12 @@
|
|||
|
||||
if($_SESSION['profile']['language'] == "")
|
||||
{
|
||||
$query = "update `users` set `language`='".$_SESSION['_config']['language']."'
|
||||
$query = "update `users` set `language`='".L10n::get_translation()."'
|
||||
where `id`='".$_SESSION['profile']['id']."'";
|
||||
mysql_query($query);
|
||||
} else {
|
||||
$_SESSION['_config']['language'] = $_SESSION['profile']['language'];
|
||||
|
||||
putenv("LANG=".$_SESSION['_config']['language']);
|
||||
setlocale(LC_ALL, $_SESSION['_config']['language']);
|
||||
|
||||
$domain = 'messages';
|
||||
bindtextdomain("$domain", $_SESSION['_config']['filepath']."/locale");
|
||||
textdomain("$domain");
|
||||
L10n::set_translation($_SESSION['profile']['language']);
|
||||
L10n::init_gettext();
|
||||
}
|
||||
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
|
||||
$res = mysql_query($query);
|
||||
|
@ -551,7 +546,7 @@
|
|||
mysql_query($query);
|
||||
|
||||
$body = _("Thanks for signing up with CAcert.org, below is the link you need to open to verify your account. Once your account is verified you will be able to start issuing certificates till your hearts' content!")."\n\n";
|
||||
$body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; //."&"."lang=".$_SESSION['_config']['language']."\n\n";
|
||||
$body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n";
|
||||
$body .= _("Best regards")."\n"._("CAcert.org Support!");
|
||||
|
||||
sendmail($_SESSION['signup']['email'], "[CAcert.org] "._("Mail Probe"), $body, "support@cacert.org", "", "", "CAcert Support");
|
||||
|
|
28
www/ttp.php
28
www/ttp.php
|
@ -15,7 +15,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
if($_SESSION['_config']['language'] != "ja_JP")
|
||||
if($_SESSION['_config']['language'] != "ja")
|
||||
{
|
||||
define('FPDF_FONTPATH','/usr/share/fpdf/font/');
|
||||
require_once('/usr/share/ufpdf/fpdf.php');
|
||||
|
@ -40,7 +40,7 @@
|
|||
{
|
||||
$this->Image($_REQUEST['bw']?'images/CAcert-logo-mono-1000.png':'images/CAcert-logo-colour-1000.png',8,8,100);
|
||||
$this->SetFont('Arial','B',14);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',14);
|
||||
$this->Cell(100);
|
||||
$this->Cell(40,20,recode($_SESSION['_config']['recode'], _("Trusted Third Party")));
|
||||
|
@ -54,12 +54,12 @@
|
|||
{
|
||||
$this->SetY(-10);
|
||||
$this->SetFont('Arial','I',8);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','I',8);
|
||||
$this->Cell(0,0,'CAcert Inc. - P.O. Box 4107 - Denistone East NSW 2112 - Australia - http://www.CAcert.org',0,0,'C');
|
||||
$this->SetY(-7);
|
||||
$this->SetFont('Arial','',6);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',6);
|
||||
$this->Cell(0,0, recode($_SESSION['_config']['recode'], _("CAcert's Root Certificate fingerprints")).": A6:1B:37:5E:39:0D:9C:36:54:EE:BD:20:31:46:1F:6B "._("and")." 135C EC36 F49C B8E9 3B1A B270 CD80 8846 76CE 8F33",0,0,'C');
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
|||
// Show text blurb at top of page
|
||||
$this->SetY(40);
|
||||
$this->SetFont('Arial','',10);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','',10);
|
||||
$this->Write(4, recode($_SESSION['_config']['recode'], _("The CAcert Trusted Third Party (TTP) Programme is designed to assure Internet user identities through personal verification of government issued identity documents.")));
|
||||
$this->Ln(7);
|
||||
|
@ -100,18 +100,18 @@
|
|||
$this->Line(120, $top + 6, 120, $top + 36);
|
||||
$this->SetXY(11, $top + 3);
|
||||
$this->SetFont("Arial", "BUI", "12");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','BUI',12);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Person Verifying Applicant's Identity")));
|
||||
$this->SetXY(11, $top + 9);
|
||||
$this->SetFont("Arial", "B", "8");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',8);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Names").":"));
|
||||
$this->SetXY(120, $top + 9);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Office Street Address").":"));
|
||||
$this->SetFont("Arial", "B", "6");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',6);
|
||||
$this->SetXY(11, $top + 14);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Profession (Please circle one)")).":");
|
||||
|
@ -122,7 +122,7 @@
|
|||
$this->SetXY(11, $top + 22);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'], "("._("as applicable")."):"));
|
||||
$this->SetFont("Arial", "B", "8");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',8);
|
||||
$this->SetXY(11, $top + 27);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Office Phone")).":");
|
||||
|
@ -147,12 +147,12 @@
|
|||
$this->Line(120, $top + 6, 120, $top + 36);
|
||||
$this->SetXY(11, $top + 3);
|
||||
$this->SetFont("Arial", "BUI", "12");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','BUI',12);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Applicant Information")));
|
||||
$this->SetXY(11, $top + 9);
|
||||
$this->SetFont("Arial", "B", "8");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',8);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Full Name (as shown on ID)").":"));
|
||||
if($name)
|
||||
|
@ -170,11 +170,11 @@
|
|||
$this->SetXY(11, $top + 21);
|
||||
$this->Write(0, recode($_SESSION['_config']['recode'],_("Date of Birth")).": ");
|
||||
$this->SetFont("Arial", "B", "6");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',6);
|
||||
$this->Write(0, "(".recode($_SESSION['_config']['recode'], _("YYYY-MM-DD")).")");
|
||||
$this->SetFont("Arial", "B", "8");
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$this->SetFont('SJIS','B',8);
|
||||
if($dob)
|
||||
{
|
||||
|
@ -199,7 +199,7 @@
|
|||
$format = "A4";
|
||||
|
||||
$pdf = new PDF('P', 'mm', $format);
|
||||
if($_SESSION['_config']['language'] == "ja_JP")
|
||||
if($_SESSION['_config']['language'] == "ja")
|
||||
$pdf->AddSJISFont();
|
||||
$pdf->Open();
|
||||
$pdf->AddPage();
|
||||
|
|
54
www/wot.php
54
www/wot.php
|
@ -16,6 +16,9 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/ ?>
|
||||
<?
|
||||
require_once("../includes/loggedin.php");
|
||||
require_once("../includes/lib/l10n.php");
|
||||
|
||||
|
||||
function show_page($target,$message,$error)
|
||||
{
|
||||
|
@ -83,43 +86,35 @@ function show_page($target,$message,$error)
|
|||
function send_reminder()
|
||||
{
|
||||
$body = "";
|
||||
if($_POST['reminder-lang'] != "" && $_POST['reminder-lang'] != "en_AU")
|
||||
{
|
||||
$userlang = $_POST['reminder-lang'];
|
||||
$_SESSION['_config']['reminder-lang'] = $_POST['reminder-lang'];
|
||||
putenv("LANG=".$userlang);
|
||||
setlocale(LC_ALL, $userlang);
|
||||
$my_translation = L10n::get_translation();
|
||||
|
||||
$body .= $_SESSION['_config']['translations'][$userlang].":\n\n";
|
||||
$_SESSION['_config']['reminder-lang'] = $_POST['reminder-lang'];
|
||||
|
||||
$reminder_translations[] = $_POST['reminder-lang'];
|
||||
if ( !in_array("en", $reminder_translations, $strict=true) ) {
|
||||
$reminder_translations[] = "en";
|
||||
}
|
||||
|
||||
foreach ($reminder_translations as $translation) {
|
||||
L10n::set_translation($translation);
|
||||
|
||||
$body .= L10n::$translations[$translation].":\n\n";
|
||||
$body .= sprintf(_("This is a short reminder that you filled out forms to become trusted with CAcert.org, and %s has attempted to issue you points. Please create your account at %s as soon as possible and then notify %s so that the points can be issued."), $_SESSION['profile']['fname']." (".$_SESSION['profile']['email'].")", "http://www.cacert.org", $_SESSION['profile']['fname'])."\n\n";
|
||||
$body .= _("Best regards")."\n";
|
||||
$body .= _("CAcert Support Team");
|
||||
|
||||
$body .= "\n\nEnglish:\n\n";
|
||||
$body .= _("CAcert Support Team")."\n\n";
|
||||
}
|
||||
|
||||
$body .= sprintf("This is a short reminder that you filled out forms to become trusted with CAcert.org, and %s has attempted to issue you points. Please create your account at %s as soon as possible and then notify %s so that the points can be issued.", $_SESSION['profile']['fname']." (".$_SESSION['profile']['email'].")", "http://www.cacert.org", $_SESSION['profile']['fname'])."\n\n";
|
||||
$body .= "Best regards"."\n";
|
||||
$body .= "CAcert Support Team";
|
||||
|
||||
L10n::set_translation($reminder_translations[0]); // for the subject
|
||||
sendmail($_POST['email'], "[CAcert.org] "._("Reminder Notice"), $body, $_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']);
|
||||
|
||||
if($_POST['reminder-lang'] != "" && $_POST['reminder-lang'] != "en_AU")
|
||||
{
|
||||
$userlang = $_SESSION['profile']['language'];
|
||||
putenv("LANG=".$userlang);
|
||||
setlocale(LC_ALL, $userlang);
|
||||
}
|
||||
L10n::set_translation($my_translation);
|
||||
|
||||
$_SESSION['_config']['remindersent'] = 1;
|
||||
$_SESSION['_config']['error'] = _("A reminder notice has been sent.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once("../includes/loggedin.php");
|
||||
|
||||
loadem("account");
|
||||
if(array_key_exists('date',$_POST) && $_POST['date'] != "")
|
||||
$_SESSION['_config']['date'] = $_POST['date'];
|
||||
|
@ -322,12 +317,8 @@ $iecho= "c";
|
|||
$_SESSION['profile']['points'] += $addpoints;
|
||||
}
|
||||
|
||||
if($_SESSION['_config']['notarise']['language'] != "")
|
||||
{
|
||||
$userlang = $_SESSION['_config']['notarise']['language'];
|
||||
putenv("LANG=".$userlang);
|
||||
setlocale(LC_ALL, $userlang);
|
||||
}
|
||||
$my_translation = L10n::get_translation();
|
||||
L10n::set_translation($_SESSION['_config']['notarise']['language']);
|
||||
|
||||
$body = sprintf(_("You are receiving this email because you have been assured by %s %s (%s)."), $_SESSION['profile']['fname'], $_SESSION['profile']['lname'], $_SESSION['profile']['email'])."\n\n";
|
||||
if($_POST['points'] != $newpoints)
|
||||
|
@ -359,8 +350,7 @@ $iecho= "c";
|
|||
|
||||
sendmail($_SESSION['_config']['notarise']['email'], "[CAcert.org] "._("You've been Assured."), $body, "support@cacert.org", "", "", "CAcert Website");
|
||||
|
||||
putenv("LANG=".$_SESSION['profile']['language']);
|
||||
setlocale(LC_ALL, $_SESSION['profile']['language']);
|
||||
L10n::set_translation($my_translation);
|
||||
|
||||
$body = sprintf(_("You are receiving this email because you have assured %s %s (%s)."), $_SESSION['_config']['notarise']['fname'], $_SESSION['_config']['notarise']['lname'], $_SESSION['_config']['notarise']['email'])."\n\n";
|
||||
if($_POST['points'] != $newpoints)
|
||||
|
|
Loading…
Reference in a new issue