Making money off extensions - rebranding
Often, site owners want a customized version of an extension with certain tweaks, changed defaults, etc. They will often want that extension branded with their site’s name or logo (this may even be required by the original extension author, if it’s not you). To make this as easy as possible, extension authors should first ensure their extension supports localization.
Localization makes it so all strings displayed to the user are stored in properties and DTD files - separate from the JavaScript and XUL. This is also required if you wanted your extension, well, localized into other languages.
Now, the extension’s name is obviously also a string and will be localized. Since the extension’s name usually occurs in other strings, you should use entities in DTD files and getFormattedString on string from properties files. So, for an extension called “Foo”, instead of having <!--ENTITY bar "Add this to Foo"--> or bar=Add this to Foo? you can use <!--ENTITY bar "Add this to &foo;"--> or bar=Add this to %S. You’ve now reduced the number of user-facing occurrences of your extension’s name to at most two per locale (one in a properties file, one in a DTD) plus one in install.rdf.
Since extension names aren’t usually translated anyway, you can also take then out of your locale DTDs and properties files and put them inside the content folder, then include the new DTD or properties file in your XUL where appropriate. You should now have at most three occurrences - install.rdf, one DTD, and one properties file. Rebranding your extension is now trivial.
Why not simply do a find and replace on all occurrences of the extension’s name? The extension’s name may occur in non-user-facing areas such as comments and licenses (!) that you don’t want changed. It’s also more work to do each time, considering you have to expand everything, run the script, and package it up again, as opposed to opening the package and editing one file. You’re not doing this once - the site owner’s probably going to an updated, rebranded version at some point. A find and replace is also more prone to break unexpectedly.