1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-30 15:39:27 +02:00

52 Commits

Author SHA1 Message Date
Paul Licameli
d2bdd60e91 Internat doesn't depend on wxCore, ComponentInterface, MemoryX 2021-05-27 09:51:32 -04:00
Paul Licameli
406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli
e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
James Crook
1f1f1d43f6 Add C number format option (disabled)
The option to force decimal point in numbers and not
use comma is an experiment to work around bug 2709

It's disabled, because wxWidgets checks for a mismatch
between locale and number format, and disallows it.  To get
it working correctly might require patching wxWidgets.

This change does get the option string into our source code
so that translators can translate it.
2021-03-30 15:46:27 +01:00
Leland Lucius
8f1e52c1c2 Fix Windows build when not using precompiled headers
Should we turn of precompiled headers in our Release builds???
2020-07-25 15:34:33 -05:00
Paul Licameli
7325e6839e New macro XXC is like XXO but with a context (and really same as XC) 2020-05-28 16:06:53 -04:00
Paul Licameli
4e2f9671ff Macros for translatable strings that need disambiguating context 2020-05-24 14:55:08 -04: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
James Crook
6a50a6fad5 Explanation of XXO() macro's purpose. 2020-05-22 18:50:45 +01:00
Paul Licameli
4d09705a73 Change XO to XXO in many more places, with no effects at all...
... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.

This commit makes ONLY such changes, and comments in Internat.h.  It is big
but quite harmless.

The intention is to introduce a type distinction in a later release, by defining
XXO differently.  XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
2020-05-22 13:07:50 -04:00
Paul Licameli
d8a096ba03 Correct placement of i18n-hint comments for plurals, no dummies needed 2020-05-22 12:48:49 -04:00
Paul Licameli
f8a070dde7 Rename macro wxPLURAL as XP (brief, and eliminates mention of "wx") 2020-05-22 12:48:49 -04:00
Leland Lucius
1ca911ed38 Convert all __WXDEBUG__ tests to use new _DEBUG symbol
This symbol is based on the NDEBUG symbol that's automatically
defined by CMake.
2020-04-25 02:36:27 -05:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Carlo Bramini
63580910a2
Internat: use _WIN32 instead of _MSC_VER for DebugBreak() (#475)
* Internat: use _WIN32 instead of _MSC_VER for DebugBreak()

For compiling with MinGW, it is required that it uses the same code of Visual Studio when __WXDEBUG__ is defined.

* Internat: replace previous _WIN32 with WXMSW
2020-04-02 11:44:30 -05: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
54e2bbd8ff Remove TranslatedInternalString, use ComponentInterfaceSymbol 2019-12-16 10:58:05 -05:00
Paul Licameli
70ec69fa3d Pass untranslated command labels to CommandManager...
... and deduce whether to exclude from macros inside NewIdentifier, simplifying
argument lists further

Also fix the localization of "..." added to names by PluginMenus.cpp
2019-12-12 15:15:59 -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
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
e4a7c9ba5b Uses of TranslatableString as value of XO macro...
... It is not implicitly convertible from wxString, compelling many uses of
the new type to fix compilation.
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
8117ca8823 Remove an unnecessary #include directive 2019-05-16 11:44:42 -04:00
Paul Licameli
1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -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
5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -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
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
27aa59ed50 AddItemList takes IdentInterfaceSymbol (untranslated) ...
... so that we can use a static constant table of names, which can't use
macro _ in initializers.
2018-10-20 09:21:22 -04:00
James Crook
ae36eea26c Bug 1855 - Accelerators not removed from names in translation 2018-04-22 19:46:09 +01:00
James Crook
0885fda459 Fix mod-nyq-bench compilation under Windows. 2018-04-05 19:41:10 +01:00
James Crook
877f07834f Fix redefinition warning in Internat.h 2018-03-30 20:46:18 +01:00
Paul Licameli
2065eebff6 IdentInterfaceSymbol to distinguish internal vs visible enum settings 2018-03-27 07:51:44 -04:00
Paul Licameli
6c8ba8b5bb Define TranslatedInternalString 2018-03-15 19:49:38 -04:00
Steve Daulton
9298ac575d Fix Linux build 2018-03-08 03:46:55 +00:00
Paul Licameli
bc773e02d3 Supply some missing translation in Macros dialogs...
... The "Set" prompt for checkboxes;

Strings in Choice controls, which had been declared translatable with XO, but
the translations not yet used.

This can be tested in Ukrainian locale now, for editing parameters of
commands like Select or Drag, but be aware that even uk.po is not up to date
for all recent changes in the Manage Macros dialog itself.
2018-03-07 15:06:55 -05:00
Paul Licameli
01718da4a2 Make a dynamic check of misuse of _ that works in Windows too...
see commit f57fdc99d7a1cd0cf4aa5818382b6b0ffcd2fa83
2018-01-14 14:23:58 -05:00
James Crook
f57fdc99d7 Fix MSVC Build
SIGTRAP is not defined for MSVC.
2018-01-07 17:14:31 +00:00
Paul Licameli
70167a80fe Make _ force crash in debug build, if used in static initializer 2018-01-06 21:07:29 -05:00
Paul Licameli
c6696f1b49 Move definition of _ and related into Internat.h 2018-01-06 21:03:32 -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
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
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00