From: Andrew Dolgov Date: Wed, 29 May 2013 11:41:19 +0000 (+0400) Subject: add startup_gettext() calls to several endpoints for unregistered users so the output... X-Git-Tag: 1.8~52 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=67e0cf9a371fca46405e7df26ccc970ce6b408cc;p=tt-rss.git add startup_gettext() calls to several endpoints for unregistered users so the output would be translated based on accept-language header --- diff --git a/classes/handler/public.php b/classes/handler/public.php index 3e868d56..727976a8 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -732,6 +732,8 @@ class Handler_Public extends Handler { } function forgotpass() { + startup_gettext(); + header('Content-Type: text/html; charset=utf-8'); print "Tiny Tiny RSS"; @@ -825,6 +827,8 @@ class Handler_Public extends Handler { } function dbupdate() { + startup_gettext(); + if (!SINGLE_USER_MODE && $_SESSION["access_level"] < 10) { $_SESSION["login_error_msg"] = __("Your access level is insufficient to run this script."); render_login_form(); diff --git a/include/login_form.php b/include/login_form.php index b401fdac..891e25e1 100644 --- a/include/login_form.php +++ b/include/login_form.php @@ -1,3 +1,4 @@ + Tiny Tiny RSS : Login @@ -108,14 +109,14 @@ function init() { require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form', 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser){ parser.parse(); - //show tooltip node only after this widget is instaniated. + //show tooltip node only after this widget is instaniated. dojo.query('div[dojoType="dijit.Tooltip"]').style({ display:'' }); fetchProfiles(); dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true'); document.forms.loginForm.login.focus(); - }); + }); } diff --git a/register.php b/register.php index f50ef14a..eaab98e0 100644 --- a/register.php +++ b/register.php @@ -15,6 +15,8 @@ require_once "config.php"; require_once "db.php"; + startup_gettext(); + $action = $_REQUEST["action"]; if (!init_plugins()) return;