Bug 29596

Summary: Add Yiddish language
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: I18N/L10NAssignee: Tomás Cohen Arazi <tomascohen>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P1 - high CC: andrewfh, david, frederic, fridolin.somers, hans.palsson, katrin.fischer, kyle, mtj, victor, wainuiwitikapark
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19169
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30245
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds the Yiddish (יידיש) language to Koha. Yiddish now appears as an option for refining search results in the staff interface advanced search (Search > Advanced search > More options > Language and Language of original) and the OPAC (Advanced search > More options > Language).
Version(s) released in:
22.05.00,21.11.03,21.05.12,20.11.17
Bug Depends on: 29605    
Bug Blocks: 18493    
Attachments: Bug 29596: Add Yiddish language
Bug 29596: Add Yiddish language
Bug 29596: Add Yiddish language
Bug 29596: Add Yiddish language
Bug 29596: Add Yiddish language

Description Tomás Cohen Arazi 2021-11-29 21:27:51 UTC

    
Comment 1 Tomás Cohen Arazi 2021-11-29 21:37:36 UTC Comment hidden (obsolete)
Comment 2 David Nind 2021-11-29 22:05:35 UTC Comment hidden (obsolete)
Comment 3 David Nind 2021-11-29 22:18:58 UTC
Testing notes using koha-testing-docker:

1. Check the advanced search in the staff interface (Search > Advanced search > More options > Language and Language of original) and OPAC (Advanced search > More options > Language) - Yiddish doesn't appear as an option.
2. Apply the patch.
3. Update the database (databaseupdate).
4. flush_memcached and restart_all
5. Yiddish now appears as a language under the staff interface and OPAC advanced search.

Question: 

Most languages display as 'Native language name (Language name in English)', for example 'Deutsch (German)'. Yiddish only displays as 'Yiddish'.

Should Yiddish also be displayed this way?
Comment 4 Tomás Cohen Arazi 2021-11-30 02:31:35 UTC
(In reply to David Nind from comment #3)
> Question: 
> 
> Most languages display as 'Native language name (Language name in English)',
> for example 'Deutsch (German)'. Yiddish only displays as 'Yiddish'.
> 
> Should Yiddish also be displayed this way?

Good question! This is the first time I add a language like this, and I based this on bug 15067, and picked Spanish as the basis from the install file. I noticed Spanish has more 'display languages' than others, and that's why I picked it (thinking it was a more complete example).
Comment 5 Tomás Cohen Arazi 2021-11-30 13:36:36 UTC Comment hidden (obsolete)
Comment 6 Tomás Cohen Arazi 2021-11-30 14:05:47 UTC
Created attachment 128106 [details] [review]
Bug 29596: Add Yiddish language

This patch adds the Yiddish language to Koha. The language codes were
taken from https://www.loc.gov/standards/iso639-2/php/code_list.php

Sponsored-by: Universidad Nacional de San Martín

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Tomás Cohen Arazi 2021-11-30 14:08:18 UTC
David, please retest now. Your question made me dig a bit further on the subject and an adjustment was needed for RTL, specifying hebrew scripts are used to write yiddish, etc.

And found a bug on bug 15067, so please test on top of the latest follow-up on that bug if interested in checking the atomic update can be run many times and results will be the same (i.e. language is added only once).
Comment 8 David Nind 2021-11-30 16:59:05 UTC
I have tested on top of bug 15067.

After applying 29956 I ran databaseupdate several times (x4) - this makes the language appear multiple times (x4) as well.

I'm not sure that is what you meant though...
Comment 9 Katrin Fischer 2022-01-30 12:28:41 UTC
Created attachment 129974 [details] [review]
Bug 29596: Add Yiddish language

This patch adds the Yiddish language to Koha. The language codes were
taken from https://www.loc.gov/standards/iso639-2/php/code_list.php

Sponsored-by: Universidad Nacional de San Martín

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Fridolin Somers 2022-02-02 06:54:58 UTC
(In reply to David Nind from comment #8)
> I have tested on top of bug 15067.
> 
> After applying 29956 I ran databaseupdate several times (x4) - this makes
> the language appear multiple times (x4) as well.
> 
> I'm not sure that is what you meant though...

I reproduce.
I think we must have Bug 29605 to have constraints.
Comment 11 Fridolin Somers 2022-02-02 07:40:46 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 12 Kyle M Hall 2022-02-07 18:21:43 UTC
Pushed to 21.11.x for 21.11.03
Comment 13 Andrew Fuerste-Henry 2022-03-04 14:42:12 UTC
Enhancement, not backported to 21.05. Please ask if needed.
Comment 14 Tomás Cohen Arazi 2022-03-04 14:50:45 UTC
(In reply to Andrew Fuerste-Henry from comment #13)
> Enhancement, not backported to 21.05. Please ask if needed.

Please backport :-D
Comment 15 Andrew Fuerste-Henry 2022-03-04 15:34:20 UTC
Pushed to 21.05.x for 21.05.12
Comment 16 Fridolin Somers 2022-03-04 19:03:18 UTC
(In reply to Kyle M Hall from comment #12)
> Pushed to 21.11.x for 21.11.03

You forgot to backport the DBRev :

 > git ll --grep=29596 master
c346481429 Bug 29596: DBRev 21.12.00.014
87621c2c89 Bug 29596: Add Yiddish language

This is also missing in 21.05.x
Comment 17 Mason James 2022-03-05 02:34:09 UTC
(In reply to Fridolin Somers from comment #16)
> (In reply to Kyle M Hall from comment #12)
> > Pushed to 21.11.x for 21.11.03
> 
> You forgot to backport the DBRev :
> 
>  > git ll --grep=29596 master
> c346481429 Bug 29596: DBRev 21.12.00.014
> 87621c2c89 Bug 29596: Add Yiddish language
> 
> This is also missing in 21.05.x

hi Kyle, Andrew

if you commit a fix to the git repo, and tag - i will release a new package
Comment 18 Mason James 2022-03-05 02:35:28 UTC
bumping severity
Comment 19 Andrew Fuerste-Henry 2022-03-07 14:46:30 UTC
I've fixed the dbrev in 21.05.x. This hasn't made it into a 21.05 package yet, so no need to release a new one to correct it.
Comment 20 Victor Grousset/tuxayo 2022-03-18 02:26:05 UTC
Backported: Pushed to 20.11.x branch for 20.11.17
Comment 21 Victor Grousset/tuxayo 2022-03-18 02:28:12 UTC
Yiddish also needs to be added to the translation platform, right? Because it isn't.
Comment 22 Katrin Fischer 2022-03-18 09:26:27 UTC
(In reply to Victor Grousset/tuxayo from comment #21)
> Yiddish also needs to be added to the translation platform, right? Because
> it isn't.

Not necessarily. We only add new languages to the translation platform if someone wants to work on them, this is here was added for search in Advanced search.

The other way around it's required. Every language you can translate Koha into should also be in the tables.
Comment 23 Victor Grousset/tuxayo 2022-03-19 01:43:04 UTC
Thanks, it makes sense. Noted here so it could help in the future: https://wiki.koha-community.org/wiki/Translating_Koha#Adding_a_new_language
Comment 24 wainuiwitikapark 2022-03-21 00:39:45 UTC
Does this need to be backported to 19.11.x?
Comment 25 Victor Grousset/tuxayo 2022-04-08 21:21:38 UTC
comment 17 has been addressed. Reverting severity and status
Comment 26 Hans Pålsson 2022-04-13 11:21:08 UTC
(In reply to David Nind from comment #8)
> I have tested on top of bug 15067.
> 
> After applying 29956 I ran databaseupdate several times (x4) - this makes
> the language appear multiple times (x4) as well.
> 
> I'm not sure that is what you meant though...

Having issues upgrading to 21.11.02.003 possibly related to this. 
"Upgrade to 21.11.02.003 [13:16:35]: Bug 29605 - Resync DB structure for existing installations
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'yi' for key 'PRIMARY' at /usr/share/koha/lib/C4/Installer.pm line 738"

Looking in PMA for the DB table `language_script_mapping` looks like this;
language_subtag script_subtag
ar              Arab
he              Hebr
yi              Hebr
yi              Hebr
yi              Hebr
yi              Hebr
yi              Hebr
yi              Hebr
yi              Hebr
yi              Hebr

I am unsure if clearing the table of multiple entries will make or brake the instance further.
Comment 27 Tomás Cohen Arazi 2022-04-13 11:36:57 UTC
(In reply to Hans Pålsson from comment #26)
> (In reply to David Nind from comment #8)
> > I have tested on top of bug 15067.
> > 
> > After applying 29956 I ran databaseupdate several times (x4) - this makes
> > the language appear multiple times (x4) as well.
> > 
> > I'm not sure that is what you meant though...
> 
> Having issues upgrading to 21.11.02.003 possibly related to this. 
> "Upgrade to 21.11.02.003 [13:16:35]: Bug 29605 - Resync DB structure for
> existing installations
> ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry
> 'yi' for key 'PRIMARY' at /usr/share/koha/lib/C4/Installer.pm line 738"
> 
> Looking in PMA for the DB table `language_script_mapping` looks like this;
> language_subtag script_subtag
> ar              Arab
> he              Hebr
> yi              Hebr
> yi              Hebr
> yi              Hebr
> yi              Hebr
> yi              Hebr
> yi              Hebr
> yi              Hebr
> yi              Hebr
> 
> I am unsure if clearing the table of multiple entries will make or brake the
> instance further.

Remove the repeated entries. You're safe.
Comment 28 Hans Pålsson 2022-04-13 12:26:24 UTC
Cleared, problem solved. Thanks!