Template:QuoteFolio: Difference between revisions
(Card title: let long Sanskrit compounds wrap on phones) |
(Folio lists stored with commas; no link = plain location; "not in the Derge Kangyur" only when explicitly marked (notInDerge)) |
||
| Line 20: | Line 20: | ||
|- | |- | ||
| <code>linkAdarshah</code> || Adarshah link to the Derge folio. Shown when there is no 84000 link. | | <code>linkAdarshah</code> || Adarshah link to the Derge folio. Shown when there is no 84000 link. | ||
|- | |||
| <code>notInDerge</code> || <code>Yes</code> only when the text is confirmed absent from the Derge Kangyur. Without a link and without this, readers see the location as plain text, never "not in the Derge Kangyur". | |||
|- | |- | ||
| <code>checked</code> || <code>Yes</code> once a curator has confirmed the match. '''Only checked folios are shown to readers.''' | | <code>checked</code> || <code>Yes</code> once a curator has confirmed the match. '''Only checked folios are shown to readers.''' | ||
|} | |} | ||
Stores a subobject (QuoteFolioText, QuoteFolioToh, QuoteFolioVolume, QuoteFolioFolio, | Stores a subobject (QuoteFolioText, QuoteFolioToh, QuoteFolioVolume, QuoteFolioFolio, | ||
QuoteFolio84000, QuoteFolioAdarshah, QuoteFolioChecked) and, for checked folios, | QuoteFolio84000, QuoteFolioAdarshah, QuoteFolioChecked) and, for checked folios, | ||
<code>QuoteFolioDisplay</code> on the segment as <code>source@@toh@@folio@@url</code>, | <code>QuoteFolioDisplay</code> on the segment as <code>source@@toh@@folio@@url</code>, | ||
which [[Module: | which [[Module:FormatSegmentRow]] turns into the link under the translation. Folio lists are | ||
stored with commas, because the chapter query joins several values with <code>;</code>. | |||
</noinclude><includeonly>{{#subobject: | </noinclude><includeonly>{{#subobject: | ||
|QuoteFolioText={{{text|}}} | |QuoteFolioText={{{text|}}} | ||
| Line 38: | Line 40: | ||
|QuoteFolioAdarshah={{{linkAdarshah|}}} | |QuoteFolioAdarshah={{{linkAdarshah|}}} | ||
|QuoteFolioChecked={{#ifeq:{{lc:{{{checked|}}}}}|yes|true|false}} | |QuoteFolioChecked={{#ifeq:{{lc:{{{checked|}}}}}|yes|true|false}} | ||
}}{{#ifeq:{{lc:{{{checked|}}}}}|yes|{{#set:QuoteFolioDisplay={{#if:{{{link84000|}}}|84000@@{{{toh|}}}@@{{{folio|}}}@@{{{link84000|}}}|{{#if:{{{linkAdarshah|}}}|Adarshah@@{{{toh|}}}@@{{{folio|}}}@@{{{linkAdarshah|}}}| | }}{{#ifeq:{{lc:{{{checked|}}}}}|yes|{{#set:QuoteFolioDisplay={{#if:{{{link84000|}}}|84000@@{{{toh|}}}@@{{#replace:{{{folio|}}}|;|,}}@@{{{link84000|}}}|{{#if:{{{linkAdarshah|}}}|Adarshah@@{{{toh|}}}@@{{#replace:{{{folio|}}}|;|,}}@@{{{linkAdarshah|}}}|{{#ifeq:{{lc:{{{notInDerge|}}}}}|yes|notinderge@@{{{toh|}}}@@{{#replace:{{{folio|}}}|;|,}}@@|nolink@@{{{toh|}}}@@{{#replace:{{{folio|}}}|;|,}}@@}}}}}}}}|}}<div class="quote-folio-entry offwhite-bg rounded shadow-sm my-3 p-3 p-md-4" style="border-left:3px solid #897435;max-width:46rem"><div class="d-flex flex-wrap justify-content-between align-items-center mb-2" style="gap:.5rem"><div class="font-sans text-uppercase" style="font-size:.72rem;letter-spacing:.16em;color:#897435"><i class="fa-sharp-duotone fa-solid fa-book-open fa-fw mr-1"></i>Quoted text</div>{{#ifeq:{{lc:{{{checked|}}}}}|yes|<span class="font-sans" style="font-size:.78rem;padding:.15rem .6rem;border-radius:999px;background:rgba(46,125,50,.1);color:#2e7d32">✓ Checked · shown to readers</span>|<span class="font-sans" style="font-size:.78rem;padding:.15rem .6rem;border-radius:999px;background:rgba(179,107,0,.12);color:#8a5200">Not checked · hidden from readers</span>}}</div><div class="h4 font-serif mt-0 mb-3" style="line-height:1.25;overflow-wrap:anywhere"><!-- anywhere: Sanskrit titles are single long compounds that cannot otherwise wrap on a phone -->{{#if:{{{text|}}}|[[{{{text|}}}|{{#titleparts:{{{text|}}}||2}}]]|<i>Quoted text not set</i>}}</div><div class="d-flex flex-wrap mb-3" style="gap:.75rem 2.5rem"><div style="min-width:0"><div class="font-sans text-uppercase" style="font-size:.68rem;letter-spacing:.14em;color:#7d7a70">Tohoku</div><div class="font-serif" style="font-size:1.05rem">{{{toh|—}}}</div></div><div style="min-width:0"><div class="font-sans text-uppercase" style="font-size:.68rem;letter-spacing:.14em;color:#7d7a70">Derge volume</div><div class="font-serif" style="font-size:1.05rem">{{{volume|—}}}</div></div><div style="min-width:0"><div class="font-sans text-uppercase" style="font-size:.68rem;letter-spacing:.14em;color:#7d7a70">Folio</div><div class="font-serif" style="font-size:1.05rem">{{{folio|—}}}</div></div></div>{{#if:{{{link84000|}}}{{{linkAdarshah|}}}|<div class="font-sans">{{#if:{{{link84000|}}}|<span style="display:inline-block;padding:.3rem .8rem;border:1px solid rgba(137,116,53,.45);border-radius:999px;background:#fff;font-size:.88rem;margin:0 .5rem .5rem 0">[{{{link84000|}}} Read on 84000]</span>|}}{{#if:{{{linkAdarshah|}}}|<span style="display:inline-block;padding:.3rem .8rem;border:1px solid rgba(137,116,53,.45);border-radius:999px;background:#fff;font-size:.88rem;margin:0 .5rem .5rem 0">[{{{linkAdarshah|}}} Derge folio on Adarshah]</span>|}}</div>|<div class="font-sans" style="font-size:.88rem;color:#7d7a70">{{#ifeq:{{lc:{{{notInDerge|}}}}}|yes|Marked not in the Derge Kangyur: readers see that note.|No link yet: readers see the Derge location as plain text.}}</div>}}</div></includeonly> | ||
Latest revision as of 20:53, 13 October 2026
One quoted text a translation-memory segment cites, with the folio where the passage is found and links to it. Placed on the segment page after the Template:TranslationMemory call, one per quoted text; edit it through Form:Segment. (Kept outside TranslationMemory on purpose: adding a parameter there would re-render all ~29,000 segment pages.)
| Parameter | Holds |
|---|---|
text |
Page of the quoted text, e.g. Texts/Ratnameghasūtra
|
toh |
Tohoku number without the D: 127, 44-31
|
volume |
Derge volume: 55
|
folio |
Derge folio: 128a, or a range 175a–176a
|
link84000 |
84000 folio link. Preferred for readers. |
linkAdarshah |
Adarshah link to the Derge folio. Shown when there is no 84000 link. |
notInDerge |
Yes only when the text is confirmed absent from the Derge Kangyur. Without a link and without this, readers see the location as plain text, never "not in the Derge Kangyur".
|
checked |
Yes once a curator has confirmed the match. Only checked folios are shown to readers.
|
Stores a subobject (QuoteFolioText, QuoteFolioToh, QuoteFolioVolume, QuoteFolioFolio,
QuoteFolio84000, QuoteFolioAdarshah, QuoteFolioChecked) and, for checked folios,
QuoteFolioDisplay on the segment as source@@toh@@folio@@url,
which Module:FormatSegmentRow turns into the link under the translation. Folio lists are
stored with commas, because the chapter query joins several values with ;.