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

fix: Remove historic countries that do not exist today from country list #5612

Merged
merged 3 commits into from
Nov 18, 2020

Conversation

sachinchauhan2889
Copy link
Contributor

Fixes #5604

Short description of what this resolves:

remove all old countries.

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@auto-label auto-label bot added the fix label Nov 13, 2020
@vercel
Copy link

vercel bot commented Nov 13, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/7zawc5m5h
✅ Preview: https://open-event-frontend-git-country-fix.eventyay.vercel.app

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #5612 (ec22808) into development (aa99edd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #5612   +/-   ##
============================================
  Coverage        23.43%   23.43%           
============================================
  Files              508      508           
  Lines             5377     5377           
  Branches            47       47           
============================================
  Hits              1260     1260           
  Misses            4109     4109           
  Partials             8        8           
Impacted Files Coverage Δ
app/utils/dictionary/demography.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa99edd...ec22808. Read the comment docs.

@sachinchauhan2889 sachinchauhan2889 changed the title fix: Country List in Forms show historic countries that do not exist today fix: Remove historic countries that do not exist today from country list Nov 13, 2020
{
name : 'Czech Republic',
code : 'CZ'
},
{
name : 'German Democratic Republic',
code : 'DD'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer in existence.

{
name : 'Hong Kong',
code : 'HK'
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep Hong Kong.

{
name : 'Taiwan',
code : 'TW'
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taiwan is an existing territory even though China does not recognize it. Where did you get the info for that list? I am not an expert on all countries but it seems not all data is correct here.

{
name : 'East Timor',
code : 'TP'
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check. I think it still exists.

{
name : 'Uganda',
code : 'UG'
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no more Uganda?

{
name : 'Uzbekistan',
code : 'UZ'
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still in existence

Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes do not seem to be entirely correct. Please do more research about this information and also update if a country name or region name has changed. Also point to where you found the information. So we can understand it. Thanks.

@sachinchauhan2889
Copy link
Contributor Author

These changes do not seem to be entirely correct. Please do more research about this information and also update if a country name or region name has changed. Also point to where you found the information. So we can understand it. Thanks.

ok sir, i will check every country one by one

@MeghalBisht
Copy link
Member

These changes do not seem to be entirely correct. Please do more research about this information and also update if a country name or region name has changed. Also point to where you found the information. So we can understand it. Thanks.

ok sir, i will check every country one by one

Hey, are you still working on it?

@sachinchauhan2889
Copy link
Contributor Author

Hey, are you still working on it?

yes

Copy link
Member

@MeghalBisht MeghalBisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use this resource. It has all the countries recognized by the UN(2020).
https://www.worldometers.info/geography/countries-of-the-world/

@sachinchauhan2889
Copy link
Contributor Author

You can use this resource. It has all the countries recognized by the UN(2020).
https://www.worldometers.info/geography/countries-of-the-world/

@MeghalBisht thanks.

@iamareebjamal
Copy link
Member

iamareebjamal commented Nov 16, 2020

https://github.com/annexare/Countries/blob/master/dist/countries.json

const countries = await (await fetch('https://raw.githubusercontent.com/annexare/Countries/master/dist/countries.json')).json()
Object.entries(countries).map(([code, { name }]) => ({ code, name }))

@sachinchauhan2889
Copy link
Contributor Author

https://github.com/annexare/Countries/blob/master/dist/countries.json

const countries = await (await fetch('https://raw.githubusercontent.com/annexare/Countries/master/dist/countries.json')).json()
Object.entries(countries).map(([code, { name }]) => ({ code, name }))

@iamareebjamal sir, I tried this.
But top level await is not working.
getting error ---> top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.
I also used await in async function but error remain there.

Thats why I have totally matched counries in our demography,ts with your provided list. i have checked each and every country one by one and correct them and remove them.

@iamareebjamal
Copy link
Member

I meant run it in your browser console and copy it here, but you seemed to have done the same already

@sachinchauhan2889
Copy link
Contributor Author

I meant run it in your browser console and copy it here, but you seemed to have done the same already

@iamareebjamal yes, sir.

@iamareebjamal iamareebjamal merged commit 1d2518e into fossasia:development Nov 18, 2020
@sachinchauhan2889 sachinchauhan2889 deleted the country-fix branch November 18, 2020 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Country List in Forms show historic countries that do not exist today
4 participants