Index: trunk/tools/editor_trends/manage.py |
— | — | @@ -287,6 +287,7 @@ |
288 | 288 | settings = configuration.Settings() |
289 | 289 | language = languages.init() |
290 | 290 | project = projects.init() |
| 291 | + pjc = projects.ProjectContainer() |
291 | 292 | rts = runtime_settings.RunTimeSettings(project, language, settings) |
292 | 293 | |
293 | 294 | #Init Argument Parser |
— | — | @@ -386,12 +387,13 @@ |
387 | 388 | action='store', |
388 | 389 | help='Example of valid languages.', |
389 | 390 | choices=project.supported_languages(), |
390 | | - default=language.name) |
| 391 | + default=unicode(language.name) |
| 392 | + ) |
391 | 393 | |
392 | 394 | parser.add_argument('-p', '--project', |
393 | 395 | action='store', |
394 | 396 | help='Specify the Wikimedia project that you would like to download', |
395 | | - choices=projects, |
| 397 | + choices=pjc.supported_projects(), |
396 | 398 | default='wiki') |
397 | 399 | |
398 | 400 | parser.add_argument('-c', '--collection', |
Index: trunk/tools/editor_trends/classes/projects.py |
— | — | @@ -41,10 +41,11 @@ |
42 | 42 | if lang in self.valid_languages: |
43 | 43 | if output == 'parser': |
44 | 44 | lang = lnc.languages.get(lang, 'Unknown language') |
45 | | - choices.append(lang.name) |
| 45 | + choices.append(lang.name.encode('utf-8')) |
46 | 46 | elif output == 'django': |
47 | 47 | lang = lnc.languages.get(lang, languages.Language('Unknown language', lang, None)) |
48 | 48 | choices.append((lang.code, lang.name)) |
| 49 | + #choices = [choice.decode('utf-8') for choice in choices] |
49 | 50 | return choices |
50 | 51 | |
51 | 52 | |
Index: trunk/tools/editor_trends/classes/languages.py |
— | — | @@ -43,6 +43,7 @@ |
44 | 44 | print '%s' % language.decode(settings.encoding) |
45 | 45 | except UnicodeEncodeError: |
46 | 46 | print '%s' % language |
| 47 | + |
47 | 48 | |
48 | 49 | class LanguageContainer: |
49 | 50 | def __init__(self): |