Bug 27136 - Add additional languages
Summary: Add additional languages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Alexis Ripetti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 31715
  Show dependency treegraph
 
Reported: 2020-12-02 19:39 UTC by Alexis Ripetti
Modified: 2023-12-28 20:44 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Adds Cree, Afrikaans and Multiple languages, Undetermined and No linguistic content to our language definitions.
Version(s) released in:
22.11.00


Attachments
Bug 27136 - Add languages and avoid displaying nothing in facet (5.50 KB, patch)
2020-12-02 19:44 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 27136 - Add languages and avoid displaying nothing in facet (6.45 KB, patch)
2020-12-02 20:56 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 27136 - Add languages and avoid displaying nothing in facet (7.36 KB, patch)
2022-07-15 11:48 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27136 - Add languages and avoid displaying nothing in facet (7.42 KB, patch)
2022-07-15 16:42 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 27136: Add additional languages for facet display (6.79 KB, patch)
2022-08-31 10:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27136: Avoid displaying nothing in facet (4.13 KB, patch)
2022-08-31 10:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27136: Add additional languages for facet display (6.79 KB, patch)
2022-10-03 10:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27136: (follow-up) Make update idempotent (6.37 KB, patch)
2022-10-03 10:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27136: (QA follow-up) Remove reference to facets, add languages to update description (1.49 KB, patch)
2022-10-07 17:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27136: (QA follow-up) Fix entries for multiple und undetermined language(s) (1.76 KB, patch)
2022-10-07 20:37 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Ripetti 2020-12-02 19:39:42 UTC
Adding some languages : Cree, Afrikaans and Multiple languages, Undetermined and No linguistic content.
Also adding a way to avoid displaying nothing in facet for opac and client staff when using elasticsearch as SearchEngine.

Test plan:
1) Do a search, like 'a'
2) Look in the bottom of the sidebar on the left and see that there is an empty language
3) Apply patch
4) Update database
5) Do the same research
6) See that there is now "No information provided"

You can test translation :
TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for opac, e.g.
  misc/translator/po/fr-FR-opac-bootstrap.po
- Locate strings pulled from
  koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc for
  translation, e.g.:

  msgid "%s%s%sNo information provided%s"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing),
example : msgstr "%s%s%sAucune information fournie%s"

Do the same for the client staff :

- Open the corresponding .po file for opac, e.g.
  misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc for
  translation, e.g.:

  msgid "%s%s%sNo information provided%s"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing),
example : msgstr "%s%s%sAucune information fournie%s"

- Install the updated translation:

> perl translate install fr-FR
Comment 1 Alexis Ripetti 2020-12-02 19:44:10 UTC
Created attachment 114107 [details] [review]
Bug 27136 - Add languages and avoid displaying nothing in facet
Comment 2 Alexis Ripetti 2020-12-02 20:56:17 UTC
Created attachment 114119 [details] [review]
Bug 27136 - Add languages and avoid displaying nothing in facet
Comment 3 Nick Clemens 2021-11-23 14:51:49 UTC
The update database here needs to be updated to use skeleton.perl as a base

Moving the removal of blank facet to bug 29561 - we should not display anything as the facet cannot be searched. We don't include blank searches for any of the facets
Comment 4 David Nind 2022-07-14 20:54:36 UTC
Changed status to Failed QA - see comment #3.
Comment 5 Nick Clemens 2022-07-15 11:48:25 UTC
Created attachment 137748 [details] [review]
Bug 27136 - Add languages and avoid displaying nothing in facet
Comment 6 Alexis Ripetti 2022-07-15 16:42:31 UTC
Created attachment 137785 [details] [review]
Bug 27136 - Add languages and avoid displaying nothing in facet

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 7 Fridolin Somers 2022-08-13 08:02:17 UTC
Oups you also need to add languages in :
installer/data/mysql/mandatory/subtag_registry.sql

I suggest you split into 2 patches, one for languages and one for facet display
Comment 8 Nick Clemens 2022-08-31 10:09:22 UTC
Created attachment 139998 [details] [review]
Bug 27136: Add additional languages for facet display

This patch adds two missing languages, Cree & Afrikaans, as well
as some necessary linguistic definitions for faceting: Multi language,
undetermined, no linguistic content

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 9 Nick Clemens 2022-08-31 10:09:43 UTC
Created attachment 139999 [details] [review]
Bug 27136: Avoid displaying nothing in facet

This patch displays 'No information provided' if a facet value/description cannot be found,
rather than displaying an empty/hidden facet

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 10 Katrin Fischer 2022-10-02 23:13:58 UTC
Hi, thx for the patch!

Some things:

1) The database update is not idempotent, meaning that you cannot run it a second time without it causing an error:

DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bz27136-Add_languages_for_facet.pl  [22:55:29]: Bug 27136 - Add missing language information for facets
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'cr-language' for key 'uniq_lang' at /kohadevbox/koha/C4/Installer.pm line 739

As we had some issues with that in recent update (bug 30951), I think it would be better to implement some kind of check.

2) Next time it would be better to have these in 2 separate bugs:
* Add languages
* Avoid displaying nothing in facets

Both are distinct issues and in separate patches it gives better advertising in release notes and better chances one or the other might get backported. A strategy of small granular steps usually also works to make your patches move faster.

Maybe a suggestion: We could make this one about adding the languages only as the patches are nice and separate. I tihnk I agree with Nick about not displayin the empty ones, as they can't be searched for - but this discussion could be continued on bug 29561. OK?
Comment 11 Nick Clemens 2022-10-03 10:36:20 UTC
Created attachment 141239 [details] [review]
Bug 27136: Add additional languages for facet display

This patch adds two missing languages, Cree & Afrikaans, as well
as some necessary linguistic definitions for faceting: Multi language,
undetermined, no linguistic content

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 12 Nick Clemens 2022-10-03 10:36:24 UTC
Created attachment 141241 [details] [review]
Bug 27136: (follow-up) Make update idempotent
Comment 13 Katrin Fischer 2022-10-07 17:02:30 UTC
Created attachment 141518 [details] [review]
Bug 27136: (QA follow-up) Remove reference to facets, add languages to update description

The new languages will also effect other pages in Koha, like the
language list on the advanced search page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2022-10-07 20:37:58 UTC
Created attachment 141522 [details] [review]
Bug 27136: (QA follow-up) Fix entries for multiple und undetermined language(s)
Comment 15 Katrin Fischer 2022-10-07 20:38:54 UTC
While working on translations for bug 31715 I noticed some more little changes are needed here.
Comment 16 Katrin Fischer 2022-10-07 20:39:43 UTC
(In reply to Katrin Fischer from comment #15)
> While working on translations for bug 31715 I noticed some more little
> changes are needed here.

... were needed: see second follow-up patch :)
Comment 17 Tomás Cohen Arazi 2022-10-12 17:59:56 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!