profile
viewpoint
Eric Lewis ericandrewlewis Software Engineer @google New York, NY http://www.ericandrewlewis.com

ericandrewlewis/bitmap-js 11

Read and create bitmap image files in Node

ericandrewlewis/create-react-app-minimal 10

create-react-app with my preferred src boilerplate

ericandrewlewis/c-plus-plus-pointers-cheat-sheet 2

Because pointers are hard as fuck

ericandrewlewis/cool-text-converter 1

ḁdd some̊ spice̊ to ẙoůr̥ life̊

aaronjorbin/shinier-updates 0

More Shiny Updates for WordPress

ericandrewlewis/Adafruit-LED-Backpack-Library 0

Adafruit LED Backpack Library for our 8x8 matrix and 7-segment LED backpacks

create barnchericandrewlewis/schotter

branch : master

created branch time in 20 days

created repositoryericandrewlewis/schotter

created time in 20 days

issue commentzhik/east-village-essential-small-business

New Buttons at top of site

We should start building translation-work into the development process, so that I'm not a bottleneck for all translations. I'll do some thinking about this over the weekend!

jpaulgale

comment created time in a month

issue commentzhik/east-village-essential-small-business

Internationalize category titles

The category titles are defined in Filters.svelte, here's where the "groceries" word is.

These words are combined with an up-to-date list of categories attached to locations in the database, and finally set the overallCategoryItems variable, which is passed down to the <CategoryFilter />.

I attempted to translate these items in this commit, but it broke the category filter functionality. In CategoryFilter.svelte, I saw the selected state of the category would be updated on that line of code in the debugger. However, the final state of the prop rendered by Svelte would have all the categories[].selected all set to false.

ericandrewlewis

comment created time in a month

issue openedzhik/east-village-essential-small-business

Internationalize category titles

The category titles are not being translated:

Screen Shot 2020-04-24 at 8 02 53 AM

created time in a month

issue closedzhik/east-village-essential-small-business

Internationalization

I don't have exact numbers on our neighborhood's primary language representation. However, census data tells us that three common languages spoken in the East Village are English, Spanish, and Chinese.

We should provide Spanish and Chinese versions of our site, if we can.

closed time in a month

ericandrewlewis

issue commentzhik/east-village-essential-small-business

Internationalization

We've generally implemented a setup for internationalization, although there are bugs remaining. I'm going to close this general ticket out and open more specific ones.

ericandrewlewis

comment created time in a month

push eventericandrewlewis/east-village-essential-small-business

Eric Andrew Lewis

commit sha d1615341b9ce289c7bd5baa7d870a14e618178ea

Add Traditional Chinese translation

view details

push time in a month

push eventericandrewlewis/east-village-essential-small-business

Eric Andrew Lewis

commit sha daa17dc08eef1d433c2dd0476cb214ea27f71c6e

Add Traditional Chinese translation

view details

push time in a month

push eventericandrewlewis/east-village-essential-small-business

Eric Andrew Lewis

commit sha c9b87cad839e606f5ba813ad5865e75c6cacd6f2

Add Traditional Chinese translation

view details

push time in a month

create barnchericandrewlewis/east-village-essential-small-business

branch : 042301

created branch time in a month

push eventericandrewlewis/east-village-essential-small-business

Eric Andrew Lewis

commit sha e23608cba2798f96fe8da95a3be6a30877bd5674

Introduce svelte-i18n for translations. This commit: - Adds the dependency - Initializes support for internationalization in src/i18n.js. - Loads the user's preferred locale based on window.navigator.language. I don't believe this will make a correct choice very often, and we should offer links in a follow-up PR to allow the user to change their language. - Create dictionary files in `src/i18n-dictionaries` where we can keep translated strings. For now I included English and Spanish. - Introduce one translated string for testing.

view details

Zhi Keng He

commit sha 89b463c3713c7b83e1b9f052763c5d4e55b4b44d

Merge pull request #2 from ericandrewlewis/41601 Introduce svelte-i18n for translations.

view details

Zhi Keng He

commit sha 42059bc3aabca471ec60e490381502f5c3804b37

add deploy to gh-pages

view details

Eric Andrew Lewis

commit sha f3825f030ddac21e4edc88c71732709104e684ac

Initial pass swapping out hardcoded strings for message identifiers

view details

Zhi Keng He

commit sha 8ec0623231aab38b9e928ab9fb297a966dce28fd

Merge pull request #3 from ericandrewlewis/4162 Initial pass swapping out hardcoded strings for message identifiers

view details

Zhi Keng He

commit sha 1cd15b858d16d0cb841ac8fd56c0a908c93ce789

Google Analytics

view details

Zhi Keng He

commit sha 94f78c2217ee027a3f8a0e6d7f2261e4c7faf626

Adjust icon sizes

view details

Zhi Keng He

commit sha 69176de2273859b888a4c5dd32afea713e946052

Remove unused component

view details

Zhi Keng He

commit sha 93804a54eca50925c2f8032da02d718ed7e7ad5f

Change placeholder and error text to be more helpful

view details

Zhi Keng He

commit sha 9087197975ee5d428ab0ac681f7501081b5978da

Order Categories

view details

Zhi Keng He

commit sha e40a5ef385477ea54beb204c03dd7f1097ab0cab

Update laundromat icons/color and shadow

view details

Zhi Keng He

commit sha 71cf7ccea3450929364580cc5153c93da90e2aac

Added 'marked' library to convert notes to markdown html

view details

Zhi Keng He

commit sha 72789e1af47c2e3f415aac40eb750017ad1b314b

Added trim and lower to fix 'dessert' not ordering properly

view details

Zhi Keng He

commit sha f2fa13bb3f6f7e61c3451851573a7cbdb980e636

Temp hide error message

view details

Zhi Keng He

commit sha 4637d764e8256f3963f31bf3ab306d19647437e2

change favicon

view details

Zhi Keng He

commit sha 7d79d42348900783688e4ae6a8125226351ccf55

code: map and icon attribution

view details

Zhi Keng He

commit sha 288e19529ec018ee5ae86f901d48736987d1fc07

code: added meta description

view details

Eric Andrew Lewis

commit sha fac885fd6a957ed981486e68681e6afea82265ac

Add strings that have surrounding context required to translate.

view details

Eric Andrew Lewis

commit sha 1fabe5dc82456708a5a1d3372a09ae6c2469c784

Introduce Spanish and Chinese translation files. This is not perfect. I've left the langauge switcher buttons disabled to allow time for follow-up about a few bugs.

view details

Zhi Keng He

commit sha 7bd04333fdd42f58940c55d32fdbf3da4dcde591

Merge pull request #4 from zhik/0420-01 Add strings that have surrounding context required to translate.

view details

push time in a month

Pull request review commentzhik/east-village-essential-small-business

Add Giftcard & Fundraiser and Special Offers fields

             </NotEmpty>         </div> +        <MarkdownField title={$_('details.notes')} content={$details.notes}/>

👍

zhik

comment created time in a month

Pull request review commentzhik/east-village-essential-small-business

Add Giftcard & Fundraiser and Special Offers fields

             </NotEmpty>         </div> +        <MarkdownField title={$_('details.notes')} content={$details.notes}/> -        <NotEmpty value={$details.notes}>-            <p><strong>{$_('details.notes')}: </strong>{@html marked($details.notes)}</p>-        </NotEmpty>--        {#if $details.buyagiftcardtosupportyourfavoriteevmerchantorganization || $details.supportyourfavoriteevmerchantorganizationsfundraiser}+        {#if $details.buyagiftcardtosupportyourfavoriteevmerchantorganization ||+            $details.supportyourfavoriteevmerchantorganizationsfundraiser ||+            $details.giftcardfundraiser ||+            $details.specialoffers+        }             <hr>+            <MarkdownField title={$_('details.giftcardfundraiser')} content={$details.giftcardfundraiser}/>

If we don't want to render anything, then you could add a condition around the component instance:

{#if $details.specialoffers}
  <MarkdownField title={$_('details.specialoffers')} content={$details.specialoffers}/>
{/if}

This pattern will result in more code since there will be an if block wherever you use the component instance, compared to a single if / return null in the component. However, I think it's preferable because it shows you that sometimes nothing is rendered for this component without having to look at the underlying component code.

zhik

comment created time in a month

Pull request review commentzhik/east-village-essential-small-business

Add Giftcard & Fundraiser and Special Offers fields

             </NotEmpty>         </div> +        <MarkdownField title={$_('details.notes')} content={$details.notes}/> -        <NotEmpty value={$details.notes}>-            <p><strong>{$_('details.notes')}: </strong>{@html marked($details.notes)}</p>-        </NotEmpty>--        {#if $details.buyagiftcardtosupportyourfavoriteevmerchantorganization || $details.supportyourfavoriteevmerchantorganizationsfundraiser}+        {#if $details.buyagiftcardtosupportyourfavoriteevmerchantorganization ||+            $details.supportyourfavoriteevmerchantorganizationsfundraiser ||+            $details.giftcardfundraiser ||+            $details.specialoffers+        }             <hr>+            <MarkdownField title={$_('details.giftcardfundraiser')} content={$details.giftcardfundraiser}/>

If $details.giftcardfundraiser is empty, do we still want to render this component instance? Similar question for the next line.

zhik

comment created time in a month

Pull request review commentzhik/east-village-essential-small-business

Add Giftcard & Fundraiser and Special Offers fields

             </NotEmpty>         </div> +        <MarkdownField title={$_('details.notes')} content={$details.notes}/>

Who has access to set the fields passed to these instances of <MarkdownField /> - $details.notes, $details.giftcardfundraiser, and $details.specialoffers? This is a potential cross-side scripting vulnerability.

zhik

comment created time in a month

PR opened zhik/east-village-essential-small-business

Introduce Spanish and Chinese translation files.

This is not perfect. I've left the langauge switcher buttons disabled to allow time for follow-up about a few bugs.

+119 -2

0 comment

4 changed files

pr created time in a month

create barnchericandrewlewis/east-village-essential-small-business

branch : 042101

created branch time in a month

PR opened zhik/east-village-essential-small-business

Add strings that have surrounding context required to translate.

Some strings like Last updated: 04/01/20 will require contextual translation. We can't just translate the Last updated: string...since some languages may put the date on the left side of some text...or who knows.

svelte-i18n's documentation did not make this clear to me originally but I found a unit test that expresses the usage.

See #1

+6 -6

0 comment

2 changed files

pr created time in a month

create barnchzhik/east-village-essential-small-business

branch : 0420-01

created branch time in a month

create barnchericandrewlewis/east-village-essential-small-business

branch : 4162

created branch time in a month

push eventericandrewlewis/east-village-essential-small-business

Zhi Keng He

commit sha 0a1c985890ba8785ab6220639a386e4775fc2b4f

Replace icons and category filter colors

view details

Zhi Keng He

commit sha 7b38d79378ef65a62ec690e59a317b86fc652f3a

Small ux fixes to map and links

view details

Zhi Keng He

commit sha fb19ca2241cd31540ca05a213e80e314d4fbdae0

Add title and footer info

view details

Zhi Keng He

commit sha 20adbe3f013d651213fbc98c4f507a88017ad775

fix icons and subtitle

view details

Zhi Keng He

commit sha e3fa812e539352c8148ff45f02f50aa02508683f

add icons to git

view details

Zhi Keng He

commit sha 94274b43443b4abe325a1d24acea1c639135d626

hide unknown and closed locations

view details

Zhi Keng He

commit sha ba1532d57cefd1e9f2f01df726d6cce323e54922

added readme

view details

Eric Andrew Lewis

commit sha e23608cba2798f96fe8da95a3be6a30877bd5674

Introduce svelte-i18n for translations. This commit: - Adds the dependency - Initializes support for internationalization in src/i18n.js. - Loads the user's preferred locale based on window.navigator.language. I don't believe this will make a correct choice very often, and we should offer links in a follow-up PR to allow the user to change their language. - Create dictionary files in `src/i18n-dictionaries` where we can keep translated strings. For now I included English and Spanish. - Introduce one translated string for testing.

view details

push time in a month

PR opened zhik/east-village-essential-small-business

Introduce svelte-i18n for translations.

This commit:

  • Adds the dependency
  • Initializes support for internationalization in src/i18n.js.
  • Loads the user's preferred locale based on window.navigator.language. I don't believe this will make a correct choice very often, and we should offer links in a follow-up PR to allow the user to change their language.
  • Create dictionary files in src/i18n-dictionaries where we can keep translated strings. For now I included English and Spanish.
  • Introduce one translated string for testing.
+124 -3

0 comment

8 changed files

pr created time in a month

create barnchericandrewlewis/east-village-essential-small-business

branch : 41601

created branch time in a month

PR opened kaisermann/svelte-i18n

Fix invalid JSON example

The JSON spec does not allow a trailing comma

+2 -2

0 comment

1 changed file

pr created time in a month

push eventericandrewlewis/svelte-i18n

Eric Lewis

commit sha ceea185fc24659e6c1659559bdd26885471ebdb3

Fix invalid JSON example The JSON spec does not allow a trailing comma

view details

push time in a month

fork ericandrewlewis/svelte-i18n

Internationalization library for Svelte

fork in a month

issue commentzhik/east-village-essential-small-business

Internationalization

I wrote a proposed design for internationalization. Please take a look and give feedback.

ericandrewlewis

comment created time in a month

issue openedzhik/east-village-essential-small-business

Internationalization

I don't have exact numbers on our neighborhood's primary language representation. However, census data tells us that three common languages spoken in the East Village are English, Spanish, and Chinese.

We should provide Spanish and Chinese versions of our site, if we can.

created time in a month

push eventericandrewlewis/doe-meal-locator

Eric Andrew Lewis

commit sha 8f9d164266c3939e35e482d66e4ed138b6af1c6e

Target the address while excluding extraneous text from the DOM. This avoids the district number and the text from the link to the DOH's latest inspection getting included in the output.

view details

Eric Andrew Lewis

commit sha 13b61199192b316cf99d3b37cb292a6bfe755f1d

Send the scraping output to a CSV file.

view details

Eric Andrew Lewis

commit sha b4853584d13f75055e68a4565436fa988fc5053b

Get locations from all 32 school districts in one script execution.

view details

push time in 2 months

fork ericandrewlewis/doe-meal-locator

Scraping the data from the DOE meal locator https://www.opt-osfns.org/schoolfoodny/meals/

fork in 2 months

create barnchericandrewlewis/covid-art-project

branch : master

created branch time in 2 months

created repositoryericandrewlewis/covid-art-project

created time in 2 months

push eventericandrewlewis/ericandrewlewis.com

Eric Andrew Lewis

commit sha c7b11482590ec3f865ba8d3e8ab5f49af157a4bf

Grace and Nature

view details

push time in 2 months

push eventericandrewlewis/ericandrewlewis.com

Eric Andrew Lewis

commit sha 9014bf5b6bc7b248e204f153b3e226bd5694e6dc

Whoops mixed up text edit

view details

push time in 2 months

push eventericandrewlewis/ericandrewlewis.com

Eric Andrew Lewis

commit sha 944131f51afa59b3422c50c5c4cf41f2f2e05dc2

some touches

view details

Eric Andrew Lewis

commit sha 62433ef713299787dd87e659774d27271601ea79

Make site links easier to understand

view details

push time in 2 months

push eventericandrewlewis/ericandrewlewis.com

Eric Andrew Lewis

commit sha 5cbdcce1c9ce079d92b5a042d661ff7f0ce237bd

add link to stay in touch

view details

push time in 2 months

push eventericandrewlewis/ericandrewlewis.com

Eric Andrew Lewis

commit sha f7b23324a4983404ec3638e5f353cd184d87a70a

Add article title, background color

view details

push time in 2 months

push eventericandrewlewis/ericandrewlewis.com

Eric Andrew Lewis

commit sha 56ceee3998e7dc225fbf286f9056c1cf58863097

initial website

view details

push time in 2 months

created tagericandrewlewis/ericandrewlewis.com

tagv1

created time in 2 months

more