[Koha-bugs] [Bug 30733] Simplify translatable strings
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 16 19:01:26 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30733
--- Comment #100 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
(In reply to Paul Derscheid from comment #99)
> I this intended?
> [...]
> <p>
> [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
> - <span>Author(s): [% IF ( BIBLIO_RESULT.author ) %][%
> BIBLIO_RESULT.author | $raw %][% END %]
> + <span><span>Author(s):</span> [% IF ( BIBLIO_RESULT.author )
> %][% BIBLIO_RESULT.author | $raw %][% END %]
This is expected. There was already one <span> spanning (ha ha) a few lines and
I needed another one just for the string on this line.
------
> I think there's something wrong here..
>
> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
> [...]
> - Item recalled by <a
> href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[%
> item.recall.patron_id | uri %]">[% item.recall.patron.firstname | html %] [%
> item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber |
> html %])</a> on [% item.recall.created_date | $KohaDates %]
>
> + [% patron_link = BLOCK %]<a
> href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[%
> item.recall.patron_id | uri %]">[% item.recall.patron.firstname | html %] [%
> item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber |
> html %])</a>[% END %]
> + <span>Item recalled by [% patron_link| $raw
> %] on [% item.recall.created_date | $KohaDates %]</span>
> [% END %]
> [% END %]
I had to do something ugly (adding <span> everywhere arguably is already ^^") ,
extracting the <a> in a BLOCK. Because having the <a> in the middle of the
phrase would split it without any recourse. But a BLOCK usage doesn't cause the
extractor to split the string.
------
> diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
> b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
> index 8953297ab7..445ec01a03 100644
> --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
> +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
> [...]
> - <div class="dialog message">[% deleted_count |
> html %] [% IF ( deleted_count == 1 ) %]tag[% ELSE %]tags[% END %]
> successfully deleted.</div>
> + <div class="dialog message">[%
> deleted_count | html %] [% IF ( deleted_count == 1 ) %]tag[% ELSE %]tags[%
> END %] successfully deleted.</div>
Here I had split the string initially and fixed indentation but I ended up not
splitting the string. It's a plural case. It should be done using I18n TT
functions. But I let the indentation fix.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list