Bugzilla – Attachment 8888 Details for
Bug 7445
Clicking on a tag gives "Language ... does not exist"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7445 - Clicking on a tag gives "Language ... does not exist"
SIGNED-OFF-Bug-7445---Clicking-on-a-tag-gives-Lang.patch (text/plain), 1.84 KB, created by
Katrin Fischer
on 2012-04-04 21:05:43 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7445 - Clicking on a tag gives "Language ... does not exist"
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-04-04 21:05:43 UTC
Size:
1.84 KB
patch
obsolete
>From 5adeab93d7682ec5773f41074d7b72981a231d87 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@enger.priv.no> >Date: Mon, 2 Apr 2012 15:27:49 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 7445 - Clicking on a tag gives "Language > ... does not exist" >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >- Syspref QueryStemming = Try >- Install Norwegian bokmål: > cd misc/translator/ > perl translate install nb-NO >- Go to Home ⺠Administration ⺠System Preferences > I18N/L10N > and enable "Norsk bokmål(nb-NO)" for opaclanguages as well as > setting opaclanguagesdisplay = Allow >- Make sure you have selected "Norsk bokmål" as the active language > in the OPAC >- Find a record that has a tag (which does not contain any digits) >- Click on the tag and see that you get the error in the title of > this bug >- Apply the patch >- Click on the tag again and the error should be gone > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Easy to test with a great test plan. Works nicely. >--- > C4/Search.pm | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 56468b5..33a1d16 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -733,6 +733,13 @@ sub _build_stemmed_operand { > > # FIXME: the locale should be set based on the user's language and/or search choice > #warn "$lang"; >+ # Make sure we only use the first two letters from the language code >+ $lang = lc(substr($lang, 0, 2)); >+ # The language codes for the two variants of Norwegian will now be "nb" and "nn", >+ # none of which Lingua::Stem::Snowball can use, so we need to "translate" them >+ if ($lang eq 'nb' || $lang eq 'nn') { >+ $lang = 'no'; >+ } > my $stemmer = Lingua::Stem::Snowball->new( lang => $lang, > encoding => "UTF-8" ); > >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7445
:
8773
| 8888