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

[Suggestion] Make Qt more tolerant with shortcuts in full-width brackets on macOS.

    XMLWordPrintable

Details

    • 86b930f07 (dev), 68249352a (6.4), ac0dc01c4 (6.5), 1dfa714ae (tqtc/lts-6.2), 713e7a4d0 (tqtc/lts-5.15)

    Description

      In strings_??.qm translation files, some translators may make mistakes that putting ampersanded shortcuts into full-width brackets as follows:

      This won't render the shortcut ineffective on Windows but will render it incorrectly on macOS. (See the screenshot I posted in my 2nd reply towards this ticket.)

      The following is the format that translators are expected to do:

      While this appears to the duty of translators, there are two difficulties:

      1. Some translators are outsourced workers for a company, and the company may have extremely-limited human resources devotable to improving the i18n experience of their products.
      2. "Using full-width brackets for ampersanded shortcuts" is something already-tolerated in Windows app localization industry in (at least) Mainland China for dozens of years, and these translators are likely to have no awareness that they have to use half-width brackets in case of translating Qt apps for macOS.

      Since only Qt (at this moment) requires half-width brackets in the strings_??.qm files, here's my suggestion:

      When parsing raw strings from strings_??.qm files, use Regex to match ampersanded shortcut letters bracketed by full-width brackets or mixed-width brackets (like "(&A)" or "(&A)"). If matched, replace all full-width brackets in the matched range to half-width brackets. So does possible full-width ampersand symbols for shortcuts, converting such symbols to half-width.

      $ EOF.

      Attachments

        1. image-2023-02-01-18-42-46-207.png
          17 kB
          SHIKI SUEN
        2. image-2023-02-01-18-41-20-204.png
          14 kB
          SHIKI SUEN
        3. image-2023-02-01-10-27-55-132.png
          67 kB
          SHIKI SUEN
        4. image-2023-02-01-10-26-10-965.png
          50 kB
          SHIKI SUEN
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Eddy Edward Welbourne
            shikisuen SHIKI SUEN
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes