Prefer next’s defaultLocale over hardcoded English
This commit is contained in:
parent
01d6604955
commit
f4d5135453
|
@ -20,7 +20,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
if (user) {
|
if (user) {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
...(await serverSideTranslations(user.locale ?? "en", ["common"])),
|
...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
...(await serverSideTranslations(bestMatch ?? "en", ["common"])),
|
...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -290,7 +290,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
availableLogins,
|
availableLogins,
|
||||||
...(await serverSideTranslations(user.locale ?? "en", ["common"])),
|
...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
availableLogins,
|
availableLogins,
|
||||||
...(await serverSideTranslations(bestMatch ?? "en", ["common"])),
|
...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -337,7 +337,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
availableLogins,
|
availableLogins,
|
||||||
...(await serverSideTranslations(user.locale ?? "en", ["common"])),
|
...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -367,7 +367,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
availableLogins,
|
availableLogins,
|
||||||
...(await serverSideTranslations(bestMatch ?? "en", ["common"])),
|
...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Ŝarĝante…
Reference in New Issue