[Koha-bugs] [Bug 30733] Simplify translatable strings

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 13 14:23:44 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30733

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Needs Signoff

--- Comment #54 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
(In reply to Jonathan Druart from comment #38)
> My tests:
> - checkout master
> - run install (fr-FR)
> - commit
> - apply patches
> - run install

you mean update?

---

> The following changes look wrong:
> 
> * cataloguing/value_builder/marc21_linking_section.tt
> [...]
> Surround "Results with span
> [% IF ( total ) %]<span>Results [% from | html %] to [% to | html %] of [%
> total | html %]</span>

Ok done, initially I skipped some strings that were not really terrible to keep
time to process all the worst.

---

> * opac-account-pay-error.tt
> It's not clear what's happening, isn't it be part of <title>?

After investigating with Fridolin we are nearly sure it's dead code from the
time of Paypal payment integrated into Koha. I will open a followup ticket. As
the for changes of this patch they can stay there. They have no impact besides
cleaning translation strings. Simpler strings never used are still less
translation work than a complex string never used.


> * includes/holds-table.inc "Item in transit from"
> You switched from:
>  9591 -msgid "%s %s %s %s Item in transit from "
> to:
>  11135 +msgid "Item in transit from "
> 
> That's still not useful to translate. You just removed the %s, but
> translators still cannot translate the sentence correctly

Ok, I extracted the <strong> in a BLOCK, thanks for the advice to use that.

> * Same here, from:
>  9712 -msgid "%s %stag%stags%s successfully added."
> to:
>  12611 +msgid "successfully added."

It's a plural case. Reverted, it should be done using I18n TT functions.

----

> * Same: msgid "Added %s by", by who?

Previous string:
msgid "%s Added %s by you %s %s Added %s by %s %s %s %s %s %s %s %s %s %s %s %s
%s %s %s %s %s "

That's an improvement right? Can't do better IIUC, the last word of the
displayed string is from a SWITCH
https://git.koha-community.org/Koha-community/Koha/src/commit/beb663836b45a77f45195774133cc9b78957fcd5/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt#L94

----

> * Same: msgid "Waiting for patron at"
> * Same: msgid "Recalled by patron expected at"

Is that about about including a trailing %s to make clear that there is a
variable? Done.


---


> You want to help translators giving them sentences easy to translate. If you
> remove context you are make things worse :)

Is there actually a confusion? Given the way phrases end.


----


(In reply to Jonathan Druart from comment #40)
> * You could also split this:
> <span>Suspended [% IF ( HOLD.suspend_until ) %] until [% HOLD.suspend_until
> | $KohaDates %] [% END %]</span>

Indeed, that's not a loss of context. I isolated Suspended and until.

-----

> * msgid "If you have any questions, please contact the "
> 
> the what?
> See on bug 29602 how we fixed this problem with KohaSpan

I don't get the need of KohaSpan. Because here are the different resulting
HTMLs with and without the KohaSpan filter.
<span>If you have any questions, please contact the <span><a
href="mailto:root at localhost">site administrator</a></span></span>
<span>If you have any questions, please contact the <a
href="mailto:root at localhost">site administrator</a></span>

And in both cases, the string will not be as wished. Because in contrast to the
examples in bug 29602, "site administrator" is in the <a>. I got a list of a
some strings like this. Maybe there is a way to deal with this? I18n TT
functions to provide context for the incomplete strings?


-------

> * msgid "Recalled by patron expected at"

Fixed.

> * msgid "does not exist"
> * msgid "does not match"

It's just a bunch of IF, not much we can do.
https://git.koha-community.org/Koha-community/Koha/src/commit/972330bc9e13e40564885bcf0ef1723abcc51772/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt#L186

> * msgid "%s Hold found for %s (" where is the closing parenthesis?

It doesn't look like I changed this so I don't know why if came up in your
diff. Anyway, added a few <span>

> I am only at the middle of the diff, it's very boring, will continue later.
> But I think you get it.

It took me a long time to understand not having an ending %s was the issue. (I
hope it was indeed that! 😮 )

I hope I spotted all the cases after going though the whole diff. Everything
should be fixed or addressed in the previous paragraphs.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list