mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-27 07:59:42 +00:00
fix: fixed available locale list (#603)
This commit is contained in:
@@ -188,12 +188,6 @@ class CustomError extends Error {
|
||||
static USER_NOT_FOUND = "USER_NOT_FOUND";
|
||||
}
|
||||
|
||||
function isLocaleAvailable(locale) {
|
||||
return ["cn", "de", "en", "es", "fr", "it", "ja", "kr", "pt-br"].includes(
|
||||
locale.toLowerCase(),
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
renderError,
|
||||
kFormatter,
|
||||
@@ -207,7 +201,6 @@ module.exports = {
|
||||
getCardColors,
|
||||
clampValue,
|
||||
wrapTextMultiline,
|
||||
isLocaleAvailable,
|
||||
logger,
|
||||
CONSTANTS,
|
||||
CustomError,
|
||||
|
||||
+9
-1
@@ -32,7 +32,7 @@ const statCardLocales = ({ name, apostrophe }) => {
|
||||
"pt-pt": "Total de estrelas",
|
||||
"pt-br": "Total de estrelas",
|
||||
np: "कुल ताराहरू",
|
||||
el: 'Σύνολο Αστεριών',
|
||||
el: "Σύνολο Αστεριών",
|
||||
},
|
||||
"statcard.commits": {
|
||||
cn: "总提交",
|
||||
@@ -190,7 +190,15 @@ const wakatimeCardLocales = {
|
||||
},
|
||||
};
|
||||
|
||||
const availableLocales = Object.keys(repoCardLocales["repocard.archived"]);
|
||||
|
||||
function isLocaleAvailable(locale) {
|
||||
return availableLocales.includes(locale.toLowerCase());
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isLocaleAvailable,
|
||||
availableLocales,
|
||||
statCardLocales,
|
||||
repoCardLocales,
|
||||
langCardLocales,
|
||||
|
||||
Reference in New Issue
Block a user