-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
let i18n use yaml rather than csv (#42)
- Loading branch information
Showing
11 changed files
with
522 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ colorlog | |
httpagentparser | ||
geoip2 | ||
GitPython | ||
PyYAML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
from vj4 import app | ||
from vj4 import error | ||
from vj4.handler import base | ||
from vj4.util import locale | ||
|
||
|
||
@app.route('/lang/{lang}', 'language_set') | ||
class LanguageView(base.Handler): | ||
@base.route_argument | ||
@base.sanitize | ||
async def get(self, *, lang: str): | ||
if not lang in ['zh_CN', 'en']: | ||
raise error.ValidationError('lang') | ||
await self.set_settings(view_lang=lang) | ||
self.json_or_redirect(self.referer_or_main) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#English | ||
--- | ||
contest_create: Contest Create | ||
contest_main: Contest | ||
contest_status: Contest Status | ||
discussion_create: Create Discussion | ||
discussion_main: Discussion | ||
discussion_node: Discussion | ||
home_account: Account | ||
home_messages: Messages | ||
home_security: Security | ||
judge_playground: Judge Playground | ||
main: Home | ||
pager_first: « First | ||
pager_last: Last » | ||
pager_next: Next › | ||
pager_previous: ‹ Previous | ||
problem_create: Problem Create | ||
problem_edit: Problem Edit | ||
problem_main: Problem Set | ||
problem_solution: Problem Solution | ||
problem_submit: Problem Submit | ||
record_detail: Record Detail | ||
record_main: Judging Queue | ||
setting_function: Function | ||
setting_info: Personal Info | ||
setting_preference: Preference | ||
setting_privacy: Privacy | ||
training_main: Training | ||
user_detail: User Detail | ||
user_login: Login | ||
user_logout: Logout | ||
user_lostpass: Lost Password | ||
user_register: Register |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.