← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~alisonken1/openlp/strings_projector_ui into lp:openlp

 

Review: Needs Fixing

I highlighted two instances of potentially problematic changes, please make sure you get the other ones too.

Diff comments:

> 
> === modified file 'openlp/core/ui/projector/manager.py'
> --- openlp/core/ui/projector/manager.py	2016-03-03 17:53:29 +0000
> +++ openlp/core/ui/projector/manager.py	2016-04-17 09:40:04 +0000
> @@ -918,11 +926,13 @@
>  
>          :param name: Name from QListWidgetItem
>          """
> -        QtWidgets.QMessageBox.warning(self, translate('OpenLP.ProjectorManager',
> -                                                      '"%s" Authentication Error' % name),
> +        # Build the title separately so we can make it easier for translators
> +        title = '"{name}" '.format(name=name)
> +        title += translate('OpenLP.ProjectorManager', 'Authentication Error')
> +        QtWidgets.QMessageBox.warning(self, title,

Just be careful of this. In some other languages, the word order differs, and the way you've done it here means that translators can't change the word order if they need to. Speak to tgc and Azaziah, they might give you some insight.

>                                        '<br />There was an authentication error while trying to connect.'
>                                        '<br /><br />Please verify your PIN setting '
> -                                      'for projector item "%s"' % name)
> +                                      'for projector item "{name}"'.format(name=name))
>  
>      @pyqtSlot(str)
>      def no_authentication_error(self, name):
> @@ -932,11 +942,13 @@
>  
>          :param name: Name from QListWidgetItem
>          """
> -        QtWidgets.QMessageBox.warning(self, translate('OpenLP.ProjectorManager',
> -                                                      '"%s" No Authentication Error' % name),
> +        # Build the title separately so we can make it easier for translators
> +        title = '"{name}" '.format(name=name)
> +        title += translate('OpenLP.ProjectorManager', 'No Authentication Error')
> +        QtWidgets.QMessageBox.warning(self, title,

Same goes here

>                                        '<br />PIN is set and projector does not require authentication.'
>                                        '<br /><br />Please verify your PIN setting '
> -                                      'for projector item "%s"' % name)
> +                                      'for projector item "{name}"'.format(name=name))
>  
>  
>  class ProjectorItem(QObject):


-- 
https://code.launchpad.net/~alisonken1/openlp/strings_projector_ui/+merge/292080
Your team OpenLP Core is subscribed to branch lp:openlp.


References