diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 6776340ac..38f1e3b9f 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -178,6 +178,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 %>
@@ -526,15 +528,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;
}
}
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