Browser Add-ons, Google Chrome, Mozilla, Mozilla Firefox, Programming, ScribeFire

Using Google Chrome-style locales in Firefox extensions

Update: Don’t use this code. Use this new version.

If you’ve ever developed the same extension for both Google Chrome and Firefox, you’ve probably noticed that there is no easy way to reuse internationalization efforts between the two. Firefox uses a mix of Java-style properties files and DTD files to store translated strings, while Chrome uses JSON “messages” files. This was especially frustrating to me because 95% of the code in ScribeFire is shared between the Chrome and Firefox (and Safari) versions.

To eliminate this annoyance, I came up with a method to parse and query the locales from the Chrome version in the Firefox version. If you want to use this method in your Firefox extension, you need to take the following steps:

  • Replace “MY_EXTENSION_ID” with the ID of your extension.
  • Rename “MY_EXTENSION_STRINGS” to something that won’t interfere with another extension.
  • The _locales directory from your Chrome extension should be in the chrome/content/ directory of your Firefox extension.
  • Include the excellent io.js library in your extension.

View the code at GitHub.

After running this function, you can call MY_EXTENSION_STRINGS.get(key, substitutions); anywhere that you would have called chrome.i18n.getMessage(key, substitutions);. (It doesn’t work in Firefox 4 (yet) due to the extension manager changes, but I’ll post a follow-up when I have a Firefox 4-compatible version.)

What are your thoughts? Is there a better way? Would it be better to write a script to convert Firefox-style locales for use in Chrome?

Standard
Blogging, Browser Add-ons, Mozilla Firefox, ScribeFire

ScribeFire Updates

Some updates on the ScribeFire project that I’m part of:

  • There’s a new website up at ScribeFire.com – a WordPress blog with a clean, writing-themed template
  • A Support Forum has been launched for ScribeFire help and discussion.
  • We’re on the verge of releasing our next version – it will be mostly small fixes and preparations for later larger fixes.

I think once this next version gets out the door, we’ll be releasing much more often and looking for much more feedback from the community on what they’d like to see added to the tool.

Standard
Digg, Digg Statistical Data, Nintendo Wii, ScribeFire, Social Media, TubeStop, Twits Like Me

Top 1,000 Diggers: 2007/05/23

Notice: TubeStop was discontinued on December 25, 2012 and is no longer supported.

This CSV files contains the username, number of frontpage stories, number of submitted stories, number of stories dugg, and number of profile views for the top 1,000 users on Digg.

Top 1000 Diggers as of 2007/05/23

In other Digg news, the last 13 stories from this blog that have been submitted to Digg have all been buried. This includes posts about TubeStop, Twits Like Me, the Digg Top Users list, ScribeFire, and Wii-specific Web design. (Contrast this search page with this search page.) This means one of three things:

  1. Everything I write is lame.
  2. There is a group of Digg users specifically burying content from my site.
  3. eFinke.com is on some sort of Digg blacklist and is being automatically buried by the system.

I’m leaning towards #2, but I don’t know how they would track submissions from my site since the only way to do that has been broken for months.

If you’d like to be notified whenever I release a new dataset, you can subscribe to the Digg Statisical Data RSS feed, which will include only the dataset posts, or my main RSS feed, which is updated with all of my blog posts.

Standard
Digg, Home Improvement, Life, Netscape Navigator, OPML Support, Programming, ScribeFire, Slashdotter, Twits Like Me

Own a piece of history

For the low, low price of $189,900, you could own this piece of Web software history:

This is the very building where I worked on such projects as Slashdotter, Netscape Navigator 9, OPML Support for Firefox, ScribeFire, the Digg Top Users list, and most recently, Twits Like Me. If you act now, I’ll even throw in the very desk that I sit at while I work my programming magic. Deals like this don’t come along every day, especially when you consider that I was named as Time Magazine’s 2006 Man of the Year!

This introductory pricing won’t last long, so you’d better hurry up and make an offer.

Standard
Blogging, Browser Add-ons, Mozilla Firefox, Performancing, ScribeFire, Software

ScribeFire 1.4.0.1 Released

ScribeFire 1.4.0.1 is now available for download from Mozilla Addons. Changes since version 1.4 include:

  • Spanish translation
  • Support for special characters in Blogger passwords (as mentioned here)
  • Added detailed error messages for when adding a Blogger account fails

(ScribeFire, previously named “Performancing for Firefox,” is a full-featured blog editor that integrates with your browser and lets you easily post to your blog.)

Standard