Commit 34ce91f9 authored by Van's avatar Van

Merge remote-tracking branch 'origin/2.9.5-dev' into 2.9.5-dev

# Conflicts:
#	src/main/webapp/skins
parents 5e1a70cb 1bd6dfff
......@@ -20,6 +20,7 @@ package org.b3log.solo.processor;
import freemarker.template.Template;
import org.apache.commons.lang.StringUtils;
import org.b3log.latke.Keys;
import org.b3log.latke.Latkes;
import org.b3log.latke.ioc.inject.Inject;
import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger;
......@@ -219,7 +220,7 @@ public class IndexProcessor {
final Map<String, Object> dataModel = renderer.getDataModel();
try {
final Map<String, String> langs = langPropsService.getAll(Locales.getLocale(request));
final Map<String, String> langs = langPropsService.getAll(Latkes.getLocale());
dataModel.putAll(langs);
final JSONObject preference = preferenceQueryService.getPreference();
filler.fillCommon(request, response, dataModel, preference);
......
......@@ -138,7 +138,7 @@ public class OAuthGitHubProcessor {
* @throws Exception exception
*/
@RequestProcessing(value = "/oauth/github", method = HTTPRequestMethod.GET)
public void showGitHubCallback(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
public synchronized void showGitHubCallback(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
final String state = request.getParameter("state");
String referer = STATES.get(state);
if (StringUtils.isBlank(referer)) {
......
......@@ -18,12 +18,14 @@
#
# Description: Solo language configurations(en_US).
# Version: 2.22.0.0, Sep 21, 2018
# Version: 2.23.0.0, Sep 21, 2018
# Author: Liang Ding
# Author: Liyuan Li
# Author: Dongxu Wang
#
useGitHubAccountLoginLabel=Use GitHub account
useLocalAccountLabel=Use local account
chageLabel=Change
useTumbnailLabel=Use Tumbnail
iconLabel=Icon
......
......@@ -18,12 +18,14 @@
#
# Description: Solo default language configurations(zh_CN).
# Version: 2.22.0.0, Sep 21, 2018
# Version: 2.23.0.0, Sep 21, 2018
# Author: Liang Ding
# Author: Liyuan Li
# Author: Dongxu Wang
#
useGitHubAccountLoginLabel=\u4F7F\u7528 GitHub \u8D26\u53F7\u767B\u5F55
useLocalAccountLabel=\u4F7F\u7528\u672C\u5730\u8D26\u53F7
chageLabel=\u66F4\u6362
useTumbnailLabel=\u542F\u7528\u914D\u56FE
iconLabel=\u56FE\u6807
......
......@@ -32,9 +32,9 @@
<a class="github__icon" href="${servePath}/oauth/github/redirect">
<img src="${staticServePath}/images/github-init.gif"/>
</a>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号初始化</button>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">${useGitHubAccountLoginLabel}</button>
<br>
<span onclick="$('#github').hide();$('#user').show()">使用本地账号</span>
<span onclick="$('#github').hide();$('#user').show()">${useLocalAccountLabel}</span>
</div>
<div id="user" class="form none">
<label for="userEmail">
......@@ -53,14 +53,13 @@
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm"/>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号初始化</button>
<button onclick='getUserInfo();'>${nextStepLabel}</button>
<span id="tip"></span>
</div>
<div id="sys" class="none">
${initIntroLabel}
<button onclick='initSys();' id="initButton">${initLabel}</button>
<button onclick='returnTo();'>${previousStepLabel}</button>
<button onclick='initSys();' id="initButton">${initLabel}</button>
<span id="tipInit"></span>
<span class="clear"></span>
</div>
......
......@@ -27,9 +27,9 @@ ${loginLabel}
<a class="github__icon" href="${servePath}/oauth/github/redirect">
<img src="${staticServePath}/images/github-init.gif"/>
</a>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号登录</button>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">${useGitHubAccountLoginLabel}</button>
<br>
<span onclick="$('#github').hide();$('.form').show()">使用本地账号</span>
<span onclick="$('#github').hide();$('.form').show()">${useLocalAccountLabel}</span>
</div>
<div class="form none">
......@@ -41,7 +41,6 @@ ${loginLabel}
${userPasswordLabel} <a href="${servePath}/forgot">(${forgotLabel})</a>
</label>
<input type="password" id="userPassword" tabindex="2" />
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号登录</button>
<button onclick='login();'>${loginLabel}</button>
<span id="tip">${resetMsg}</span>
</div>
......
......@@ -25,9 +25,9 @@
<a class="github__icon" href="${servePath}/oauth/github/redirect">
<img src="${staticServePath}/images/github-init.gif"/>
</a>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号注册</button>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">${useGitHubAccountLoginLabel}</button>
<br>
<span onclick="$('#github').hide();$('.form').show()">使用本地账号</span>
<span onclick="$('#github').hide();$('.form').show()">${useLocalAccountLabel}</span>
</div>
<div class="form none">
<label for="userEmail">
......@@ -50,7 +50,6 @@
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm" />
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号注册</button>
<button onclick='getUserInfo();'>${registerSoloUserLabel}</button>
<span id="tip" ></span>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment