We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6c4e39 commit 0b644afCopy full SHA for 0b644af
tools/scripts/build/download-trending.ts
@@ -9,7 +9,7 @@ const { clientLocale } = envData;
9
const createCdnUrl = (lang: string) =>
10
`https://cdn.freecodecamp.org/universal/trending/${lang}.yaml`;
11
12
-const download = async () => {
+const download = async (clientLocale: string) => {
13
const url = createCdnUrl(clientLocale);
14
const res = await fetch(url);
15
if (!res.ok) {
@@ -44,4 +44,7 @@ const download = async () => {
44
}
45
};
46
47
-void download();
+void download(clientLocale);
48
+// TODO: remove the need to fallback to english once we're confident it's
49
+// unnecessary (client/i18n/config.js will need all references to 'en' removing)
50
+if (clientLocale !== 'english') void download('english');
0 commit comments