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

static_cast<> throws off lupdate's parsing of QCoreApplication::translate()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.10.0 FF
    • 5.12.8
    • Tools: Linguist
    • None
    • Linux/Wayland
    • aa5105770 (dev)

      When trying to translate a string with QCoreApplication::translate() using the plural forms, lupdate doesn't see it.
      For example, 
       

      QCoreApplication::translate("Context", "[A] removed %n item(s)", "", static_cast<int>(items));
      

      doesn't show up in QtLinguist after running lupdate. However, 

      QCoreApplication::translate("Context", "[A] removed [B] item(s)");
      

      works well.
      Using tr() works fine.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            masoud.jami Masoud Jami
            mickael.reporting Mickaël Da Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes