-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
6.7
-
c612dc3d1 (dev), 1863fd82c (6.8)
-
DaVinci 103, DaVinci 104, DaVinci 105
link: https://doc.qt.io/qt-6/qml-qtqml-qt.html#qsTr-method
The documentation explains
value of n for strings containing plurals
but this is not clear how n is supposed to be used. Especially when you see the explanation of n in qsTrId()'s documentation. (Does n mean the same as for qsTrId()?)
If n >= 0, all occurrences of %n in the resulting string are replaced with a decimal representation of n. In addition, depending on n's value, the translation text may vary.
Adding an example snippet to the documentation should make the usage of n clearer.
- relates to
-
QTBUG-127794 Add example snippets to qsTrId() methods' documentation
-
- Closed
-
-
QTBUG-127796 Describe the point of using qsTranslate() instead of qsTr()
-
- Closed
-
For Gerrit Dashboard: QTBUG-127795 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
591584,7 | Doc: Add snippet that shows how to use the n param in qsTr() | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
595215,2 | Doc: Add snippet that shows how to use the n param in qsTr() | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
595342,1 | Doc: Add snippet that shows how to use the n param in qsTr() | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: ABANDONED | 0 | 0 |