Skip to content

Commit

Permalink
core(fcp-3g): remove unused i18n for LR compatibility (#7103)
Browse files Browse the repository at this point in the history
  • Loading branch information
exterkamp authored and brendankenny committed Jan 29, 2019
1 parent 619db8a commit 9658610
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lighthouse-core/audits/metrics/first-contentful-paint-3g.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@

const Audit = require('../audit.js');
const regular3G = require('../../config/constants.js').throttling.mobileRegluar3G;
const i18n = require('../../lib/i18n/i18n.js');
const FCP = require('./first-contentful-paint.js');
const ComputedFcp = require('../../computed/metrics/first-contentful-paint.js');

const i18nFilename = require.resolve('./first-contentful-paint.js');
const str_ = i18n.createMessageInstanceIdFn(i18nFilename, FCP.UIStrings);

class FirstContentfulPaint3G extends Audit {
/**
* @return {LH.Audit.Meta}
*/
static get meta() {
return {
id: 'first-contentful-paint-3g',
title: str_(FCP.UIStrings.title),
description: str_(FCP.UIStrings.description),
title: 'First Contentful Paint (3G)',
description: 'First Contentful Paint 3G marks the time at which the first text or image is ' +
`painted while on a 3G network. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-contentful-paint).`,
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
requiredArtifacts: ['traces', 'devtoolsLogs'],
};
Expand Down Expand Up @@ -60,7 +56,7 @@ class FirstContentfulPaint3G extends Audit {
context.options.scoreMedian
),
rawValue: metricResult.timing,
displayValue: str_(i18n.UIStrings.seconds, {timeInMs: metricResult.timing}),
displayValue: `${metricResult.timing}\xa0ms`,
};
}
}
Expand Down

0 comments on commit 9658610

Please sign in to comment.