diff --git a/app/controllers/BlogController.go b/app/controllers/BlogController.go index e14c89b..163b4e9 100644 --- a/app/controllers/BlogController.go +++ b/app/controllers/BlogController.go @@ -173,6 +173,8 @@ func (c Blog) Set() revel.Result { c.getRecentBlogs(userId) + c.SetLocale(); + return c.RenderTemplate("blog/set.html") } diff --git a/app/views/Blog/set.html b/app/views/Blog/set.html index 64a70e7..9f3308f 100644 --- a/app/views/Blog/set.html +++ b/app/views/Blog/set.html @@ -168,7 +168,7 @@ $(function() { selector : "#AboutMe", content_css : [ "/css/bootstrap.css", "/css/editor/editor.css" ], skin : "custom", - language : "zh", + language : "{{.locale}}", height : 300, width : "100%", skin : "custom", diff --git a/messages/msg.en b/messages/msg.en index e3630bd..0e7ca99 100644 --- a/messages/msg.en +++ b/messages/msg.en @@ -76,6 +76,7 @@ myNotebook=My notebook addNotebook=Add notebook all=Newest trash=Trash +delete=Delete unTitled=UnTitled defaultShare=Default sharing leftHidden=Hidden slide bar diff --git a/messages/msg.zh b/messages/msg.zh index 0898182..fc0ebfb 100644 --- a/messages/msg.zh +++ b/messages/msg.zh @@ -77,6 +77,7 @@ myNotebook=我的笔记本 addNotebook=添加笔记本 all=最新 trash=废纸篓 +delete=删除 unTitled=无标题 defaultShare=默认共享 leftHidden=隐藏左侧 diff --git a/public/tinymce/plugins/leanote_code/plugin.js b/public/tinymce/plugins/leanote_code/plugin.js index 18903c8..5cd3703 100644 --- a/public/tinymce/plugins/leanote_code/plugin.js +++ b/public/tinymce/plugins/leanote_code/plugin.js @@ -28,9 +28,9 @@ tinymce.PluginManager.add('leanote_code', function(editor, url) { } if(!text) { text = $(node).text(); - $(node).replaceWith('
 '+ text + "
"); + $(node).replaceWith('
'+ text + "
"); } else { - ed.insertContent('
 ' + text + "
"); + ed.insertContent('
' + text + "
"); } } ed.selection.moveToBookmark(everBookmark);