Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some support for internationalization to the route system #502

Merged
merged 20 commits into from
Mar 7, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more comments.
toolness committed Mar 6, 2019
commit e8492dd285ea40a32bd2560cfddd89dc5a262468
6 changes: 5 additions & 1 deletion frontend/lib/app.tsx
Original file line number Diff line number Diff line change
@@ -28,7 +28,11 @@ export interface AppProps {
/** The initial URL to render on page load. */
initialURL: string;

/** The locale the user is on. */
/**
* The locale the user is on. This can be an empty string to
* indicate that localization is disabled, or an ISO 639-1
* code such as 'en' or 'es'.
*/
locale: string;

/** The initial session state the App was started with. */
2 changes: 1 addition & 1 deletion project/views.py
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@ def react_rendered_view(request, url: str):
initial_props = {
'initialURL': url,
'initialSession': get_initial_session(request),
'locale': '',
'locale': '', # Disable localization for now.
'server': {
'originURL': request.build_absolute_uri('/')[:-1],
'staticURL': settings.STATIC_URL,