Commit Graph

55 Commits

Author SHA1 Message Date
Paul Licameli 70c4898648 Move class wxArrayStringEx to its own files 2021-05-27 09:51:32 -04:00
Paul Licameli f7d9602a42 TranslatableString.h does not include Identifier.h 2021-05-27 09:51:32 -04:00
Paul Licameli 7e697d1d8f Replace many inclusions of Types.h with Identifier.h 2021-05-27 09:51:32 -04:00
Paul Licameli 564235f9c9 GUIPrefs::SetLang wraps new Languages::SetLang ...
... the former uses Prefs, wxApp, and AudacityMessageBox, the latter has no
dependency on them.

Also move some other functions from GUIPrefs into namespace Languages.
2021-05-27 09:51:32 -04:00
Paul Licameli ad5f895f65 namespace for Languages, which does not depend on FileNames...
(some small code duplication of code for path lists results)
2021-05-27 09:51:32 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli 8fdb18427e Less-incomplete Marathi support ...
... supplying some missing pieces of commit
a76b7ec295

See commit a37162ffca for the complete example of
Corsican.

Still missing are appropriate strings in Marathi for src/audacity.desktop.in and
win/Inno_Setup_Wizard/audacity.iss

Blank line change of locale/CMakeLists.txt to force reconfigure
2021-02-13 13:10:22 -05:00
Patriccollu a37162ffca Add Corsican language (co.po etc) 2021-02-04 17:14:02 +00: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 72df562c4a Conversion of TranslatableString to wxString is private 2019-12-01 18:17:57 -05:00
Paul Licameli b351eabf47 ComponentInterfaceSymbol contains TranslatableString 2019-12-01 18:08:56 -05:00
Paul Licameli 8640a83b25 "System" in language choice in Interface prefs was blank, fixed that 2019-12-01 18:04:51 -05:00
Paul Licameli e96c213f4b Fix missing Spanish language choice on Linux...
... Don't modify a hash table (with operator []) while iterating it!
2019-10-24 15:31:24 -04:00
Paul Licameli a1ff74b5bb Move AudacityPathList & utilities from AudacityApp.h to FileNames.h 2019-05-17 16:29:03 -04:00
Paul Licameli 961882838f Move definition of std::hash< wxString > 2019-05-16 12:30:26 -04:00
Paul Licameli 3a7324984c wx/hashmap.h no longer used anywhere 2019-03-30 10:06:52 -04:00
Paul Licameli a0d9e31c42 Consistently use <> not "" in inclusions of wx headers 2019-03-23 10:27:25 -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 a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli 50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -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 7a0475e39f Remove most uses of AUDACITY_OLD_STD 2018-05-10 00:56:36 -04:00
Paul Licameli cb403954fa Use std::[tr1::]unordered_(set|map), not the wxWidgets container macros 2018-01-08 18:22:51 -05:00
Paul Licameli fa7f1a455b Correct self-names for the two Chinese locales 2018-01-03 19:33:04 -05:00
Paul Licameli 815a80846d String literals for UTF-8 language names using octal escapes only...
... Leaving absolutely no doubt about the portability.

New Perl script in locale emits the required C++ source when LanguageNames.txt
is updated.
2018-01-03 18:01:47 -05:00
Paul Licameli 889284555b Language name table is static and const 2018-01-03 15:33:52 -05:00
Paul Licameli a1530c36a8 Rewrite "Interface preferences displays self-names of languages" ...
See original attempt at commit 7ec5fd79df

This eliminates the need for a resource file at run-time.

locale/LanguageNames.txt is intended as a "source file" that is infrequently
changed as the set of supported languages changes.

The intermediate step, of appropriately copying that file into the C++ source
code in src/Languages.cpp, was done by hand.

In XCode, I set locale/LanguagesNames.txt and src/Languages.cpp to be
interpreted as Western encoding, and then the copy-paste was easy in the
editor.

The resulting C++ source code file now has string literals that are not 7-bit
ASCII.
2018-01-02 17:08:06 -05:00
Paul Licameli 1b19ab4f02 Revert "Use unicode file format with BOM for Languages.cpp"
This reverts commit 3dc241ed54.
2018-01-02 17:07:25 -05:00
James Crook 3dc241ed54 Use unicode file format with BOM for Languages.cpp
This allows us to directly include language name strings in unicode in the file.
The L in the strings ensures wchar_t use.

I've confirmed that this gives the same results visually on Windows,
and that we do get unicode on Linux.
2018-01-02 20:56:03 +00:00
Paul Licameli 7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli 7ec5fd79df Interface preferences displays self-names of languages 2017-12-31 21:58:36 -05:00
Paul Licameli b1d9be00e4 Added eu_ES (Basque (Spain)) to supported languages 2017-09-22 00:22:42 -04:00
Paul Licameli f70788709c Bug1227: Make Audacity detect System language on Mac correctly 2017-07-26 01:04:27 -04:00
Paul Licameli 7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Leland Lucius a9184af222 Merge remote-tracking branch 'upstream/master' into wx3 is necessary, 2015-07-11 19:23:49 -05:00
James Crook 6423610f01 Bug 1061 - Chinese (Simplified) Missing
Previously we looked at wxLocale language names for matches to our names.  The change to use the language set in the installer reversed this.  However looking up zh (which is Chinese) in wxLocale yields  zh_TW.   So instead we now look up zh_CN.
2015-07-10 09:28:24 +01:00
Leland Lucius d1f66d768f Updates for wx3
A long way to go yet, but many OSX issues fixed including
conversion of Audio Unit effects.
2015-06-30 11:25:32 -05:00
Leland Lucius c9327a9df0 Addition fix/changes for bug #673
This changes the way "unofficial" Inno Setup translations
are handled.

The first time a user compiles the .iss, the "unofficial" translations
will be downloaded to:

   C:\Program Files (x86)\Inno Setup 5/Languages/unofficial

Any translations supported by Audacity that do not have an Inno
translation will be automatically created from the Default.isl in:

   C:\Program Files (x86)\Inno Setup 5/Languages/dummy

This is all handled by the Inno Preprocessor.  Powershell is used
to do the actual download.

Once downloaded, they will not be downloaded again, so if updates
are made, they will need to be deleted from the above directories
and allowed to download again.

In addition, I extracted the "Reset Preferences" translations from
the Audacity .po files and added them to the .iss file.

Audacity private Inno translation files are still supported in
win/InnoSetupLanguages, but I've removed the samples I'd previously
committed.

While not exactly related to this change, there were 2 languages
that weren't being set properly after being selected during
installation:

   ca@valencia (Valencian)
   bs (Bosnian)

The reason Valencian wasn't be displayed in preferences was twofold.
It was incorrectly named and the search loop in Languages:GetLanguages()
didn't include a range sufficient enough to pull the Valencian info.

The Bosnian language is supported by wxWidgets 2.8.12 (it is in wx3)
so, even though we have a translation, it was unavailable for
selection.

The changes required to fix those issues were:

1)  Renamed ca@valencia to ca_ES@valencia
2)  Instead of iterating over all wxWidgets languages and trying to
    match them with our translations, I reversed it.  It now iterates
    over our translations and asks wxWidgets for the associated
    language info.  This provides support for both of the above
    languages.
3)  By doing #2, we are now able to add additional user languages that
    may not yet be supported by wxWidgets.  So, I added the Bosnian
    language info.
2015-06-04 14:19:06 -05:00
windinthew@gmail.com 5bffe9cecf Added new Armenian translation by Aram Vardanyan to Windows and Linux builds. Still needs to be added to the Mac project file. 2014-11-22 16:59:02 +00:00
windinthew a4bd763071 Added new Tamil translation (80% complete) by Kenthira Ponnampalam.
Ta.po still needs to be added to the Mac Xcode project.
2014-06-22 17:04:52 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
lllucius 865e22c0ee Bug 637 - Some full and reduced Menu Bar items are not translated
Relocates the translation tables to the bundle

This will change the location of the translation tables from:

<root>
  Audacity.app/
    Languanges/<langcode>/

to:

<root>
  Audacity.app/Contents/Resources/<langcode>.lproj/

  This will allow the menu items to be translated as expected.
2013-10-23 17:41:10 +00:00
RichardAsh1981@gmail.com 9a75557b89 convert this file to UTF-8 format for all compilers to work with. Patch by Campbell Barton 2013-09-25 19:33:09 +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
RichardAsh1981@gmail.com 28e9f0ca73 make many functions which do not require access to class member variables static so they can be called without an object to do so with. Based on part of a patch by Campbell Barton 2013-09-21 19:15:42 +00:00
windinthew 97677e1d9f New Croatian translation of software by Martin Bagiæ (still needs adding to Mac project) 2013-01-04 15:16:06 +00:00
windinthew e98695f324 Added Serbian (Latin) software translation by Miroslav Nikolic. 2012-04-03 07:56:51 +00:00
windinthew 58b03d2cf6 Remove localLanguageName for Laothian as there is no such Audacity translation. 2011-12-18 04:25:56 +00:00
windinthew eab4109489 Added new Serbian translation by Miroslav Nikolic. 2011-10-20 15:41:57 +00:00