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.