We have a str class wich can be used for replacing the variables, is standard to sprintf via python.
https://github.com/sourcefabric/Superdesk/blob/devel/plugins/livedesk/gui-resources/scripts/js/providers/google.js
str.format('HR/User/%s/Source/%s/Collaborator',self.model.get('Id'),this.get('Id'));

And add the str to require.