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

Capitalize countries #386

Closed
Tracked by #251
teolemon opened this issue Dec 2, 2022 · 11 comments
Closed
Tracked by #251

Capitalize countries #386

teolemon opened this issue Dec 2, 2022 · 11 comments
Assignees

Comments

@teolemon
Copy link
Member

teolemon commented Dec 2, 2022

What

  • Capitalize countries

Part of

@vedant-z
Copy link

vedant-z commented Dec 2, 2022

@teolemon I just need some help.

Do I need to update the countries.json or other file?

@alexfauquette
Copy link
Member

For lazy people, capitalizing can also be done by using CSS 😇
https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform

@vedant-z
Copy link

vedant-z commented Dec 2, 2022

Even the most workaholic man on this planet will not be able to capitalise all the countries name manually @alexfauquette

Thanks for helping 😊

@vedant-z
Copy link

vedant-z commented Dec 2, 2022

I had one doubt though. Should I capitalise the id as well in json file, because the label is already capitalised.

@alexfauquette
Copy link
Member

You should not touch to ids in any case, since they are the keys used to fetch the API. Modifying ids implies breaking API call

If we are talking about the country input in the question game filter, the options are defined as follow in QuestionFilter.jsx

options={countryNames}
getOptionLabel={(countryTag) => countryTag.slice(3)}

For example when countryTag="en:france" it shows the option "france".

Two solutions:

@StarTrooper08
Copy link

Hey @teolemon, Is this issue still open?

Or is it solved?

I'm just getting started with contributing to Open Food Facts projects.
And I think this issue will be great for getting starting.

Please let me know if this issue is it still open to work on!?

@Sudhanva-Nadiger
Copy link
Contributor

I solved the issue, if u need any help let me know @vedant-z

@alexfauquette
Copy link
Member

@Sudhanva-Nadiger If you already fixed it feal free to open a PR

@Sudhanva-Nadiger
Copy link
Contributor

Okay !! Will do that !!

@StarTrooper08
Copy link

I think this issue has PR merged and it can be closed now!!

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

No branches or pull requests

5 participants