Add L10n support for program copyright style

This commit is contained in:
Pig Fang 2018-07-22 16:46:37 +08:00
parent 5e3e2bf688
commit 11afeea08d
4 changed files with 5 additions and 6 deletions

View File

@ -96,9 +96,8 @@ class AdminController extends Controller
$form->textarea('copyright_text')->rows(6)->description();
})->with('copyright_text',
option('copyright_text_'.config('app.locale'), option('copyright_text'))
)->handle(function () {
})->handle(function () {
Option::set('copyright_prefer_'.config('app.locale'), request('copyright_prefer'));
Option::set('copyright_text_'.config('app.locale'), request('copyright_text'));
});

View File

@ -239,7 +239,7 @@ if (! function_exists('bs_copyright')) {
function bs_copyright($prefer = null)
{
$prefer = is_null($prefer) ? Option::get('copyright_prefer', 0, false) : $prefer;
$prefer = is_null($prefer) ? option_localized('copyright_prefer', 0) : $prefer;
$base64CopyrightText = [
'UG93ZXJlZCB3aXRoIOKdpCBieSA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vcHJpbnRlbXB3L2JsZXNzaW5nLXNraW4tc2VydmVyIj5CbGVzc2luZyBTa2luIFNlcnZlcjwvYT4u',

View File

@ -12,7 +12,7 @@ homepage:
description: The given image must have same width and height (leave blank to use default icon).
copyright_prefer:
title: Program Copyright
description: Any evil modification applied on the footer program copyright (including deleting, modifying author, changing link target) with out permission is <b>FORBIDDEN</b>. The author reserves the right to pursue relevant responsibilities.
description: "You can specify a different style of program copyright for each language. To edit a specific language's corresponding program copyright style, please switch to that language and submit your edit. <br><b>Warning:</b> Any evil modification applied on the footer program copyright (including deleting, modifying author, changing link target) with out permission is <b>FORBIDDEN</b>. The author reserves the right to pursue relevant responsibilities."
copyright_text:
title: Custom Copyright Text
description: Placeholders are available in custom copyright text. e.g. <code>{site_name}</code> & <code>{site_url}</code>. You can also specify a different footer for each language. To edit a specific language's corresponding footer, please switch to that language and submit your edit.

View File

@ -12,7 +12,7 @@ homepage:
description: 所使用的图像必须具有相同的宽度和高度(留空以使用默认图标)
copyright_prefer:
title: 程序版权信息
description: 对于任何恶意修改页面<b>右下角</b>的版权信息(包括不限于删除、修改作者信息、修改链接指向)的用户,作者保留对其追究责任的权力。
description: 每种支持的语言都可以对应不同的程序版权信息,如果想要编辑某种特定语言下的版权信息,请在右上角切换至该语言后再提交修改。<b>对于任何恶意修改页面右下角的版权信息(包括不限于删除、修改作者信息、修改链接指向)的用户,作者保留对其追究责任的权利。</b>
copyright_text:
title: 自定义版权文字
description: 自定义版权文字内可使用占位符,<code>{site_name}</code> 将会被自动替换为站点名称,<code>{site_url}</code> 会被替换为站点地址。每种支持的语言都可以对应不同的自定义版权文字,如果想要编辑某种特定语言下的版权文字,请在右上角切换至该语言后再提交修改。