Re: [Audacity-devel] [Audacity-translation] P3 bug changing language in Preferences
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Ed M. <edg...@wa...> - 2009-12-23 03:10:48
|
Nyquist Prompt is also able to change while the app is running \audacity\src\effects\nyquist\Nyquist.cpp at or near line 71 EffectNyquist::EffectNyquist(wxString fName): if (fName == wxT("")) { // Interactive Nyquist mOK = true; mInteractive = true; mName = _("Nyquist Prompt..."); SetEffectFlags(PROCESS_EFFECT | BUILTIN_EFFECT | ADVANCED_EFFECT); return; } wxLogNull dontLog; mName = wxFileName(fName).GetName(); -------------------------------------- filling the effect menu with GetEffectName(): names.Add((*effects)[i]->GetEffectName()); } c->AddItemList(wxT("Effect"), names, FN(OnProcessEffect)); -------------------------------------- class AUDACITY_DLL_API EffectNyquist:public Effect { [...] virtual wxString GetEffectName() { return mName; } again, mName would need to be translated "on-the-fly" because it is subject to change at any time. This can probably be solved if mName is being put to double use. Make EffectNyquist ::GetEffectName() return only to the menu building process and have a fixed string. If we need to get the built string, make it a new wxString with a non-translated return Get...string(). Since I can't commit patches it makes no sense for me to spend a lot of time learning the Nyquist code to make this change. With this info, whoever is "responsible" for the Nyquist codebase can easily fix this. --Ed > -----Original Message----- > From: Ed Musgrove [mailto:edg...@wa...] > Sent: Tuesday, December 22, 2009 6:03 PM > To: aud...@li... > Subject: Re: [Audacity-devel] [Audacity-translation] P3 bug changing language in > Preferences > > In file \audacity\src\Menus.cpp at or near line number 720, here is one that > works: > > c->AddItem( wxT("AddLabelPlaying"), > _("Add Label At &Playback Position"), > FN(OnAddLabelPlaying), wxT("Ctrl+M"), > 0, > AudioIONotBusyFlag); > > > and (near line number 820) one that does not work: > c->AddItem( wxT("RepeatLastEffect"), > mLastEffectDesc, > FN(OnRepeatLastEffect), > wxT("Ctrl+R"), > AudioIONotBusyFlag | TimeSelectedFlag | WaveTracksSelectedFlag | > HasLastEffectFlag, > AudioIONotBusyFlag | TimeSelectedFlag | WaveTracksSelectedFlag | > HasLastEffectFlag); > > Note that in the first case the second line: > _("Add Label At &Playback Position"), > goes into the translation software: > wxGetTranslation(const wxChar *sz, const wxChar* domain = NULL) > > Now note that in the second case the second line is: > mLastEffectDesc, > and because it is not wrapped in _() it does not go into the translation software instead it > goes into: > // implicit conversion to C string > operator const wxChar*() const { return c_str(); } and does not get translated. > > Note that in bool AudacityProject::OnEffect() the string stored in mLastEffectDesc is > modify: > mLastEffectDesc.Printf(_("Repeat %s"), shortDesc.c_str()); > > Because it is not a constant string but mutable I do not know how we can do something > like: > c->AddItem( wxT("RepeatLastEffect"), > _(mLastEffectDesc), [... etc.] (which will not compile). Doing this solves the > problem: > //mLastEffectDesc, > _("Repeat Last Effect"), > > I am going to go eat some dinner and then I'll look and see what I can do to figure out > why "Nyquist Prompt..." does not work... > > --Ed > > > > -----Original Message----- > > From: Gale Andrews [mailto:ga...@au...] > > Sent: Tuesday, December 22, 2009 1:48 AM > > To: aud...@li... > > Subject: Re: [Audacity-devel] [Audacity-translation] P3 bug changing > language in > > Preferences > > > > > > | From "Ed Musgrove" <edg...@wa...> Mon, 21 Dec 2009 > > | 16:42:30 -0800 > > | Subject: [Audacity-translation] [Audacity-devel] P3 bug changing > > | language in Preferences > > >... Using the "current nightly build": 1.3.11-alpha-Dec 19 2009 > > >(Unicode) Before reopening fails... to translate: > > > Generate menu: > > > Click Track... no change after restart **** > > > Pluck... no change after restart **** > > > Risset Drum... no change after restart **** > > > > > > Effects menu: > > > Repeat last effect... fixed after restart > > > Auto Duck... no change after restart > > > Echo...? no change after restart > > > Nyquist Prompt... fixed after restart > > > Phaser...? no change after restart > > > Everything from "Clip fix..." on down no change after restart **** > > > Analyze menu: > > > Everything from "Beat Finder..." on down no change after **** > restart > > > > > > Meter toolbar labels (L/R -- should be G/D) fixed after restart > > > > > > Click and hold slider labels (both transport and device toolbars) > > > fixed after restart > > > > > > Track pan labels (L/R) fixed after restart > > > > > > > > > I tried this with French, Spanish, Hebrew and Italian all with the > > > same result. > > > > The ones marked **** will only ever be in English because they are in > > the > Plug-Ins folder > > (so underneath the divider in the menu). Anything could be added to > > that > folder by the > > user, and so would never be > > translated. > > > > I suspect "Echo", "Phaser" and "Auto Duck" are regarded by most > translators as close to a > > proper name, so although they are available for translation, they > > won't be > translated in > > practice. > > > > > > > Find all "Repeat last effect", Subfolders, Find Results 1, "Entire > > > Solution", "*.c; *.cpp;*.h" > > > D:\audio\Audacity\currentCVS\audacity\src\Project.cpp(762): > > > mLastEffectDesc(_("Repeat Last Effect")) > > > Matching lines: 1 Matching files: 1 Total files searched: 1478 > > > > > > Find all "Nyquist Prompt", Subfolders, Find Results 1, "Entire > > > Solution", "*.c; *.cpp;*.h" > > > > D:\audio\Audacity\currentCVS\audacity\src\effects\nyquist\Nyquist.cpp(91): > > > mName = _("Nyquist Prompt..."); > > > > > > > D:\audio\Audacity\currentCVS\audacity\src\effects\nyquist\Nyquist.cpp(401): > > > _("Nyquist Prompt..."), > > > Matching lines: 2 Matching files: 1 Total files searched: 1478 > > > > > > Find all ""R"", Subfolders, Find Results 1, "Entire Solution", "*.c; > > > *.cpp;*.h" > > > D:\audio\Audacity\currentCVS\audacity\src\widgets\ASlider.cpp(721): > > > dc->DrawText(_("R"), mRightX-6,0); > > > D:\audio\Audacity\currentCVS\audacity\src\widgets\Meter.cpp(251): > > > mRightText = _("R"); > > > > > > > > > I think I am detecting a pattern here. I have not gotten a reply to > > > my more general question but I bet (not a lot) that these all should > > > be > > > wxT() not _()... > > > > No, perversely "wxT" signifies the string is *not* to be translated. > > So > the menu items you > > cite do already have translatable strings (otherwise, they would not > change even after > > restart). > > > > There must be some other reason for the problem. > > > > > > > > Gale > > > > > > > > > > -----Original Message----- > > > > From: Gale Andrews [mailto:ga...@au...] > > > > Sent: Monday, December 21, 2009 1:02 PM > > > > To: aud...@li... > > > > Cc: hum...@fr...; edg...@wa...; > > > > Audacity > > > Developers > > > > List > > > > Subject: Re: [Audacity-translation] [Audacity-devel] P3 bug > > > > changing > > > language in > > > > Preferences > > > > > > > > > > > > Ed, As I noted on the Checklist, the problems with some elements > > > > not > > > changing after a > > > > language change until you restart are still there for me in > > > > Windows > > > > 7 > > > (RC). For example > > > > the "left-click and hold" > > > > slider tooltips are translated to French in the .po file, but they > > > > do not > > > appear after a change > > > > to French until you restart. Can you try the Windows Nightly Build > > > > please, > > > which is > > > > Unicode Release of course. > > > > > > > > I can't see why this would vary from one Windows platform to > > > > another and the problem is exactly the same on Linux. > > > > > > > > > > > > > > > > Thanks > > > > > > > > Gale > > > > > > > > > > > > Ed said: > > > > > > P3 When changing language in Preferences, some elements don't > > > > > > change until restart. Affects Audio Track at the top of the > > > > > > Track Drop-down menu, and the toolbars tooltips (except > > > > > > Selection > Bar). > > > > > > LL: It looks like this has been partially fixed...the track > > > > > > menus now change, but tooltips are still an issue. > > > > > > LL: This should now be fixed...just needs verification. > > > > > > GA: Still an issue with > > > > > > Generic track name ("Audio Track" in English) Meter Toolbar > > > > > > channel names All the slider tooltips Selection Toolbar > > > > > > elements running into each other: after changing from English > > > > > > to French; then restarting and changing from French to English. > > > > > > > > > > > > This P3 does not present in Win7. All the listed problems are > > > > > > resolved except for translation issues... > > > > > > > > > ---------------------------------------------------------------------------- > -- > > This SF.Net email is sponsored by the Verizon Developer Community Take > advantage of > > Verizon's best-in-class app development support A streamlined, 14 day > > to > market process > > makes app distribution fast and easy Join now and get one step closer > > to > millions of > > Verizon customers http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > audacity-devel mailing list > > aud...@li... > > https://lists.sourceforge.net/lists/listinfo/audacity-devel > > > ---------------------------------------------------------------------------- -- > This SF.Net email is sponsored by the Verizon Developer Community Take advantage of > Verizon's best-in-class app development support A streamlined, 14 day to market process > makes app distribution fast and easy Join now and get one step closer to millions of > Verizon customers http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > audacity-devel mailing list > aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel |