[02:55:38] snarfer has joined #noxbot
[04:13:42] * snarfer wonders if CyaNox is awake
[10:22:12] snarfer has quit:
[21:58:24] snarfer has joined #noxbot
[22:21:18] <CyaNox> hi snarfer
[22:21:30] <snarfer> Hello, CyaNox
[22:22:10] <CyaNox> any news?
[22:24:00] <snarfer> Oh, no not really
[22:24:14] <snarfer> I've been procratinating on school work last couple of days
[22:24:22] <snarfer> So I've been catching up today
[22:27:49] <CyaNox> http://www.despair.com/proc24x30pri.html
[22:28:34] <snarfer> Wow, that's great
[22:28:50] <snarfer> It's mostly that I hate school and the "important" books tehy assign
[22:32:32] <snarfer> At least I can graduate early with this independent study program
[23:17:24] <CyaNox> what are you studying snarfer ?
[23:18:29] <snarfer> Currently it's English
[23:18:40] <snarfer> But I also have a big project that lasts year long
[23:19:02] <CyaNox> and what is that project exactly?
[23:25:56] <snarfer> It's called the "senior Project"
[23:26:21] <CyaNox> does not tell me much
[23:26:31] <snarfer> Each student has to do 30 hours of community service, a ten page report, and coose a topic that is either community or service oriented
[23:26:48] <CyaNox> aaarrggg ... I'm kinda lost at how to implement the rest of the localization.
[23:27:31] <snarfer> Could I help?
[23:28:03] <CyaNox> not sure
[23:28:26] <CyaNox> I need to figure out a way to make the text locatable in the bots code in the language file.
[23:28:46] <CyaNox> and I need to structure the language file per class
[23:29:26] <CyaNox> or change my whole localisation idea to make it totally different (which seems to be easier but its way more work)
[23:30:21] <snarfer> "text locatable in the bots code in the language file"
[23:30:27] <CyaNox> I currently have something that attempts to get the class and other information at truntime. But its limited to the texts that are actually triggered.
[23:30:56] <CyaNox> not all the texts that are in the bot.
[23:31:31] <CyaNox> Now I wrote a small test script to parse all files and gather all the texts but it can be faulty in some cases.
[23:32:39] <CyaNox> so I have two possible things ... one that is never fully acurate and the other can be at fault when the bot is not used correctly (with wrong plugins for example).
[23:34:20] <snarfer> :/
[23:34:25] <CyaNox> hhmmm the seperate script aproach seems to be more reliable.
[23:35:26] <snarfer> Then go for it
[23:36:12] <CyaNox> well I'm trying to think of a method that is both reliable and acurate
[23:37:06] <snarfer> http://www.onlamp.com/pub/a/php/2002/11/28/php_i18n.html
[23:37:12] <snarfer> http://scriptdigital.com/divers/phplocalization.html
[23:37:18] <snarfer> http://www.phpclasses.org/browse/file/1865.html
[23:37:38] <CyaNox> what are you trying to say?
[23:39:12] <CyaNox> Owh and I'm quite good at PHP. I make money with writing it. So I'll probably never have to fallback on someone elses code.
[23:40:04] <CyaNox> I know how to do localization ... its just that implementing it in the bot in a clean and non-intrusive way is difficult.
[23:40:25] <snarfer> All right
[23:40:39] <snarfer> Just wanted to give a few resources
[23:40:43] <CyaNox> for example $dh->reply('Some english text.'); should be automagickly translatable to any other language.
[23:41:09] <CyaNox> basicly the bot is written in english and all texts will be english.
[23:41:35] <snarfer> Could you give reply a numeric code so in the localizedd files, you can just give each code a language specific text?
[23:41:36] <CyaNox> However the translation magick that happens in the background will alter the text to for example German.
[23:41:40] <snarfer> That seems to make sense
[23:42:15] <CyaNox> I thought about a number but it becomes highly difficult to track what number is what text.
[23:42:27] <CyaNox> It makes it way harder to raed the bot and actually find bugs.
[23:42:39] <CyaNox> So I'm nog going to take a number approach
[23:42:53] <snarfer> perhaps a simple phrase?
[23:42:59] <snarfer> Like "failedauth"
[23:43:09] <CyaNox> there are already 196 lines of different texts (probably 200+ since I still missed a few parts)
[23:43:30] <CyaNox> I prefere to not go over these again to change them
[23:43:36] <CyaNox> and I should not need to
[23:44:04] <CyaNox> and using a sort of cleaned up hash of the actual text makes it just as complicated to understand as numbers
[23:44:19] <CyaNox> plain old english is the best way and is non-intrusive.
[23:46:05] <CyaNox> hhhmmm ... tracking the line number and staying multiline compatible is difficult
[23:47:10] <CyaNox> all current texts however are single line so I might do it line by line which makes tracking the line number easy.
[23:47:25] <CyaNox> and class will not be needed since I can use the filename
[23:47:34] <CyaNox> (which mostly is the same as the class anyway.
[23:47:42] <CyaNox> )
[23:50:17] <snarfer> Hm
[23:50:32] <snarfer> How would a user then switch his/her language?
[23:51:38] <CyaNox> owh thats easy
[23:52:12] <CyaNox> there will be a command like !setlanguage (which can even be per channel since switching languages can be on the fly) and he/she is done.
[23:54:47] <CyaNox> heh ... just thought about something fancy
[23:54:50] <CyaNox> (again)
[23:55:10] <CyaNox> I could make it possible for a plugin to hook into the translation process to check if a translation failed.
[23:55:38] <CyaNox> If it failed that plugin could then contact the main website and report it or even go further by downloading new language files if avalable.