Template:TTS/aural: Difference between revisions
Appearance
t1 / t3 parameters |
m correctly insert ruby tag |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{HueCSS}}<!-- | {{HueCSS}}<!-- | ||
--><includeonly><onlyinclude>{{#if:{{{t1|}}}|<span aria-hidden="true">{{{t1|}}}</span>}}<{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch:{{{NoTitle|}}}|y=title{{=}}""|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts | --><includeonly><onlyinclude>{{#if:{{{t1|}}}|<span aria-hidden="true">{{{t1|}}}</span>}}<{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch: {{{NoTitle|}}}|y = title{{=}}""|{{{tts|}}}{{{2|}}}{{{title|}}} = title{{=}}""|{{{tts|}}}{{{title|}}} = title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}} = title{{=}}"{{{tts|}}}"|#default = title{{=}}"{{{title|}}}"}}data-arg1="{{{1|}}}" data-arg1="{{{2|}}}" data-tts="{{{tts|}}}">{{#ifeq:{{{html|}}}|ruby||<ruby>}}{{#if:{{{tts|}}}{{{2|}}} | <span class="visual" aria-hidden="true">{{{1}}}</span><rp class="bracket" aria-hidden="true"> (</rp><rp class="help">pronounced </rp><rt {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{{lang2|}}}{{{lang|}}} = data-lang{{=}}"" | {{{lang|}}} = data-lang{{=}}"{{{lang2}}}" | {{{lang2|}}} = data-lang{{=}}"{{{lang}}}" | #default = data-lang{{=}}"" }} class="aural">{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{{tts|}}}{{{2|}}} = {{{1|error: TTS pronunciation missing}}} | {{{tts|}}} = {{{2|error: TTS pronunciation missing}}} | {{{2|}}} = {{{tts|error: TTS pronunciation missing}}} }}</rt><rp class="bracket" aria-hidden="true">)</rp> | {{{1|}}} }}{{#ifeq:{{{html|}}}|ruby||</ruby>}}</{{{html|span}}}>{{#if:{{{t3|}}}|<span aria-hidden="true">{{{t3|}}}</span>}}</onlyinclude></includeonly><!-- | ||
Put visually clearer version below for debug purposes: | Put visually clearer version below for debug purposes: | ||
| Line 13: | Line 13: | ||
|{{{tts|}}}{{{title|}}} = title{{=}}"{{{2|}}}" | |{{{tts|}}}{{{title|}}} = title{{=}}"{{{2|}}}" | ||
|{{{2|}}}{{{title|}}} = title{{=}}"{{{tts|}}}" | |{{{2|}}}{{{title|}}} = title{{=}}"{{{tts|}}}" | ||
|#default = title{{=}}"{{{title|}}}"}}> | |#default = title{{=}}"{{{title|}}}"}} | ||
{{#if:{{{tts|}}} | data-arg1="{{{1|}}}" data-arg1="{{{2|}}}" data-tts="{{{tts|}}}"> | ||
{{#ifeq:{{{html|}}}|ruby||<ruby>}} | |||
{{#if:{{{tts|}}}{{{2|}}} | |||
| <span class="visual" aria-hidden="true">{{{1}}}</span> | | <span class="visual" aria-hidden="true">{{{1}}}</span> | ||
< | <rp class="bracket" aria-hidden="true"> (</rp> | ||
< | <rp class="help">pronounced </rp> | ||
< | <rt | ||
{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | ||
| {{{lang2|}}}{{{lang|}}} = data-lang{{=}}"" | | {{{lang2|}}}{{{lang|}}} = data-lang{{=}}"" | ||
| Line 27: | Line 29: | ||
class="aural"> | class="aural"> | ||
{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | ||
| {{{tts|}}}{{{2|}}}{{{1| | | {{{tts|}}}{{{2|}}} = {{{1|error: TTS pronunciation missing}}} | ||
| {{{tts | | {{{tts|}}} = {{{2|error: TTS pronunciation missing}}} | ||
| {{{2 | | {{{2|}}} = {{{tts|error: TTS pronunciation missing}}}_ | ||
}} | }} | ||
</ | </rt> | ||
< | <rp class="bracket" aria-hidden="true">)</rp> | ||
| {{{1|}}} | | {{{1|}}} | ||
}} | }} | ||
{{#ifeq:{{{html|}}}|ruby||<ruby>}} | |||
</{{{html|span}}}> | </{{{html|span}}}> | ||
{{#if:{{{t3|}}}|<span aria-hidden="true">{{{t3|}}}</span>}} | {{#if:{{{t3|}}}|<span aria-hidden="true">{{{t3|}}}</span>}} | ||
| Line 52: | Line 54: | ||
=== number list === | === number list === | ||
<ol class="hue clean compound"><li><dfn class="field_geo manual flag" data-dimension="Z" data-qid="617"><abbr class="figure item-dimension" title="Z1 Basic Item / Item ID Q617" data-icon="">{{TTS|html=ins|class=flag|tts=617. (Z)|Z–617|NoTitle=y}} {{TTS|html=ins|class=swatch|tts=(Z):|[Z]}}</abbr> [[E:Q617|unique object coded as Z Item]]</dfn></li></ol> | <ol class="hue clean compound"><li><dfn class="field_geo manual flag" data-dimension="Z" data-qid="617"><abbr class="figure item-dimension" title="Z1 Basic Item / Item ID Q617" data-icon="">{{TTS|html=ins|class=flag|tts=617. (Z)|Z–617|NoTitle=y}} {{TTS|html=ins|class=swatch|tts=(Z):|[Z]}}</abbr> [[E:Q617|unique object coded as Z Item]]</dfn></li></ol> | ||
Latest revision as of 11:00, 5 December 2025
Demo[edit]
oddly-pronounced word demo:
using this template just for an HTML tag: ordinary phrase
number list[edit]
Description[edit]
This is a template for giving bits of text a TTS pronunciation.
This page is the main "guts" of Template:TTS, which needed to be broken up to properly create linking capabilities.