Changeset View
Changeset View
Standalone View
Standalone View
src/qtquick/qml/Dialog.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 39 | QtDialogs.Dialog { | |||
---|---|---|---|---|---|
44 | */ | 44 | */ | ||
45 | property alias configFile: newStuffPage.configFile | 45 | property alias configFile: newStuffPage.configFile | ||
46 | 46 | | |||
47 | /** | 47 | /** | ||
48 | * Set the text that should appear as the dialog's title. Will be set as | 48 | * Set the text that should appear as the dialog's title. Will be set as | ||
49 | * i18n("Download New %1"). | 49 | * i18n("Download New %1"). | ||
50 | * | 50 | * | ||
51 | * @default The name defined by your knsrc config file | 51 | * @default The name defined by your knsrc config file | ||
52 | * @note For the sake of consistency, you should NOT override the text propety, just set this one | 52 | * @note For the sake of consistency, you should NOT override the title property, just set this one | ||
53 | */ | 53 | */ | ||
54 | property string downloadNewWhat: engine.name | 54 | property string downloadNewWhat: engine.name | ||
55 | title: i18n("Download New %1", component.downloadNewWhat) | 55 | title: component.downloadNewWhat.length > 0 ? i18nc("The dialog title when we know which type of stuff is being requested", "Download New %1", component.downloadNewWhat) : i18nc("A placeholder title used in the dialog when there is no better title available", "Download New Stuff") | ||
ngraham: For readability's sake and to avoid nested `i18n()` calls which would cause string puzzles, I… | |||||
leinir: Quite right, also just simpler code in general :)
Stuff indeed ;) | |||||
56 | 56 | | |||
57 | /** | 57 | /** | ||
58 | * The engine which handles the content in this dialog | 58 | * The engine which handles the content in this dialog | ||
59 | */ | 59 | */ | ||
60 | property alias engine: newStuffPage.engine | 60 | property alias engine: newStuffPage.engine | ||
61 | 61 | | |||
62 | /** | 62 | /** | ||
63 | * The default view mode of the dialog spawned by this button. This should be | 63 | * The default view mode of the dialog spawned by this button. This should be | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |
For readability's sake and to avoid nested i18n() calls which would cause string puzzles, I would do it like this:
also "stuff" lol