[Bug 42346] New: Add per-language template snippet system for translatable Template Toolkit sysprefs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42346 Bug ID: 42346 Summary: Add per-language template snippet system for translatable Template Toolkit sysprefs Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: f.demians@tamil.fr, jonathan.druart@gmail.com A growing number of Koha system preferences accept Template Toolkit content for use in the staff interface and OPAC (e.g. SlipCSS, OpacUserCSS-style customisations, the forthcoming DuplicateCheckAdditionalInfo from bug 41902, various display customisations, report templates, etc.). These preferences are not translatable: the value is a single string regardless of the user's interface language. To work around this, sites have either: a) used inline TT conditionals on a 'lang' variable (ugly, doesn't scale), or b) bastardised the Notices and slips system to store per-language template variants (wrong - notices have their own lifecycle, audience, and management UI), or c) accepted a single language only. Proposal: Build a proper per-language template snippet store, separate from notices, that any TT-accepting feature can hook into. Likely shape: - DB table 'template_snippets' keyed by (snippet_name, lang) - Admin UI for managing variants per language, similar in spirit to the notices editor but scoped to UI snippets - A Koha::TemplateSnippet object/resultset - Integration helper so that a syspref or feature can say 'render this snippet for the current language, fall back to default' - Migration path for existing TT sysprefs that would benefit from translation This would also let us properly migrate any 'pseudo-notices' that exist today (notices being used for non-notice UI purposes solely to get translation support). Identified during work on bug 41902. The duplicate-check additional info syspref added there will be a candidate consumer once this lands. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42346 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41902, 33030 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33030 [Bug 33030] Add standardized subroutine for processing Template Toolkit syntax outside of notices https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41902 [Bug 41902] Allow configuration of bibliographic information to be shown on new record duplicate check -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42346 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- This is the goal of bug 38460. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42346 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42047 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42346 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- All I ask is that appropriate C4::Scrubber profiles be used for anything that can render HTML. If there's any non-HTML, I'd ask thought be put into how someone could inject arbitrary content and whether or not that could cause a problem in that area of template usage. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org