function to generate values of a javascript object
If you keep the naming consistent, you could probably do something like:

function getThemeName(themeName, transparency) {
  var name = "messages:theme.info." + themeName;
  if( transparency ) {
    name += "_with_transparency";
    return translator.get(name, { percentage: transparency });
  } else {
    return translator.get(name);
  }
}