Commit Graph

50 Commits

Author SHA1 Message Date
James Crook
93c5525a36 Bug 1441 - Mac: Imported file names containing '/' change the '/' to ':'
This addresses only one part of the behaviour, and now disallows \ and / in export multiple on all platforms.
2020-08-21 15:06:23 +01:00
Paul Licameli
7c246ddc26 Need only wxWidgets 3.1.1 for translation context strings 2020-05-24 14:55:08 -04:00
Paul Licameli
db690d94f7 Remove 27 various macro _ ...
... and supply a few missing translations in Dependencies.cpp

And substitute-don't-concatenate in a few places in Internat.cpp
2020-05-23 08:07:24 -04:00
Paul Licameli
24f27da9b7 Use i18n context if wxWidgets version 3.1.3 or later 2020-05-22 12:48:49 -04:00
Paul Licameli
127eb56d4e EnumValueSymbols for scale names 2020-02-03 15:34:48 -05:00
Paul Licameli
75996a851c ShuttleGui::AddChoice and TieChoice take TranslatableStrings 2019-12-23 15:35:47 -05:00
Paul Licameli
e3ea93a624 Define and use function Verbatim...
... in cases of "TranslatableString" that are not really translated.

This makes it easier to scan the code for such unusual constructions of
TranslatableString, distinct from mere mentions of the TranslatableString type.
2019-12-19 22:49:23 -05:00
Paul Licameli
681950fc61 TranslatableString for names, labels, tooltips of wxPanelWrapper...
... and Grabber too
2019-12-16 10:58:05 -05:00
Paul Licameli
f16709945b Define TranslatableString::Strip() 2019-12-16 10:58:05 -05:00
Paul Licameli
8aa6b47b17 Try again to fix TranslatableString for Windows compiler...
... The fix at a3d8518 was not sufficient.

I think the Windows compiler has a bug, and gets confused by a name that has
static and non-static overloads.  So use distinct names instead.
2019-12-14 14:20:50 -05:00
Paul Licameli
a3d8518f5d Fix misbehavior of TranslatableString::Format in Windows build...
... Make sure it doesn't try to capture this (quite unnecessarily!) but calls
the static overload of DoFormat.

Make other qualified calls too for added measure.
2019-12-14 12:27:27 -05:00
Paul Licameli
8655e2e3b9 r & lvalue ref-qualified overloads of TranslatableString functions...
... and moves of TranslatableString arguments where possible
2019-12-13 12:36:20 -05:00
Paul Licameli
2e3ba2204f Rewrites of TranslatableString and reimplementation of wxPLURAL...
... including move-construction of the base string, debug string formatting,
and contexts (not fully implemented)
2019-12-11 14:55:29 -05:00
Paul Licameli
94fc1bb2a8 TranslatableString has + and +=, and translation of Format arguments 2019-12-06 11:50:56 -05:00
Paul Licameli
1545d292d0 Fix Linux build 2019-12-05 14:08:35 -05:00
Paul Licameli
4b43962415 Fix Linux build 2019-12-05 13:14:42 -05:00
Paul Licameli
15260c2c95 TranslatableString can store a context and format arguments...
... Format arguments are substituted into the translation of the msgid, which
may not be known at the time the format arguments are captured (because locale
may change).  This allows TranslatableString with arguments to be constructed
at static initialization time.

There is also a special "verbatim" or null context which makes no translations
of msgids.

There is not yet any use of other contexts besides default or null.
2019-12-05 11:34:06 -05:00
Paul Licameli
911f5eabcc Define TranslatableString...
... Perhaps it should be in Internat.h (which is at the lowest level of the
dependency graph), but later ComponentInterface.h will need to include it, and
I don't want includes/ to depend on src/.

Though there is still a linkage dependency on src if
TranslatableString::Translation() is used.
2019-12-01 18:05:20 -05:00
Paul Licameli
273ba9f64d Fix Windows build...
... unfortunately inclusion of ErrorDialog.h in FileNames.h ties nine files
into a low-level s.c.c.
2019-05-20 13:49:26 -04:00
Paul Licameli
25db4652b0 Internat.cpp has fewer dependencies...
... after we move a function to FileNames.cpp.

This frees ten files from cyclic dependencies
2019-05-18 20:29:25 -04:00
Paul Licameli
3eeb91f23a Define class Identifier and template TaggedIdentifier...
... Identifier holds strings used for internal purposes and not shown to users;
TaggedIdentifier generates subclasses of Identifier for different purposes,
which won't implicitly (that is, inadvertently) interconvert as function
arguments.
2019-05-16 12:30:28 -04:00
Paul Licameli
5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli
dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Paul Licameli
c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli
52642e49a5 Define and use utilities transform_range, transform_container 2019-03-10 14:43:47 -04:00
James Crook
466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +00:00
Paul Licameli
8935fa106f Replace deprecated std::mem_fun and mem_fun_ref with mem_fn...
... which is easier to type and works whether you pass object pointers or
references to its operator ().
2018-07-28 10:59:08 -04:00
James Crook
0885fda459 Fix mod-nyq-bench compilation under Windows. 2018-04-05 19:41:10 +01:00
Paul Licameli
2065eebff6 IdentInterfaceSymbol to distinguish internal vs visible enum settings 2018-03-27 07:51:44 -04:00
Paul Licameli
c6696f1b49 Move definition of _ and related into Internat.h 2018-01-06 21:03:32 -05:00
Paul Licameli
84a600bab1 Fix windows build 2018-01-02 01:05:09 -05:00
Paul Licameli
ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
Paul Licameli
731a2ac40c Fix format of tooltip text for toolbar buttons in RTL languages...
... No translatable strings were added, two were removed
2017-09-11 22:08:06 -04:00
James Crook
aee0c4cbc6 Fix for broken build (::None)
None clashed with something else under linux, probably a macro expansion.
2017-08-03 17:25:12 +01:00
Paul Licameli
5d48e96942 Where FileSelector was used, default to Documents not cwd; save prefs 2017-08-03 08:02:33 -04:00
James Crook
028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Paul Licameli
02ce3c312b Bug119: Export Multiple /, *, ? handled incorrectly 2016-06-20 22:32:23 -04:00
Paul Licameli
de8d0e9918 Define Internat::Parenthesize, for good of right-to-left languages 2016-06-11 18:23:36 -04:00
Paul Licameli
f00144e9a5 Sweep for filename copying: various 2016-04-10 22:26:28 -04:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
lllucius@gmail.com
9317bbb3f7 Applying patch from bug #766
This patch fixes the corrupted device names as 
documented by the bug report.
2014-12-06 05:05:21 +00:00
lllucius
bdcefb4850 Preliminary changes for wxWidgets 3.0.1
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX.  You can get Windows to build, but there's
still some display issues.

These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
2014-10-06 08:10:50 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
james.k.crook@gmail.com
69476e785c Fixed more internationalisation hints. 2012-03-20 15:36:02 +00:00
v.audacity
722d0d67e3 In the case where Internat::ToDisplayString gets no specified precision, do not strip all trailing zeros. Leave the decimal separator and one zero. This makes edit-texts associated with sliders consistently show at least one decimal point of precision as the slider moves. It also fixes a bug in Nyquist dynamic typing of the result from a real/float slider, where if the value string had no decimal point it got typed as a FIXNUM instead of FLONUM. 2010-08-28 23:41:30 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00