From 068bb7dc78d0b3565c100b61acc859ede0adc0d4 Mon Sep 17 00:00:00 2001
From: Mike Chen
Date: Wed, 29 Jul 2009 00:00:52 +0800
Subject: merge Evgeny's English and Botum's Spanish translations
---
templates/content/js/com.cnprog.i18n.js | 90 ++++++++++++++++++
templates/content/js/com.cnprog.post.js | 109 +++++++++++++++-------
templates/content/js/com.cnprog.post.pack.js | 1 -
templates/content/js/com.cnprog.utils.js | 22 +++--
templates/content/js/jquery.i18n.js | 133 +++++++++++++++++++++++++++
templates/content/js/wmd/wmd.js | 34 ++++---
6 files changed, 329 insertions(+), 60 deletions(-)
create mode 100644 templates/content/js/com.cnprog.i18n.js
delete mode 100644 templates/content/js/com.cnprog.post.pack.js
create mode 100644 templates/content/js/jquery.i18n.js
(limited to 'templates/content/js')
diff --git a/templates/content/js/com.cnprog.i18n.js b/templates/content/js/com.cnprog.i18n.js
new file mode 100644
index 00000000..2d8c90a6
--- /dev/null
+++ b/templates/content/js/com.cnprog.i18n.js
@@ -0,0 +1,90 @@
+// Evgeny Fadeev evgeny.fadeev@gmail.com localized for english and chinese
+// i18nLang variable must be set in html header to extract correct language
+var i18nZh = {
+ 'insufficient privilege':'用户权限不在操作范围',
+ 'cannot pick own answer as best':'不能设置自己的回答为最佳答案',
+ 'anonymous users cannot select favorite questions':'匿名用户不能收藏问题,请先',
+ 'please login':'注册或者登录',
+ 'anonymous users cannot vote':'匿名用户不能投票',
+ '>15 points requried to upvote':'需要+15积分才能投支持票。',
+ '>100 points required to downvote':'需要+100积分才能投反对票。',
+ 'please see': '查看',
+ 'cannot vote for own posts':'不能给自己的帖子投票',
+ 'daily vote cap exhausted':'对不起,您已用完今日所有的投票。',
+ 'cannot revoke old vote':'这个投票已经过时,不能撤销。',
+ 'please confirm offensive':"确定要归类该帖为广告、人身攻击、恶意言论吗?",
+ 'anonymous users cannot flag offensive posts':'匿名用户不能操作,请先',
+ 'cannot flag message as offensive twice':'不能重复操作。',
+ 'flag offensive cap exhausted':'对不起,您已用完今日所有的5次‘水帖’操作。',
+ 'need >15 points to report spam':"需要+15积分才能归类‘垃圾帖’。",
+ 'confirm delete':"确定要删除/撤销删除该帖吗?",
+ 'anonymous users cannot delete/undelete':"匿名用户不能删除或撤销删除帖子",
+ 'post recovered':"操作成功!该帖子已被恢复。",
+ 'post deleted':"操作成功!该帖子已删除。",
+ 'add comment':'添加评论',
+ 'community reputation points':'社区积分',
+ 'to comment, need':'评论需要',
+ 'delete this comment':'删除此评论',
+ 'hide comments':"隐藏评论",
+ 'add a comment':"添加评论",
+ 'comments':"评论",
+ 'confirm delete comment':"真要删除此评论吗?",
+ 'characters':'字符',
+ 'can write':'还可写',
+ 'click to close':'点击消息框关闭',
+ 'loading...':'读取中...',
+ 'tags cannot be empty':'标签不能为空。',
+ 'tablimits info':"最多5个标签,每个标签长度小于20个字符。",
+ 'content cannot be empty':'内容不能为空。',
+ 'content minchars': '请输入至少 {0} 字符。',
+ 'please enter title':'请输入标题。',
+ 'title minchars':"请输入至少 {0} 字符。",
+ 'delete':'删除',
+ 'undelete': '取消',
+ 'bold':'粗体',
+ 'italic':'斜体',
+ 'link':'超链接',
+ 'quote':'引用',
+ 'preformatted text':'代码',
+ 'image':'图片',
+ 'numbered list':'数字编号列表',
+ 'bulleted list':'项目符号列表',
+ 'heading':'标题',
+ 'horizontal bar':'水平线',
+ 'undo':'撤销',
+ 'redo':'重做',
+ 'enter image url':'输入图片地址
评论需要 ' + repNeededForComments + ' 社区积分 - ');
+ jDiv.append('
'
+ + $.i18n._('to comment, need') + ' ' +
+ + repNeededForComments + ' ' + $.i18n._('community reputation points')
+ + '');
}
}
};
@@ -477,7 +516,7 @@ function createComments(type) {
var imgHover = "/content/images/close-small-hover.png";
html += '
';
+ html += '\')" title="' + $.i18n._('delete this comment') + '" />';
}
html += '
';
@@ -524,13 +563,15 @@ function createComments(type) {
renderForm(id, jDiv);
jDiv.show();
if (canPostComments(id, jDiv)) jDiv.find("textarea").get(0).focus();
- jDiv.siblings("a").unbind("click").click(function() { commentsFactory[objectType].hide(id); }).text("隐藏评论");
+ jDiv.siblings("a").unbind("click").click(function(){
+ commentsFactory[objectType].hide(id);
+ }).text($.i18n._('hide comments'));
},
hide: function(id) {
var jDiv = jDivInit(id);
var len = jDiv.children("div.comments").children().length;
- var anchorText = len == 0 ? "添加评论" : "评论 (
" + len + ")";
+ var anchorText = len == 0 ? $.i18n._('add a comment') : $.i18n._('comments') + ' (
' + len + ")";
jDiv.hide();
jDiv.siblings("a").unbind("click").click(function() { commentsFactory[objectType].show(id); }).html(anchorText);
@@ -538,7 +579,7 @@ function createComments(type) {
},
deleteComment: function(jImg, id, deleteUrl) {
- if (confirm("真要删除此评论吗?")) {
+ if (confirm($.i18n._('confirm delete comment'))) {
jImg.hide();
appendLoaderImg(id);
$.post(deleteUrl, { dataNeeded: "forIIS7" }, function(json) {
@@ -551,7 +592,9 @@ function createComments(type) {
var length = textarea.value ? textarea.value.length : 0;
var color = length > 270 ? "#f00" : length > 200 ? "#f60" : "#999";
var jSpan = $(textarea).siblings("span.text-counter");
- jSpan.html('还可写' + (300 - length) + ' 字符').css("color", color);
+ jSpan.html($.i18n._('can write')
+ + (300 - length) + ' '
+ + $.i18n._('characters')).css("color", color);
}
};
}
diff --git a/templates/content/js/com.cnprog.post.pack.js b/templates/content/js/com.cnprog.post.pack.js
deleted file mode 100644
index 8af19d13..00000000
--- a/templates/content/js/com.cnprog.post.pack.js
+++ /dev/null
@@ -1 +0,0 @@
-var lanai={highlightSyntax:function(){var a=false;$("pre code").parent().each(function(){if(!$(this).hasClass("prettyprint")){$(this).addClass("prettyprint");a=true}});if(a){prettyPrint()}}};var Vote=function(){var M;var v;var ah;var O;var X="answer-container-";var V="vote-buttons";var s="answer-img-accept-";var T="question-img-favorite";var N="question-img-upvote-";var r="question-img-downvote-";var L="answer-img-upvote-";var ae="answer-img-downvote-";var ad="favorite-number";var j="comment-";var H="vote-number";var a="question-offensive-flag-";var t="answer-offensive-flag-";var x="offensive-flag";var aa="question-controls";var J="question-delete-link-";var b="answer-delete-link-";var o="用户权限不在操作范围";var w="不能设置自己的回答为最佳答案";var g="匿名用户不能收藏问题,请先
注册或者登录";var aj="匿名用户不能投票,请先
注册或者登录";var K="需要+15积分才能投支持票。查看
faq";var Y="需要+100积分才能投反对票。查看
faq";var q="不能给自己的帖子投票";var n="对不起,您已用完今日所有的投票。查看
faq";var A="这个投票已经过时,不能撤销。查看
faq";var u="确定要归类该帖为广告、人身攻击、恶意言论吗?";var ab="匿名用户不能操作,请先
注册或者登录";var C="不能重复操作。查看
faq";var B="对不起,您已用完今日所有的5次‘水帖’操作。查看
faq";var af="需要+15积分才能归类‘垃圾帖’。查看
faq";var p="确定要删除/撤销删除该帖吗?";var W="匿名用户不能删除或撤销删除帖子";var Q="操作成功!该帖子已被恢复。";var i="操作成功!该帖子已删除。";var h={acceptAnswer:0,questionUpVote:1,questionDownVote:2,favorite:4,answerUpVote:5,answerDownVote:6,offensiveQuestion:7,offensiveAnswer:8,removeQuestion:9,removeAnswer:10};var Z=function(){var ak="div."+V+" img[class="+T+"]";return $(ak)};var I=function(){var ak="#"+ad;return $(ak)};var e=function(){var ak="div."+V+" img[id^="+N+"]";return $(ak)};var E=function(){var ak="div."+V+" img[id^="+r+"]";return $(ak)};var l=function(){var ak="div."+V+" img[id^="+L+"]";return $(ak)};var k=function(){var ak="div."+V+" img[id^="+ae+"]";return $(ak)};var m=function(al){var ak="div."+V+" img[id="+L+al+"]";return $(ak)};var y=function(al){var ak="div."+V+" img[id="+ae+al+"]";return $(ak)};var z=function(){var ak="table[id=question-table] span[class="+x+"]";return $(ak)};var c=function(){var ak="div.answer span[class="+x+"]";return $(ak)};var R=function(){var ak="div#question-controls a[id^="+J+"]";return $(ak)};var f=function(){var ak="div.answer-controls a[id^="+b+"]";return $(ak)};var U=function(an,al,am){var ak=al?"":"-on";var ao=(an==h.questionUpVote||an==h.answerUpVote)?"up":"down";am.attr("src","/content/images/vote-arrow-"+ao+ak+".png");if(al){if(an==h.questionUpVote||an==h.questionDownVote){$(e()).attr("src","/content/images/vote-arrow-up.png");$(E()).attr("src","/content/images/vote-arrow-down.png")}else{$(m(v)).attr("src","/content/images/vote-arrow-up.png");$(y(v)).attr("src","/content/images/vote-arrow-down.png")}}};var P=function(al,am){var ak=al.parent("div."+V).find("div."+H);$(ak).text(am)};var ac=function(){if(ah==O){var am="div."+V+" img[id^="+s+"]";$(am).unbind("click").click(function(aq){Vote.accept($(aq.target))})}var ao=Z();ao.unbind("click").click(function(aq){Vote.favorite($(aq.target))});var an=e();an.unbind("click").click(function(aq){Vote.vote($(aq.target),h.questionUpVote)});var ak=E();ak.unbind("click").click(function(aq){Vote.vote($(aq.target),h.questionDownVote)});var al=l();al.unbind("click").click(function(aq){Vote.vote($(aq.target),h.answerUpVote)});var ap=k();ap.unbind("click").click(function(aq){Vote.vote($(aq.target),h.answerDownVote)});z().unbind("click").click(function(aq){Vote.offensive(this,h.offensiveQuestion)});c().unbind("click").click(function(aq){Vote.offensive(this,h.offensiveAnswer)});R().unbind("click").click(function(aq){Vote.remove(this,h.removeQuestion)});f().unbind("click").click(function(aq){Vote.remove(this,h.removeAnswer)})};var G=function(ak,al,am){$.ajax({type:"POST",cache:false,dataType:"json",url:"/questions/"+M+"/vote/",data:{type:al,postId:v},error:ai,success:function(an){am(ak,al,an)}})};var ai=function(al,ak){alert("Callback invoke error: "+ak)};var d=function(al,am,ao){if(ao.allowed=="0"&&ao.success=="0"){showMessage(al,o)}else{if(ao.allowed=="-1"){showMessage(al,w)}else{if(ao.status=="1"){al.attr("src","/content/images/vote-accepted.png");$("#"+X+v).removeClass("accepted-answer");$("#"+j+v).removeClass("comment-link-accepted")}else{if(ao.success=="1"){var an="div."+V+" img[id^="+s+"]";$(an).attr("src","/content/images/vote-accepted.png");var ap=("div[id^="+X+"]");$(ap).removeClass("accepted-answer");var ak=("div[id^="+X+"] div[id^="+j+"]");$(ak).removeClass("comment-link-accepted");al.attr("src","/content/images/vote-accepted-on.png");$("#"+X+v).addClass("accepted-answer");$("#"+j+v).addClass("comment-link-accepted")}else{showMessage(al,ao.message)}}}}};var F=function(ak,al,am){if(am.allowed=="0"&&am.success=="0"){showMessage(ak,g.replace("{{QuestionID}}",M))}else{if(am.status=="1"){ak.attr("src","/content/images/vote-favorite-off.png");var an=I();an.removeClass("my-favorite-number");if(am.count==0){am.count=""}an.text(am.count)}else{if(am.success=="1"){ak.attr("src","/content/images/vote-favorite-on.png");var an=I();an.text(am.count);an.addClass("my-favorite-number")}else{showMessage(ak,am.message)}}}};var S=function(ak,al,am){if(am.allowed=="0"&&am.success=="0"){showMessage(ak,aj.replace("{{QuestionID}}",M))}else{if(am.allowed=="-3"){showMessage(ak,n)}else{if(am.allowed=="-2"){if(al==h.questionUpVote||al==h.answerUpVote){showMessage(ak,K)}else{if(al==h.questionDownVote||al==h.answerDownVote){showMessage(ak,Y)}}}else{if(am.allowed=="-1"){showMessage(ak,q)}else{if(am.status=="2"){showMessage(ak,A)}else{if(am.status=="1"){U(al,true,ak);P(ak,am.count)}else{if(am.success=="1"){U(al,false,ak);P(ak,am.count);if(am.message.length>0){showMessage(ak,am.message)}}}}}}}}};var ag=function(ak,al,am){ak=$(ak);if(am.allowed=="0"&&am.success=="0"){showMessage(ak,ab.replace("{{QuestionID}}",M))}else{if(am.allowed=="-3"){showMessage(ak,B)}else{if(am.allowed=="-2"){showMessage(ak,af)}else{if(am.status=="1"){showMessage(ak,C)}else{if(am.success=="1"){$(ak).children("span[class=darkred]").text("("+am.count+")")}}}}}};var D=function(ak,al,am){if(am.allowed=="0"&&am.success=="0"){showMessage(ak,W.replace("{{QuestionID}}",M))}else{if(am.status=="1"){showMessage(ak,Q)}else{if(am.success=="1"){showMessage(ak,i)}}}};return{init:function(ak,al,am){M=ak;ah=al;O=am;ac()},accept:function(ak){v=ak.attr("id").substring(s.length);G(ak,h.acceptAnswer,d)},favorite:function(ak){if(!O||O.toUpperCase()=="NONE"){showMessage(ak,g.replace("{{QuestionID}}",M));return false}G(ak,h.favorite,F)},vote:function(ak,al){if(!O||O.toUpperCase()=="NONE"){showMessage(ak,aj.replace("{{QuestionID}}",M));return false}if(al==h.answerUpVote){v=ak.attr("id").substring(L.length)}else{if(al==h.answerDownVote){v=ak.attr("id").substring(ae.length)}}G(ak,al,S)},offensive:function(ak,al){if(!O||O.toUpperCase()=="NONE"){showMessage($(ak),ab.replace("{{QuestionID}}",M));return false}if(confirm(u)){v=ak.id.substr(ak.id.lastIndexOf("-")+1);G(ak,al,ag)}},remove:function(ak,al){if(!O||O.toUpperCase()=="NONE"){showMessage($(ak),W.replace("{{QuestionID}}",M));return false}if(confirm(p)){v=ak.id.substr(ak.id.lastIndexOf("-")+1);G($(ak),al,D)}}}}();function createComments(i){var d=i;var b=function(k){return $("#comments-"+d+"-"+k)};var j=function(k){appendLoader("#comments-"+d+"-"+k+" div.comments")};var h=function(m,l){var k=l.siblings("#can-post-comments-"+d+"-"+m);return k.val().toLowerCase()=="true"};var f=function(o,m){var n="form-comments-"+d+"-"+o;if(h(o,m)){if(m.find("#"+n).length==0){var l='';m.append(l);setupFormValidation("#"+n,{comment:{required:true,minlength:10}},"",function(){e(o,n)})}}else{var k="comments-rep-needed-"+d+"-"+o;if(m.find("#"+k).length==0){m.append('
评论需要 '+repNeededForComments+' 社区积分 - ')}}};var a=function(l,k){j(l);$.getJSON("/"+d+"s/"+l+"/comments/",function(m){c(l,m)})};var c=function(n,l){var m=b(n);m=m.find("div.comments");m.find("div[id^='comment-"+d+"-']").remove();removeLoader();if(l&&l.length>0){for(var k=0;k
'+n.text;m+=n.user_url?' – ":"");m+=' ";if(n.delete_url){var l="/content/images/close-small.png";var k="/content/images/close-small-hover.png";m+=''}m+="";o.append(m)};var e=function(n,m){j(n);var l="#"+m;var k=$(l+" textarea");$.ajax({type:"POST",url:"/"+d+"s/"+n+"/comments/",dataType:"json",data:{comment:k.val()},success:function(o){c(n,o);k.val("");commentsFactory[d].updateTextCounter(k);enableSubmitButton(l)},error:function(o,q,p){removeLoader();showMessage(l,o.responseText);enableSubmitButton(l)}})};return{init:function(){$("a[id^='comments-link-"+d+"-']").unbind("click").click(function(){commentsFactory[d].show($(this).attr("id").substr(("comments-link-"+d+"-").length))})},show:function(l){var k=b(l);a(l,k);f(l,k);k.show();if(h(l,k)){k.find("textarea").get(0).focus()}k.siblings("a").unbind("click").click(function(){commentsFactory[d].hide(l)}).text("隐藏评论")},hide:function(n){var m=b(n);var k=m.children("div.comments").children().length;var l=k==0?"添加评论":"评论 (
"+k+")";m.hide();m.siblings("a").unbind("click").click(function(){commentsFactory[d].show(n)}).html(l);m.children("div.comments").children().hide()},deleteComment:function(m,l,k){if(confirm("真要删除此评论吗?")){m.hide();j(l);$.post(k,{dataNeeded:"forIIS7"},function(n){c(l,n)},"json")}},updateTextCounter:function(l){var n=l.value?l.value.length:0;var m=n>270?"#f00":n>200?"#f60":"#999";var k=$(l).siblings("span.text-counter");k.html("还可写"+(300-n)+" 字符").css("color",m)}}}var questionComments=createComments("question");var answerComments=createComments("answer");$().ready(function(){questionComments.init();answerComments.init()});var commentsFactory={question:questionComments,answer:answerComments};var PR_SHOULD_USE_CONTINUATION=true;var PR_TAB_WIDTH=8;var PR_normalizedHtml;var PR;var prettyPrintOne;var prettyPrint;function _pr_isIE6(){var a=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);_pr_isIE6=function(){return a};return a}(function(){function W(av){av=av.split(/ /g);var aw={};for(var au=av.length;--au>=0;){var at=av[au];if(at){aw[at]=null}}return aw}var n="break continue do else for if return while ";var D=n+"auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile ";var w=D+"catch class delete false import new operator private protected public this throw true try ";var p=w+"alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ";var G=w+"boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ";var ap=G+"as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ";var F=w+"debugger eval export function get null set undefined var with Infinity NaN ";var y="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ";var ab=n+"and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ";var k=n+"alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ";var aa=n+"case done elif esac eval fi function in local set then until ";var M=(p+ap+F+y+ab+k+aa);var O="str";var L="kwd";var o="com";var al="typ";var Y="lit";var ah="pun";var V="pln";var q="tag";var U="dec";var ad="src";var ao="atn";var s="atv";var ak="nocode";function aq(at){return(at>="a"&&at<="z")||(at>="A"&&at<="Z")}function N(aw,au,at,av){aw.unshift(at,av||0);try{au.splice.apply(au,aw)}finally{aw.splice(0,2)}}var ai=function(){var av=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"];var aw="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)";for(var at=0;at
:&])/g,"\\$1")}}aw+="|^)\\s*$";return new RegExp(aw)}();var S=/&/g;var Z=//g;var K=/\"/g;function E(at){return at.replace(S,"&").replace(Z,"<").replace(x,">").replace(K,""")}function r(at){return at.replace(S,"&").replace(Z,"<").replace(x,">")}var e=/</g;var C=/>/g;var d=/'/g;var i=/"/g;var ar=/&/g;var J=/ /g;function t(aw){var ay=aw.indexOf("&");if(ay<0){return aw}for(--ay;(ay=aw.indexOf("",ay+1))>=0;){var at=aw.indexOf(";",ay);if(at>=0){var av=aw.substring(ay+3,at);var ax=10;if(av&&av.charAt(0)==="x"){av=av.substring(1);ax=16}var au=parseInt(av,ax);if(!isNaN(au)){aw=(aw.substring(0,ay)+String.fromCharCode(au)+aw.substring(at+1))}}}return aw.replace(e,"<").replace(C,">").replace(d,"'").replace(i,'"').replace(ar,"&").replace(J," ")}function R(at){return"XMP"===at.tagName}function an(ax,av){switch(ax.nodeType){case 1:var au=ax.tagName.toLowerCase();av.push("<",au);for(var aw=0;aw");for(var ay=ax.firstChild;ay;ay=ay.nextSibling){an(ay,av)}if(ax.firstChild||!/^(?:br|link|img)$/.test(au)){av.push("",au,">")}break;case 2:av.push(ax.name.toLowerCase(),'="',E(ax.value),'"');break;case 3:case 4:av.push(r(ax.nodeValue));break}}var am=null;function b(aw){if(null===am){var au=document.createElement("PRE");au.appendChild(document.createTextNode('\n'));am=!/=0;aw-=at.length){ax.push(at.substring(0,aw))}aC=ay+1;break;case"\n":au=0;break;default:++au}}if(!ax){return az}ax.push(az.substring(aC));return ax.join("")}}var Q=/(?:[^<]+|||<\/?[a-zA-Z][^>]*>|<)/g;var v=/^|$)/,null],[ad,/^<\?[\s\S]*?(?:\?>|$)/,null],[ad,/^<%[\s\S]*?(?:%>|$)/,null],[ad,/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],[q,/^<\/?\w[^<>]*>/,null]]);var z=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function ae(ay){var av=a(ay);for(var ax=0;ax\/=]+/,null,"<>/="]],[[q,/^[\w:\-]+/,/^],[s,/^[\w\-]+/,/^=/],[ao,/^[\w:\-]+/,null],[V,/^\s+/,null," \t\r\n"]]);function I(ay,au){for(var aw=0;aw=2&&/^[\"\']/.test(aG)&&aG.charAt(0)===aG.charAt(au-1));var aw;var ay;var aC;if(aA){ay=ax+1;aC=aD-1;aw=aG}else{ay=ax+1;aC=aD-1;aw=aG.substring(1,aG.length-1)}var aH=af(aw);for(var aE=0,az=aH.length;aEaI){if(ax&&ax!==aC){aB.push("");ax=null}if(!ax&&aC){ax=aC;aB.push('')}var aL=r(az(aJ.substring(aI,aK))).replace(aE?aF:aw,"$1 ");aE=aD.test(aL);aB.push(aL.replace(aA,"
"));aI=aK}}while(true){var at;if(av");ax=null}aB.push(au[av+1]);av+=2}else{if(aH")}return aB.join("")}var A={};function g(av,aw){for(var at=aw.length;--at>=0;){var au=aw[at];if(!A.hasOwnProperty(au)){A[au]=av}else{if("console" in window){console.log("cannot override language handler %s",au)}}}}g(af,["default-code"]);g(l,["default-markup","html","htm","xhtml","xml","xsl"]);g(m({keywords:p,hashComments:true,cStyleComments:true}),["c","cc","cpp","cs","cxx","cyc"]);g(m({keywords:G,cStyleComments:true}),["java"]);g(m({keywords:aa,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);g(m({keywords:ab,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);g(m({keywords:y,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);g(m({keywords:k,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);g(m({keywords:F,cStyleComments:true,regexLiterals:true}),["js"]);function H(ay,aw){try{var az=B(ay);var av=az.source;var at=az.tags;if(!A.hasOwnProperty(aw)){aw=/^\s*=0){var aD=aH.className.match(/\blang-(\w+)\b/);if(aD){aD=aD[1]}var aM=false;for(var aB=aH.parentNode;aB;aB=aB.parentNode){if((aB.tagName==="pre"||aB.tagName==="code"||aB.tagName==="xmp")&&aB.className&&aB.className.indexOf("prettyprint")>=0){aM=true;break}}if(!aM){var aJ=b(aH);aJ=aJ.replace(/(?:\r\n?|\n)$/,"");var aN=H(aJ,aD);if(!R(aH)){aH.innerHTML=aN}else{var aC=document.createElement("PRE");for(var aF=0;aF=0;){var aL=aI[aE];aL.parentNode.replaceChild(document.createTextNode("\r\n"),aL)}}}}}if(at' + msg + '
(点击消息框关闭) ');
+ var div = $('