-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lang: TR Language added #1
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! 💯 here some feedback about the code. What do you think about the detail page? Can you make it a bit easy to translate to other languages too?
api/[lang]/detail/index.ts
Outdated
}); | ||
|
||
const $ = cheerio.load(html); | ||
//console.log("ss2", html); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this comment
}) | ||
} | ||
|
||
/* $("div.nutrient.black.right.tRight").each((_, elem: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this too
console.log("normali", normalizeText); | ||
|
||
switch (normalizeText) { | ||
case "Enerji": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this detail is too specific with one language. Can you make it more language agnostic? Maybe add some parameters on utils/lang.ts
. Just maybe add this types and update accordingly.
detailTextSeparator: {
energy: string;
protein: string;
fat: string
... etc
}
api/[lang]/detail/index.ts
Outdated
const normalizeText = element.text().replace(/(\r\n|\n|\r\t|\t|\r)/gm, ""); | ||
let item; | ||
const nextELem = element.next().text(); | ||
console.log("normali", normalizeText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this console.log
api/[lang]/detail/index.ts
Outdated
} | ||
|
||
let _url = langConfig.baseUrl + detailUrl; | ||
console.log("ss", _url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all console.log
from code
Someone is attempting to deploy a commit to a Personal Account owned by @mandaputtra on Vercel. @mandaputtra first needs to authorize it. |
No description provided.