Skip to content

Commit

Permalink
Fallback to formatjs pt for brazilian pt
Browse files Browse the repository at this point in the history
  • Loading branch information
wendevlin committed Oct 28, 2024
1 parent 9db1e52 commit 0753977
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-scripts/gulp/locale-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ const convertToJSON = async (
) => {
let localeData;
try {
// use "pt" for "pt-BR", because "pt-BR" is unsupported by @formatjs
const language = lang !== "pt-BR" ? lang : "pt";

localeData = await readFile(
join(formatjsDir, pkg, subDir, `${lang}.js`),
join(formatjsDir, pkg, subDir, `${language}.js`),
"utf-8"
);
} catch (e) {
Expand Down

0 comments on commit 0753977

Please sign in to comment.