javascript周辺の日本語化。
lib/view周辺の日本語化。
| @@ -96,7 +96,7 @@ | ||
| 96 | 96 | var img = $c("img", {src: base_url + "img/min.png"}); |
| 97 | 97 | addClassName(img, "remover"); |
| 98 | 98 | span.appendChild(img); |
| 99 | - span.setAttribute("title", "delete " + name) | |
| 99 | + span.setAttribute("title", name + "を削除") | |
| 100 | 100 | span.onclick = deleteObject; |
| 101 | 101 | li.appendChild(span); |
| 102 | 102 | } |
| @@ -167,7 +167,7 @@ | ||
| 167 | 167 | var name = this.getAttribute("name"); |
| 168 | 168 | var url = base_url + '' + type + '/delete/' + name |
| 169 | 169 | |
| 170 | - var answer = confirm('Really delete ' + name + '? There is no undo') | |
| 170 | + var answer = confirm('本当に「' + name + '」を削除しますか?この操作は取り消せません') | |
| 171 | 171 | if (!answer) |
| 172 | 172 | return |
| 173 | 173 |
| @@ -1,3 +1,4 @@ | ||
| 1 | +# -*- coding: utf-8 -*- | |
| 1 | 2 | from dispatch.view import View |
| 2 | 3 | from template.shortcuts import evaluate_main |
| 3 | 4 | from dispatch.response import Response, XMLStatusResponse, XMLTemplateResponse |
| @@ -136,11 +137,11 @@ | ||
| 136 | 137 | # TODO: Make this a setting in submin.conf? |
| 137 | 138 | if group.name == "submin-admins" and username == req.session['user'].name: |
| 138 | 139 | return XMLStatusResponse('removeMember', False, |
| 139 | - "You cannot remove yourself from %s" % group.name) | |
| 140 | + u"自分自身はグループ「%s」から削除できません" % group.name) | |
| 140 | 141 | |
| 141 | 142 | success = Group(groupname).removeMember(username) |
| 142 | - msgs = {True: 'User %s removed from group %s' % (username, groupname), | |
| 143 | - False: 'User %s is not a member of group %s' % (username, groupname)} | |
| 143 | + msgs = {True: u'ユーザー「%s」はグループ「%s」から削除されました' % (username, groupname), | |
| 144 | + False: u'ユーザー「%s」はグループ「%s」に所属していません' % (username, groupname)} | |
| 144 | 145 | return XMLStatusResponse('removeMember', success, msgs[success]) |
| 145 | 146 | |
| 146 | 147 | @admin_required |
| @@ -147,8 +148,8 @@ | ||
| 147 | 148 | def addMember(self, req, groupname): |
| 148 | 149 | username = req.post['addMember'].value |
| 149 | 150 | success = Group(groupname).addMember(username) |
| 150 | - msgs = {True: 'User %s added to group %s' % (username, groupname), | |
| 151 | - False: 'User %s already in group %s' % (username, groupname)} | |
| 151 | + msgs = {True: u'ユーザー「%s」はグループ「%s」に追加されました' % (username, groupname), | |
| 152 | + False: u'ユーザー「%s」は既にグループ「%s」に所属しています' % (username, groupname)} | |
| 152 | 153 | return XMLStatusResponse('addMember', success, msgs[success]) |
| 153 | 154 | |
| 154 | 155 | @admin_required |
| @@ -1,3 +1,4 @@ | ||
| 1 | +# -*- coding: utf-8 -*- | |
| 1 | 2 | from dispatch.view import View |
| 2 | 3 | from template.shortcuts import evaluate_main |
| 3 | 4 | from dispatch.response import Response, XMLStatusResponse, XMLTemplateResponse |
| @@ -186,8 +187,8 @@ | ||
| 186 | 187 | def addToGroup(self, req, user): |
| 187 | 188 | group = Group(req.post.get('addToGroup')) |
| 188 | 189 | success = group.addMember(user.name) |
| 189 | - msgs = {True: 'User %s added to group %s' % (user.name, group.name), | |
| 190 | - False: 'User %s already in group %s' % (user.name, group.name) | |
| 190 | + msgs = {True: u'ユーザー「%s」はグループ「%s」に追加されました' % (user.name, group.name), | |
| 191 | + False: u'ユーザー「%s」は既にグループ「%s」に所属しています' % (user.name, group.name) | |
| 191 | 192 | } |
| 192 | 193 | return XMLStatusResponse('addToGroup', success, msgs[success]) |
| 193 | 194 |
| @@ -248,11 +249,11 @@ | ||
| 248 | 249 | # TODO: Make this a setting in submin.conf? |
| 249 | 250 | if group.name == "submin-admins" and user.name == req.session['user'].name: |
| 250 | 251 | return XMLStatusResponse('removeFromGroup', False, |
| 251 | - "You cannot remove yourself from %s" % group.name) | |
| 252 | + u"自分自身はグループ「%s」から削除できません" % group.name) | |
| 252 | 253 | |
| 253 | 254 | success = group.removeMember(user.name) |
| 254 | - msgs = {True: 'User %s removed from group %s' % (user.name, group.name), | |
| 255 | - False: 'User %s is not a member of %s' % (user.name, group.name) | |
| 255 | + msgs = {True: u'ユーザー「%s」はグループ「%s」から削除されました' % (user.name, group.name), | |
| 256 | + False: u'ユーザー「%s」はグループ「%s」に所属していません' % (user.name, group.name) | |
| 256 | 257 | } |
| 257 | 258 | return XMLStatusResponse('removeFromGroup', success, msgs[success]) |
| 258 | 259 |
| @@ -189,7 +189,7 @@ | ||
| 189 | 189 | # add member with no permissions (let the user select that) |
| 190 | 190 | config.authz.setPermission(repository.name, path, name, type) |
| 191 | 191 | config.authz.save() |
| 192 | - return XMLStatusResponse('addPermission', True, ('User', 'Group')[type == 'group'] + ' %s added to path %s' % (name, path)) | |
| 192 | + return XMLStatusResponse('addPermission', True, (u'ユーザー', u'グループ')[type == 'group'] + u'「%s」はパス「%s」に追加されました' % (name, path)) | |
| 193 | 193 | |
| 194 | 194 | @admin_required |
| 195 | 195 | def removepermission(self, req, repository): |
| @@ -201,7 +201,7 @@ | ||
| 201 | 201 | |
| 202 | 202 | config.authz.removePermission(repository.name, path, name, type) |
| 203 | 203 | config.authz.save() |
| 204 | - return XMLStatusResponse('removePermission', True, ('User', 'Group')[type == 'group'] + ' %s removed from path %s' % (name, path)) | |
| 204 | + return XMLStatusResponse('removePermission', True, (u'ユーザー', u'グループ')[type == 'group'] + u'「%s」はパス「%s」から削除されました' % (name, path)) | |
| 205 | 205 | |
| 206 | 206 | @admin_required |
| 207 | 207 | def setpermission(self, req, repository): |
| @@ -214,8 +214,8 @@ | ||
| 214 | 214 | |
| 215 | 215 | config.authz.setPermission(repository.name, path, name, type, permission) |
| 216 | 216 | config.authz.save() |
| 217 | - return XMLStatusResponse('setPermission', True, 'Permission for %s %s changed to %s' % | |
| 218 | - (('user', 'group')[type == 'group'], name, permission)) | |
| 217 | + return XMLStatusResponse('setPermission', True, u'%s 「%s」の権限が「%s」に変更されました' % | |
| 218 | + ((u'ユーザー', u'グループ')[type == 'group'], name, permission)) | |
| 219 | 219 | |
| 220 | 220 | @admin_required |
| 221 | 221 | def setNotifications(self, req, repository): |