[Sugar-devel] [PATCH Browse] Remove search url from translation strings SL #3311

Eduardo H. Silva hoboprimate at gmail.com
Sat Apr 28 07:55:44 EDT 2012


2012/4/28 Manuel Kaufmann <humitos at gmail.com>:
> This string is not translatable, so it's removed from the list.
I really think it should be "translated", to show a localized google
page. This localized page not only has its interface localized, but
also lets you search only for sites of the specific language.

You add hl=[language-code]& , for example:
http://www.google.com/search?hl=pt-PT&q=%s&ie=UTF-8&oe=UTF-8

This should probably be explained in a developers commentary to the
string in the PO file, so translators know it.

Eduardo
>
> Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
> ---
>  browser.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/browser.py b/browser.py
> index 259d888..e628848 100644
> --- a/browser.py
> +++ b/browser.py
> @@ -136,7 +136,7 @@ class TabbedView(BrowserNotebook):
>         if soup_uri is None and not _NON_SEARCH_REGEX.match(url):
>             # If the string doesn't look like an URI, let's search it:
>             url_search = \
> -                _('http://www.google.com/search?q=%s&ie=UTF-8&oe=UTF-8')
> +                'http://www.google.com/search?q=%s&ie=UTF-8&oe=UTF-8'
>             query_param = Soup.form_encode_hash({'q': url})
>             # [2:] here is getting rid of 'q=':
>             effective_url = url_search % query_param[2:]
> --
> 1.7.7.6
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


More information about the Sugar-devel mailing list