Skip to content

Add country list as dependency#248

Closed
kesselb wants to merge 1 commit intomasterfrom
update-countrylist
Closed

Add country list as dependency#248
kesselb wants to merge 1 commit intomasterfrom
update-countrylist

Conversation

@kesselb
Copy link
Copy Markdown
Contributor

@kesselb kesselb commented Oct 26, 2019

Will add some missing countries but drops Somaliland.

I'm not sure about this one. It might be easier (and better for the bundle size) to just add the missing countries to nameProvider.js instead of adding a external dependency. I don't think there are many changes for the country list anyway.

This PR:

Hash: eb6e69ed5847ad00515c
Version: webpack 4.41.0
Time: 4313ms
Built at: 10/26/2019 3:57:18 PM
                                Asset      Size  Chunks                         Chunk Names
    privacy.0.9958ee86b5ff32375049.js  14.3 KiB       0  [emitted] [immutable]  
privacy.0.9958ee86b5ff32375049.js.map  64.1 KiB       0  [emitted] [dev]        
    privacy.1.6b147bef841517d642a9.js   107 KiB       1  [emitted] [immutable]  
privacy.1.6b147bef841517d642a9.js.map   211 KiB       1  [emitted] [dev]        
    privacy.2.e937d9e66329d255e03a.js   134 KiB       2  [emitted] [immutable]  
privacy.2.e937d9e66329d255e03a.js.map   271 KiB       2  [emitted] [dev]        
    privacy.4.0b87012a50aa53ec3854.js   202 KiB       4  [emitted] [immutable]  
privacy.4.0b87012a50aa53ec3854.js.map   399 KiB       4  [emitted] [dev]        
    privacy.5.c5c87f38749ebe4c6e7a.js  3.96 KiB       5  [emitted] [immutable]  
privacy.5.c5c87f38749ebe4c6e7a.js.map  11.9 KiB       5  [emitted] [dev]        
    privacy.6.76a9a0360a6a57579911.js  4.47 KiB       6  [emitted] [immutable]  
privacy.6.76a9a0360a6a57579911.js.map  11.6 KiB       6  [emitted] [dev]        
    privacy.7.c61782902684509fdc30.js  60.9 KiB       7  [emitted] [immutable]  
privacy.7.c61782902684509fdc30.js.map  80.6 KiB       7  [emitted] [dev]        
    privacy.8.4dc495e61928029c75ce.js  1.41 KiB       8  [emitted] [immutable]  
privacy.8.4dc495e61928029c75ce.js.map  4.15 KiB       8  [emitted] [dev]        
                           privacy.js   157 KiB       3  [emitted]              main
                       privacy.js.map   776 KiB       3  [emitted] [dev]        main
Entrypoint main = privacy.js privacy.js.map

Master:

Hash: a4d03edf6cc2654c18a4
Version: webpack 4.41.0
Time: 9272ms
Built at: 10/26/2019 4:00:08 PM
                                Asset      Size  Chunks                         Chunk Names
    privacy.0.9958ee86b5ff32375049.js  14.3 KiB       0  [emitted] [immutable]  
privacy.0.9958ee86b5ff32375049.js.map  64.1 KiB       0  [emitted] [dev]        
    privacy.1.6b147bef841517d642a9.js   107 KiB       1  [emitted] [immutable]  
privacy.1.6b147bef841517d642a9.js.map   211 KiB       1  [emitted] [dev]        
    privacy.2.e937d9e66329d255e03a.js   134 KiB       2  [emitted] [immutable]  
privacy.2.e937d9e66329d255e03a.js.map   271 KiB       2  [emitted] [dev]        
    privacy.4.3905719ad124c4e229f8.js  3.96 KiB       4  [emitted] [immutable]  
privacy.4.3905719ad124c4e229f8.js.map  11.9 KiB       4  [emitted] [dev]        
    privacy.5.087367969a9a6072ae5a.js  4.47 KiB       5  [emitted] [immutable]  
privacy.5.087367969a9a6072ae5a.js.map  11.6 KiB       5  [emitted] [dev]        
    privacy.6.5f09af7f6b9fac797d76.js   193 KiB       6  [emitted] [immutable]  
privacy.6.5f09af7f6b9fac797d76.js.map   397 KiB       6  [emitted] [dev]        
    privacy.7.b9fa68b157b52aadfa95.js    68 KiB       7  [emitted] [immutable]  
privacy.7.b9fa68b157b52aadfa95.js.map    96 KiB       7  [emitted] [dev]        
    privacy.8.4dc495e61928029c75ce.js  1.41 KiB       8  [emitted] [immutable]  
privacy.8.4dc495e61928029c75ce.js.map  4.15 KiB       8  [emitted] [dev]        
                           privacy.js   157 KiB       3  [emitted]              main
                       privacy.js.map   776 KiB       3  [emitted] [dev]        main
Entrypoint main = privacy.js privacy.js.map

I'm having troubles to build the app locally so the above make all output is might be wrong. Leaving this here for your thoughts.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb added 3. to review enhancement New feature or request labels Oct 26, 2019
@kesselb kesselb requested a review from georgehrke October 26, 2019 14:05
Copy link
Copy Markdown
Member

@georgehrke georgehrke left a comment

Choose a reason for hiding this comment

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

The biggest problem is see right now is the map.
Even if the update this list, we have no way of generating an SVG world map from that npm module.

Comment thread src/nameProvider.js
return getData().map(country => {
return {
code: country.code,
label: t('privacy', country.name)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not translatable.

The script that extracts our translations needs the real string, not a variable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh :(

Comment thread src/nameProvider.js
return element.label
const name = getName(code)
if (name) {
return t('privacy', name)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants