Skip to content

Commit 376dc1f

Browse files
committed
chore: remove i18n mocks
1 parent 305d7d7 commit 376dc1f

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

scripts/post-build.ts

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -51,72 +51,6 @@ function main(): void {
5151
const devtoolsFrontEndCorePath =
5252
'node_modules/chrome-devtools-frontend/front_end/core';
5353

54-
// Create i18n mock
55-
const i18nDir = path.join(BUILD_DIR, devtoolsFrontEndCorePath, 'i18n');
56-
fs.mkdirSync(i18nDir, {recursive: true});
57-
const i18nFile = path.join(i18nDir, 'i18n.js');
58-
const i18nContent = `
59-
export const i18n = {
60-
registerUIStrings: () => {},
61-
getLocalizedString: (_, str) => {
62-
// So that the string passed in gets output verbatim.
63-
return str;
64-
},
65-
lockedLazyString: () => {},
66-
getLazilyComputedLocalizedString: () => ()=>{},
67-
};
68-
69-
// TODO(jacktfranklin): once the DocumentLatency insight does not depend on
70-
// this method, we can remove this stub.
71-
export const TimeUtilities = {
72-
millisToString(x) {
73-
const separator = '\xA0';
74-
const formatter = new Intl.NumberFormat('en-US', {
75-
style: 'unit',
76-
unitDisplay: 'narrow',
77-
minimumFractionDigits: 0,
78-
maximumFractionDigits: 1,
79-
unit: 'millisecond',
80-
});
81-
82-
const parts = formatter.formatToParts(x);
83-
for (const part of parts) {
84-
if (part.type === 'literal') {
85-
if (part.value === ' ') {
86-
part.value = separator;
87-
}
88-
}
89-
}
90-
91-
return parts.map(part => part.value).join('');
92-
}
93-
};
94-
95-
// TODO(jacktfranklin): once the ImageDelivery insight does not depend on this method, we can remove this stub.
96-
export const ByteUtilities = {
97-
bytesToString(x) {
98-
const separator = '\xA0';
99-
const formatter = new Intl.NumberFormat('en-US', {
100-
style: 'unit',
101-
unit: 'kilobyte',
102-
unitDisplay: 'narrow',
103-
minimumFractionDigits: 1,
104-
maximumFractionDigits: 1,
105-
});
106-
const parts = formatter.formatToParts(x / 1000);
107-
for (const part of parts) {
108-
if (part.type === 'literal') {
109-
if (part.value === ' ') {
110-
part.value = separator;
111-
}
112-
}
113-
}
114-
115-
return parts.map(part => part.value).join('');
116-
}
117-
};`;
118-
writeFile(i18nFile, i18nContent);
119-
12054
// Create codemirror.next mock.
12155
const codeMirrorDir = path.join(
12256
BUILD_DIR,

0 commit comments

Comments
 (0)