[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr...
From: |
Fernando Lalo Martins |
Subject: |
[OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr... |
Date: |
Tue, 05 Aug 2003 12:22:38 -0400 |
CVSROOT: /cvsroot/opental
Module name: opental
Branch:
Changes by: Fernando Lalo Martins <address@hidden> 03/08/05 12:22:38
Modified files:
PlacelessTranslationService: PlacelessTranslationService.py
Log message:
when unregistering a catalog, get rid of the language/domain combo if
it is empty
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/opental/opental/PlacelessTranslationService/PlacelessTranslationService.py.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
Patches:
Index: opental/PlacelessTranslationService/PlacelessTranslationService.py
diff -u opental/PlacelessTranslationService/PlacelessTranslationService.py:1.24
opental/PlacelessTranslationService/PlacelessTranslationService.py:1.25
--- opental/PlacelessTranslationService/PlacelessTranslationService.py:1.24
Tue Jul 29 18:31:28 2003
+++ opental/PlacelessTranslationService/PlacelessTranslationService.py Tue Aug
5 12:22:38 2003
@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
"""Placeless Translation Service for providing I18n to file-based code.
-$Id: PlacelessTranslationService.py,v 1.24 2003/07/29 22:31:28 lalo Exp $
+$Id: PlacelessTranslationService.py,v 1.25 2003/08/05 16:22:38 lalo Exp $
"""
import sys, re, zLOG, Globals, fnmatch
@@ -101,11 +101,13 @@
self._p_changed = 1
def _unregisterMessageCatalog(self, catalog):
- for combo in self._catalogs.values():
+ for key, combo in self._catalogs.items():
try:
combo.remove(catalog.getIdentifier())
except ValueError:
- pass
+ continue
+ if not combo: # removed the last catalog for a language/domain
combination
+ del self._catalogs[key]
self._p_changed = 1
def _load_dir(self, basepath):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr...,
Fernando Lalo Martins <=