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.

Not all strins visable in Ui are translatable right now.
current state
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.

Comments

joachim namyslo created an issue. See original summary.

joachim namyslo’s picture

Status: Active » Closed (outdated)
joachim namyslo’s picture

Issue summary: View changes
Status: Closed (outdated) » Active
StatusFileSize
new158.7 KB
joachim namyslo’s picture

I'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.

itmaybejj’s picture

Assigned: Unassigned » itmaybejj
itmaybejj’s picture

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

itmaybejj’s picture

Alright; 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.

itmaybejj’s picture

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

joachim namyslo’s picture

That'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.

itmaybejj’s picture

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

joachim namyslo’s picture

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

itmaybejj’s picture

I'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.

  • itmaybejj committed 81924683 on 2.2.x
    Issue #3496760 by joachim namyslo, itmaybejj: check if all strings...

  • itmaybejj committed 3b7e812c on 2.2.x
    Issue #3496760 by joachim namyslo, itmaybejj: check if all strings...

  • itmaybejj committed a626aad5 on 2.2.x
    Issue #3496760 by joachim namyslo, itmaybejj: check if all strings...
itmaybejj’s picture

Title: check if all strings visable in UI are translatable » check if all strings visible in UI are translatable
Issue summary: View changes

Hopefully all fixed in 2.2.1, and I added a debug parameter to make it easier to review in the future.

itmaybejj’s picture

Status: Active » Needs review
itmaybejj’s picture

joachim namyslo’s picture

StatusFileSize
new147.63 KB

That is almost perfect,

I quickly made suggestions and imported them locally into Drupal CMS.
Apparently, some placeholders are not recognized.
üöacehpöder 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.

  • itmaybejj committed 2841fe2f on 2.2.x
    Issue #3496760 by joachim namyslo, itmaybejj: check if all strings...
itmaybejj’s picture

Oh -- 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:

headingExample : `
    <ul>
        <li>${Drupal.t("Heading level 1")}
            <ul>
                <li>${Drupal.t("Heading level 2: a topic")}
                    <ul>
                        <li>${Drupal.t("Heading level 3: a subtopic")}</li>
                    </ul>
                </li>
                <li>${Drupal.t("Heading level 2: a new topic")}</li>
            </ul>
        </li>
    </ul>`
  ,
headingEmpty : {
    title: Drupal.t("Heading tag without any text"),
    tip: () => `
      <p>
      ${Drupal.t("Headings and subheadings create a navigable table of contents for assistive devices. The numbers indicate indents in a nesting relationship:")}
      </p>
      ${Ed11y.M.headingExample}
      <p>${Drupal.t("Empty headings create confusing gaps in this outline: they could mean the following content is still part of the previous section, or that the text was unpronounceable for some reason.")}</p>
      <p>
        ${Drupal.t("<strong>To fix:</strong> add text to this heading, or delete this empty line.")}
      </p>`,
  },
joachim namyslo’s picture

I can change it manually for now, but it should be fixed, because other language teams might find this confusing when the issue got closed. So we need to take care and see when it is gone if new strings available on l.d.o

itmaybejj’s picture

Status: Needs review » Needs work

I'll keep this open until l.d.o gets the new strings then. I'm assuming there's nothing I can do at my end to help with that?

joachim namyslo’s picture

No, the strings got extracted when payout release a new version

itmaybejj’s picture

Looks like 2.2.3 is up and ready with all the new strings. Is it ok for me to mark this fixed?

joachim namyslo’s picture

Let me check if %headingExample isn't shown anymore when translations are live. If it is still there, we need to fix it. Until we confirm it, we can change it to postponed. If the bug exists the translations containing %headingExample must be changed manually in each language by maintainers and that deed wouldn't be the best solution.

joachim namyslo’s picture

StatusFileSize
new805.24 KB

Ok

The correction notes are now in order.

I have found a single passage that cannot be translated. It is the string

https://localize.drupal.org/translate/languages/de/translate?sid=2913733

However, the translation is available and approved. That's why I find it strange.

As for the original issue, we can close it. The module can now be translated without any problems (except for the string mentioned)

Only local images are allowed.

joachim namyslo’s picture

The placeholder shown above is still displayed in the Ui and the placeholder %level is not replaced with text. Unfortunately, placeholders cannot simply be removed from strings because the translation server does not allow the affected string to be saved without placeholders in superset form. The placeholder must therefore either be reactivated or removed. Otherwise it will remain exactly as it is.

  • itmaybejj committed a5dc4189 on 2.2.x
    Issue #3496760 by joachim namyslo, itmaybejj: check if all strings...
joachim namyslo’s picture

So I looked at this again and reset the translations in my installation of Drupal and imported them fresh. The module is 100% translatable. Many thanks for actively patching it. We can close the issue

joachim namyslo’s picture

Status: Needs work » Fixed