[gen] Renamed translation files to be compliant with Launchpad policy.
This commit is contained in:
parent
14f4848348
commit
ba890c865c
|
@ -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:
|
||||||
|
|
21
gen/po.py
21
gen/po.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue