1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQPackageSelectorHelp.cc
14 See also: YQPackageSelector.cc
16 Author: Stefan Hundhammer <sh@suse.de>
18 Textdomain "packages-qt"
24 #define y2log_component "qt-pkg"
25 #include <ycp/y2log.h>
27 #include "YQPackageSelector.h"
28 #include "YQPkgTextDialog.h"
35 YQPackageSelector::help()
37 // Translators: Headline for help about the package manager in general
39 QString html = YQPkgTextDialog::htmlHeading( _( "The YaST2 Package Manager" ) );
41 // Translators: Automatic word-wrapping.
42 html += para( _( "<b>Note:</b> This is a just a short overview."
43 " Refer to the manual for details." ) );
45 if ( onlineUpdateMode() )
47 // Help specific to online update mode
49 html += para( _( "In this dialog, select patches to download and install." ) );
50 html += para( _( "The list on the left side contains available patches"
51 " along with the respective patch kind (security, recommended, or optional)"
52 " and the (estimated) download size." ) );
53 html += para( _( "This list normally contains only those patches that are not installed on your system yet."
54 " You can change that with the <b>Include Installed Patches</b> check box below the list." ) );
55 html += para( _( "The <b>Patch Description</b> field contains a longer explanation of the currently"
56 " selected patch. Click a patch in the list to view its description here." ) );
57 html += para( _( "The package list on the right side shows the contents of the currently selected patch, i.e.,"
58 " the packages it contains. You cannot install or delete individual packages from a patch,"
59 " only the patch as a whole. This is intentional to avoid system inconsistencies." ) );
61 // Translators: Please keep the reference to "filter views" to distinguish between "filter views" that
62 // affect the amount of visible packages in the package list and "details views" ( below the package list )
63 // that show details about the ( one ) currently selected package in the package list.
65 html += para( _( "In addition to <b>Patches</b>, you can also select one of the other filter views"
66 " from <b>Filter</b> at the upper left:" ) );
69 else // ! _onlineUpdateMode
71 // Help specific to normal (non-online-update) mode
73 html += para( _( "In this dialog, select which packages to install, update, or delete."
74 " You can select individual packages or entire package \"selections\"." ) );
75 html += para( _( "Click the status icon for a package or selection to change the status"
76 " or right-click it to open a context menu." ) );
77 html += para( _( "Use the <b>Check Dependencies</b> button to resolve package dependencies."
78 " Some packages require other packages to be installed."
79 " Some packages can only be installed if certain other packages are not installed, too."
80 " This check will automatically mark required packages for installation"
81 " and it will warn you if there are dependency conflicts." ) );
82 html += para( _( "When you leave this dialog with <b>Accept</b>, this check will automatically be performed." ) );
84 // Translators: Please keep the reference to "filter views" to distinguish between "filter views" that
85 // affect the amount of visible packages in the package list and "details views" (below the package list)
86 // that show details about the (one) currently selected package in the package list.
88 html += para( _( "Select one of the available filter views with the <b>Filter</b> combo-box"
89 " at the upper left:" ) );
92 html += listItem( para( _( "<b>Selections</b> shows some predefined sets of packages that logically belong together." ) ) +
93 para( _( "Use the check box next to the selection to select it as a whole."
94 " You can also select or deselect individual packages in the package list at the right." ) ) );
98 // Help common to all modes: Description of the various filter views
101 html += listItem( para( _( "<b>Package Groups</b> shows packages by category. You can expand and collapse tree items"
102 " to refine or generalize categories. Click any category to display the packages"
103 " in that category in the package list on the right side." ) ) +
104 para( _( " <b>Hint:</b> There is a \"zzz All\" entry at the very end of the list that will show"
105 " all packages. This may take a few seconds on slow machines." ) ) );
107 html += listItem( para( _( "<b>Search</b> allows you to search for packages that meet various criteria."
108 " This is usually the easiest way to find a package if you know its name." ) )+
109 para( _( "<b>Hint:</b> You can also use this to find out what package contains a certain library. "
110 " Search in the <b>Provides</b> RPM field." ) ) );
112 html += listItem( para( _( "<b>Installation Summary</b> by default shows the changes to your system -- what packages"
113 " will be installed, deleted, or updated." ) ) +
114 para( _( "It is generally a good idea to use <b>Check Dependencies</b> then switch to"
115 " <b>Installation Summary</b> before clicking <b>Accept</b>. This way you can see"
116 " all changes that will be made to your system." ) ) +
117 para( _( "You can also explicitly select what packages with what status to see here;"
118 " use the check boxes at the left side." ) ) +
119 para( _( "<b>Hint:</b> You can also reverse the effect of this filter."
120 " You can see what packages remain the same on your system. Simply check <b>Keep</b>"
121 " and uncheck everything else." ) ) );
125 YQPkgTextDialog::showText( this, html );
130 YQPackageSelector::symbolHelp()
132 // Make sure all images used here are specified in
133 // helpimages_DATA in include/Makefile.am !
135 // Translators: Headline for help about package status icons
136 QString html = YQPkgTextDialog::htmlHeading( _( "Symbols Overview" ) );
139 html += "<table border=1>";
141 html += symHelp( "noinst.xpm",
142 // Translators: Package status short (!) description
143 _( "Do not install" ),
144 // Translators: Automatic word-wrapping.
145 _( "This package is not installed and it will not be installed." ) );
147 html += symHelp( "install.xpm",
148 // Translators: Package status short (!) description
150 // Translators: Automatic word-wrapping.
151 _( "This package will be installed. It is not installed yet." ) );
153 html += symHelp( "keepinstalled.xpm",
154 // Translators: Package status short (!) description
156 // Translators: Automatic word-wrapping.
157 _( "This package is already installed. Leave it untouched." ) );
159 html += symHelp( "update.xpm",
160 // Translators: Package status short (!) description
162 // Translators: Automatic word-wrapping.
163 _( "This package is already installed. Update it or reinstall it"
164 " (if the versions are the same)." ) );
166 html += symHelp( "del.xpm",
167 // Translators: Package status short (!) description
169 // Translators: Automatic word-wrapping.
170 _( "This package is already installed. Delete it." ) );
172 html += symHelp( "taboo.xpm",
173 // Translators: Package status short (!) description
175 // Translators: Automatic word-wrapping.
176 _( "This package is not installed and should not be installed under any circumstances, "
177 " especially not because of unresolved dependencies that other packages"
178 " might have or get." )
180 + _( "Packages set to \"taboo\" are treated as if they did not exist on any installation media." ) );
182 html += symHelp( "protected.xpm",
183 // Translators: Package status short (!) description
185 // Translators: Automatic word-wrapping.
186 _( "This package is installed and should not be modified, "
187 " especially not because of unresolved dependencies that other packages"
188 " might have or get." )
190 + _( "Use this status for third-party packages that should not be overwritten by newer versions"
191 " that may come with the distribution." ) );
193 html += symHelp( "autoinstall.xpm",
194 // Translators: Package status short (!) description
196 // Translators: Automatic word-wrapping.
197 _( "This package will be installed automatically because some other package needs it." )
199 + _( "<b>Hint:</b> You may have to use \"taboo\" to get rid of such a package." ) );
201 html += symHelp( "autoupdate.xpm",
202 // Translators: Package status short (!) description
204 // Translators: Automatic word-wrapping.
205 _( "This package is already installed, but some other package"
206 " needs a newer version, so it will automatically be updated." ) );
208 html += symHelp( "autodel.xpm",
209 // Translators: Package status short (!) description
211 // Translators: Automatic word-wrapping.
212 _( "This package is already installed, but package dependencies require that it is deleted." )
213 + _( "This can happen, for example, if some other package obsoletes this one." ) );
215 // Translators: This is added to the explanation of a status. Use of
216 // "non-breakable space" ( HTML ) is recommended ( if the line doesn't
217 // get too long ) to avoid line-break in the middle of this explanaton.
218 QString bySelection = " " + _( "(by selection)" );
220 html += symHelp( "sel_autoinstall.xpm",
221 // Translators: Package status short (!) description
222 _( "Autoinstall" ) + bySelection,
223 // Translators: Automatic word-wrapping.
224 _( "This package will be installed automatically because it is contained in a"
225 " predefined software selection (e.g., \"Multimedia\", \"Development\")." ) );
227 html += symHelp( "sel_autoupdate.xpm",
228 // Translators: Package status short (!) description
229 _( "Autoupdate" ) + bySelection,
230 // Translators: Automatic word-wrapping.
231 _( "This package is already installed, but there is a newer version."
232 " It is contained in a predefined software selection (e.g., \"Multimedia\","
233 " \"Development\") that you requested to update, so this package will"
234 " automatically be updated." ) );
236 html += symHelp( "sel_autodel.xpm",
237 // Translators: Package status short (!) description
238 _( "Autodelete" ) + bySelection,
239 // Translators: Automatic word-wrapping.
240 _( "This package is already installed, but some predefined software selection"
241 " (e.g., \"Multimedia\", \"Development\") requires that it is deleted." ) );
245 YQPkgTextDialog::showText( this, html );
250 YQPackageSelector::symHelp( const QString & imgFileName,
251 const QString & summary,
252 const QString & explanation )
254 QString imgPath = HELPIMAGEDIR;
255 QString html = "<tr valign=top>";
256 html += "<td><img src=\"" + imgPath + "/" + imgFileName + "\"></td>"
257 + "<td>" + summary + "</td>"
258 + "<td>" + explanation + "</td>"
266 YQPackageSelector::keyboardHelp()
268 // Translators: Headline for help about "magic keys" in the package manager
269 QString html = YQPkgTextDialog::htmlHeading( _( "Special Keys Overview" ) );
271 // Translators: Additional hint that will be added to any of the following keyboard actions.
272 // Automatic word wrapping.
273 QString goto_next = "<br>" + _( "In any case, go to the next list item." );
276 html += "<table border=1>";
278 html += keyHelp( "+",
279 // Translators: Keyboard action short (!) description
281 // Translators: Automatic word-wrapping.
282 _( "Get this package. Install it if it is not installed yet."
283 " Update it to the latest version if it is installed "
284 " and there is a newer version." )
287 html += keyHelp( "-",
288 // Translators: Keyboard action short (!) description
290 // Translators: Automatic word-wrapping.
291 _( "Get rid of this package. Mark it as \"do not install\" "
292 "if it is not installed yet. Delete it if it is installed." )
295 html += keyHelp( ">",
296 // Translators: Keyboard action short (!) description
298 // Translators: Automatic word-wrapping.
299 _( "Update this package if it is installed and there is a newer version."
300 " Ignore packages that are not installed." )
304 html += keyHelp( "<",
305 // Translators: Keyboard action short (!) description
307 // Translators: Automatic word-wrapping.
308 _( "Undo the effect of \">\" above: Set package to \"keep\""
309 " if it is currently set to \"update\". Ignore all other packages." )
312 html += keyHelp( "!",
313 // Translators: Keyboard action short (!) description
315 // Translators: Automatic word-wrapping.
316 _( "Set this package to \"taboo\" if it is not installed:"
317 " make sure this package does not get installed, especially not"
318 " because of unresolved dependencies that other packages might have or get. " )
320 + _( "Packages set to \"taboo\" are treated as if they did not exist on any installation media." )
324 html += keyHelp( "*",
325 // Translators: Keyboard action short (!) description
327 // Translators: Automatic word-wrapping.
328 _( "Set this package to \"protected\" if it is installed:"
329 " make sure this package will not be modified, especially not"
330 " because of unresolved dependencies that other packages might have or get. " )
332 + _( "Use this for third-party packages that should not be overwritten by newer versions"
333 " that may come with the distribution." )
339 YQPkgTextDialog::showText( this, html );
344 YQPackageSelector::keyHelp( const QString & key,
345 const QString & summary,
346 const QString & explanation )
348 QString html = "<tr valign=top>";
350 "<td><table bgcolor=#E0E0E0><tr><td align=center><b>"
352 + "</b></td></tr></table></td>"
353 + "<td>" + summary + "</td>"
354 + "<td>" + explanation + "</td>"
362 YQPackageSelector::para( const QString & text )
364 return "<p>" + text + "</p>";
369 YQPackageSelector::listItem( const QString & text )
371 return "<li>" + text + "</li>";