Consolidate label rendering on per-vocab templates, retire $ldt:lang#323
Open
namedgraph wants to merge 3 commits into
Open
Consolidate label rendering on per-vocab templates, retire $ldt:lang#323namedgraph wants to merge 3 commits into
namedgraph wants to merge 3 commits into
Conversation
- client.xsl imports the Web-Client per-vocab stylesheets (same order as internal-layout.xsl, so CSR label precedence = SSR) and drops the monolithic ac:label/ac:description override — fixes duplicate bilingual widget headings (e.g. BacklinksBacklinks) rendered when the browser language matched neither @en nor @es - Property-value suppression in bs2:PropertyList negotiates over $ac:langs (two split templates): the best accepted language per property wins; values in unaccepted languages stay hidden as before - sh.xsl label/description templates migrated to $ac:langs - All xsl:sort collations use $ac:lang; dual use-when sort pairs collapsed - Depend on client 5.0.3-SNAPSHOT Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CSR override in client.xsl (import precedence over the Web-Client $ldt:lang-derived default). SaxonJS marshals navigator.languages as an XDM sequence, so it is iterated directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Implements the Web-Client stub via window.generateUUID in the CSR functions module, mirroring the $ac:langs override pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes duplicate bilingual widget headings (e.g.
BacklinksBacklinks,Related resultsResultados relacionados) and makes the browser's ordered language preference govern label selection. Companion PR: AtomGraph/Web-Client#89 (requiresclient5.0.3-SNAPSHOT).client.xslimports the Web-Client per-vocab stylesheets (same order asinternal-layout.xsl, so CSR label precedence = SSR by construction) and drops the monolithicac:label/ac:descriptionoverride, whose unfiltered fallback emitted every language variant when the browser language matched neither@ennor@es.$ac:langsis overridden client-side fromnavigator.languages(SaxonJS marshals it as an XDM sequence); server-side the Web-Client writer passes the request'sAccept-Language. Label selection is no longer capped by thesupportedLanguagesconfig — a@ltlabel wins for anlt-preferring user whileContent-Languagestill negotiates againsten,es.bs2:PropertyListnegotiates per property over$ac:langs(two split templates with cheap match patterns): the best accepted language wins; values in unaccepted languages stay hidden as before.sh.xsllabel/description templates migrated; allxsl:sortcollations use$ac:lang; dualuse-whensort pairs collapsed.ac:uuid()override added (window.generateUUID), completing the removal ofixslfrom Web-Client.$ldt:langis fully retired from this repo (0 references); it remains the SSRContent-Languagecarrier in Web-Client.Test plan
Verified in the browser against three preference configurations, all rendering single-language labels with SSR/CSR parity:
Accept-Languagees,lt;q=0.9,en-US;q=0.8,en;q=0.7Registrarse,Resultados relacionados)lt,en-US;q=0.9,en;q=0.8en-US,en;q=0.9🤖 Generated with Claude Code