MsgPlus Hotkey Checker - 1.1.3 - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Translation (/forumdisplay.php?fid=24) +----- Thread: MsgPlus Hotkey Checker - 1.1.3 (/showthread.php?tid=25313) MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-15-2004 at 05:46 PM
Hi! RE: MsgPlus Hotkey Checker - 1.0.1 by ZrednaZ on 05-15-2004 at 06:24 PM
It's nice that someone has finally taken on the job of making an ampersand checker... I find it very hard to do manually. RE: MsgPlus Hotkey Checker - 1.0.1 by Leif on 05-15-2004 at 06:54 PM
Great, great, great!! Thanks a lot! This will save me a LOT of work! Judging from Anders', (a.k.a. ZrednaZ) letter, the programme will probably have problems with our Swedish umlauts as well: å/Å, ä/Ä and ö/Ö RE: MsgPlus Hotkey Checker - 1.0.1 by ShunterAlhena on 05-15-2004 at 06:58 PM
About not displaying characters: Try saving your files with Unicode encoding, then opening them with the program. I have the unicode version of your translations included with Plus! and they display fine. RE: MsgPlus Hotkey Checker - 1.0.1 by Patchou on 05-15-2004 at 07:04 PM
Excellent program! however, you should add some internal exceptions for some sections (you can see what I mean by running the program on the english file, it detects some conflicts but some text in the same section can be displayed in different windows/menus that do not conflict with each other). RE: MsgPlus Hotkey Checker - 1.0.1 by Leif on 05-15-2004 at 07:29 PM Thanks! .NET Framework and Unicode finally did it! "End of the document reached." RE: MsgPlus Hotkey Checker - 1.1.2 by ShunterAlhena on 05-15-2004 at 07:49 PM New version: all characters should display without messing with unicode. .NET Framework cannot be fixed, thats a feature not a bug... RE: MsgPlus Hotkey Checker - 1.1.2 by Leif on 05-15-2004 at 09:01 PM
Hmmm... RE: MsgPlus Hotkey Checker - 1.1.2 by ShunterAlhena on 05-16-2004 at 06:53 AM It might be that your your national characters look the same in ANSI but their character codes are different so the prg doesnt consider them same. You could search to one of them and see if some characters looking the same are not found in the search. Anyway, please send me the two files to shunter@freemail.hu (i tested the app many times on my ansi hungarian also full of special characters, and it worked all right...) RE: MsgPlus Hotkey Checker - 1.1.2 by Leif on 05-16-2004 at 11:10 AM
I've tried to mail you my Swedish translation in ANSI and in Unicode but the letters keep bouncing back. RE: MsgPlus Hotkey Checker - 1.1.2 by CookieRevised on 05-16-2004 at 11:18 AM
Leif, yeah, that's exactly watch Patchou said in his post: quote: RE: MsgPlus Hotkey Checker - 1.1.2 by Leif on 05-16-2004 at 11:48 AM Not exactly. My example is displayed in the same window (and it does not occur in a menu); the text is displayed on a button that toggles between two states. That is the reason I mentioned this particular case. Easy to miss, I thought. RE: MsgPlus Hotkey Checker - 1.1.2 by ShunterAlhena on 05-16-2004 at 12:10 PM
I'll try to add some "intelligence" to it for such cases, I think it should not be so hard to do with filters. RE: MsgPlus Hotkey Checker - 1.1.2 by CookieRevised on 05-16-2004 at 12:10 PM
yes, it's exactly the same though it is exactly what Patchou means quote:That would be a very bad idea... This will result in very crappy translations. The ampersand should be placed in a logical manner by a human. For example: "&Cancel Transfer" (first letter in sentence, first letter of main word) or "Cancel &Transfer" and not "Ca&ncel Transfer" (because c and a were already in use?) RE: MsgPlus Hotkey Checker - 1.1.2 by ShunterAlhena on 05-16-2004 at 07:02 PM another release, all encoding problem should be fixed now. if the auto detection fails simply switch to unicode encoding. RE: MsgPlus Hotkey Checker - 1.1.3 by Choli on 05-16-2004 at 08:07 PM
Hey! the idea is good and the program is usefull, however I see problems (as patchou said). There are sections like [IMWindowMenu] that have several levels of menus and so you can repeat shortcut keys and they aren't wrong. There are other sections, like [InstallCommon] where you have 2 buttons that won't be never displayed together ("&Close" and "&Cancell") so they can have the same letter. Also there are values that are used in several menus, (specially in the 3 menus that plus adds to the chat windows (the plus menu, the enhenced one, and the other that is shown when you click the button next to the bolck one ). I mean, those "&" should be checked with other keys from other sections quote:I know, but it is possible write a program that handles unicode files (my translator does ) quote:you have a textbox named Text1 and a RichTextBox named RichTextBox1. Both have the text hello . Ok, the next 2 codes do what you want. Exactly, they select the 2 "l" in hello. code: code: quote:totally agree RE: MsgPlus Hotkey Checker - 1.1.3 by Patchou on 05-16-2004 at 08:41 PM Quick note about VB: Visual Basic works entirely in Unicode internally. I'm not a VB programmer so I can't help you much, however, I can tell you that when VB gives you an ANSI string, that's because it converted it RE: MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-17-2004 at 12:30 PM
quote:Yeah, i read a lot about your program and i decided that i'll try .NET instead of APIs.... quote:I'm like and ... i spent 2 hours looking for such an expression in MSDN library, with no result... that's when i decided to use .NET. I believed SetFocus is only useful to give a control focus, and the library did not mention that it had a very useful another use... But at least i'm slightly experienced in .NET now, too quote:... however with common expressions or using FSO it does not like opening unicode files. there is a ANSI->Unicode conversion function StrConv, and with it i could kick it to life, but the scrolling problem still remained. Now i see that it was not VB6 that lacked ability, but me I'll try and make some filters to add some intelligence to the app. Thanks for all the help! RE: MsgPlus Hotkey Checker - 1.1.3 by Choli on 05-17-2004 at 01:25 PM
quote:If you can program in VB.NET, using it would be easier for you than using VB 6, I think. I wrote the translator in VB.NET because I can't program in .NET and because when I did the first release I hadn't got it yet quote:the .SetFocus is there to give the textbox the focus so you can see what's selected, because when you create a textbox it has its HideSelection property set to true. If when you create the textbox you set the HideSelection property to false, you don't need the .SetFocus line quote:FSO=FileSystemObject? I've never used that and don't know what's thatquote:... however with common expressions or using FSO it does not like opening unicode files. there is a ANSI->Unicode conversion function StrConv, and with it i could kick it to life, but the scrolling problem still remained. and yes, when you open a file, VB reads ansi strings, however it stores them as unicode strings. That may be a big problem with some files if you open them with the open function. You can work arround that by using APIs. btw, what has the scrolling thingy to do with ansi/unicode? I don't see any problem with scrolling. RE: MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-17-2004 at 04:18 PM
quote:Nothing Scrolling and encoding were my two main problems in VB6, and i barely could solve one, thats why i said the other one still remained and so i used .NET RE: MsgPlus Hotkey Checker - 1.1.3 by Kian on 05-18-2004 at 08:32 AM
quote: Is it possible to 'borrow' the source ? RE: MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-18-2004 at 02:46 PM err... why do you need it? it is extremely uncommon to lend sourcecodes RE: RE: MsgPlus Hotkey Checker - 1.1.3 by Kian on 05-18-2004 at 03:42 PM
quote: Well it was just a question and if you don't want to share your source its okay... I just wanted to see how you did // Peter aka Kian aka Peter Another of those stupid Danes RE: MsgPlus Hotkey Checker - 1.1.3 by CookieRevised on 05-19-2004 at 05:21 AM
Something like this I presume: RE: MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-19-2004 at 02:19 PM
Well, almost. RE: MsgPlus Hotkey Checker - 1.1.3 by CookieRevised on 05-19-2004 at 05:13 PM
quote:I didn't test this, but this explaination seems a bit dodgy if it realy happens like I read it... A) you're only test for a new topic is "]" somewhere in a line? B) linebreaks? you shouldn't let the code depend on linebreaks at all... EDIT: I tested it with this file, and my assumptions are correct... code:This is a valid INI file... As you can see your program doesn't reconize double apersands in both topics... First, A new topic is ALWAYS started at a new line not in the middle of a line. For example, the value from key12 ([test]) isn't a new topic, it is a valid value for a key.... Also, remember that spaces in front of keys and spaces in front and behind a topic should be ignored. The following file is exact the same INI-file, and should be handled just the same (note I replaced the spaces with points so you can see them clearly): code:(also note that the value of key13 is "mor&e text.........." in this case and not "mor&e text") Second, linebreaks in a INI-file can occur everywhere, key21 and key22 are still part of topic2... checking on linebreaks to check topics is a big no-no... So, How to detect a new topic (without the use of API's): in pseudocode: TRIM(readline) == "[?*]" - readline is the variable which holds the new textline read from the ini-file. - TRIM is to strip the line from leading and trailing spaces - [?*] means: starting with "[", then some text (at least 1 character), ending with "]" This is the ONLY valid way. If the above function returns true, then, and only then, you have a new topic... PS: Lines you should ignore (AFTER removing leading and trailing spaces!): empty lines and lines starting with ";" RE: MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-19-2004 at 06:49 PM
quote:<= You are right about the ] checking, it is a very inelegant way to handle that. As soon as this exam-heated week goes away I'll code filters and correct this as well. (although if you look in the file, you'll find no messages with ] in them. After all this program was written for Messenger Plus!, not for generic INI files) But newline checking was not used for nothing: for example look at this InsertSpecialTag=Insert &Special Tag CurrentTime=Current &Time\t(!T) CurrentDate=Current &Date\t(!D) MyName=My &Name\t(!NP) MyEmail=My &E-mail\t(!MP) ContactNames=&Contact Name(s)\t(!N) ContactEmails=C&ontact Email(s)\t(!M) CustomContactNames=C&ustom Contact Name(s)\t(!CN) CurrentIP=Current &IP\t(!IP) SoftwareVersion=Software &Version\t(!VER) PluginsVersion=Plugins Ve&rsion\t(!PVER) Winamp=&Winamp Song Title\t(!WAT) InsertFormatTag=Insert &Format Tag BoldText=B&old Text\t(!FB) ItalicText=&Italic Text\t(!FI) UnderlinedText=&Underlined Text\t(!FU) StrikedoutText=&Struck-out Text\t(!FS) TextColor=Text &Color\t(!FC) TextBckColor=Text &Background Color\t(!FG) ResetFormat=&Reset Format\t(!FR) (extract from DefaultLg, section IMWindowMenu) These are in the same section, although the ampersands do not collide (the two menus are not displayed at the same time). Until filters are set up i found newline checking as an alternate solution to stop (at least reduce) false collisions. RE: MsgPlus Hotkey Checker - 1.1.3 by CookieRevised on 05-19-2004 at 11:20 PM
quote:You realy shouldn't use that method, as the translation files are generic INI-files (and the method I described is in fact as long/short as the one you used). Not all translations will have those line breaks or will have linebreaks at different places. For example the dutch translation uses a different order for the keys then the default English one. And there are many languagefiles which don't have empty lines between the topics at all. In fact, in the current default English translation (first two lines of your example): InsertSpecialTag=Insert &Special Tag CurrentTime=Current &Time\t(!T) can have the same ampersand because CurrentTime is a child menu of InsertSpecialTag. So even your current method doesn't work!.... PS: about the ], you're right, it isn't used (yet)... but who says no one can use [ and ] instead of ( and ) for example in a translation? example: the key strokes in IRC style shortcuts, someone could use "[ctrl]+[b]" for example (which is another common way of writing keystrokes, and there are more examples to give...) PSS: saying: let's make a program to check the ampersands is simply at first sight, but in fact isn't as easy as that... Anyway, I forgot that you guys and girls have exams that's priority of course.... and btw, very good luck with them... RE: MsgPlus Hotkey Checker - 1.1.3 by Choli on 05-20-2004 at 10:44 AM
quote:just now (at the uni) I don't remember, but I think we've put (or had put and now changed) a value between [ ] in the spanish_spain so you have to be careful with those things RE: MsgPlus Hotkey Checker - 1.1.3 by ShunterAlhena on 05-20-2004 at 06:38 PM as soon as the goddamn german exam is ok i'll see to it |