I'm receiving nasty errors in the watchdog log because Drupal can't import bad translations. The latest one is for RoleAssign:
https://localize.drupal.org/translate/languages/de/translate?page=1&proj...
There's a long string containing 58 HTML errors according to https://validator.w3.org/check, like
<h2>Hintergrund</h2>Hintergrund</h2>
<Es ist für Site-Administratoren möglich, die Benutzerverwaltung über die Berechtigung <code>administer users</code> zu delegieren.
These HTML errors are not in the original string.
Since D7 (in my case) does basic HTML checking and produces recurring error messages about broken texts, couldn't l.d.o do this checking as well, before it accepts those edits?
Issue fork de-3091250
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
joachim namysloIt is actually my fault. I'll try to fix this soon.
There are some things we should mention, before Drupal 9 comes round the corner. by now there is not such a function and the error check in Drupal 7 and Drupal 8 doesn't recognize the new twig syntax. Some strings require to wrap them into a div element but div elements are excluded when the check in D7 D8 runs. So the import process will be interrupted, whenever a malformed string is found.
RoleAssign contains truly malformed HTML. The Problem here is not that the String has mallformed HTML at all. The Problem is the original One. It contains a
in the original String. Below you can find a HTML-tidy version of the string where the tag is removed from. As long as the maintainer fixes that issue. The only chance is to import the help text manually and delete the translation for that help text monster from l.d.o
Need to test that for 7.x as well, but I don't own d/ instances anymore. Feel free to copy and paste the code below. It works perfect.
Comment #3
joachim namysloFixed so far.
Need to retranslate it. Error-Message should be gone in aprox. 30 Minutes.
Comment #4
joachim namysloComment #5
joachim namysloComment #6
joachim namysloFür 8 nochmals geändert Review folgt, sobald der String vom Übersetzungsserver verarbeitet wurde.
Comment #7
joachim namysloComment #8
joachim namysloIch hab den Übeltäter gefunden. Es ist der
tag, der dafür sorgt, dass Drupal den String ablehnt. egal in welcher Version. Der gehört da einfach nicht rein.
Wenn das jemand verifizieren will, hier ist der richtige Code:
Comment #9
joachim namysloComment #10
joachim namysloComment #11
salvisYes, this validates fine at https://validator.w3.org/#validate-by-upload
Thank you, Joachim Namyslo!
Comment #12
salvisComment #13
joachim namysloSekunde, da hängt noch ein referenzierte Issue dran. Der Fehler ist ja nicht etwa von uns. Der Fehler ist im Modul. Da haben wir aber noch keine Antwort. ergo ist der Status hier nach wie vor...
Comment #14
salvisAh, ok, ich werde das flicken.
Brauchst Du einen Release für die Translations?
Comment #15
joachim namysloSolange die Zeichenfolgen in allen 3 betroffenen Ausgaben keinen Break-Tag mehr enthalten brauche ich keine neue. Nur den Patch für die jeweilige Release muss das dann halt jemand committen. Ich glaube nicht, dass es neue Releases braucht, damit der Server das übernimmt. So einen Fall hatte ich bis jetzt noch nicht.
Comment #16
salvis3 Ausgaben? Ich hab's für 7.x-1.x-dev und 8.x-1.x-dev committed.
Brauchst Du mehr?
Comment #17
joachim namysloDie andere ist die 6.x https://localize.drupal.org/translate/languages/de/translate?sid=204088 Da war Pagebreak vielleicht in Hilfetexten noch erlaubt. Die braucht nicht unbedingt nen Patch. Ich übersetz die dann einfach mit und lass sie zu, dann ist das Modul zu 100 % fertig.
Comment #18
salvisOh, Du unterhältst die D6 immer noch? Wenn Du willst, kann ich sie noch ändern — schreib's mir einfach.
Vielen Dank für Deine Arbeit!
Comment #19
joachim namysloIn dem Fall ja. Mir ist ein aufgeräumtes Projekt lieber, als das einhalten irgendwelcher Lebenszyklen. Wenn es dir also keine Umstände bereitet, kann ein Patch nicht schaden.
Comment #20
salvisIst gemacht. :-)
Comment #21
joachim namyslo@Salvis Ich hab immer noch keine neune Zeichenfolgen auf dem Server. Kann das sein, dass der Maintainer dass nicht commited hat?
Comment #22
joachim namysloOk ich hab in jedem nicht übersetzen String noch ein break drin
https://localize.drupal.org/translate/languages/de/translate?project=rol...
Ich mach den Issue jetzt mal zu. Ob das jetzt in 8 und 9 funktioniert, werde ich mit der nächsten Varbase-Installation testen.
Wenn der Server den String nicht zieht, müssen wir noch mal nachsehen, was mit dem Hilfetext nicht stimmt.
Comment #23
joachim namysloComment #24
joachim namysloEigentlich ist hier trotz zurücksetzen sämtlicher Versionen von Übersetzungen alles beim Alten. Die Zeichenfolgen mit dem Break-Tag sind nach wie vor auf dem Server zu finden und der Hilfetext lässt sich in keiner der Versionen übersetzen und das trotz eines entsprechenden patches. Ich bin an der Stelle mal ehrlich: Ich mach das Ding jetzt zu und seh mir das vielleicht noch mal an, wenn Varbase in Version 9 vorliegt. Module die sich nicht zu 100 % übersetzen lassen regen mich einfach auf. Leider ist Role-Assign da kein Einzelfall.
Comment #25
joachim namysloComment #26
joachim namysloComment #27
joachim namysloHopefully next beta will bring this changes alive
Comment #28
joachim namysloComment #29
joachim namysloThanks to the release of version 2.0.0 of the module, the bug is fixed at least for 9.1 and 10
Despite the hiding of the help text in the UI, an error is still seen when importing the detuschen translation when the version 9.x of the module is installed.
This means that, for example, when installing Varbase 9, this error appears again and again, even though the developers have programmatically hidden the help text for 9.x.
If anyone knows how to remove the Po file for version 9.x from the server and then recreate it without the string in question, that would be very helpful. It would be even better if the po file could be edited on the server directly, so that the translatiion, that was deleted long time ago, via ui wouldn't be present any longer insde the downloadable .po-file. I will do the devil to allow a translation of the help text for the version 9.x once again.
Otherwise that Issue will clearly, renain for d 5 d 6 and D7. Thank god D7 will be tsgged EOL later that year.
Nevertheless such errors (in this case a !--break-- Tag was inserted in the original string) are very annoying from the point of view of us translators, because we can't translate modules which are afflicted with this kind of error 100%.
To prevent this in the future, Drupal now has the feature:
https://api.drupal.org/api/drupal/core%21modules%21locale%21locale.modul...
with which programmers can avoid such errors in the future before providing a release. For the 2.0.0 branch of RoleAssign there is as of today again a properly translated help text from which the corresponding tag was removed by the developers. Thank you so much.
Since the new Release 2.0.0 is compatible with D9, too that bug is finally fixed fpr D9 and D10 In D7 that bug can still occur.
If so, you can add the new translation of the help-text manually:
Comment #30
joachim namysloComment #31
joachim namyslo