No warning for `tts:origin` and `tts:extent` attributes on `<p>` elements

Aperta
#1 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Esamina l’XML e il CSV del validator allegati, concentrandoti sugli attributi tts:origin e tts:extent degli elementi p e sulla diagnostica esistente per l’attributo region. Traccia il punto di ingresso della validazione che controlla gli attributi degli elementi TTML, quindi aggiungi una copertura che dimostri che questi attributi sugli elementi p producono avvisi specifici della posizione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Given the XML fragment:

<p begin="00:00:35:21" end="00:00:38:15" region="pop1" style="basic" tts:origin="39.59% 80.13%" tts:extent="20.82% 9.87%">Some cubes of ice,</p>
<p begin="00:00:35:21" end="00:00:38:15" region="pop2" style="basic" tts:origin="39.59% 80.13%" tts:extent="20.82% 9.87%">a set of dice</p>

where two different lines of text are specified to be displayed at the same time, the playback effect is that the second subtitle is displayed over the first, ie the second subtitle overlaps the first, usually obscuring it entirely.

The validator does signal there is a general problem without giving the location (unless the -collate_more_than option is set), in this case:

Fail,ebuttd_overlapping_region_constraint,12 locations,Elements overlap spatially and temporally

The XML specifies these lines are to be displayed in different regions ("pop1", "pop2"), but in this example those regions have no positioning attributes, only styling:

<layout>
            <region xml:id="pop1" tts:backgroundColor="transparent" tts:showBackground="whenActive"/>
            <region xml:id="pop2" tts:backgroundColor="transparent" tts:showBackground="whenActive"/>
            <region xml:id="pop3" tts:backgroundColor="transparent" tts:showBackground="whenActive"/>
            <region xml:id="pop4" tts:backgroundColor="transparent" tts:showBackground="whenActive"
</layout>

The validator warns of this:

Fail,ebuttd_region_attributes_constraint,region element xml:id pop1,Required style attribute {http://www.w3.org/ns/ttml#styling}origin missing from region element
Fail,ebuttd_region_attributes_constraint,region element xml:id pop1,Required style attribute {http://www.w3.org/ns/ttml#styling}extent missing from region element

Positioning data is presented in the XML as tts:origin and tts:extent attributes on the <p> elements, but this is invalid in EBU-TT-D and is not flagged by the validator.

XML file:

p07y898m-a0b5f41e-f4d2-45a5-9f27-f5f166ff4803.xml

Validator file:

p07y898m-a0b5f41e-f4d2-45a5-9f27-f5f166ff4803.csv

Lingua principale
Python
Stelle
12
Fork
1
Merge medio
1g 18h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bbc/ttml-validator

Tutte le issue di bbc/ttml-validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.