diff --git a/gen/generator.py b/gen/generator.py index 73aa606..472268e 100644 --- a/gen/generator.py +++ b/gen/generator.py @@ -444,7 +444,7 @@ class ZopeGenerator(Generator): # get it. Else, use appyLabels from the pot file as default empty # labels. appyPoFileName = os.path.join(appy.getPath(), 'gen', 'tr', - 'Appy-%s.po' % language) + '%s.po' % language) if os.path.exists(appyPoFileName): baseLabels = po.PoParser(appyPoFileName).parse().messages else: diff --git a/gen/po.py b/gen/po.py index 2cf8966..3df2149 100644 --- a/gen/po.py +++ b/gen/po.py @@ -166,21 +166,20 @@ class PoFile: elems = baseName.split('-') if self.isPot: if len(elems) == 1: - self.applicationName = baseName - self.domain = baseName + self.applicationName = self.domain = elems[0] else: - self.applicationName = elems[0] - self.domain = elems[1] + self.applicationName, self.domain = elems else: - self.applicationName = elems[0] - if len(elems) == 2: - self.domain = self.applicationName + if len(elems) == 1: + self.applicationName = self.domain = '' + self.language = elems[0] + elif len(elems) == 2: + self.applicationName = self.domain = elems[0] self.language = elems[1] else: - self.domain = elems[1] - self.language = elems[2] - self.generated = False # Is set to True during the generation process - # when this file has been generated. + self.applicationName, self.domain, self.language = elems + self.generated = False # Will be True during the generation process, + # once this file will have been generated. def addMessage(self, newMsg, needsCopy=True): if needsCopy: diff --git a/gen/tr/Appy-ar.po b/gen/tr/ar.po similarity index 100% rename from gen/tr/Appy-ar.po rename to gen/tr/ar.po diff --git a/gen/tr/Appy-de.po b/gen/tr/de.po similarity index 100% rename from gen/tr/Appy-de.po rename to gen/tr/de.po diff --git a/gen/tr/Appy-en.po b/gen/tr/en.po similarity index 100% rename from gen/tr/Appy-en.po rename to gen/tr/en.po diff --git a/gen/tr/Appy-es.po b/gen/tr/es.po similarity index 100% rename from gen/tr/Appy-es.po rename to gen/tr/es.po diff --git a/gen/tr/Appy-fr.po b/gen/tr/fr.po similarity index 100% rename from gen/tr/Appy-fr.po rename to gen/tr/fr.po diff --git a/gen/tr/Appy-it.po b/gen/tr/it.po similarity index 100% rename from gen/tr/Appy-it.po rename to gen/tr/it.po diff --git a/gen/tr/Appy-nl.po b/gen/tr/nl.po similarity index 100% rename from gen/tr/Appy-nl.po rename to gen/tr/nl.po