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

[WIP] ES2016 locales #64

Merged
merged 8 commits into from
Jan 21, 2016
Merged

[WIP] ES2016 locales #64

merged 8 commits into from
Jan 21, 2016

Conversation

zspecza
Copy link
Contributor

@zspecza zspecza commented Jan 14, 2016

Ported from the CoffeeScript version in #39

@zspecza
Copy link
Contributor Author

zspecza commented Jan 18, 2016

@hhsnopek sent you a message on slack regarding this PR - could you take a look at it when you have a minute?

@zspecza
Copy link
Contributor Author

zspecza commented Jan 21, 2016

Might have to temporarily disable asynchronous tests until Roots has better ways of disabling analytics for test helpers - this means running tests serially, which will take slightly longer, but only temporary, and is just to get CI tests to pass.

Otherwise, this is almost complete and just needs updated comments. The conditional logic could be improved a little but it's not important - and there could be a few more tests, but we can add these in the future.

@kylemac @hhsnopek care to review anything before I merge this into #55?

@kylemac
Copy link
Contributor

kylemac commented Jan 21, 2016

@declandewet get those tests 🎾 before we review

@zspecza
Copy link
Contributor Author

zspecza commented Jan 21, 2016

@kylemac debugging as we speak. weirdly enough the tests pass locally and have nothing to do with locales so this is somewhat confusing but on it in any case

zspecza added a commit that referenced this pull request Jan 21, 2016
@zspecza zspecza merged commit 6d12ea9 into es2016 Jan 21, 2016
@zspecza zspecza deleted the es2016-locales branch January 21, 2016 20:12
@zspecza
Copy link
Contributor Author

zspecza commented Jan 21, 2016

@hhsnopek - I've merged this in but could you give it a review anyway (when you have time)? I'd like to hear your thoughts. Any changes can be submitted via PR to es2016

@kylemac
Copy link
Contributor

kylemac commented Jan 21, 2016

...and we'll address any comments in a new PR

@@ -119,11 +193,11 @@ function convert_types_to_array (types) {
*/
async function get_all_content (types) {
types = await Promise.all(types)
return types.map(async type => {
let content = await fetch_content(type)
for (const type of types) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you use const instead of let?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Usually, to denote that type won't be changed but rather a new value will be inferred from type. I'm glad you asked this, however - since further down, I actually do change type by setting type.content. I will refactor this to use let eventually.

@hhsnopek
Copy link
Contributor

besides my one question, mainly for my knowledge - I'd like to think there's a better way to accomplish what I did with the locales, tho I'm unsure what to improve without diving into the code myself. 👍 from me 😀

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

Successfully merging this pull request may close these issues.

3 participants