Changeset 467
- Timestamp:
- 01/10/09 23:42:01 (3 years ago)
- Location:
- trunk/babel/messages
- Files:
-
- 2 edited
-
catalog.py (modified) (1 diff)
-
tests/catalog.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/babel/messages/catalog.py
r464 r467 711 711 [message.string] + ([u''] * (len(message.id) - 1)) 712 712 ) 713 elif len(message.string) != len(message.id):713 elif len(message.string) != self.num_plurals: 714 714 fuzzy = True 715 715 message.string = tuple(message.string[:len(oldmsg.string)]) -
trunk/babel/messages/tests/catalog.py
r464 r467 215 215 cat.update(tmpl, no_fuzzy_matching=True) 216 216 self.assertEqual(2, len(cat.obsolete)) 217 218 def test_fuzzy_matching_regarding_plurals(self): 219 cat = catalog.Catalog() 220 cat.add(('foo', 'foh'), ('foo', 'foh')) 221 ru = copy.copy(cat) 222 ru.locale = 'ru_RU' 223 ru.update(cat) 224 self.assertEqual(True, ru['foo'].fuzzy) 225 ru = copy.copy(cat) 226 ru.locale = 'ru_RU' 227 ru['foo'].string = ('foh', 'fohh', 'fohhh') 228 ru.update(cat) 229 self.assertEqual(False, ru['foo'].fuzzy) 217 230 218 231 def test_update_no_template_mutation(self):
Note: See TracChangeset
for help on using the changeset viewer.
