fix formatCode()

This commit is contained in:
xiaomlove
2025-04-21 20:20:16 +07:00
parent 8a9a478d51
commit 92530e2c79
4 changed files with 5 additions and 2 deletions

View File

@@ -229,8 +229,8 @@ function formatUrl($url, $newWindow = false, $text = '', $linkClass = '') {
return addTempCode("<a".($linkClass ? " class=\"$linkClass\"" : '')." href=\"$url\"" . ($newWindow==true? " target=\"_blank\"" : "").">$text</a>");
}
function formatCode($text) {
global $lang_functions;
return addTempCode("<br /><div class=\"codetop\">".$lang_functions['text_code']."</div><div class=\"codemain\"><pre><code>$text</code></pre></div><br />");
$textCode = nexus_trans("label.text_code");
return addTempCode("<br /><div class=\"codetop\">".$textCode."</div><div class=\"codemain\"><pre><code>$text</code></pre></div><br />");
}
function formatImg($src, $enableImageResizer, $image_max_width, $image_max_height, $imgId = "") {

View File

@@ -45,6 +45,7 @@ return [
'created_at_begin' => 'Created at begin',
'created_at_end' => 'Created at end',
'text_quote' => 'Quote',
'text_code' => "CODE",
'setting' => [
'nav_text' => 'Setting',
'backup' => [

View File

@@ -45,6 +45,7 @@ return [
'created_at_begin' => '创建时间开始',
'created_at_end' => '创建时间结束',
'text_quote' => '引用',
'text_code' => "代码",
'setting' => [
'nav_text' => '设置',
'backup' => [

View File

@@ -45,6 +45,7 @@ return [
'created_at_begin' => '創建時間開始',
'created_at_end' => '創建時間結束',
'text_quote' => '引用',
'text_code' => "代碼",
'setting' => [
'nav_text' => '設置',
'backup' => [