Code review comment for lp:~submarine/unity-scope-isgd/isgd-previews

Revision history for this message
James Henstridge (jamesh) wrote :

+ description = '<big><b>' + self.result.title + "</b></big>\n\n"
+ description += _('is.gd is a free service for shortening web addresses and ')
+ description += _('other URLs. This is useful in many circumstances e.g. when ')
+ description += _('sending an address to a phone via SMS and character count is limited.\n\n')
+ description += _('Click the <i>Shorten url</i> button below to shorten <b>%s</b> ' % self.result.uri.replace('&', '&amp;'))
+ description += _('and copy the shortened link to the clipboard, ready for pasting or the ')
+ description += _('<i>is.gd Preferences</i> button to visit is.gd\'s preferences ')
+ description += _('page.')

This is going to be a pain to translate, since the translator has 7 separate strings to translate. Can you do something like:

description = _(
    '<big><b>%(title)s</b></big>\n\n'
    '...'
    'Click the <i>Shorten url</i> button below to shorten <b>%(uri)s</b>'
    '...') % dict(title=escape(self.result.title), uri=escape(self.result.uri))

It would be necessary to check that the string gets extracted correctly in the .pot file.

« Back to merge proposal