Problem/Motivation

The following translations are de facto untranslatable because they are containing <ace> :
https://localize.drupal.org/translate/languages/de/translate?project=ace...

The reason for this is, that Drupal's malformed html filter skips strings with unallowed / unknown tags. So the strings containing the <ace> are de facto untranslatable, because even if we translate them to any language importing will be skiped.

therefore whenever a regular opening tag or closeing is used iin ui text it should be replaced with html entities..

Steps to reproduce

Proposed resolution

use html entities instead of opening and closing tags in translation source strings containing the <ace> tag.

Remaining tasks

change UI translation strings

User interface changes

Change texts so that thexy will be translateaböe without using a legion of html tidy tools to figure out waht's wrong here..

API changes

none

Data model changes

none

Issue fork ace_editor-3177428

Command icon 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

Joachim Namyslo created an issue. See original summary.

joachim namyslo’s picture

Issue summary: View changes
joachim namyslo’s picture

Issue summary: View changes
joachim namyslo’s picture

Issue summary: View changes
joachim namyslo’s picture

Issue summary: View changes
joachim namyslo’s picture

Maybe this could be solved by useing html entities for special chars in translation. So

Use <ace> and </ace> tags to show it with syntax highlighting.
Add attributes to tag to control formatting.

shold become

Use &lt;ace&gt; and &lt;/ace&gt; tags to show it with syntax highlighting.
		   Add attributes to &lt;ace&gt; tag to control formatting.

We are currently testing this here: https://localize.drupal.org/translate/languages/de/translate?sid=2670460

If it gets rendered in 30 minutes or so we'll all know if this could be a proper solution to get ace editors translation thowards 100 %

Second test with an ace-Edditor String: https://localize.drupal.org/translate/languages/de/translate?sid=1136378

joachim namyslo’s picture

Seems to be ok now, at least for 8 and 9 No errors anymore when HTML entities are used. Can't even find the affected text in the ui anymore. So I was not able to cross check this with my own eyes. HTML-Tidy must be enough so far.

joachim namyslo’s picture

Title: Seperate translations to get out <ace> Tag » Use HTML entities whenever <ace> is used in UI-Text instead of regular opening/closeing chars
joachim namyslo’s picture

Issue summary: View changes
joachim namyslo’s picture

Status: Active » Needs review

Needs to be reviewed in Varbase 8 and 9 for example. Maybe even simpletest. Me with German translation enabled will be enough.

rajab natshah’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

Needs an updated issue fork and MR for the 2.0.x branch.

rajab natshah’s picture

Status: Needs review » Needs work

rajab natshah’s picture

Status: Needs work » Needs review

  • rajab natshah committed aeb33d52 on 2.0.x
    fix: #3177428 Keep HTML out of the translatable filter description
    
rajab natshah’s picture

Status: Needs review » Fixed

Merged as aeb33d5 via !18 — the tags now arrive as placeholders, so the translatable string carries no HTML at all.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue tags: +ace_editor-2.0.4

✅ Released ace_editor-2.0.4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.