12#ifndef __AUDACITY_INTERNAT__
13#define __AUDACITY_INTERNAT__
16#include <wx/longlong.h>
27#define _TS( s ) GetCustomSubstitution( s )
31#define XO(s) (TranslatableString{ wxT(s), {} })
37#define XC(s, c) (TranslatableString{ wxT(s), {} }.Context(c))
47#define XXC(s, c) XC(s, c)
62 #define _(s) ((wxTranslations::Get() || (DebugBreak(), true)), \
63 GetCustomTranslation((s)))
69 #define _(s) ((wxTranslations::Get() || raise(SIGTRAP)), \
70 GetCustomTranslation((s)))
75 #define _(s) GetCustomTranslation((s))
96#define XP(sing, plur, n) \
97 TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )
100#define XPC(sing, plur, n, c) \
101 TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )
114 static wxChar GetDecimalSeparator();
115 static void SetCeeNumberFormat();
122 static bool CompatibleToDouble(
const wxString& stringToConvert,
double* result);
125 static double CompatibleToDouble(
const wxString& stringToConvert);
129 static wxString
ToString(
double numberToConvert,
130 int digitsAfterDecimalPoint = -1);
134 static wxString ToDisplayString(
double numberToConvert,
135 int digitsAfterDecimalPoint = -1);
147 static bool SanitiseFilename(wxString &
name,
const wxString &sub);
159#define UTF8CTOWX(X) wxString((X), wxConvUTF8)
160#define LAT1CTOWX(X) wxString((X), wxConvISO8859_1)
165#define HAS_I18N_CONTEXTS wxCHECK_VERSION(3, 1, 1)
const TranslatableString name
STRINGS_API const wxString & GetCustomTranslation(const wxString &str1)
STRINGS_API const wxString & GetCustomSubstitution(const wxString &str1)
Internationalisation support.
static wxChar mDecimalSeparator
static const wxArrayString & GetExcludedCharacters()
static wxArrayString exclude
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
std::string ToString(const wxString &str)