Summary: | Make alphabet localizable | ||
---|---|---|---|
Product: | Koha | Reporter: | Chris Cormack <chris> |
Component: | I18N/L10N | Assignee: | Magnus Enger <magnus> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | enhancement | ||
Priority: | P3 | CC: | dubyk, jcamins, jonathan.druart, katrin.fischer, koha-bugs, magnus, mirko, nengard |
Version: | 3.12 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug 2832 - Make alphabet localizable
Bug 2832 - Make alphabet localizable Bug 2832 - Make alphabet localizable Bug 2832: Followup: Add a default value Bug 2832: [SIGNED-OFF] Followup: Add a default value |
Description
Chris Cormack
2010-05-21 00:56:57 UTC
Would it be possible to turn the alphabet into a syspref, so that the default is 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', but e.g. Norwegian installations could change it to 'ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ'? Wherever an alhpabet is needed, this string could then be split into single characters, and the necessary links generated, e.g.: <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=A">A</a> <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=B">B</a> <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=C">C</a> ... <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=Æ">Æ</a> <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=Ø">Ø</a> <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=Å">Å</a> Are browsable alphabets like this used on any other pages than members/members-home.pl? (In reply to comment #1) > Would it be possible to turn the alphabet into a syspref, so that the default > is 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', but e.g. Norwegian installations could change > it to 'ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ'? ...and of course leaving the syspref empty could turn off the whole "Browse by last name" feature. (In reply to comment #1) > Would it be possible to turn the alphabet into a syspref, so that the default > is 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', but e.g. Norwegian installations could change > it to 'ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ'? I like this idea. > Are browsable alphabets like this used on any other pages than > members/members-home.pl? No, but it might be nice to have it in other places: Vendor names, for instance? (In reply to comment #1) > Would it be possible to turn the alphabet into a syspref, so that the default > is 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', but e.g. Norwegian installations could change > it to 'ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ'? Also vote for such syspref. For cyrillic libraries latin string often not usefull, need something like АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯ (Ukrainian alphabets). Also will be possible some mixtures (if many foreign students). I like the idea of a syspref too ... now we just need someone to write the code :) (In reply to comment #5) > I like the idea of a syspref too ... now we just need someone to write the > code :) I'll take a stab at it. Created attachment 12761 [details] [review] Bug 2832 - Make alphabet localizable Adds the "alphabet" syspref, which can hold a space separated list of charachters, which can be expanded into browse links when needed. To test: - Make sure to run updatedatabase - Check that the "alphabet" syspref was added under "I18N/L10N preferences" - Check that browse links are displayed Home › Patrons - Add some weird charachters like ÆØÅ to "alphabet" and check that the browse links are still displayed ok Using a non-delimited string of characters as first described did not work, because split() divided chars like Æ into two separate thingies, as described here: http://www.effectiveperlprogramming.com/blog/1286 A space delimited string is less elegant, but should get the job done. Created attachment 12924 [details] [review] Bug 2832 - Make alphabet localizable Adds the "alphabet" syspref, which can hold a space separated list of charachters, which can be expanded into browse links when needed. To test: - Make sure to run updatedatabase - Check that the "alphabet" syspref was added under "I18N/L10N preferences" - Check that browse links are displayed Home › Patrons - Add some weird charachters like ÆØÅ to "alphabet" and check that the browse links are still displayed ok Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Tested with mildly crazy cyrillic (kildin saami), IPA and others. Finally I am able to browse people like Hans ʘ͡qrder :) Works as expected, did not manage to break it. Created attachment 12981 [details] [review] Bug 2832 - Make alphabet localizable Adds the "alphabet" syspref, which can hold a space separated list of charachters, which can be expanded into browse links when needed. To test: - Make sure to run updatedatabase - Check that the "alphabet" syspref was added under "I18N/L10N preferences" - Check that browse links are displayed Home › Patrons - Add some weird charachters like ÆØÅ to "alphabet" and check that the browse links are still displayed ok Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> QA Comment: If the syspref is empty, I have a "Browse by last name:". Either we display nothing or we display a default value. I will proposed a little patch for the second option. Fell free to propose another one :) Created attachment 13021 [details] [review] Bug 2832: Followup: Add a default value Created attachment 13119 [details] [review] Bug 2832: [SIGNED-OFF] Followup: Add a default value Signed-off-by: Magnus Enger <magnus@enger.priv.no> Makes sense, and works as advertised. Comment on attachment 13021 [details] [review] Bug 2832: Followup: Add a default value Replaced by signed off patch. Both patches are now signed off. Marked as Passed QA This feature will go into 3.12 since it introduces string changes and the 3.10 string freeze has already begun. This patch has been pushed to master. Looks like the followup (attachment 13119 [details] [review]) has not been pushed. Changing the status so the followup does not get missed. This patch has been pushed to master. Works nicely in master. |