Let's try that one again, shall we? Actually try installing .mo files properly.

This commit is contained in:
Thomas Hurst 2008-07-06 16:20:53 +01:00
parent 5a3af71023
commit 1baef967a6
1 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ class BuildData(build):
for po in glob.glob (os.path.join (PO_DIR, '*.po')): for po in glob.glob (os.path.join (PO_DIR, '*.po')):
lang = os.path.basename(po[:-3]) lang = os.path.basename(po[:-3])
mo = os.path.join(MO_DIR, lang + '.mo') mo = os.path.join(MO_DIR, lang, 'terminator.mo')
directory = os.path.dirname(mo) directory = os.path.dirname(mo)
if not os.path.exists(directory): if not os.path.exists(directory):
@ -40,18 +40,18 @@ class BuildData(build):
class InstallData(install_data): class InstallData(install_data):
def run (self): def run (self):
self.data_files.extend (self._compile_po_files ()) self.data_files.extend (self._find_mo_files ())
install_data.run (self) install_data.run (self)
def _compile_po_files (self): def _find_mo_files (self):
data_files = [] data_files = []
if WITHOUT_NLS: if WITHOUT_NLS:
return data_files return data_files
for mo in glob.glob (os.path.join (MO_DIR, '*.mo')): for mo in glob.glob (os.path.join (MO_DIR, '*', 'terminator.mo')):
lang = os.path.basename(mo[:-3]) lang = os.path.basename(os.path.dirname(mo))
dest = os.path.join('share', 'locale', lang, 'LC_MESSAGES', 'terminator.mo') dest = os.path.join('share', 'locale', lang, 'LC_MESSAGES')
data_files.append((dest, [mo])) data_files.append((dest, [mo]))
return data_files return data_files