comparison babel/messages/catalog.py @ 87:f259182f9baf

Fixed a bug on Catalog. `__setitem__` was not updating the translator comments. Thanks pjenvey! Fixed a bug on the `new_catalog` and `init` frontends, we were badly building the new directory for the localized catalog. Normal directory hierarchy is `<output_dir>/<locale>/LC_MESSAGES/<domain>.po`, not `<output_dir>/<locale>/<domain>.po`, ie `LC_MESSAGES/<locale>/<domain>.po`.
author palgarvio
date Mon, 11 Jun 2007 00:48:07 +0000
parents 4ff9cc26c11b
children 008cd3f7d485
comparison
equal deleted inserted replaced
86:9d539a4dc502 87:f259182f9baf
326 if message.pluralizable and not current.pluralizable: 326 if message.pluralizable and not current.pluralizable:
327 # The new message adds pluralization 327 # The new message adds pluralization
328 current.id = message.id 328 current.id = message.id
329 current.string = message.string 329 current.string = message.string
330 current.locations.extend(message.locations) 330 current.locations.extend(message.locations)
331 current.comments.extend(message.comments)
331 current.flags |= message.flags 332 current.flags |= message.flags
332 message = current 333 message = current
333 else: 334 else:
334 if isinstance(id, (list, tuple)): 335 if isinstance(id, (list, tuple)):
335 assert isinstance(message.string, (list, tuple)) 336 assert isinstance(message.string, (list, tuple))
Copyright (C) 2012-2017 Edgewall Software