mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 20:36:35 +00:00
Fallback to formatjs pt for brazilian pt (#22570)
* Fallback to formatjs pt for brazilian pt * Update build-scripts/gulp/locale-data.js Co-authored-by: Paul Bottein <paul.bottein@gmail.com> --------- Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
parent
3e0c998e74
commit
e55f32ae91
@ -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" ? "pt" : lang;
|
||||
|
||||
localeData = await readFile(
|
||||
join(formatjsDir, pkg, subDir, `${lang}.js`),
|
||||
join(formatjsDir, pkg, subDir, `${language}.js`),
|
||||
"utf-8"
|
||||
);
|
||||
} catch (e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user