Thread: [Audacity-devel] Long strings
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Dominic M. <do...@au...> - 2005-10-25 06:36:24
|
Vaughan, I noticed you changed a few long strings - does MSVC++ have trouble when they're split across multiple lines, or when two quoted strings are concatenated? Originally they were all option #1, below - I changed them to option #2 (my personal preference), but now they look like #3 - and at least on the Mac, the dialog boxes look all messed up now. I would prefer #2, because I think that's the most readable - but if we can't get that to work on Windows, then I guess we should go back to #1. - Dominic Option #1: wxLogWarning(_("Project check found inconsistencies inspecting the loaded project data;\nclick 'Details' for a complete list of errors, or 'OK' to proceed to more options.")); Option #2: wxLogWarning(_("Project check found inconsistencies inspecting the " "loaded project data;\nclick 'Details' for a complete " "list of errors, or 'OK' to proceed to more options.")); Option #3: wxLogWarning(_("Project check found inconsistencies inspecting the \ loaded project data;\n\ click 'Details' for a complete list of errors, or \ 'OK' to proceed to more options.")); |
From: Vaughan J. <va...@au...> - 2005-10-25 20:42:24
|
Yes, this was the issue with MSVC in Unicode compiles that I brought up a few months ago. I prefer option #2, too, but MSVC can't handle option #2 when building Unicode, only #1 or #3. Option #3 is more like #2, so more legible. I mostly did option #1 when I made the MSVC Unicode Debug project, but later, and since then, did option #3. Martyn recently asked the list about this, because he tried to build the Unicode Debug project and it wouldn't compile because of new strings in option #2 format. He's using MSVC 2005 beta 2, so apparently this bug in the MSVC compiler won't be fixed any time soon. The Unicode build isn't important for Windows as I understand it -- only for Linux, right? I read that modern versions of Windows (post Win2K, I think) use Unicode for internals, so string handling is more efficient in Unicode builds, because there's no conversion to the internals, but string handling is not a bottleneck for Audacity. So, if option #3 is really undesirable, we can forget about Unicode Debug compatibility for MSVC. It was a good bit of work, and I didn't do a Unicode Release project, because the goal as I understood it was just to get it to build in Unicode on all platforms. So now, we could decide: (A) just get rid of the MSVC Unicode Debug project, or (B) leave it in there in case we ever want to do Unicode on Windows, but don't keep it up to date for new multi-line strings and just not build it. -Vaughan Dominic Mazzoni wrote: > Vaughan, I noticed you changed a few long strings - does MSVC++ have > trouble when they're split across multiple lines, or when two quoted > strings are concatenated? > > Originally they were all option #1, below - I changed them to option > #2 (my personal preference), but now they look like #3 - and at least > on the Mac, the dialog boxes look all messed up now. > > I would prefer #2, because I think that's the most readable - but if > we can't get that to work on Windows, then I guess we should go back > to #1. > > - Dominic > > > Option #1: > > wxLogWarning(_("Project check found inconsistencies inspecting the > loaded project data;\nclick 'Details' for a complete list of errors, > or 'OK' to proceed to more options.")); > > > Option #2: > > wxLogWarning(_("Project check found inconsistencies inspecting the " > "loaded project data;\nclick 'Details' for a complete " > "list of errors, or 'OK' to proceed to more options.")); > > Option #3: > > wxLogWarning(_("Project check found inconsistencies inspecting the \ > loaded project data;\n\ > click 'Details' for a complete list of errors, or \ > 'OK' to proceed to more options.")); > > |
From: Dominic M. <do...@au...> - 2005-10-26 08:06:25
|
Vaughan, Even though Unicode for Windows is not our highest priority, I would prefer to have the source code as compatible as possible. The problem with #3 is that it actually adds a lot of spaces to the string, so at least on Mac OS X, when the dialog box appears, the formatting is quite odd-looking. I think #3 would be fine if we didn't indent all of the lines - but there are obviously other problems with this. I think it's also confusing for translators. I've got an idea - let's go back to #1, but for files like DirManager.cpp that have a lot of strings like that, let's put them all in one place, like at the top of the file. I'd far prefer a bunch of long lines in one place than really long lines scattered throughout a file that also contains a lot of code and logic that I'm trying to debug sometimes. Doing this will also help us see similarities between them - and in case we decide to change one later, it will be easy to change them all. - Dominic On Oct 25, 2005, at 1:39 PM, Vaughan Johnson wrote: > Yes, this was the issue with MSVC in Unicode compiles that I > brought up a few months ago. I prefer option #2, too, but MSVC > can't handle option #2 when building Unicode, only #1 or #3. Option > #3 is more like #2, so more legible. I mostly did option #1 when I > made the MSVC Unicode Debug project, but later, and since then, did > option #3. > > Martyn recently asked the list about this, because he tried to > build the Unicode Debug project and it wouldn't compile because of > new strings in option #2 format. He's using MSVC 2005 beta 2, so > apparently this bug in the MSVC compiler won't be fixed any time soon. > > The Unicode build isn't important for Windows as I understand it -- > only for Linux, right? I read that modern versions of Windows (post > Win2K, I think) use Unicode for internals, so string handling is > more efficient in Unicode builds, because there's no conversion to > the internals, but string handling is not a bottleneck for Audacity. > > So, if option #3 is really undesirable, we can forget about Unicode > Debug compatibility for MSVC. It was a good bit of work, and I > didn't do a Unicode Release project, because the goal as I > understood it was just to get it to build in Unicode on all > platforms. So now, we could decide: (A) just get rid of the MSVC > Unicode Debug project, or (B) leave it in there in case we ever > want to do Unicode on Windows, but don't keep it up to date for new > multi-line strings and just not build it. > > -Vaughan > > > > Dominic Mazzoni wrote: > > >> Vaughan, I noticed you changed a few long strings - does MSVC++ >> have trouble when they're split across multiple lines, or when >> two quoted strings are concatenated? >> >> Originally they were all option #1, below - I changed them to >> option #2 (my personal preference), but now they look like #3 - >> and at least on the Mac, the dialog boxes look all messed up now. >> >> I would prefer #2, because I think that's the most readable - but >> if we can't get that to work on Windows, then I guess we should >> go back to #1. >> >> - Dominic >> >> >> Option #1: >> >> wxLogWarning(_("Project check found inconsistencies inspecting >> the loaded project data;\nclick 'Details' for a complete list of >> errors, or 'OK' to proceed to more options.")); >> >> >> Option #2: >> >> wxLogWarning(_("Project check found inconsistencies inspecting the " >> "loaded project data;\nclick 'Details' for a >> complete " >> "list of errors, or 'OK' to proceed to more >> options.")); >> >> Option #3: >> >> wxLogWarning(_("Project check found inconsistencies inspecting the \ >> loaded project data;\n\ >> click 'Details' for a complete list of >> errors, or \ >> 'OK' to proceed to more options.")); >> >> >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Audacity-devel mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |
From: Vaughan J. <va...@au...> - 2005-10-27 20:51:00
|
Sorry to hear about the added spaces. It's been a while since I looked at it, but I'm pretty sure that MSVC didn't do that -- but it might have been that it just they were still left-aligned but with a fatter left margin, didn't look weird. So yep, option #1 sounds good. Locating them all at one place is okay by me, but if you just turn off wrap, then they'd interfere less with the code logic. But keeping them in one place reminds us to do it all in option #1, as you say, so that's good. Thanks, Vaughan Dominic Mazzoni wrote: > Vaughan, > > Even though Unicode for Windows is not our highest priority, I would > prefer to have the source code as compatible as possible. > > The problem with #3 is that it actually adds a lot of spaces to the > string, so at least on Mac OS X, when the dialog box appears, the > formatting is quite odd-looking. I think #3 would be fine if we > didn't indent all of the lines - but there are obviously other > problems with this. I think it's also confusing for translators. > > I've got an idea - let's go back to #1, but for files like > DirManager.cpp that have a lot of strings like that, let's put them > all in one place, like at the top of the file. I'd far prefer a > bunch of long lines in one place than really long lines scattered > throughout a file that also contains a lot of code and logic that I'm > trying to debug sometimes. Doing this will also help us see > similarities between them - and in case we decide to change one > later, it will be easy to change them all. > > - Dominic > > > On Oct 25, 2005, at 1:39 PM, Vaughan Johnson wrote: > >> Yes, this was the issue with MSVC in Unicode compiles that I brought >> up a few months ago. I prefer option #2, too, but MSVC can't handle >> option #2 when building Unicode, only #1 or #3. Option #3 is more >> like #2, so more legible. I mostly did option #1 when I made the >> MSVC Unicode Debug project, but later, and since then, did option #3. >> >> Martyn recently asked the list about this, because he tried to build >> the Unicode Debug project and it wouldn't compile because of new >> strings in option #2 format. He's using MSVC 2005 beta 2, so >> apparently this bug in the MSVC compiler won't be fixed any time soon. >> >> The Unicode build isn't important for Windows as I understand it -- >> only for Linux, right? I read that modern versions of Windows (post >> Win2K, I think) use Unicode for internals, so string handling is >> more efficient in Unicode builds, because there's no conversion to >> the internals, but string handling is not a bottleneck for Audacity. >> >> So, if option #3 is really undesirable, we can forget about Unicode >> Debug compatibility for MSVC. It was a good bit of work, and I >> didn't do a Unicode Release project, because the goal as I >> understood it was just to get it to build in Unicode on all >> platforms. So now, we could decide: (A) just get rid of the MSVC >> Unicode Debug project, or (B) leave it in there in case we ever want >> to do Unicode on Windows, but don't keep it up to date for new >> multi-line strings and just not build it. >> >> -Vaughan >> >> >> >> Dominic Mazzoni wrote: >> >> >>> Vaughan, I noticed you changed a few long strings - does MSVC++ >>> have trouble when they're split across multiple lines, or when two >>> quoted strings are concatenated? >>> >>> Originally they were all option #1, below - I changed them to >>> option #2 (my personal preference), but now they look like #3 - >>> and at least on the Mac, the dialog boxes look all messed up now. >>> >>> I would prefer #2, because I think that's the most readable - but >>> if we can't get that to work on Windows, then I guess we should go >>> back to #1. >>> >>> - Dominic >>> >>> >>> Option #1: >>> >>> wxLogWarning(_("Project check found inconsistencies inspecting the >>> loaded project data;\nclick 'Details' for a complete list of >>> errors, or 'OK' to proceed to more options.")); >>> >>> >>> Option #2: >>> >>> wxLogWarning(_("Project check found inconsistencies inspecting the " >>> "loaded project data;\nclick 'Details' for a complete " >>> "list of errors, or 'OK' to proceed to more >>> options.")); >>> >>> Option #3: >>> >>> wxLogWarning(_("Project check found inconsistencies inspecting the \ >>> loaded project data;\n\ >>> click 'Details' for a complete list of >>> errors, or \ >>> 'OK' to proceed to more options.")); >>> >>> >>> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the JBoss Inc. >> Get Certified Today * Register for a JBoss Training Course >> Free Certification Exam for All Training Attendees Through End of 2005 >> Visit http://www.jboss.com/services/certification for more information >> _______________________________________________ >> Audacity-devel mailing list >> Aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audacity-devel >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Audacity-devel mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |