| 1 |
Index: dLocalize.py |
|---|
| 2 |
=================================================================== |
|---|
| 3 |
--- dLocalize.py (revision 5299) |
|---|
| 4 |
+++ dLocalize.py (working copy) |
|---|
| 5 |
@@ -72,10 +72,8 @@ |
|---|
| 6 |
|
|---|
| 7 |
daboTranslation = None |
|---|
| 8 |
daboLocaleDir = _domains.get("dabo", None) |
|---|
| 9 |
- if daboLocaleDir: |
|---|
| 10 |
- daboTranslation = gettext.translation("dabo", daboLocaleDir, languages=lang, codeset=charset) |
|---|
| 11 |
-# daboTranslation.install() ## No, don't globally bind _ |
|---|
| 12 |
- _currentTrans = daboTranslation.ugettext |
|---|
| 13 |
+ daboTranslation = gettext.translation("dabo", daboLocaleDir, languages=lang, codeset=charset) |
|---|
| 14 |
+ _currentTrans = daboTranslation.ugettext |
|---|
| 15 |
|
|---|
| 16 |
for domain, localedir in _domains.items(): |
|---|
| 17 |
if domain == "dabo": |
|---|
| 18 |
@@ -111,6 +109,10 @@ |
|---|
| 19 |
if os.path.isdir(candidate): |
|---|
| 20 |
localeDir = candidate |
|---|
| 21 |
break |
|---|
| 22 |
+ if not os.path.isdir(localeDir): |
|---|
| 23 |
+ # Dabo locale doesn't exist in a dabo-expected place. Perhaps the platform (Ubuntu) |
|---|
| 24 |
+ # moved it to a central place. |
|---|
| 25 |
+ return None |
|---|
| 26 |
return localeDir |
|---|
| 27 |
|
|---|
| 28 |
|
|---|