Audacity  3.0.3
Classes | Macros | Functions
Internat.h File Reference
#include <wx/longlong.h>
#include "audacity/Types.h"
Include dependency graph for Internat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Internat
 Internationalisation support. More...
 

Macros

#define _TS(s)   GetCustomSubstitution( s )
 
#define XO(s)   (TranslatableString{ wxT(s), {} })
 
#define XC(s, c)   (TranslatableString{ wxT(s), {} }.Context(c))
 
#define XXO(s)   XO(s)
 
#define XXC(s, c)   XC(s, c)
 
#define _(s)   GetCustomTranslation((s))
 
#define XP(sing, plur, n)    TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )
 
#define XPC(sing, plur, n, c)    TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )
 
#define UTF8CTOWX(X)   wxString((X), wxConvUTF8)
 
#define LAT1CTOWX(X)   wxString((X), wxConvISO8859_1)
 
#define HAS_I18N_CONTEXTS   wxCHECK_VERSION(3, 1, 1)
 

Functions

AUDACITY_DLL_API const wxString & GetCustomTranslation (const wxString &str1)
 
AUDACITY_DLL_API const wxString & GetCustomSubstitution (const wxString &str1)
 
AUDACITY_DLL_API TranslatableStrings Msgids (const EnumValueSymbol strings[], size_t nStrings)
 
AUDACITY_DLL_API TranslatableStrings Msgids (const std::vector< EnumValueSymbol > &strings)
 

Macro Definition Documentation

◆ _

#define _ (   s)    GetCustomTranslation((s))

Definition at line 76 of file Internat.h.

◆ _TS

#define _TS (   s)    GetCustomSubstitution( s )

Definition at line 28 of file Internat.h.

◆ HAS_I18N_CONTEXTS

#define HAS_I18N_CONTEXTS   wxCHECK_VERSION(3, 1, 1)

Definition at line 171 of file Internat.h.

◆ LAT1CTOWX

#define LAT1CTOWX (   X)    wxString((X), wxConvISO8859_1)

Definition at line 161 of file Internat.h.

◆ UTF8CTOWX

#define UTF8CTOWX (   X)    wxString((X), wxConvUTF8)

Definition at line 160 of file Internat.h.

◆ XC

#define XC (   s,
 
)    (TranslatableString{ wxT(s), {} }.Context(c))

Definition at line 38 of file Internat.h.

◆ XO

#define XO (   s)    (TranslatableString{ wxT(s), {} })

Definition at line 32 of file Internat.h.

◆ XP

#define XP (   sing,
  plur,
 
)     TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )

Definition at line 97 of file Internat.h.

◆ XPC

#define XPC (   sing,
  plur,
  n,
 
)     TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )

Definition at line 101 of file Internat.h.

◆ XXC

#define XXC (   s,
 
)    XC(s, c)

Definition at line 48 of file Internat.h.

◆ XXO

#define XXO (   s)    XO(s)

Definition at line 45 of file Internat.h.

Function Documentation

◆ GetCustomSubstitution()

AUDACITY_DLL_API const wxString& GetCustomSubstitution ( const wxString &  str1)

Definition at line 68 of file Internat.cpp.

69 {
70  return str1 ;
71 }

Referenced by GetCustomTranslation().

Here is the caller graph for this function:

◆ GetCustomTranslation()

AUDACITY_DLL_API const wxString& GetCustomTranslation ( const wxString &  str1)

Definition at line 76 of file Internat.cpp.

77 {
78  const wxString& str2 = wxGetTranslation( str1 );
79  return GetCustomSubstitution( str2 );
80 }

◆ Msgids() [1/2]

AUDACITY_DLL_API TranslatableStrings Msgids ( const EnumValueSymbol  strings[],
size_t  nStrings 
)

◆ Msgids() [2/2]

AUDACITY_DLL_API TranslatableStrings Msgids ( const std::vector< EnumValueSymbol > &  strings)

Definition at line 276 of file Internat.cpp.

277 {
278  return Msgids( strings.data(), strings.size() );
279 }

References Msgids().

Here is the call graph for this function:
ComponentInterfaceSymbol::Msgid
const TranslatableString & Msgid() const
Definition: ComponentInterface.h:89
GetCustomSubstitution
AUDACITY_DLL_API const wxString & GetCustomSubstitution(const wxString &str1)
Definition: Internat.cpp:68
Msgids
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Definition: Internat.cpp:267