Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62115

Qt Designer: Simple HTML formatting option effects immediately lost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.9.0
    • Tools: Designer
    • None
    • Debian GNU/Linux 9.0 a.k.a. "Stretch", AMD64 1.8GHz Phenom x4, 8GByte

    Description

      A recent change (in the last year I think) has now made populating rich-text static content into read-only QTextEdit/QTextBrowsers virtually useless where that text needs to be translatable for I18n purposes. As has been the case for the last ten years that QTBUG-1136 has been open Qt Linguist cannot handle the display of HTML and will display the raw text content to translators.

      In the past Qt Designer has been largely content to leave what I might describe as "simple HTML" mark-up alone - especial if the "Simplify Rich Text" option is selected on the text entry form in Qt Designer (see indicated option on "Screenshot_editor.png"). Indeed as long as that control was left active then text enter/edited to be like "Screenshot_simple.png" was left untouched. Whilst that would end up turning into the "Screenshot_unpleasant.png" form if it was edited whilst in the "Rich Text" tab view it would be possible to hand-edit it back again. However the current Qt Creator now always converts the HTML into the unsimple form which I show as "Screenshot_repulsive.png".

      There is no way anyone could hope to comprehend that even before the '<'/'>' and '&' at least are converted to HTML entities so they can be stored in the XML that is the `.ui` form/dialogue storage file format. And that is what users of Qt Linguist are suppose to read to convert into a different language.

      Please, as a minimum, can Designer be revised to not un-simplify rich-text that has been explicitly set to be simple.

      Of course there is something that would render this Issue moot - and that would be incorporating whatever the code is that renders all three of the samples of HTML in those pictures into the same rendered content (like Snapshot_rendered_HTML.png) into the guts of Qt Linguist so it too can show and allow edits to the translat-ish-able text. It is almost as if it needs a widget that can show either the rendered or raw HTML of the source text and allow entry of a translated version - and it is fortunate that the Qt Designer has one of those already operating - even if it cannot save what was actually entered without mangling to an much less user readable source form before it stores it at present...

      Attachments

        1. qtbug621115_diag.diff
          0.8 kB
        2. qtbug62115.ui
          1 kB
        3. Screenshot_20170725_014105.png
          Screenshot_20170725_014105.png
          26 kB
        4. Screenshot_editor.png
          Screenshot_editor.png
          42 kB
        5. Screenshot_rendered_HTML.png
          Screenshot_rendered_HTML.png
          25 kB
        6. Screenshot_repulsive_HTML.png
          Screenshot_repulsive_HTML.png
          77 kB
        7. Screenshot_simple_HTML.png
          Screenshot_simple_HTML.png
          37 kB
        8. Screenshot_unpleasant_HTML.png
          Screenshot_unpleasant_HTML.png
          51 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            slysven Stephen Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes