android / android/project-replicator

xml parser skips files with DOCTYPE entries

Ouverte
#39 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Kotlin
Étoiles
136
Forks
40
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

```
> 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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par le code derrière la tâche :my-module:gatherModuleInfo et l’analyse de my-module/src/main/res/values/strings.xml. Vérifiez comment l’analyseur XML gère le DOCTYPE signalé et ajoutez une couverture pour les entités nommées telles que …. C’est terminé lorsque le fichier est analysé au lieu d’être ignoré et que les entités nommées restent utilisables dans les strings.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, kotlin
Domaine
build-system
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.