Merge pull request #13460 from vector-im/jryans/stylise-macos

Tweak default device name on macOS
pull/13486/head
J. Ryan Stinnett 2020-04-30 16:45:11 +01:00 committed by GitHub
commit 9fb5a6de3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@
/*
Copyright 2016 Aviral Dasgupta
Copyright 2016 OpenMarket Ltd
Copyright 2017-2020 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -186,7 +187,9 @@ export default class WebPlatform extends VectorBasePlatform {
const ua = new UAParser();
const browserName = ua.getBrowser().name || "unknown browser";
const osName = ua.getOS().name || "unknown os";
let osName = ua.getOS().name || "unknown OS";
// Stylise the value from the parser to match Apple's current branding.
if (osName === "Mac OS") osName = "macOS";
return _t('%(appName)s via %(browserName)s on %(osName)s', {appName: appName, browserName: browserName, osName: osName});
}