Mailing List Archive

Improving the localisation of the search box
Hello all,

I am looking at improving the localisation support of the search box, but am running into a backwards compatibility wall. Here’s the situation:

* the old code added placeholder text to the search field to guide users as to what the search will do
* it also contained a simple js to clear the field upon text input
* the old code didn’t work with the i18n setup, so the placeholder text would always be in English
* modern browsers have support for @placeholder: <input type="text" placeholder=“Type your search here” >
* using this attribute, the placeholder text works exactly as intended, including i18n and l10n
* … EXCEPT for IE9 and older, in which case the search field will be just empty

Question/viewpoints requested:

Is this important enough that we want to find a JS solution for older browsers? I tried one, but couldn’t get it going (that might well be because of my non-existent JS knowledge).

OR:

Would it be ok to drop support for older browsers in this case? It just means that there won’t be any lead text/placeholder text in the search field, it will just be plain white instead.

WDYT?

This is tested with the Pelt skin, but the code changes are small and should portable to all skins without issues.

Sjur
Re: Improving the localisation of the search box [ In reply to ]
24. nov. 2014 kl. 16:59 skrev Sjur Moshagen <sjurnm@mac.com>:
> Question/viewpoints requested:
>
> Is this important enough that we want to find a JS solution for older browsers? I tried one, but couldn’t get it going (that might well be because of my non-existent JS knowledge).
>
> OR:
>
> Would it be ok to drop support for older browsers in this case? It just means that there won’t be any lead text/placeholder text in the search field, it will just be plain white instead.

With no objections so far, and this being the 0.10-dev code base, I think it is ok to disregard older browsers for now.

Sjur
Re: Improving the localisation of the search box [ In reply to ]
On Tue, Nov 25, 2014 at 02:46:32PM +0100, Sjur Moshagen wrote:
> 24. nov. 2014 kl. 16:59 skrev Sjur Moshagen <sjurnm@mac.com>:
> > Question/viewpoints requested:
> >
> > Is this important enough that we want to find a JS solution for older browsers? I tried one, but couldn’t get it going (that might well be because of my non-existent JS knowledge).
> >
> > OR:
> >
> > Would it be ok to drop support for older browsers in this case? It just means that there won’t be any lead text/placeholder text in the search field, it will just be plain white instead.
>
> With no objections so far, and this being the 0.10-dev code base, I think it is ok to disregard older browsers for now.

That is a good approach.

Yes, i was going to suggest option two too.

-David

> Sjur
>
Re: Improving the localisation of the search box [ In reply to ]
25. nov. 2014 kl. 22:14 skrev David Crossley <crossley@apache.org>:
>
> On Tue, Nov 25, 2014 at 02:46:32PM +0100, Sjur Moshagen wrote:
>> With no objections so far, and this being the 0.10-dev code base, I think it is ok to disregard older browsers for now.
>
> That is a good approach.
>
> Yes, i was going to suggest option two too.

Thanks a lot for the feedback :)

Sjur
Re: Improving the localisation of the search box [ In reply to ]
I re-generated the whole Forrest website to deploy your changes there.

-David

On Tue, Nov 25, 2014 at 10:21:53PM +0100, Sjur Moshagen wrote:
> 25. nov. 2014 kl. 22:14 skrev David Crossley <crossley@apache.org>:
> >
> > On Tue, Nov 25, 2014 at 02:46:32PM +0100, Sjur Moshagen wrote:
> >> With no objections so far, and this being the 0.10-dev code base, I think it is ok to disregard older browsers for now.
> >
> > That is a good approach.
> >
> > Yes, i was going to suggest option two too.
>
> Thanks a lot for the feedback :)
>
> Sjur
>