Skip to content

Conversation

@adamraine
Copy link
Contributor

Closes #14049

@adamraine adamraine merged commit 70d5652 into main Oct 20, 2022
@adamraine adamraine deleted the i18n-default-step-names branch October 20, 2022 21:46
Comment on lines +23 to +24
// See: https://jestjs.io/docs/ecmascript-modules#differences-between-esm-and-commonjs
// https://github.com/facebook/jest/issues/10025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems weird to still be linking to jest docs for this, though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It matches everything else so probably good for now

*/
defaultFlowName: 'User flow ({url})',
/**
* @description Default name for a user flow step that analyzes a page navigation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"user flow" isn't going to mean anything to a translator here, and doesn't really seem to matter for the name anyways. Seems better just to explain what's meant by "navigation" and "report"?

(same for timespan/snapshot below)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do this one in a follow up

*/
function translate(message, values, locale) {
const icuMessage = str_(message, values);
return getFormatted(icuMessage, locale);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels weird to be immediately removing the IcuMessage. Should this be handled by either the flow report's i18n or by the LHR's typical replaceIcuMessages flow?

This won't work with swapping locales, but looks like there's nowhere you can swap a flow report's locale anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The messages are designed to be customized, so I want to avoid shipping ICU messages as the step/flow names.

},
};

/** @type {LH.UserFlow.GatherStep[]} */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not

// @ts-expect-error - incomplete mock.
/** @type {LH.UserFlow.GatherStep[]} */

or whatever? This file can also just be removed from the tsconfig if mocking continues to make it too annoying to maintain the types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup FR API for Release

4 participants