Commit Graph

37 Commits

Author SHA1 Message Date
Václav Slavík
f2959820a5 Add wxTranslations::GetTranslatedString().
Replace GetString(), which always returns something (possibly the
original string) with GetTranslatedString() that returns either a
pointer to translated string or NULL.

This simplifies the code a bit, all handling of missing translations is
now done in wxGetTranslation().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:31 +00:00
Steve Lamerton
8c6471af3c Fix various documentation warnings throughout core and base.
See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-21 15:26:34 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Václav Slavík
01f953efb2 Add wxTranslations::GetBestTranslation().
Implement preferred language selection on modern systems (OS X, Windows
Vista+). User settings for locale (aka "regional settings") and UI
language are independent there and the UI language shouldn't be
determined from the locale.

Moreover, the OS provides a list of preferred languages, not a single
value (as with locale), so we should use the best language given user's
preferences and available translations. A Czech user may prefer Slovak
UI over English, for example, and we should use Slovak translation in
absence of Czech one in that case instead of falling back to English.

On Unix, locale is language and so things remain as before.

Notice that calling wxLocale::Init(wxLANGUAGE_DEFAULT) does the right
thing now: it sets the locale to whatever the user has configured in
regional settings and loads translations corresponding to default
wxTranslations language, which is determined as described above.
Previously, UI would be translated using a language corresponding to the
regional settings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 08:58:38 +00:00
Vadim Zeitlin
f090e4ef67 No real changes, just fix spelling errors in the documentation.
Closes #14038.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-23 13:56:10 +00:00
Robin Dunn
639f81199f Fix more missing and broken stuff in the interface, for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-17 18:53:28 +00:00
Robin Dunn
96b77d60a4 Fixed parameter names. They can't be named "short"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-23 22:14:18 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Václav Slavík
dfbb5eff44 Don't use size_t for plural forms parameter.
size_t should be used for size of objects, which wxGetTranslation() and
wxTranslations::GetString() 'n' argument isn't -- it's just a regular
integer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:27:07 +00:00
Václav Slavík
ea14492351 Split intl.h into intl.h, language.h and translation.h.
To make the code more manageable, intl.h now contains wxLocale and
translation.h all translations-related stuff (wxTranslations, _() etc.).
Code generated by genlang.py was moved into its own files (language.h,
languageinfo.cpp).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 07:06:32 +00:00
Václav Slavík
18e065b48d Split wxLocale into wxLocale and wxTranslations.
wxTranslations is for handling gettext translations. wxLocale manages
locale and provides compatiblity API for translations. Separating these
two loosely related tasks makes it possible to use translations into
languages not known by Windows or using localized GUI without all the
locales compilations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 07:06:18 +00:00
Václav Slavík
3acf8a8d9b Remove wxLOCALE_CONV_ENCODING flag.
This doesn't affect Unicode builds, only the legacy ANSI one.

PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:22 +00:00
Václav Slavík
f30bd8f262 Add wxLOCALE_DONT_LOAD_DEFAULT (=0) for clarity.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:09 +00:00
Mattia Barbon
1058f65203 Copy wxPerl notes from the LaTeX documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-18 17:47:01 +00:00
Vadim Zeitlin
c59532bc62 regenerated after r60684
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-06 21:11:52 +00:00
Francesco Montorsi
ea0022d356 grouping is not allowed for enum values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-19 13:29:19 +00:00
Vadim Zeitlin
89a7e1ff98 Added wxLOCALE_DATE/TIME_FMT support to wxLocale::GetInfo().
- Implement for POSIX and Win32, TODO for OS X
- Use this instead of ad hoc code in wxDateTime::ParseFormat()
- Remove HAVE_STRPTIME, we don't need nor use strptime() any more


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-29 17:15:43 +00:00
Francesco Montorsi
fc79419b65 document wxLocale::GetInfo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-19 15:08:49 +00:00
Francesco Montorsi
3c99e2fd1b recategorize many misplaced classes; move lots of classes from miscellaneous [window] category to more specific categories; add the 'Book controls' and the 'Application and system configuration' class groups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 11:34:52 +00:00
Francesco Montorsi
9a6fda2288 do not use preprocessor macros in interface headers; doxygen doesn't know about preprocessor symbols used in the real headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 15:09:48 +00:00
Francesco Montorsi
51c0d02b65 document the wxWindow::Get/SetLayoutDirection functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 14:42:40 +00:00
Francesco Montorsi
382f12e419 many automated ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 22:42:09 +00:00
Francesco Montorsi
57bf907d8e fix the definition of many static functions marked as 'const' or functions which had incoherent default values for their arguments or duplicated functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 22:10:54 +00:00
Francesco Montorsi
336aecf1c2 miscellaneous small enhancements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 18:59:37 +00:00
Bryan Petty
b21126db7a Replaced @ingroup with @addtogroup for all global func/macros for use with Doxygen 1.5.7+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-05 20:48:06 +00:00
Francesco Montorsi
f045c7f52d done various @todo items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-29 14:14:39 +00:00
Francesco Montorsi
d5c8403a37 force doxygen autolink wrt wxLanguage enum
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-14 16:11:22 +00:00
Francesco Montorsi
e2c4ccaf8a fix doxygen warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 16:10:08 +00:00
Francesco Montorsi
a0a4c5aa14 split AddCatalog docs for the two overloads
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 15:40:54 +00:00
Francesco Montorsi
43c48e1e53 automated ifacecheck fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-28 15:36:26 +00:00
Francesco Montorsi
fadc2df682 automated ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-27 21:26:54 +00:00
Francesco Montorsi
7323ff1aee other ifacecheck fixes, resulting in removal of the non-existing functions wxDatagramSocket::ReceiveFrom() and wxCloseEvent::SetForce()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-27 17:12:27 +00:00
Francesco Montorsi
89bb3f0244 interface revisions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-17 20:55:12 +00:00
Francesco Montorsi
969daeea66 revision of wxLocale; documented the list of language constants into the wxLanguage enum; modified genlang.py to generate a .h with doxygen comments and removed generation of a .tex script; moved docs for wxXlocale to the right header (xlocale.h)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-17 20:27:36 +00:00
Francesco Montorsi
adaaa68635 HUGE commit of ifacecheck-automated fixes to virtualness/constness/staticness of wxWidgets documented functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-27 11:21:10 +00:00
Bryan Petty
12f5e1e78f Commit 3 of 3 for Doxygen path fixes, this one finally removes all 600+ unnecessary uses of @wxheader and @headerfile.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 18:00:03 +00:00
Bryan Petty
ae3c17b401 Moved all interface headers into a 'wx' subdirectory for proper use of Doxygen path settings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 16:22:58 +00:00