devedmonton / heyburrito

MIT License
6 stars 3 forks source link

No more thanks to give away - text change #7

Open ashiazed opened 5 years ago

ashiazed commented 5 years ago

We need to adjust the text to remove the word burrito You are trying to give away 1 burritos, but you only have 0 burritos left today!

MarkBennett commented 5 years ago

It looks like this specific text is coming from here:

https://github.com/devedmonton/heyburrito/blob/4cbbd50febe54c0d8d503bd947a899592caa3ab6/app/Bot.ts#L123

The name burrito is used in a bunch of places (including to name objects in the code) so we should probably do a larger refactor to remove burrito references. We might want to pull all language resources out and then make an upstream PR.

MarkBennett commented 5 years ago

Just doing a bit of research on possible translation libraries that work on node and in the browser. Some options include:

Based off of usage, ergonomics, and size it looks like polyglot.js might be the best choice.

format.js makes a better attempt to follow proposed (but not implemented) internationalization APIs which may come to the browser at some point, however it looks less ergonomic and seems a bit overcomplex for our current needs.

Both these libraries work in the browser and in Node.js.