#NEWLINE# def unpgettext( self , context , singular , plural , num ) : #NEWLINE# #INDENT# "Do a plural-forms lookup of a message id.  `singular` is used as the\n        message id for purposes of lookup in the catalog, while `num` is used to\n        determine which plural form to use.  The returned message string is a\n        Unicode string.\n\n        If the message id for `context` is not found in the catalog, and a\n        fallback is specified, the request is forwarded to the fallback's\n        ``unpgettext()`` method.  Otherwise, when `num` is 1 `singular` is\n        returned, and `plural` is returned in all other cases.\n        " #NEWLINE# ctxt_message_id = ( self . CONTEXT_ENCODING % ( context , singular ) ) #NEWLINE# try : #NEWLINE# #INDENT# tmsg = self . _catalog [ ( ctxt_message_id , self . plural ( num ) ) ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# if self . _fallback : #NEWLINE# #INDENT# return self . _fallback . unpgettext ( context , singular , plural , num ) #NEWLINE# #UNINDENT# if ( num == 1 ) : #NEWLINE# #INDENT# tmsg = text_type ( singular ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tmsg = text_type ( plural ) #NEWLINE# #UNINDENT# #UNINDENT# return tmsg