Here, I was just copying the pattern in gallery.dialog.js, but I agree: it doesn't smell right.

The issue is that we were relying on the *themes* to define MSG_CANCEL, then using this as a fallback.  This seems a bit weird to me... we don't rely on themes to define any other messages (e.g. Save, Submit, OK, or anything else that might go in the submit button right next to it), so why this one?

I think the better solution is to move defining MSG_CANCEL from the themes to Hook_GalleryTheme.  Then, we can be assured that it's always defined, while still leaving it in a place where a theme designer could conceivably override it if they felt so inclined.

I push the commit up in a bit.