OiWorld / CarbonFootprint

A Google Chrome browser extension that displays carbon footprint information in Google Maps.
34 stars 33 forks source link

Replace 'Gasoline' term with 'Petrol' based on their location. #128

Closed boro741 closed 7 years ago

boro741 commented 7 years ago

As in India also in some countries like UK Gasoline is referred as Petrol. So replacing the term based on their location would ease people in understanding. screen shot 2016-12-04 at 11 26 13 pm

ceilican commented 7 years ago

That's a great idea!

Are you planning to implement it?

boro741 commented 7 years ago

Yeah I'm planning for it.

ceilican commented 7 years ago

Ok. Thanks! Here are some tips:

1) I think it is better to make the fuel name depend on the user's "language/locale" preferences, rather than his/her location. For example, if the user has "en-UK" as his locale, he would still prefer to see "petrol" instead of "gasoline", even if he is currently located in the US.

2) @PrateekGupta1509 created a mechanism to allow internationalization/localization of the options page based on locales. Please use his mechanism.

Good luck!

boro741 commented 7 years ago

Thanks! That's a great hint for me to start.

boro741 commented 7 years ago

screen shot 2016-12-29 at 8 55 24 pm

Now I would be allowing petrol to display when the user selects Imperial and Gasoline when they select the US.

And for a metric should I keep both?

ceilican commented 7 years ago

Hi @boro741 ! Thanks for the screenshot. I like how it is looking. Maybe we should simply keep both "Petrol" and "Gasoline" as options independently of what the unit system chosen by the user?

boro741 commented 7 years ago

I've added Petrol to the list. But I don't know what broken when the map is opened it doesn't automatically pop-up on a new tab.

Here's the link I made changes to the file.

Kolpa commented 7 years ago

That only happens if you never saved your settings, After saving them once you can open the settings again by clicking the extension icon and selecting options in the pop-up.

boro741 commented 7 years ago

ok got it. Thank you @Kolpa

boro741 commented 7 years ago

Solution to this PR

ceilican commented 7 years ago

Thanks!