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

Abierto
#1 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
tooling

Línea de trabajo

Revisa el XML y el CSV del validador adjuntos, centrándote en los atributos tts:origin y tts:extent de los elementos p y en los diagnósticos existentes del atributo region. Sigue el punto de entrada de validación que comprueba los atributos de los elementos TTML y añade cobertura que demuestre que estos atributos en los elementos p producen advertencias específicas de ubicación.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
12
Forks
1
Merge medio
1 d 18 h
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bbc/ttml-validator

Todos los issues de bbc/ttml-validator

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.