[gen] Renamed translation files to be compliant with Launchpad policy.

This commit is contained in:
Gaetan Delannay 2013-10-20 23:13:16 +02:00
parent 14f4848348
commit ba890c865c
9 changed files with 11 additions and 12 deletions

View file

@ -444,7 +444,7 @@ class ZopeGenerator(Generator):
# get it. Else, use appyLabels from the pot file as default empty # get it. Else, use appyLabels from the pot file as default empty
# labels. # labels.
appyPoFileName = os.path.join(appy.getPath(), 'gen', 'tr', appyPoFileName = os.path.join(appy.getPath(), 'gen', 'tr',
'Appy-%s.po' % language) '%s.po' % language)
if os.path.exists(appyPoFileName): if os.path.exists(appyPoFileName):
baseLabels = po.PoParser(appyPoFileName).parse().messages baseLabels = po.PoParser(appyPoFileName).parse().messages
else: else:

View file

@ -166,21 +166,20 @@ class PoFile:
elems = baseName.split('-') elems = baseName.split('-')
if self.isPot: if self.isPot:
if len(elems) == 1: if len(elems) == 1:
self.applicationName = baseName self.applicationName = self.domain = elems[0]
self.domain = baseName
else: else:
self.applicationName = elems[0] self.applicationName, self.domain = elems
self.domain = elems[1]
else: else:
self.applicationName = elems[0] if len(elems) == 1:
if len(elems) == 2: self.applicationName = self.domain = ''
self.domain = self.applicationName self.language = elems[0]
elif len(elems) == 2:
self.applicationName = self.domain = elems[0]
self.language = elems[1] self.language = elems[1]
else: else:
self.domain = elems[1] self.applicationName, self.domain, self.language = elems
self.language = elems[2] self.generated = False # Will be True during the generation process,
self.generated = False # Is set to True during the generation process # once this file will have been generated.
# when this file has been generated.
def addMessage(self, newMsg, needsCopy=True): def addMessage(self, newMsg, needsCopy=True):
if needsCopy: if needsCopy: