Bug 26895 - Template process failed: file error - parse error - patron-title.inc line 37: unexpected token ('<span) [% span_start = '<span class="patron-title">‘ %] at /usr/share/koha/lib/C4/Templates.pm line 122.
Summary: Template process failed: file error - parse error - patron-title.inc line 37:...
Status: RESOLVED MOVED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: PC Linux
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-02 14:39 UTC by francesc
Modified: 2020-11-04 13:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description francesc 2020-11-02 14:39:54 UTC
Hello:

I have installed Koha 20 in Ubuntu 20LTS through command line.
I have installed ca-ES language. 
The intranet interface appears translated.
When I try to add a new user (member)in the intranet part I get this error:

Template process failed: file error - parse error - patron-title.inc line 37: unexpected token ('<span)
  [% span_start = '<span class="patron-title">‘ %] at /usr/share/koha/lib/C4/Templates.pm line 122.


To install the new language I had to do following:

BEFORE:

I created following folders :

/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/ca-ES
/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/ca-ES

If I don't create these folders before, translation command says that the folders no exists.

I gave 777 permissions to koha-conf.xml file (before langugage installation)

THEN:

I excuted the followinfg command.

sudo koha-translate --install ca-ES


To install Koha I followed this web page instructions:

https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages



Thank you very much.

francescjp
Comment 1 Owen Leonard 2020-11-02 15:04:10 UTC
Confirmed: intranet-tmpl/prog/ca-ES/includes/patron-title.inc is generated with the wrong markup:

[%- span_start = '<span class="patron-title">‘ %] [%- span_end = ‘</span>' %]

Note the "‘" character where there should be a single quote.
Comment 2 francesc 2020-11-03 07:21:46 UTC
But this happens with clean installation. 
I don't have written this character anywhere.
This error is caused with installation.

I use catalan language that contains this character.
May be the default catalan templates use this character.
But this character is common used in this language.

So the site would be configured in order to process it.
I guess it may be the problem.

Any clues abiut the problem?

Thank you very much.
Comment 3 Katrin Fischer 2020-11-03 22:06:04 UTC
The mistake was in the translation files, I fixed them. It was:
‘ %%] [%%- span_end = ‘

https://translate.koha-community.org/ca/translate/#search=span&sfields=source,target,locations&soptions=exact,case&unit=6524062&offset=10

You can either fix the file mentioned by Owen in comment#1 manually or wait for the next bug fix release when this will be fixed by an update to the translation files.
Comment 4 francesc 2020-11-04 13:45:03 UTC
Solved.
Thank you very much for your help.