X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c50f1fb9226d9260454ccb9c8a67d0be23c2827f..2d499dbbb3c618b53e92f230ca88e6618856b634:/samples/dialogs/tips.txt?ds=inline diff --git a/samples/dialogs/tips.txt b/samples/dialogs/tips.txt index 3a019d90e4..fe8a12efc1 100644 --- a/samples/dialogs/tips.txt +++ b/samples/dialogs/tips.txt @@ -1,5 +1,18 @@ -Startup tips are documented in "Startup tips overview" section of wxWindows documentation. -This is the first tip! -And this is another great tip... -And here is a very very very very very very very very very very very long one. -If you have something useful to add to this file, please do. +Startup tips are documented in the "Startup tips overview" section of wxWindows documentation. +These tips are being read from the tips.txt text file in this directory. Each line of the file contains a single tip. +If you close and open this tips dialog, you will notice that the tip numbers start at the point you were at when you closed the dialog last time. This allows easy cycling through the entire list of tips, instead of always showing the initial tips over and over. +Often you will want to save to the application's wxConfig, the last tip that the user saw, as well as whether they want to see tips on startup. +Comments in the tips file have a # as the first character. Comments are automatically skipped over. See the tips.txt file in this directory for the example. +# This line is a comment since it started with a #, and is skipped. +Blank lines in the tip file are also automatically skipped over. Lines with only spaces are also considered empty. +The next line in this tip file is empty, so it will be automatically skipped. + +The next line in this tip file is just empty spaces, so it is considered empty too, and is also automatically skipped. + +You can easily add translations to your startup tips via the usual gettext methods by wrapping a string in a gettext macro, which is _(""). See next tip for example. +_("This tip is marked as a translatable string by wrapping it inside the usual gettext macro, so it can be collected by gettext and added to a translation catalog. Your application can then use this catalog and serve out a translated version of the tip.") +Translatable strings must strictly begin with _(", not _( " or wxGetTranslation(" or something else. +If you are using gettext translatable strings, don't forget to escape to replace any " characters within the tip with a \" instead +_("This is a translatable tip with the quoted words \"Escape me\" properly escaped.") +If you have very specialized needs, you can derive your own wxTipProvider and use that instead. +If you want to modify the tip content at runtime for purposes other than translation (for example, variable expansion), one easy option is to use a custom tip provider derived from wxFileTipProvider. Your custom tip provider would contain a single virtual function to override: PreprocessTip().