Attachments you submit will be routed for moderation. If you have an account, please
log in first.
Ticket #2073: 0001-Use-current-default-language-insted-of-hardcoded-en_.patch
|
File 0001-Use-current-default-language-insted-of-hardcoded-en_.patch, 0.9 KB
(added by alsroot, 3 years ago)
|
|
|
-
From 90983300cf207362a608b75d81e2005416b9c010 Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Fri, 2 Jul 2010 16:13:22 +0000
Subject: Use current default language insted of hardcoded en_US #2073
diff --git a/extensions/cpsection/language/model.py b/extensions/cpsection/language/model.py
index fe80410..6b4d2db 100644
|
a
|
b
|
|
| 21 | 21 | # |
| 22 | 22 | |
| 23 | 23 | import os |
| | 24 | import locale |
| 24 | 25 | from gettext import gettext as _ |
| 25 | 26 | import subprocess |
| 26 | 27 | |
| … |
… |
|
| 52 | 53 | return locales |
| 53 | 54 | |
| 54 | 55 | def _initialize(): |
| | 56 | global _default_lang |
| | 57 | _default_lang = '%s.%s' % locale.getdefaultlocale() |
| | 58 | |
| 55 | 59 | if set_languages.__doc__ is None: |
| 56 | 60 | # when running under 'python -OO', all __doc__ fields are None, |
| 57 | 61 | # so += would fail -- and this function would be unnecessary anyway. |
Download in other formats: