[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re[2]: Request for permission to commit a string changing bugfix to
From:       Grisha Mokhin <mokhin () bog ! msu ! ru>
Date:       2003-04-29 6:38:10
[Download RAW message or body]

Have a look at the example of the correct code:

        statusMsg = i18n( "Transmission for account %3 complete. "
                          "%n new message in %1 KB "                                  \
                
                          "(%2 KB remaining on the server).",                         \
                
                          "Transmission for account %3 complete. "                    \
                
                          "%n new messages in %1 KB "                                 \
                
                          "(%2 KB remaining on the server).",                         \
                
                          numMessages )                                               \
                
                    .arg( numBytesRead / 1024 )                                       \
                
                    .arg( numBytes / 1024 )                                           \
                
                    .arg( account );                                                  \


%n means plural forms handling (see two different messages above).
%1, %2, and %3 are the arguments.

Your 'else' line doesn't have %n, and should read as follows:

+        setStatusMsg( i18n("%1 of %n queued message successfully sent.",
+                           "%1 of %n queued messages successfully sent.",
+                           mTotalMessages )
+                      .arg(mSentMessages) );

Best wishes,
Grisha

                    
> > 
> > +    if (someSent) {
> > +      if ( mSentMessages == mTotalMessages ) {
> > +        setStatusMsg(i18n("%n queued message successfully sent.",
> > +                 "%n queued messages successfully sent.",
> > +                 mSentMessages));
> > +      } else {
> > +        setStatusMsg(i18n("%1 of %2 queued messages successfully sent.")
> > +            .arg(mSentMessages).arg( mTotalMessages ));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic