| 91 | | localeDirName = "locale" |
|---|
| 92 | | localeDir = os.path.join(os.path.split(dabo.__file__)[0], localeDirName) |
|---|
| 93 | | if not os.path.isdir(localeDir): |
|---|
| 94 | | # Frozen app? |
|---|
| 95 | | # First need to find the directory that contains the executable. On the Mac, |
|---|
| 96 | | # it might be a directory at a lower level than dabo itself. |
|---|
| 97 | | startupDir = localeDir |
|---|
| 98 | | while startupDir: |
|---|
| 99 | | newDir = os.path.split(startupDir)[0] |
|---|
| 100 | | if newDir == startupDir: |
|---|
| 101 | | # At the root dir |
|---|
| | 91 | localeDirNames = ("dabo.locale", "locale") |
|---|
| | 92 | for localeDirName in localeDirNames: |
|---|
| | 93 | localeDir = os.path.join(os.path.split(dabo.__file__)[0], localeDirName) |
|---|
| | 94 | if not os.path.isdir(localeDir): |
|---|
| | 95 | # Frozen app? |
|---|
| | 96 | # First need to find the directory that contains the executable. On the Mac, |
|---|
| | 97 | # it might be a directory at a lower level than dabo itself. |
|---|
| | 98 | startupDir = localeDir |
|---|
| | 99 | while startupDir: |
|---|
| | 100 | newDir = os.path.split(startupDir)[0] |
|---|
| | 101 | if newDir == startupDir: |
|---|
| | 102 | # At the root dir |
|---|
| | 103 | break |
|---|
| | 104 | startupDir = newDir |
|---|
| | 105 | candidate = os.path.join(startupDir, localeDirName) |
|---|
| | 106 | if os.path.isdir(candidate): |
|---|
| | 107 | break |
|---|
| | 108 | if os.path.isdir(candidate): |
|---|
| | 109 | localeDir = candidate |
|---|