ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #10563
Re: [Scopes] Easy (?) questions
On Thu, 2014-11-20 at 01:43 -0500, Robert Schroll wrote:
> On Thu, Nov 20, 2014 at 12:44 AM, Michi Henning
> <michi.henning@xxxxxxxxxxxxx> wrote:
> >> 2) Is there a way to mark strings in the settings.ini file as
> >> translatable, and then to put those strings in the installed
> >> settings.ini file?
> >
> > There is a mechanism with some tools built around gettext. I believe
> > Pete may be able to comment on this. But, in general, you can
> > localize DisplayName and DisplayValues in the settings.ini file
> > directly, without any additional tool support. This is described here:
> >
> > http://developer.ubuntu.com/scopes/tutorials/adding-settings-to-your-scope/
>
> But I can't localize these things myself -- I need the translators to
> do that. Thus, I need to get these strings into the POT file. And
> ideally, dropping the resultant PO files into my repository would
> automatically add the localized strings to to the .ini file, without me
> doing anything by hand.
>
> But before I work myself into a lather about this, I'll see what Pete
> has to say.
You would create the file in the same way that the translated scopes.ini
file, or any .desktop file, is created, using intltool-{extract,merge},
to extract the strings, and merge them back in by processing a
settings.ini.in to a settings.ini which is included in the package. If
the SDK already sets this up for the scopes.ini file, but not
settings.ini, then it sounds like a bug in the SDK's template for
scopes.
> In my case, Google with throttle me if I try to request too many
> results at once. Having the ability to query the server only when the
> user needs more results would be very useful. Shall I create a bug
> here?
Google throttles on number of requests over time, not amount of results
they return. If you need to paginate, that's of course an issue. Maybe
instead there is a better way to limit the number of results you get?
> I've done that for other things, but that will show the query right
> away. (Or, it should. See bug #1335761.) I don't want to run the
> query now, or possibly ever. I only want it to be rerun if the user
> returns to the previous view.
Why do you want to reload the results whenever the user closes the
preview, anyway? Does something in the preview change what results will
be returned, for a given query?
Generally, a preview should not alter the result set from the query.
There are some exceptions of course, but in those cases, the action
should also be immediately visible.
> FWIW, the OnlineAccountClient::PostLoginAction::InvalidateResults seems
> to do this, though I've never tested it from a preview page.
It won't do what you want. That API is only for use in the
OnlineAccountClient API if you specify a widget or result to use for the
login item. You cannot specify that value as the action on a general
button widget.
Follow ups
References