Merge lp:~dpm/ubucon-site/add-de-fr-zh_cn into lp:ubucon-site

Proposed by David Planella
Status: Merged
Merged at revision: 42
Proposed branch: lp:~dpm/ubucon-site/add-de-fr-zh_cn
Merge into: lp:ubucon-site
Diff against target: 67 lines (+38/-11)
1 file modified
ubucon_site/settings/__init__.py (+38/-11)
To merge this branch: bzr merge lp:~dpm/ubucon-site/add-de-fr-zh_cn
Reviewer Review Type Date Requested Status
UbuCon site developers Pending
Review via email: mp+292809@code.launchpad.net

Description of the change

Enable additional languages: French, German, Simplified Chinese

The languages should then appear in the admin interface under the 'Languages' top-bar menu

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubucon_site/settings/__init__.py'
2--- ubucon_site/settings/__init__.py 2016-03-30 08:21:27 +0000
3+++ ubucon_site/settings/__init__.py 2016-04-25 14:22:55 +0000
4@@ -187,25 +187,52 @@
5
6 LANGUAGES = (
7 ## Customize this
8- ('en', gettext('en')),
9+ ('en', _('English')),
10+ ('fr', _('French')),
11+ ('de', _('German')),
12+ ('zh-cn', _('Simplified Chinese')),
13 )
14
15 CMS_LANGUAGES = {
16- ## Customize this
17- 'default': {
18- 'public': True,
19- 'hide_untranslated': False,
20- 'redirect_on_fallback': True,
21- },
22 1: [
23 {
24- 'public': True,
25 'code': 'en',
26- 'hide_untranslated': False,
27- 'name': gettext('en'),
28- 'redirect_on_fallback': True,
29+ 'name': _('English'),
30+ 'public': True,
31+ 'hide_untranslated': True,
32+ 'redirect_on_fallback': False,
33+ },
34+ {
35+ 'code': 'zh-cn',
36+ 'name': _('Simplified Chinese'),
37+ 'fallbacks': ['en'],
38+ 'hide_untranslated': True,
39+ 'redirect_on_fallback': False,
40+ 'public': True,
41+ },
42+ {
43+ 'code': 'fr',
44+ 'name': _('French'),
45+ 'fallbacks': ['en'],
46+ 'hide_untranslated': False,
47+ 'redirect_on_fallback': False,
48+ 'public': True,
49+ },
50+ {
51+ 'code': 'de',
52+ 'name': _('German'),
53+ 'fallbacks': ['en'],
54+ 'hide_untranslated': False,
55+ 'redirect_on_fallback': False,
56+ 'public': True,
57 },
58 ],
59+ 'default': {
60+ 'fallbacks': ['en'],
61+ 'redirect_on_fallback':False,
62+ 'public': False,
63+ 'hide_untranslated': False,
64+ }
65 }
66
67 CMS_TEMPLATES = (

Subscribers

People subscribed via source and target branches