mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Move definition of _ and related into Internat.h
This commit is contained in:
parent
e37d701bc0
commit
c6696f1b49
@ -213,52 +213,6 @@ void QuitAudacity();
|
||||
#define JUST_BELOW_MAX_AUDIO (1.f - 1.f/(1<<14))
|
||||
|
||||
|
||||
#ifndef IN_RC
|
||||
//#include <wx/defs.h>
|
||||
//#include <wx/string.h>
|
||||
class wxString;
|
||||
|
||||
extern const wxString& GetCustomTranslation(const wxString& str1 );
|
||||
extern const wxString& GetCustomSubstitution(const wxString& str1 );
|
||||
|
||||
// Marks strings for extraction only...must use wxGetTranslation() to translate.
|
||||
#define XO(s) wxT(s)
|
||||
// Marks string for substitution only.
|
||||
#define _TS( s ) GetCustomSubstitution( s )
|
||||
|
||||
|
||||
//#define WXINTL_NO_GETTEXT_MACRO
|
||||
|
||||
#ifdef wxPLURAL
|
||||
#undef wxPLURAL
|
||||
#endif
|
||||
|
||||
// The two string arugments will go to the .pot file, as
|
||||
// msgid sing
|
||||
// msgid_plural plural
|
||||
//
|
||||
// (You must use plain string literals. Do not use _() or wxT() or L prefix,
|
||||
// which (inentionally) will fail to compile. The macro inserts wxT).
|
||||
//
|
||||
// Note too: it seems an i18n-hint comment is not extracted if it precedes
|
||||
// wxPLURAL directly. A workaround: after the comment, insert a line
|
||||
// _("dummyStringXXXX");
|
||||
// where for XXXX subsitute something making this dummy string unique in the
|
||||
// program. Then check in your generated audacity.pot that the dummy is
|
||||
// immediately before the singular/plural entry.
|
||||
//
|
||||
// Your i18n-comment should therefore say something like,
|
||||
// "In the string after this one, ..."
|
||||
#define wxPLURAL(sing, plur, n) wxGetTranslation( wxT(sing), wxT(plur), n)
|
||||
|
||||
|
||||
#ifdef _
|
||||
#undef _
|
||||
#endif
|
||||
|
||||
#define _(s) GetCustomTranslation((s))
|
||||
#endif
|
||||
|
||||
// This renames a good use of this C++ keyword that we don't need to review when hunting for leaks.
|
||||
#define PROHIBITED = delete
|
||||
|
||||
|
@ -80,7 +80,6 @@ It handles initialization and termination by subclassing wxApp.
|
||||
#include "Screenshot.h"
|
||||
#include "Sequence.h"
|
||||
#include "WaveTrack.h"
|
||||
#include "Internat.h"
|
||||
#include "prefs/PrefsDialog.h"
|
||||
#include "Theme.h"
|
||||
#include "PlatformCompatibility.h"
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "MemoryX.h"
|
||||
#include <wx/app.h>
|
||||
|
||||
#include "Internat.h"
|
||||
|
||||
class wxString;
|
||||
|
||||
class AudacityException /* not final */
|
||||
|
@ -28,6 +28,7 @@ Provides thread-safe logging based on the wxWidgets log facility.
|
||||
#include "../images/AudacityLogoAlpha.xpm"
|
||||
#include "Experimental.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "Internat.h"
|
||||
|
||||
//
|
||||
// AudacityLogger class
|
||||
|
@ -40,6 +40,8 @@
|
||||
*/
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "Internat.h"
|
||||
|
||||
#include "FFT.h"
|
||||
#include "MemoryX.h"
|
||||
#include "SampleFormat.h"
|
||||
|
@ -18,6 +18,8 @@ Describes shared object that is used to access FFmpeg libraries.
|
||||
|
||||
#include "MemoryX.h"
|
||||
|
||||
#include "Internat.h"
|
||||
|
||||
// TODO: Determine whether the libav* headers come from the FFmpeg or libav
|
||||
// project and set IS_FFMPEG_PROJECT depending on it.
|
||||
#define IS_FFMPEG_PROJECT 1
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "FileException.h"
|
||||
#include "Internat.h"
|
||||
#include "Prefs.h"
|
||||
|
||||
FileException::~FileException()
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "FileNames.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "AllThemeResources.h"
|
||||
#include "Internat.h"
|
||||
|
||||
|
||||
wxString HtmlColourOfIndex( int i ){
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "InconsistencyException.h"
|
||||
#include "Internat.h"
|
||||
|
||||
InconsistencyException::~InconsistencyException()
|
||||
{
|
||||
|
@ -27,10 +27,10 @@ and on Mac OS X for the filesystem.
|
||||
#include <locale.h>
|
||||
#include <math.h> // for pow()
|
||||
|
||||
#include "Internat.h"
|
||||
#include "Experimental.h"
|
||||
#include "FileNames.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "Internat.h"
|
||||
|
||||
// in order for the static member variables to exist, they must appear here
|
||||
// (_outside_) the class definition, in order to be allocated some storage.
|
||||
|
@ -16,6 +16,41 @@
|
||||
#include <wx/string.h>
|
||||
#include <wx/longlong.h>
|
||||
|
||||
#ifndef IN_RC
|
||||
|
||||
class wxString;
|
||||
|
||||
extern const wxString& GetCustomTranslation(const wxString& str1 );
|
||||
extern const wxString& GetCustomSubstitution(const wxString& str1 );
|
||||
|
||||
// Marks string for substitution only.
|
||||
#define _TS( s ) GetCustomSubstitution( s )
|
||||
|
||||
// Marks strings for extraction only...must use wxGetTranslation() to translate.
|
||||
#define XO(s) wxT(s)
|
||||
|
||||
#define _(s) GetCustomTranslation((s))
|
||||
|
||||
// The two string arugments will go to the .pot file, as
|
||||
// msgid sing
|
||||
// msgid_plural plural
|
||||
//
|
||||
// (You must use plain string literals. Do not use _() or wxT() or L prefix,
|
||||
// which (intentionally) will fail to compile. The macro inserts wxT).
|
||||
//
|
||||
// Note too: it seems an i18n-hint comment is not extracted if it precedes
|
||||
// wxPLURAL directly. A workaround: after the comment, insert a line
|
||||
// _("dummyStringXXXX");
|
||||
// where for XXXX subsitute something making this dummy string unique in the
|
||||
// program. Then check in your generated audacity.pot that the dummy is
|
||||
// immediately before the singular/plural entry.
|
||||
//
|
||||
// Your i18n-comment should therefore say something like,
|
||||
// "In the string after this one, ..."
|
||||
#define wxPLURAL(sing, plur, n) wxGetTranslation( wxT(sing), wxT(plur), n)
|
||||
|
||||
#endif
|
||||
|
||||
class Internat
|
||||
{
|
||||
public:
|
||||
|
@ -29,6 +29,7 @@ of languages for Audacity.
|
||||
#include "ShuttleGui.h"
|
||||
#include "widgets/wxPanelWrapper.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "Internat.h"
|
||||
|
||||
class LangChoiceDialog final : public wxDialogWrapper {
|
||||
public:
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "PitchName.h"
|
||||
#include "Internat.h"
|
||||
|
||||
|
||||
double FreqToMIDInote(const double freq)
|
||||
|
@ -66,6 +66,7 @@
|
||||
|
||||
#include "Prefs.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "Internat.h"
|
||||
|
||||
std::unique_ptr<wxFileConfig> ugPrefs {};
|
||||
wxFileConfig *gPrefs = NULL;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "Experimental.h"
|
||||
|
||||
#include "TrackPanelDrawingContext.h"
|
||||
#include "Internat.h"
|
||||
|
||||
// Globals, so that we remember settings from session to session
|
||||
wxPrintData &gPrintData()
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "Resample.h"
|
||||
#include "Prefs.h"
|
||||
#include "TranslatableStringArray.h"
|
||||
#include "Internat.h"
|
||||
|
||||
#include <soxr.h>
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "SampleFormat.h"
|
||||
#include "Prefs.h"
|
||||
#include "Dither.h"
|
||||
#include "Internat.h"
|
||||
|
||||
static Dither::DitherType gLowQualityDither = Dither::none;
|
||||
static Dither::DitherType gHighQualityDither = Dither::none;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "ShuttlePrefs.h"
|
||||
#include "Prefs.h"
|
||||
#include "prefs/GUISettings.h"
|
||||
#include "Internat.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(SoundActivatedRecord, wxDialogWrapper)
|
||||
EVT_BUTTON(wxID_OK, SoundActivatedRecord::OnOK)
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <wx/string.h>
|
||||
|
||||
#include "widgets/wxPanelWrapper.h"
|
||||
#include "Internat.h"
|
||||
|
||||
class NumericTextCtrl;
|
||||
class ShuttleGui;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include "Track.h"
|
||||
#include "Internat.h"
|
||||
|
||||
TrackPanelAx::TrackPanelAx( wxWindow *window )
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
|
@ -32,6 +32,7 @@ or "OFF" point
|
||||
|
||||
#include "WaveTrack.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "Internat.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "NotYetAvailableException.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
NotYetAvailableException::~NotYetAvailableException()
|
||||
{
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "../../widgets/wxPanelWrapper.h"
|
||||
|
||||
#include "AudioUnitEffect.h"
|
||||
#include "../../Internat.h"
|
||||
|
||||
struct CFReleaser
|
||||
{ void operator () (const void *p) const { if (p) CFRelease(p); } };
|
||||
|
@ -84,7 +84,6 @@
|
||||
#include "../WaveTrack.h"
|
||||
#include "ImportPlugin.h"
|
||||
#include "Import.h"
|
||||
#include "../Internat.h"
|
||||
#include "../NoteTrack.h"
|
||||
#include "../Project.h"
|
||||
#include "../FileFormats.h"
|
||||
|
@ -56,9 +56,8 @@ but little else.
|
||||
#define __AUDACITY_IMPORTER__
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include <wx/arrstr.h>
|
||||
#include "../Internat.h"
|
||||
#include <wx/filename.h>
|
||||
#include <wx/string.h>
|
||||
#include "../MemoryX.h"
|
||||
|
||||
#include "../widgets/ProgressDialog.h"
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "EffectsPrefs.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
EffectsPrefs::EffectsPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Effects"))
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "ThemePrefs.h"
|
||||
#include "../AColor.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
GUIPrefs::GUIPrefs(wxWindow * parent)
|
||||
/* i18n-hint: refers to Audacity's user interface settings */
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "ImportExportPrefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
ImportExportPrefs::ImportExportPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Import / Export"))
|
||||
|
@ -24,6 +24,7 @@ with names like mnod-script-pipe that add NEW features.
|
||||
|
||||
#include "ModulePrefs.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "../Experimental.h"
|
||||
#include "MousePrefs.h"
|
||||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/intl.h>
|
||||
@ -41,7 +42,7 @@
|
||||
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "MousePrefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
// The numbers of the columns of the mList.
|
||||
enum
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
PlaybackPrefs::PlaybackPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Playback"))
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <wx/treebook.h>
|
||||
#include <wx/window.h>
|
||||
#include "../widgets/wxPanelWrapper.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
class PrefsPanel;
|
||||
class PrefsPanelFactory;
|
||||
|
@ -25,6 +25,7 @@ handling.
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "ProjectsPrefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "../Resample.h"
|
||||
#include "../SampleFormat.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
#define ID_SAMPLE_RATE_CHOICE 7001
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
using std::min;
|
||||
|
||||
|
@ -28,6 +28,7 @@ Paul Licameli
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
SpectrogramSettings::Globals::Globals()
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
TracksBehaviorsPrefs::TracksBehaviorsPrefs(wxWindow * parent)
|
||||
/* i18n-hint: two nouns */
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "../WaveTrack.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
int TracksPrefs::iPreferencePinned = -1;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "WarningsPrefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -23,6 +23,8 @@ Paul Licameli
|
||||
|
||||
#include "../Prefs.h"
|
||||
#include "../TranslatableStringArray.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
|
||||
WaveformSettings::Globals::Globals()
|
||||
{
|
||||
|
@ -57,6 +57,7 @@ with changes in the SpectralSelectionBar.
|
||||
#include "../widgets/NumericTextCtrl.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
|
||||
|
@ -21,6 +21,7 @@ Paul Licameli split from TrackPanel.cpp
|
||||
#include <wx/fontenum.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include "../../../Internat.h"
|
||||
|
||||
LabelTrackControls::~LabelTrackControls()
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <wx/menu.h>
|
||||
|
||||
#include "FileHistory.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
FileHistory::FileHistory(size_t maxfiles, wxWindowID base)
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ around to NEW positions.
|
||||
|
||||
#include "../AColor.h"
|
||||
#include "../AllThemeResources.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Methods for Grabber
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "Grid.h"
|
||||
#include "NumericTextCtrl.h"
|
||||
#include "../SelectedRegion.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
NumericEditor::NumericEditor
|
||||
(NumericConverter::Type type, const wxString &format, double rate)
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <wx/arrimpl.cpp>
|
||||
#include <wx/dc.h>
|
||||
#include "../Internat.h"
|
||||
|
||||
// Various drawing constants
|
||||
#define KV_BITMAP_SIZE 16
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "ProgressDialog.h"
|
||||
#include "ErrorDialog.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
// This really should be a Preferences setting
|
||||
static const unsigned char beep[] =
|
||||
|
@ -30,6 +30,7 @@ the ability to not see similar warnings again for this session.
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
#include "wxPanelWrapper.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
class WarningDialog final : public wxDialogWrapper
|
||||
{
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "numformatter.h"
|
||||
#include "../Internat.h"
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <locale.h> // for setlocale and LC_ALL
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <wx/dataobj.h>
|
||||
|
||||
#include "numformatter.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
// ============================================================================
|
||||
// NumValidatorBase implementation
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include <wx/panel.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
#include "../Internat.h"
|
||||
|
||||
void wxTabTraversalWrapperCharHook(wxKeyEvent &event);
|
||||
|
||||
template <typename Base>
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "../Internat.h"
|
||||
#include "XMLFileReader.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
XMLFileReader::XMLFileReader()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user