Skip to content
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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

factorycreacom
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Jun 8, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
fatsecret-unofc-api ✅ Ready (Inspect) Visit Preview Jun 9, 2022 at 10:34AM (UTC)

Copy link
Owner

@mandaputtra mandaputtra left a 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?

});

const $ = cheerio.load(html);
//console.log("ss2", html);
Copy link
Owner

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) => {
Copy link
Owner

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":
Copy link
Owner

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
}

const normalizeText = element.text().replace(/(\r\n|\n|\r\t|\t|\r)/gm, "");
let item;
const nextELem = element.next().text();
console.log("normali", normalizeText);
Copy link
Owner

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

}

let _url = langConfig.baseUrl + detailUrl;
console.log("ss", _url);
Copy link
Owner

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

@vercel
Copy link

vercel bot commented Jun 8, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @mandaputtra on Vercel.

@mandaputtra first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants