Pull the translated plugin names through.

This commit is contained in:
Raoul Snyman 2011-05-31 14:30:21 +02:00
parent 5c943ff1eb
commit de56462c8f
2 changed files with 4 additions and 3 deletions

View File

@ -47,7 +47,7 @@ window.OpenLP = {
var select = $("#search-plugin");
select.html("");
$.each(data.results.items, function (idx, value) {
select.append("<option value='" + value + "'>" + value + "</option>");
select.append("<option value='" + value[0] + "'>" + value[1] + "</option>");
});
select.selectmenu("refresh");
}

View File

@ -124,7 +124,7 @@ except ImportError:
from PyQt4 import QtCore, QtNetwork
from mako.template import Template
from openlp.core.lib import Receiver, PluginStatus
from openlp.core.lib import Receiver, PluginStatus, StringContent
from openlp.core.ui import HideMode
from openlp.core.utils import AppLocation, translate
@ -491,7 +491,8 @@ class HttpConnection(object):
for plugin in self.parent.plugin.pluginManager.plugins:
if plugin.status == PluginStatus.Active and \
plugin.mediaItem and plugin.mediaItem.hasSearch:
searches.append(plugin.name)
searches.append([plugin.name, unicode(
plugin.textStrings[StringContent.Name][u'plural'])])
return HttpResponse(
json.dumps({u'results': {u'items': searches}}),
{u'Content-Type': u'application/json'})