Log in

No account? Create an account
May 10th, 2002 - LiveJournal Development — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Development

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

May 10th, 2002

Selecting en_GB (and, I guess, other sub-languages) [May. 10th, 2002|01:42 am]
LiveJournal Development



I'm having a bit of trouble testing this, simply because my browser keeps trying to be clever, or gets cookies and sends them when I don't want it to, but it looks like BML can't auto-select en-gb from Accept-Language. From what I read in the code, this makes sense because it reads up to ten \w (letters, digits, underscores) from the start of the string and uses that.

The HTTP spec says that if my browser requests en-gb specifically, it should get only British English or nothing. As it happens, my browser is configured to ask for "en-gb, en, es" in that order, so giving me en to satisfy the second is of course acceptable, and I'd not quibble if it wasn't for the fact that I've seen the code and I know that it's not doing what it appears to be doing! ;)

Since the spec says that en-gb or en-us aren't allowed to fall back on generic 'en' unless it's also present in the list, this doesn't require any special logic... just allow BML to "see" the letters after the hypen too, and it should 'just work' if en_GB is renamed to en-gb, which also has the benefit that it sets it aside from en_LJ, which isn't a special kind of English but instead a LiveJournal.com-specific extension to the phrases in normal English.

Revised regex, then... /^([a-z]{1,5}([\-_][a-z]{1,5})?)/i;, which should match en, en-gb, en_LJ, EN-GB and de, but not match en-gb_LJ, which will never exist. (because I said so! :p)

link8 comments|post comment

Find Users By Region [May. 10th, 2002|09:22 am]
LiveJournal Development


[mood |frustratedfrustrated]

I'm not sure if maint/stats.pl is broken or if I have something configured incorrectly.

"ljmaint.pl genstats" creates in my "stats" table:

gender F 8
gender M 5
gender U 8

stateus U 4
stateus M 5
stateus F 8

There are no other entries for "stateus" in the table. Of course, this doesn't allow "Find Users By Region" to work properly (check: http://www.ujournal.org/directory.bml).

Please help.
link2 comments|post comment

Netscape Problems? [May. 10th, 2002|11:05 am]
LiveJournal Development


I'm not sure if this is widespread, but I wanted to point out a problem that I've recently noticed. Apparently, every time I post or edit an entry, the last character is being lost. Yeah, just the last character I type, whether it be a letter or punctuation, it's just being eaten.

I'm using Netscape 4.78 here at work, and as far as I can tell, LiveJournal is the only web site this is happening with. Bulletin boards I post to elsewhere don't have this problem. Also, this problem has only been happening in the recent past--I want to say post-UTF-8.

I know it's not a problem with the entry itself, since I can go home and edit it to add the last character fine. It has to be something with the way Netscape 4.78 is formulating its headers or with the way LiveJournal is parsing them. Looking at update.bml, more than likely it's a problem in bmlp.pl or somewhere prior in the execution tree. Something with language parsing.

Yes, I've set my default language to English. Netscape is also configured to use "en" as it's first (and only) language choice. If there's anything else that I can try here to give more debugging information, just let me know and I'll see what I can do.

Edit: It doesn't do it to comments. Just entry posting and editing. Maybe it's something to do with the postevent method in ljprotocal.pl.

Edit Again: If I manually type in a command to /interface/flat in the URL bar on my browser, it does NOT clip off the last character. Something in the header's on the BML pages might be confusing Netscape?
link10 comments|post comment

Perl script to automatically friend a list of usernames? [May. 10th, 2002|06:47 pm]
LiveJournal Development



Does anyone know of an existing Perl script that can take a list of LJ usernames (either from a .txt file or from stdin) and add them all as friends using the Livejournal.pm module? I'm trying to cobble together such a thing myself, but my Perl is quite rusty and if a script like that already exists I'd rather not re-invent the wheel.

(Livejournal.pm is very fun to play with, though. :) )


link5 comments|post comment

[ viewing | May 10th, 2002 ]
[ go | Previous Day|Next Day ]