From jeremie at jabber.org Tue Sep 9 06:12:21 2008 From: jeremie at jabber.org (Jeremie Miller) Date: Tue, 9 Sep 2008 01:12:21 -0500 Subject: [search-ui] trying to improve the suggestions and try-also Message-ID: <1228BA5D-D0A8-4132-B4B1-A2947F3423B2@jabber.org> I've been thinking hard about how to make the existing suggestion and try-also stuff a lot more useful and below is what I've come up with so far. It needs better styling yet so don't jump to any conclusions based on the look alone :) It's also checked into svn so you can run it off your own server or file:// if you want to see it in action. The basic idea is that after you enter a search it presents you with a list of alternatives (the top/larger list) and whichever one of those you're viewing, there is a smaller secondary list of refinement queries. Example would be searching for "new york" and an alternative is "the big apple" whereas a refinement would be "new york yankees". The most useful part about these lists is that they stay there and let you click through them. It makes a lot more sense when you use it :) The try-also stuff I pushed to the right side and expanded the list to include a lot of the popular ones (or any that you've added) by default. I'm not sure if seeing the hostnames looks better than the favicons or not, but it's a lot lighter to load :) All of those shortcut items take you straight to the search result on those sites, it's super-duper handy IMO. Jer -------------- next part -------------- A non-text attachment was scrubbed... Name: Snapshot 2008-09-09 01-01-20.png Type: image/png Size: 54155 bytes Desc: not available Url : http://lists.wikia.com/pipermail/search-ui/attachments/20080909/b1e893f3/attachment-0001.png -------------- next part -------------- From phil.nelson at gmail.com Tue Sep 9 07:20:10 2008 From: phil.nelson at gmail.com (Christian Nelson) Date: Tue, 9 Sep 2008 03:20:10 -0400 Subject: [search-ui] Problem with username profile link Message-ID: If you're logged in, and currently browsing a page in a folder above the root, for example http://re.search.wikia.com/legal/privacy.html, and you click your username in the top right of the screen, it links to the profile.html page in that folder (this the example above http://re.search.wikia.com/legal/profile.html) , which doesn't exist. Changing the href to an absolute /profile.html should fix it. - Phil From david.pean at gmail.com Tue Sep 9 13:23:15 2008 From: david.pean at gmail.com (David Pean) Date: Tue, 9 Sep 2008 09:23:15 -0400 Subject: [search-ui] Problem with username profile link In-Reply-To: References: Message-ID: Fixed in r508 and up live :) Thanks Dave On Tue, Sep 9, 2008 at 3:20 AM, Christian Nelson wrote: > If you're logged in, and currently browsing a page in a folder above > the root, for example http://re.search.wikia.com/legal/privacy.html, > and you click your username in the top right of the screen, it links > to the profile.html page in that folder (this the example above http://re.search.wikia.com/legal/profile.html) > , which doesn't exist. Changing the href to an absolute /profile.html > should fix it. > > - Phil > _______________________________________________ > Search-UI mailing list > Search-UI at wikia.com > http://lists.wikia.com/mailman/listinfo/search-ui > From david.pean at gmail.com Tue Sep 9 14:52:57 2008 From: david.pean at gmail.com (David Pean) Date: Tue, 9 Sep 2008 10:52:57 -0400 Subject: [search-ui] Language Update Message-ID: A few weeks ago Jeff implemented an interface for allowing users to translate strings directly through the site. http://re.search.wikia.com/translate.html (it can be found on the top menu under "Contributions") Instead of including a static javascript file for each language, we are including a dynamic page to generate the necessary JSON. Its pulling the content of a page on the wiki side that is generated for each language -- for example: http://search.wikia.com/wiki/MediaWiki:Jstrans_ru Rainer, we saw that you had checked in some code that included the old i18n javascript file on each page, but we decided to leave the include once defined in (the poorly named) file servertouse.js (should really be globals or something :P ) One thing I think we need is a way to allow parameters in the strings -- for example: gettext("There are % results", 4). This would require some work developing a plural system across the languages. I think there are other issues that were brought up regarding how certain phrases made no sense when they were combined in other languages. On another note, one potential problem is that if text is changed in the code, it will no longer match up to the system in the mediawiki page. Perhaps we should implement what is used in Mediawiki and use text ids for the gettext parameters? Dave From rainer.blome at gmx.de Wed Sep 10 22:27:56 2008 From: rainer.blome at gmx.de (Rainer Blome) Date: Thu, 11 Sep 2008 00:27:56 +0200 Subject: [search-ui] Language Update In-Reply-To: References: Message-ID: <48C849EC.6020100@gmx.de> David Pean wrote: > A few weeks ago Jeff implemented an interface for allowing users to > translate strings directly through the site. > > http://re.search.wikia.com/translate.html (it can be found on the top > menu under "Contributions") Way cool! Heh, I didn't notice that. That's what I deserve for mostly using my old local copy :-). By the way, some translations for language names that had already been translated to German seem to have been lost in the process. I tried to fix them, but the fix is not visible. > Instead of including a static javascript file for each language, we > are including a dynamic page to generate the necessary JSON. Its > pulling the content of a page on the wiki side that is generated for > each language -- for example: > http://search.wikia.com/wiki/MediaWiki:Jstrans_ru Where do the translations go to? Apparently the form POSTs to /index.php?action=ajax&rs=saveTransListMulti What does this do? Where is the code for index.php? > Rainer, we saw that you had checked in some code that included the old > i18n javascript file on each page, Almost each page. For some reason that I don't remember, I did not add the tag to search.html (of all pages :-)). My intent with the script tags is to: o Make it more transparent to the user what code is loaded. o Load the code early, potentially reducing latency. o Treat the .js files equally. > but we decided to leave the include > once defined in (the poorly named) file servertouse.js (should really > be globals or something :P ) The "include" was never checked in to servertouse.js, as far as I can see. To allow for easier deployment of re.search, a statement to load the script needs to be checked in. Currently servertouse.js needs to be patched. > One thing I think we need is a way to allow parameters in the strings > -- for example: gettext("There are % results", 4). This would require > some work developing a plural system across the languages. GNU gettext shows us how to solve these issues. To handle plural forms, it uses a dedicated pluralization function called "ngettext": http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms unit= ngettext("Byte", "Bytes", n_bytes_free); The translators provide the means to decide which plural form needs to be taken. For each language, in addition to the translated singular and plural strings, they provide the number of plural forms in the language (for english this would be "1"), and an expression that matches an amount to an index. > I think > there are other issues that were brought up regarding how certain > phrases made no sense when they were combined in other languages. Are you referring to positional parameters or something else? The gettext "id" format needs to support explicitly referring to argument positions. Since for ECMAScript, there is no convention for a gettext format string syntax, we need to decide on one. The GNU gettext documentation shows that there is a slew of different conventions: http://www.gnu.org/software/gettext/manual/gettext.html#Translators-for-other-Languages To achieve positional arguments, for many languages GNU gettext uses the printf format string syntax. http://www.opengroup.org/onlinepubs/009695399/functions/fprintf.html An example gettext call looks like this: gettext("'%s' has only %d %s free.", volume, n_bytes_free, unit); As a translation example, the English "translation" might be changed to "Only %2$d %3$s free on '%1$s'." Despite the changed order of the variable text parts, it would still produce a correct result. gettext-js (http://code.google.com/p/gettext-js/) is a JavaScript implementation of gettext that uses the printf format convention. It could apparently be easily extended to support positional arguments. > On another note, one potential problem is that if text is changed in > the code, it will no longer match up to the system in the mediawiki > page. Perhaps we should implement what is used in Mediawiki and use > text ids for the gettext parameters? Once a text id has been used in a particular translation, it must either never change, or be changed in all places that use it, including all translation tables. This is true whether we use a numeric id, or a dedicated id string, or the English text itself as the id. The first gettext() parameter is already a text id. If no translation is found, the id itself is used as the text. However, this is merely a convenience as long as a given text does not change. This means that text ids in the code should not be changed, or else all translation tables that refer to that id must be changed as well. To change the default language (English) text returned by a gettext call, the new text should be added to a translation table. So we should have an English translation, after all ;-). Regards, Rainer From phil.nelson at gmail.com Wed Sep 10 23:59:41 2008 From: phil.nelson at gmail.com (Christian Nelson) Date: Wed, 10 Sep 2008 19:59:41 -0400 Subject: [search-ui] Setting up a test environment Message-ID: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> I can't seem to get my checked out SVN copy running on my local dev environment. I've changed the variables in servertouse.js, what else am I missing? - Phil Nelson From david.pean at gmail.com Thu Sep 11 00:52:30 2008 From: david.pean at gmail.com (David Pean) Date: Wed, 10 Sep 2008 20:52:30 -0400 Subject: [search-ui] Setting up a test environment In-Reply-To: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> References: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> Message-ID: Sorry...the servertouse.js is not up to date in SVN...we had it locked so we didn't accidentally commit it from our main dev site You need to add this at the bottom var i18n= {}; document.write(''); document.write( "" ); I will make sure this gets updated Dave On Wed, Sep 10, 2008 at 7:59 PM, Christian Nelson wrote: > I can't seem to get my checked out SVN copy running on my local dev > environment. I've changed the variables in servertouse.js, what else > am I missing? > > - Phil Nelson > _______________________________________________ > Search-UI mailing list > Search-UI at wikia.com > http://lists.wikia.com/mailman/listinfo/search-ui > From phil.nelson at gmail.com Thu Sep 11 01:02:23 2008 From: phil.nelson at gmail.com (Christian Nelson) Date: Wed, 10 Sep 2008 21:02:23 -0400 Subject: [search-ui] Setting up a test environment In-Reply-To: References: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> Message-ID: <030187A7-F1C4-4F58-A440-009F6C6B37F6@zerolives.org> Still getting tons of JS errors when trying to load up /cool/ Additionally: the Wiki link on the live re.search site points to http://search.wikia.com/wiki/Search_Wikia which is a confusing translation page. I believe it should point to http://search.wikia.com/wiki/Wikia_Search - Phil On Sep 10, 2008, at 8:52 PM, David Pean wrote: > Sorry...the servertouse.js is not up to date in SVN...we had it locked > so we didn't accidentally commit it from our main dev site > > You need to add this at the bottom > > var i18n= {}; > document.write(''); > document.write( "" ); > > > I will make sure this gets updated > > Dave > > On Wed, Sep 10, 2008 at 7:59 PM, Christian Nelson > wrote: >> I can't seem to get my checked out SVN copy running on my local dev >> environment. I've changed the variables in servertouse.js, what else >> am I missing? >> >> - Phil Nelson >> _______________________________________________ >> Search-UI mailing list >> Search-UI at wikia.com >> http://lists.wikia.com/mailman/listinfo/search-ui >> > _______________________________________________ > Search-UI mailing list > Search-UI at wikia.com > http://lists.wikia.com/mailman/listinfo/search-ui From david.pean at gmail.com Thu Sep 11 01:07:10 2008 From: david.pean at gmail.com (David Pean) Date: Wed, 10 Sep 2008 21:07:10 -0400 Subject: [search-ui] Setting up a test environment In-Reply-To: <030187A7-F1C4-4F58-A440-009F6C6B37F6@zerolives.org> References: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> <030187A7-F1C4-4F58-A440-009F6C6B37F6@zerolives.org> Message-ID: I think the code's formatting got messed up when I pasted it in...it should be only 3 lines Dave On Wed, Sep 10, 2008 at 9:02 PM, Christian Nelson wrote: > Still getting tons of JS errors when trying to load up /cool/ > > Additionally: the Wiki link on the live re.search site points to http://search.wikia.com/wiki/Search_Wikia > which is a confusing translation page. I believe it should point to http://search.wikia.com/wiki/Wikia_Search > > - Phil > > > On Sep 10, 2008, at 8:52 PM, David Pean wrote: > >> Sorry...the servertouse.js is not up to date in SVN...we had it locked >> so we didn't accidentally commit it from our main dev site >> >> You need to add this at the bottom >> >> var i18n= {}; >> document.write(''); >> document.write( "" ); >> >> >> I will make sure this gets updated >> >> Dave >> >> On Wed, Sep 10, 2008 at 7:59 PM, Christian Nelson > > wrote: >>> I can't seem to get my checked out SVN copy running on my local dev >>> environment. I've changed the variables in servertouse.js, what else >>> am I missing? >>> >>> - Phil Nelson >>> _______________________________________________ >>> Search-UI mailing list >>> Search-UI at wikia.com >>> http://lists.wikia.com/mailman/listinfo/search-ui >>> >> _______________________________________________ >> Search-UI mailing list >> Search-UI at wikia.com >> http://lists.wikia.com/mailman/listinfo/search-ui > > _______________________________________________ > Search-UI mailing list > Search-UI at wikia.com > http://lists.wikia.com/mailman/listinfo/search-ui > From phil.nelson at gmail.com Thu Sep 11 01:55:26 2008 From: phil.nelson at gmail.com (Christian Nelson) Date: Wed, 10 Sep 2008 21:55:26 -0400 Subject: [search-ui] Setting up a test environment In-Reply-To: References: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> <030187A7-F1C4-4F58-A440-009F6C6B37F6@zerolives.org> Message-ID: <15B8A77A-35B3-489A-B1F3-DA378042673D@zerolives.org> d'oh. Should've caught that myself. Thanks, dave! I have some changes I'd like to make to the actual stylesheet of the site. I'm having trouble getting the changes I make to show up on my local copy. Is there some other missing thing I should be doing? I'm modifying search.css in the / directory, but nothing seems to happen, even if it empty the entire file. - Phil On Sep 10, 2008, at 9:07 PM, David Pean wrote: > I think the code's formatting got messed up when I pasted it in...it > should be only 3 lines > > Dave From david.pean at gmail.com Thu Sep 11 02:03:42 2008 From: david.pean at gmail.com (David Pean) Date: Wed, 10 Sep 2008 22:03:42 -0400 Subject: [search-ui] Setting up a test environment In-Reply-To: <15B8A77A-35B3-489A-B1F3-DA378042673D@zerolives.org> References: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> <030187A7-F1C4-4F58-A440-009F6C6B37F6@zerolives.org> <15B8A77A-35B3-489A-B1F3-DA378042673D@zerolives.org> Message-ID: Was search.css in the SVN? The search.html on the live site is a little different that in SVN -- it uses one minified js file and one concatenated css file. Right now only style.css and structure.css are being combined to form search.css Dave On Wed, Sep 10, 2008 at 9:55 PM, Christian Nelson wrote: > d'oh. Should've caught that myself. Thanks, dave! > > I have some changes I'd like to make to the actual stylesheet of the > site. I'm having trouble getting the changes I make to show up on my > local copy. Is there some other missing thing I should be doing? > > I'm modifying search.css in the / directory, but nothing seems to > happen, even if it empty the entire file. > > - Phil > > On Sep 10, 2008, at 9:07 PM, David Pean wrote: > >> I think the code's formatting got messed up when I pasted it in...it >> should be only 3 lines >> >> Dave > _______________________________________________ > Search-UI mailing list > Search-UI at wikia.com > http://lists.wikia.com/mailman/listinfo/search-ui > From phil.nelson at gmail.com Thu Sep 11 02:05:51 2008 From: phil.nelson at gmail.com (Christian Nelson) Date: Wed, 10 Sep 2008 22:05:51 -0400 Subject: [search-ui] Setting up a test environment In-Reply-To: References: <5CD97151-CB52-420F-9092-BFB57F190227@zerolives.org> <030187A7-F1C4-4F58-A440-009F6C6B37F6@zerolives.org> <15B8A77A-35B3-489A-B1F3-DA378042673D@zerolives.org> Message-ID: <845D57DC-9914-4E6F-9701-52FE09501E58@zerolives.org> Yes, it was in the SVN. - Phil On Sep 10, 2008, at 10:03 PM, David Pean wrote: > Was search.css in the SVN? The search.html on the live site is a > little different that in SVN -- it uses one minified js file and one > concatenated css file. Right now only style.css and structure.css are > being combined to form search.css > > Dave From jeremie at jabber.org Thu Sep 11 07:00:19 2008 From: jeremie at jabber.org (Jeremie Miller) Date: Thu, 11 Sep 2008 02:00:19 -0500 Subject: [search-ui] a little slider toy to visualize "scent" Message-ID: <0D56E932-D753-4F9E-98FA-9EB6551C8CCD@jabber.org> I've been thinking about the "information scent" of a search result and decided to whip up this simplistic little slider toy/utility to visualize all the parts of any search result individually. I checked it into svn, and you can play with it live at: http://re.search.wikia.com/BEWARE2/exp/scent.html#javascript You'll have to change the keyword after the # to see any other search results, and grab the black slider and drag it back and forth to vary the visibility of the title / summary / url. It seems to only work in firefox but it's probably something simple (if you are a JS guru and know how to change class properties dynamically, any cross-browser tips would be much appreciated!). It's interesting to play around with different results and try to judge how valuable just the individual pieces are, for me most often the title is the most valuable when quickly scanning. Jer From rainer.blome at gmx.de Thu Sep 11 08:02:11 2008 From: rainer.blome at gmx.de (Rainer Blome) Date: Thu, 11 Sep 2008 10:02:11 +0200 Subject: [search-ui] Language Update In-Reply-To: <48C849EC.6020100@gmx.de> References: <48C849EC.6020100@gmx.de> Message-ID: <48C8D083.8080006@gmx.de> Rainer Blome wrote: > gettext-js (http://code.google.com/p/gettext-js/) is a JavaScript > implementation of gettext that uses the printf format convention. No need to use the gettext there. The sprintf "hidden in it", originally from http://jan.moesen.nu/code/javascript/sprintf-and-printf-in-javascript/ is sufficient. > It could apparently be easily extended to > support positional arguments. Did that, it works. Dave, Jeff, if you like the printf way, I'll check this in. Rainer From avatar at wikia.com Thu Sep 11 09:34:18 2008 From: avatar at wikia.com (Tim Bartel) Date: Thu, 11 Sep 2008 11:34:18 +0200 Subject: [search-ui] Language Update In-Reply-To: <48C849EC.6020100@gmx.de> References: <48C849EC.6020100@gmx.de> Message-ID: Hi, 2008/9/11 Rainer Blome : > David Pean wrote: >> http://re.search.wikia.com/translate.html (it can be found on the top [...] > > By the way, some translations for language names that had already been > translated to German seem to have been lost in the process. > I tried to fix them, but the fix is not visible. Did you notice the save button in the lower left at the end of the page? I missed it first time. Bye, Tim. -- http://de.wikia.com From rainer.blome at gmx.de Thu Sep 11 21:57:26 2008 From: rainer.blome at gmx.de (Rainer Blome) Date: Thu, 11 Sep 2008 23:57:26 +0200 Subject: [search-ui] Language Update In-Reply-To: References: <48C849EC.6020100@gmx.de> Message-ID: <48C99446.6030800@gmx.de> Tim Bartel wrote: > Hi, > > 2008/9/11 Rainer Blome : >> David Pean wrote: >>> http://re.search.wikia.com/translate.html (it can be found on the top > [...] >> By the way, some translations for language names that had already been >> translated to German seem to have been lost in the process. >> I tried to fix them, but the fix is not visible. > > Did you notice the save button in the lower left at the end of the > page? I missed it first time. Yes, I saw and used it and it still does not work. If I change a translation and save it, the displayed translation is changed. But as sonn as I shift-reload, the old translation reappears. Rainer From rainer.blome at gmx.de Thu Sep 11 22:18:56 2008 From: rainer.blome at gmx.de (Rainer Blome) Date: Fri, 12 Sep 2008 00:18:56 +0200 Subject: [search-ui] Language Update In-Reply-To: <48C849EC.6020100@gmx.de> References: <48C849EC.6020100@gmx.de> Message-ID: <48C99950.502@gmx.de> Rainer Blome wrote: > David Pean wrote: >> This would require [...] a plural system across the languages. > [...] > http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms > [...] > The translators provide the means to decide which plural form needs to > be taken. For each language, [...] they provide [...] > an expression that matches an amount to an index. Note that such an expression must be sanitized, as well as the translated strings and anything destined to be part of interpreted text. Rainer From newsmarkie at googlemail.com Fri Sep 12 17:04:16 2008 From: newsmarkie at googlemail.com (Mark (Markie)) Date: Fri, 12 Sep 2008 18:04:16 +0100 Subject: [search-ui] trying to improve the suggestions and try-also In-Reply-To: <1228BA5D-D0A8-4132-B4B1-A2947F3423B2@jabber.org> References: <1228BA5D-D0A8-4132-B4B1-A2947F3423B2@jabber.org> Message-ID: looks cool to me :) few comments though, the links to other searches imo is hard to read, and would be better with the favicons, making it easier to see (as most ppl recognise the logos). also the new scent functions are really cool, however it doesnt handle two word or more searches well. could it be intergrated into the scent functions? links to an example of the new functions: http://people.swlabs.org/~markie/latest/cool/search.html#chocolate http://people.swlabs.org/~markie/latest/cool/search.html#chocolate raisins regards mark On Tue, Sep 9, 2008 at 7:12 AM, Jeremie Miller wrote: > I've been thinking hard about how to make the existing suggestion and > try-also stuff a lot more useful and below is what I've come up with so far. > It needs better styling yet so don't jump to any conclusions based on the > look alone :) It's also checked into svn so you can run it off your own > server or file:// if you want to see it in action. > > The basic idea is that after you enter a search it presents you with a list > of alternatives (the top/larger list) and whichever one of those you're > viewing, there is a smaller secondary list of refinement queries. Example > would be searching for "new york" and an alternative is "the big apple" > whereas a refinement would be "new york yankees". The most useful part > about these lists is that they stay there and let you click through them. > It makes a lot more sense when you use it :) > > The try-also stuff I pushed to the right side and expanded the list to > include a lot of the popular ones (or any that you've added) by default. > I'm not sure if seeing the hostnames looks better than the favicons or not, > but it's a lot lighter to load :) All of those shortcut items take you > straight to the search result on those sites, it's super-duper handy IMO. > > Jer > > > > > _______________________________________________ > Search-UI mailing list > Search-UI at wikia.com > http://lists.wikia.com/mailman/listinfo/search-ui > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.wikia.com/pipermail/search-ui/attachments/20080912/fcd8daa7/attachment.html From rainer.blome at gmx.de Mon Sep 15 22:03:25 2008 From: rainer.blome at gmx.de (Rainer Blome) Date: Tue, 16 Sep 2008 00:03:25 +0200 Subject: [search-ui] Loading .js files Message-ID: <48CEDBAD.5080409@gmx.de> Rainer Blome wrote: > David Pean wrote: >> Rainer, we saw that you had checked in some code that included >> the old i18n javascript file on each page, > > Almost each page. For some reason that I don't remember, > I did not add the tag to search.html (of all pages :-)). All of the old i18n.js was needed by all pages, because all pages need translation. Now, additional code has been added that is needed only for the translation form, as far as I can see. That code should be moved to a separate file. > My intent with the script tags is to: > o Make it more transparent to the user what code is loaded. > o Load the code early, potentially reducing latency. > o Treat the .js files equally. In particular, using a static script tag enables inclusion of i18n.js into the generated search.js, which should keep latency low. >> but we decided to leave the include >> once defined in (the poorly named) file servertouse.js (should really >> be globals or something :P ) Why? Sure, having only a single "include" is "more elegant". How about this?: In each .html, use *only* '