[Winmerge-svn] SF.net SVN: winmerge:[6986] trunk/Translations/GetTranslationsStatus.py
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <ge...@us...> - 2009-09-05 15:09:40
|
Revision: 6986 http://winmerge.svn.sourceforge.net/winmerge/?rev=6986&view=rev Author: gerundt Date: 2009-09-05 15:09:34 +0000 (Sat, 05 Sep 2009) Log Message: ----------- Add "Web" project to translations status Modified Paths: -------------- trunk/Translations/GetTranslationsStatus.py Modified: trunk/Translations/GetTranslationsStatus.py =================================================================== --- trunk/Translations/GetTranslationsStatus.py 2009-09-03 16:38:47 UTC (rev 6985) +++ trunk/Translations/GetTranslationsStatus.py 2009-09-05 15:09:34 UTC (rev 6986) @@ -286,7 +286,10 @@ @property def language(self): - return os.path.splitext(self.filename)[0] + if self._poeditlanguage: #If "X-Poedit-Language"... + return self._poeditlanguage + else: #If NOT "X-Poedit-Language"... + return os.path.splitext(self.filename)[0] @property def count(self): @@ -344,6 +347,7 @@ self._fuzzy = 0 self._porevisiondate = '' self._potcreationdate = '' + self._poeditlanguage = '' self._translators = [] if os.access(filepath, os.R_OK): #If PO(T) file can read... @@ -353,6 +357,7 @@ reTranslator = re.compile('^# \* (.*)$', re.IGNORECASE) rePoRevisionDate = re.compile('PO-Revision-Date: ([0-9 :\+\-]+)', re.IGNORECASE) rePotCreationDate = re.compile('POT-Creation-Date: ([0-9 :\+\-]+)', re.IGNORECASE) + rePoeditLanguage = re.compile('X-Poedit-Language: ([A-Z]+)', re.IGNORECASE) iMsgStarted = 0 sMsgId = '' @@ -420,6 +425,9 @@ if tmp: #If "POT-Creation-Date"... #TODO: Convert to date! self._potcreationdate = tmp[0] + tmp = rePoeditLanguage.findall(sMsgStr) + if tmp: #If "X-Poedit-Language"... + self._poeditlanguage = tmp[0] sMsgId = '' sMsgStr = '' bIsFuzzy = False @@ -509,6 +517,7 @@ status.addProject(PoProject('ShellExtension', 'ShellExtension/English.pot', 'ShellExtension')) status.addProject(InnoSetupProject('InnoSetup', 'InnoSetup/English.isl', 'InnoSetup')) status.addProject(ReadmeProject('Docs/Readme', 'Docs/Readme.txt', 'Docs/Readme')) + status.addProject(PoProject('Web', 'Web/en-US.pot', 'Web')) status.writeToXmlFile('TranslationsStatus.xml') status.writeToHtmlFile('TranslationsStatus.html') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |