Problem/Motivation
The instructions for manually checking content cannot be translated. Basically, the module is great because it offers very general tips for improving content when it comes to accessibility. As these tips seem to be kept as general as possible, the tool can of course also be used outside English-speaking countries. However, not all pop-ups are translatable. For example, the instructions for manual checking. If possible, this should be changed so that these dialogs are available in more languages than just English. Here is an example:
Steps to reproduce
Install Drupal (Drupal CMS + Accessibility Tools recipe - recommended)
Write a post. This may disregard all accessibility rules.
Activate another language e.g. German
Set the language as the main display language for the administration area of your website
Display the content you have previously created and open the overlay of the module.
Proposed resolution
All strings that are now in English and do not come directly from the text of the displayed content are currently not translatable.
The strings identified should urgently be made translatable using the available functions (e.g. t()).
Remaining tasks
patch affected strings
Data model changes
Many, many updated translation strings.
Comment | File | Size | Author |
---|---|---|---|
#19 | placeholder-not-recognized.png | 147.63 KB | joachim namyslo |
#3 | 13-01-2025_18-29-05.png | 158.7 KB | joachim namyslo |
Unbenannt.JPG | 60.26 KB | joachim namyslo |
Comments
Comment #2
joachim namysloComment #3
joachim namysloComment #4
joachim namysloI'm a bit sad that I have to reopen the issue here. I thought the error was with us and that we had forgotten to translate the module 100% before checking for non-existing translations, but unfortunately, that is not the case. In the German translation of Drupal, the module is 100% translated and yet it still displays English texts even when the display language for Drupal is set to German. As the two screenshots above show, English texts exist both in the module's popup dialogue and in the configuration form in the Drupal administration area.
Therefore, I unfortunately have to reopen the issue here.
Comment #5
itmaybejj CreditAttribution: itmaybejj commentedComment #6
itmaybejj CreditAttribution: itmaybejj commentedThe good news is I can reproduce the issue.
The bad news is that I do not understand where the problem is coming from. These strings are available for translation, but I think I may have HTML in these strings that is causing the Drupal.t() function to ignore them.
I hope to have a fix to you this week, but I am concerned I may need to break up a lot of strings into individual sentences, which will be very time consuming and break a lot of existing translation work.
Comment #7
itmaybejj CreditAttribution: itmaybejj commentedAlright; I wrote some tests to compare strings and confirmed that most of the missing strings are due to HTML tags in the strings. This is definitely going to take me a few days to fix.
Comment #8
itmaybejj CreditAttribution: itmaybejj commentedQuestion -- did you have this problem in 2.1? I could revert most of these strings to what they were in 2.1 for now, which would restore existing translation work.
Comment #9
joachim namysloThat's a good one. Actually I don't t know but I can test it manually and reply here, if that. Helps. Don't worry about destroying any translations work, please we can re-translate that real quick. The smaller the peaces thee easier it'll be. Especially if there is just text in those additional strings. It's really late here.So testing and replying will take a while.
Comment #10
itmaybejj CreditAttribution: itmaybejj commentedI will keep working on breaking up the strings then, since I know that will work.
The other translation option is to add a DE object to the library languages file. That would be much more robust between versions, and I would then just use the library translation rather than Drupal.t for the JavaScript strings.
Comment #11
joachim namysloRegarding the object for German.
I'm not sure if that's a good thing. Drupal supports 115 languages. Of these, some translations are less active others more. Thanks to our dedicated team members, we are often the first to notice this. Most of the time these kinds of bugs are valid to all languages Drupal supports. That's why I'm not sure if an extra object for a specific language makes sense here. I'll Compare the behavior of the two module versions as soon as possible and give feedback as promised.
Comment #12
itmaybejj CreditAttribution: itmaybejj commentedI'm going to do both-- I'm reformatting the strings to support Drupal.t() for all languages. But people also use the library on other CMS platforms. And any languages I have natively supported in the JS library I don't have to pass through Drupal.t().
I hope to finish today or tomorrow.
Comment #16
itmaybejj CreditAttribution: itmaybejj commentedHopefully all fixed in 2.2.1, and I added a debug parameter to make it easier to review in the future.
Comment #17
itmaybejj CreditAttribution: itmaybejj commentedComment #18
itmaybejj CreditAttribution: itmaybejj commentedComment #19
joachim namysloThat is almost perfect,
I quickly made suggestions and imported them locally into Drupal CMS.
Apparently, some placeholders are not recognized.
https://localize.drupal.org/translate/languages/de/translate?sid=2913738
Here is an example string:
https://localize.drupal.org/translate/languages/de/translate?sid=2913738
Apart from that, everything looks excellent, and the administration area's configuration page is now completely translatable.
Comment #21
itmaybejj CreditAttribution: itmaybejj commentedOh -- so those placeholders are gone now, so it is just outputting %headingExample as plain text. The text that used to be %headingExample is visible in your screenshot -- it is the nested bullets.
I don't actually see the new strings on the translation server yet. That example should now be made of 4 separate strings, with no placeholders: