diff --git a/lib/hb-helpers.js b/lib/hb-helpers.js index 9fd9310ff..8bfd77593 100644 --- a/lib/hb-helpers.js +++ b/lib/hb-helpers.js @@ -85,14 +85,18 @@ module.exports.registerHelpers = function registerHelpers() { }); hb.registerHelper('prettyOSName', function(name) { - // TODO make first character upper case and return one windows name + // Selenium is used when fetching OS names (for BrowserTime) + // and windows has the following names, change them to + // just Windows var windows = ['xp', 'windows', 'win8', 'win7']; - return name; + if (windows.indexOf(name)>-1) + return 'Windows'; + else + return name.substr(0, 1).toUpperCase() + name.substr(1); }); - hb.registerHelper('prettyBrowserName', function(name) { - // TODO upper case the browser name - return name; + hb.registerHelper('capitalize', function(word) { + return word.substr(0, 1).toUpperCase() + word.substr(1); }); hb.registerHelper('getPlural', function(value) { diff --git a/templates/partials/browserMeasurements.hb b/templates/partials/browserMeasurements.hb index 98af9937b..4c41e4f00 100644 --- a/templates/partials/browserMeasurements.hb +++ b/templates/partials/browserMeasurements.hb @@ -1,6 +1,6 @@