Project/ProjectTranslationsBrowser.py

changeset 248
f4561c24989a
parent 245
de5c4effc747
child 428
58405c24aa09
child 792
a13346916170
--- a/Project/ProjectTranslationsBrowser.py	Fri May 14 17:23:52 2010 +0200
+++ b/Project/ProjectTranslationsBrowser.py	Fri May 14 17:26:38 2010 +0200
@@ -617,7 +617,7 @@
         if itmList and not previewAll:
             for itm in itmList:
                 if isinstance(itm, ProjectBrowserSimpleDirectoryItem):
-                    dname = itm.dirName().replace(self.project.ppath+os.sep, '')
+                    dname = self.project.getRelativePath(itm.dirName())
                     trfiles = sorted(self.project.pdata["TRANSLATIONS"][:])
                     for trfile in trfiles:
                         if trfile.startswith(dname):
@@ -686,7 +686,7 @@
         sections.append(("FORMS", forms))
         
         if langs:
-            l = [lang.fileName().replace(self.project.ppath + os.sep, '') \
+            l = [self.project.getRelativePath(lang.fileName()) \
                  for lang in langs if lang.fileName().endswith('.ts')]
         else:
             try:
@@ -873,13 +873,13 @@
         else:
             if noobsolete:
                 if self.hooks["generateSelected"] is not None:
-                    l = [lang.fileName().replace(self.project.ppath + os.sep, '') \
+                    l = [self.project.getRelativePath(lang.fileName()) \
                          for lang in langs]
                     self.hooks["generateSelected"](l)
                     return
             else:
                 if self.hooks["generateSelectedWithObsolete"] is not None:
-                    l = [lang.fileName().replace(self.project.ppath + os.sep, '') \
+                    l = [self.project.getRelativePath(lang.fileName()) \
                          for lang in langs]
                     self.hooks["generateSelectedWithObsolete"](l)
                     return
@@ -1015,7 +1015,7 @@
                 return
         else:
             if self.hooks["releaseSelected"] is not None:
-                l = [lang.fileName().replace(self.project.ppath+os.sep, '') \
+                l = [self.project.getRelativePath(lang.fileName()) \
                      for lang in langs]
                 self.hooks["releaseSelected"](l)
                 return

eric ide

mercurial