Bug 32677 - Spanish language not displaying on the staff or opac interface
Summary: Spanish language not displaying on the staff or opac interface
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: 22.11
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-19 00:26 UTC by Victor Zuniga
Modified: 2023-12-28 20:44 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Commands to list, remove, and install the Spanish language (12.00 KB, image/png)
2023-01-19 23:36 UTC, Victor Zuniga
Details
Staff interface displaying the available languages. Only English. (14.80 KB, image/png)
2023-01-19 23:37 UTC, Victor Zuniga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Zuniga 2023-01-19 00:26:20 UTC
I am trying to install the Spanish language into our Koha catalog.

Running the command:

sudo koha-translate --list
es-ES


Shows the package.

I tried to install it and even updated but it says it is already installed.

sudo koha-translate --install es-ES
Error: the selected language is already installed. Try --update if you want to re-install it.


I tried removing it and then reinstalling it but made no difference.


However, the language is not displaying under the system preferences > I18N/L10N > Language or OPACLanguages settings.

Any advice on how to display it on the staff interface would be greatly appreciated.

Thanks,

Victor
Comment 1 Katrin Fischer 2023-01-19 09:17:37 UTC
I am not sure why that happened, but try to remove es-ES first with koha-translate and then reinstall it.
Comment 2 Victor Zuniga 2023-01-19 23:36:13 UTC
Created attachment 145497 [details]
Commands to list, remove, and install the Spanish language
Comment 3 Victor Zuniga 2023-01-19 23:37:04 UTC
Created attachment 145498 [details]
Staff interface displaying the available  languages. Only English.
Comment 4 Victor Zuniga 2023-01-19 23:38:58 UTC
(In reply to Katrin Fischer from comment #1)
> I am not sure why that happened, but try to remove es-ES first with
> koha-translate and then reinstall it.

Hi Katrin,

I tried that yesterday and then today but it made no difference. Please see attached screenshots.

Any other ideas to enable the language package on the staff interface?

Thanks,

Victor
Comment 5 Katrin Fischer 2023-04-23 12:25:33 UTC
Hi Victor, the remove didn't work. You need to make sure you add the instance name at the end of your commands:

sudo koha-translate --remove es-ES instancename
Comment 6 Victor Zuniga 2023-05-15 21:38:59 UTC
Hi Katrin,

Thanks for the update. 

I tried the command using the instance name at the end and got the following:

vzuniga@SJDS:/etc/koha/sites$ sudo koha-translate --remove es-ES catalog
[sudo] password for vzuniga:
Error: the selected language is not installed.

Then, doubled check the list and noticed the Spanish package is listed on the system (es-ES):

vzuniga@SJDS:/etc/koha/sites$ sudo koha-translate --list -a catalog
am-Ethi
ar-Arab
as-IN
az-AZ
be-BY
bg-Cyrl
bn-IN
ca-ES
cs-CZ
cy-GB
da-DK
de-CH
de-DE
dz
el-GR
en-GB
en-NZ
eo
es-ES
et
eu
fa-Arab
fi-FI
fo-FO
fr-CA
fr-FR
ga
gd
gl
he-Hebr
hi
hr-HR
hu-HU
hy-Armn
hyw-Armn
ia
id-ID
iq-CA
is-IS
it-IT
iu-CA
ja-Jpan-JP
ka
km-KH
kn-Knda
ko-Kore-KP
ku-Arab
lo-Laoo
lv
mi-NZ
ml
mon
mr
ms-MY
my
nb-NO
ne-NE
nl-BE
nl-NL
nn-NO
oc
pbr
pl-PL
prs
pt-BR
pt-PT
ro-RO
ru-RU
rw-RW
sd-PK
si
sk-SK
sl-SI
sq-AL
sr-Cyrl
sv-SE
sw-KE
ta-LK
ta
te
tet
th-TH
tk
tl-PH
tr-TR
tvl
uk-UA
ur-Arab
uz
vi-VN
zh-Hans-CN
zh-Hant-TW

Then tried to install it again:

vzuniga@SJDS:/etc/koha/sites$ sudo koha-translate --install es-ES catalog
Error: the selected language is not currently available.

Is there a way to grab the files manually and upload them to the server?

I even upgraded to the latest version (Koha 22.11.05) before attempting the commands listed below. No success :/

Thanks,

Victor
Comment 7 Katrin Fischer 2023-05-15 21:45:05 UTC
I have just tried installing es-ES on my dev system and it worked fine. It also looks ok on our 22.11.05 installation.
Only thing I noticed is that I installed from a different directory... but I am not sure if that should make any difference.

Do you have es-ES files in misc/translator/po ?
Comment 8 Victor Zuniga 2023-05-15 22:00:46 UTC
Hi Katrin,

I can see a few files for es-ES:

vzuniga@SJDS:/usr/share/koha/misc/translator/po$ ls

es-ES-marc-MARC21.po
es-ES-installer.po
es-ES-installer-UNIMARC.po
es-ES-marc-MARC21.po
es-ES-marc-UNIMARC.po
es-ES-messages-js.po
es-ES-messages.po
es-ES-opac-bootstrap.po
es-ES-pref.po
es-ES-staff-prog.po

Victor
Comment 9 Katrin Fischer 2023-05-15 22:02:42 UTC
I am running out of ideas, it would be best to bring this up on the mailing list or in the IRC channel next.
Comment 10 Victor Zuniga 2023-05-15 22:10:07 UTC
(In reply to Katrin Fischer from comment #9)
> I am running out of ideas, it would be best to bring this up on the mailing
> list or in the IRC channel next.

I hear you! Feeling the same.

I'll reach out to the mailing list. 

Just puzzled by this one. Everything else is working fine.

Thanks again for all your help,

Victor
Comment 11 David Nind 2023-05-18 19:46:50 UTC
I was able to install with: koha-translate --install es-ES

If I used the same command as you did, including the instancename (in my case, koha-translate --install es-ES kohadev), I got the same error as you did:

   Error: the selected language is not currently available.

I'm not sure why this is. Maybe there is something wrong with the koha-translate package command (the help says you should include the instance name), or it is something to do with permissions.
Comment 12 Victor Zuniga 2023-05-18 22:51:17 UTC
(In reply to David Nind from comment #11)
> I was able to install with: koha-translate --install es-ES
> 
> If I used the same command as you did, including the instancename (in my
> case, koha-translate --install es-ES kohadev), I got the same error as you
> did:
> 
>    Error: the selected language is not currently available.
> 
> I'm not sure why this is. Maybe there is something wrong with the
> koha-translate package command (the help says you should include the
> instance name), or it is something to do with permissions.

Thanks for testing.

I tried running the command without the instance name and got the following message:

Error: the selected language is already installed. Try --update if you want to re-install it.


I tried using the --update command instead and basically got the same message (Package is already installed).

Do you know what level of permissions should be attributed to the po packages?

Thanks,

Victor
Comment 13 Jonathan Druart 2023-05-22 13:04:19 UTC
koha-translate has a 'print_installed' routine that is used by the script to know if the language is already installed (and block you with the error you get).

It is doing

print_installed()
{
    ( ls -1 $KOHA_HOME/$OPAC_TMPL/bootstrap/ ; \ 
        ls -1 $KOHA_HOME/$OPAC_TMPL/prog/ 2> /dev/null ) | \ 
        sort | uniq | \ 
        grep -v -e images -e itemtypeimg -x -e en -e css -e js -e less -e lib 
}

Can you list the 2 directory and confirm that you have es-ES in there?
Then call remove and ls again. What's left?
Comment 14 Victor Zuniga 2023-05-22 22:36:46 UTC
(In reply to Jonathan Druart from comment #13)
> koha-translate has a 'print_installed' routine that is used by the script to
> know if the language is already installed (and block you with the error you
> get).
> 
> It is doing
> 
> print_installed()
> {
>     ( ls -1 $KOHA_HOME/$OPAC_TMPL/bootstrap/ ; \ 
>         ls -1 $KOHA_HOME/$OPAC_TMPL/prog/ 2> /dev/null ) | \ 
>         sort | uniq | \ 
>         grep -v -e images -e itemtypeimg -x -e en -e css -e js -e less -e
> lib 
> }
> 
> Can you list the 2 directory and confirm that you have es-ES in there?
> Then call remove and ls again. What's left?


Hi Jonathan,

Here's the output I'm getting:

vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ ls
es-ES
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ cd es-ES/
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog/es-ES$ ls
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog/es-ES$ cd ..
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ rm -rf es-ES/
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ ls
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$


Somehow the only thing left inside the prog folder was an empty es-ES folder. Per your suggestion, I removed and tried to install the Spanish package again.

Here is the output I am getting:

vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ sudo koha-translate --install es-ES
[sudo] password for vzuniga:
/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/: Input must be a directory.
(Symbolic links are not supported at the moment)
Try `/usr/share/koha/misc/translator/tmpl_process3.pl --help for more information.
/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/en/: Input must be a directory.
(Symbolic links are not supported at the moment)
Try `/usr/share/koha/misc/translator/tmpl_process3.pl --help for more information.
/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/: Input must be a directory.
(Symbolic links are not supported at the moment)
Try `/usr/share/koha/misc/translator/tmpl_process3.pl --help for more information.
/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/en/: Input must be a directory.
(Symbolic links are not supported at the moment)
Try `/usr/share/koha/misc/translator/tmpl_process3.pl --help for more information.
/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/: Input must be a directory.
(Symbolic links are not supported at the moment)
Try `/usr/share/koha/misc/translator/tmpl_process3.pl --help for more information.
/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/en/: Input must be a directory.
(Symbolic links are not supported at the moment)
Try `/usr/share/koha/misc/translator/tmpl_process3.pl --help for more information.

Connection to the memcached servers '__MEMCACHED_SERVERS__' failed. Are the unix socket permissions set properly? Is the host reachable?
If you ignore this warning, you will face performance issues
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$


Victor
Comment 15 Victor Zuniga 2023-05-22 23:25:13 UTC
Hi Jonathan,

I noticed I didn't include the instance name so perhaps that's the reason for those error messages.

I tried again using the instance name (catalog) at the end of the command and got the following:

vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ sudo koha-translate --install es-ES catalog
[sudo] password for vzuniga:
Error: the selected language is not currently available.
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ sudo koha-translate --update es-ES catalog
Error: the selected language is not currently installed. Try --install.
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ sudo koha-translate --install es-ES catalog
Error: the selected language is not currently available.
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$


I tried the --update and -- install commands respectively with no success.

How can I add the language package again?

Thanks,

Victor
Comment 16 Jonathan Druart 2023-05-23 06:40:50 UTC
Which version of Koha are you using?

In recent versions you are not supposed to have 'prog' or 'ccsr' in /usr/share/koha/opac/htdocs/opac-tmpl/ but 'bootstrap'.
Comment 17 Victor Zuniga 2023-05-23 16:41:31 UTC
(In reply to Jonathan Druart from comment #16)
> Which version of Koha are you using?
> 
> In recent versions you are not supposed to have 'prog' or 'ccsr' in
> /usr/share/koha/opac/htdocs/opac-tmpl/ but 'bootstrap'.

Hi Jonathan,

We are using version 22.11.05

I checked this morning and to my surprise, the Spanish language package had been installed despite the error messages from yesterday. I checked on the staff interface and sure enough, the option was displayed and available.

Here are the contents of the prog folder on our system as of this morning:

vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ ls
es-ES
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ cd es-ES/
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog/es-ES$ ls
js
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog/es-ES$ cd js/
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog/es-ES/js$ ls
locale_data.js


I enabled it on the staff interface to confirm and it is working as expected. Woot Woot!!


I checked and here are the contents of the bootstrap folder:

vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/prog$ cd ..
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl$ ls
bootstrap  ccsr  lib  prog  xslt
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl$ cd bootstrap
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap$ ls
css  en  es-ES  images  itemtypeimg  js  lib
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap$
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap$ cd es-ES/
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/es-ES$ ls
includes  js  modules  xslt
vzuniga@SJDS:/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/es-ES$



Am I to understand that the bootstrap folder should take precedence for language installations?

We were forced to upgrade this system from a very outdated version back in December 2022. I wonder if the migration tools (even though we ended up doing a fair amount of manual tweaks) did not remove this folder as part of the upgrade.

Can I remove the prog folder safely to avoid further confusion? or should I just leave it be?


Thanks for all your help Katrin, David, and Jonathan!!

Best,


Victor
Comment 18 Jonathan Druart 2023-05-24 06:51:07 UTC
(In reply to Victor Zuniga from comment #17)
> 
> Am I to understand that the bootstrap folder should take precedence for
> language installations?

"bootstrap" is the default OPAC theme. "prog" and "ccsr" have been removed in favour of "bootstrap". It is no longer used.

> We were forced to upgrade this system from a very outdated version back in
> December 2022. I wonder if the migration tools (even though we ended up
> doing a fair amount of manual tweaks) did not remove this folder as part of
> the upgrade.
> 
> Can I remove the prog folder safely to avoid further confusion? or should I
> just leave it be?

You *should* be safe removing it, but backup and test before!
Comment 19 Victor Zuniga 2023-05-24 17:25:35 UTC
(In reply to Jonathan Druart from comment #18)
> (In reply to Victor Zuniga from comment #17)
> > 
> > Am I to understand that the bootstrap folder should take precedence for
> > language installations?
> 
> "bootstrap" is the default OPAC theme. "prog" and "ccsr" have been removed
> in favour of "bootstrap". It is no longer used.
> 
> > We were forced to upgrade this system from a very outdated version back in
> > December 2022. I wonder if the migration tools (even though we ended up
> > doing a fair amount of manual tweaks) did not remove this folder as part of
> > the upgrade.
> > 
> > Can I remove the prog folder safely to avoid further confusion? or should I
> > just leave it be?
> 
> You *should* be safe removing it, but backup and test before!



Thanks for the clarification, Jonathan!

Victor