android / android/project-replicator

xml parser skips files with DOCTYPE entries

Abierto
#39 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Kotlin
Estrellas
136
Forks
40
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```
> Task :my-module:gatherModuleInfo
e: Invalid xml file my-module/src/main/res/values/strings.xml
line 4; column 10: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.










]>
```
Then later we can refer to these standard entity names in the strings:
```
One last thing…
```
In this case, we prefer to use `…` here, because it is more meaningful for translators, and it is more grammatically correct. I.e., using `…` vs `...`. It also translates differently for some languages - for example, some languages prefer a different type of ellipsis, like the midline (`⋯`) or vertical ellipsis (`⋮`).

Inlining the unicode character can often be difficult for people reading the file to understand that it is a unicode character rather than its similar non-unicode counterpart (i.e., `'` apostrophe vs `’` right-single quotation or rsquo), which is why we use the `&#<>;` notation. And inlining that notation into the string, someone reading the file won't understand what that number represents unless they look it up.

So the workaround is using the named XML entity: it gives us the exact unicode representation, with a meaningful name, without compromising the character width which can have an impact on some older editors that aren't well equipped to handle multi-byte unicode characters.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza por el código detrás de la tarea :my-module:gatherModuleInfo y el análisis de my-module/src/main/res/values/strings.xml. Comprueba cómo gestiona el analizador XML el DOCTYPE indicado y añade cobertura para entidades con nombre como …. La tarea estará terminada cuando el archivo se analice en lugar de omitirse y las entidades con nombre sigan siendo utilizables en strings.

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

Evaluación

Stack tecnológico
android, kotlin
Área
build-system
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.