From ab9a9628c0132f3b77301a5b9d47b029aaf7fedc Mon Sep 17 00:00:00 2001 From: gonglexin <18008490802@163.com> Date: Mon, 27 Oct 2014 17:22:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3#1220=20=E7=94=98?= =?UTF-8?q?=E7=89=B9=E5=9B=BE=20PNG=20=E6=A0=BC=E5=BC=8F=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/configuration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/configuration.yml b/config/configuration.yml index 833b19083..21337e3b4 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -204,6 +204,8 @@ default: # specific configuration options for production environment # that overrides the default ones production: + # CJK support + rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf # specific configuration options for development environment # that overrides the default ones From cc81695bc3c3cfea420d18380e4fbfde1dafe6b6 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 27 Oct 2014 17:30:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=B5=84=E6=96=99=E3=80=8B=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=A7=B0=E7=9A=84bug,=E8=A7=81=E7=BC=BA?= =?UTF-8?q?=E9=99=B7http://forge.trustie.net/issues/1846=5FTrustie-Forge(1?= =?UTF-8?q?328-1418)=20Signed-off-by:=20alan=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 48 ++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 57eaa93d1..74de20ab7 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -171,6 +171,7 @@ <% city = User.current.user_extensions.location_city %> <% identity = User.current.user_extensions.identity %> <% title = User.current.user_extensions.technical_title %> + <% language = User.current.language %> @@ -499,15 +501,55 @@ } } } - function init_identity_and_title(pField, identity, cField, title) { + function init_identity_and_title(pField, identity, cField, title, language) { for (var i = 0; i < pField.options.length; i++) { if (pField.options[i].value == identity) { pField.selectedIndex = i; } } showtechnical_title(identity, cField); + + if(language == 'zh') { + switch (title) { + case 'Professor' : + title1 = '教授'; + break; + case 'Associate professor' : + title1 = '副教授'; + break; + case 'Lecturer' : + title1 = '讲师'; + break; + case 'Teaching assistant' : + title1 = '助教'; + break; + default : + title1 = title; + break; + } + } + else { + switch (title) { + case '教授' : + title1 = 'Professor'; + break; + case '副教授' : + title1 = 'Associate professor'; + break; + case '讲师' : + title1 = 'Lecturer'; + break; + case '助教' : + title1 = 'Teaching assistant'; + break; + default : + title1 = title; + break; + } + } + for (var i = 0; i < cField.options.length; i++) { - if (cField.options[i].value == title) { + if (cField.options[i].value == title1) { cField.selectedIndex = i; } }