Skip to content

Conversation

Gregoor
Copy link
Contributor

@Gregoor Gregoor commented May 14, 2018

I took a stab it. Happy to make changes, if I went off-convention somewhere 🙃

Also tested it in Common Voice and it indeed fixes common-voice/common-voice#986.

@stasm
Copy link
Contributor

stasm commented May 14, 2018

Yay, thanks! I'll review this tomorrow.

@Gregoor
Copy link
Contributor Author

Gregoor commented May 15, 2018

Great thanks :) Looks like the linter doesn't like my code, but it talks about a line that doesn't exist. Plus locally make lint doesn't report anything to me. Hmm

Copy link
Contributor

@stasm stasm left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for taking this.

return createElement(
Inner,
Object.assign({ getString: this.getString }, this.props)
Object.assign({ getString: (...args) => this.getString(...args) }, this.props)
Copy link
Contributor

@stasm stasm May 15, 2018

Choose a reason for hiding this comment

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

I think the linter complains about this line. Note that this change shouldn't be needed because this.getString is bound to this in line 9. That said, I'd much rather get rid of that bind and the whole constructor and fix the line length here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, that line does exist, I was on the wrong branch, sorry 🙈 I pushed a new commit, which also added a comment and removes the constructor.

Inner,
Object.assign({ getString: (...args) => this.getString(...args) }, this.props)
Object.assign(
// getString needs to be re-bound on updates to trigger a re-render of Inner
Copy link
Contributor Author

@Gregoor Gregoor May 15, 2018

Choose a reason for hiding this comment

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

Fixed and broke the build in the same commit 😁

line length fail no 2

@stasm
Copy link
Contributor

stasm commented May 15, 2018

Sweet, thanks! Can I squash this while merging?

@Gregoor
Copy link
Contributor Author

Gregoor commented May 15, 2018

Sure! Always feel free to squash my commits 😁

@stasm stasm merged commit 8637886 into projectfluent:master May 15, 2018
@stasm
Copy link
Contributor

stasm commented May 15, 2018

Thanks again, @Gregoor! This fixes #194. I'll publish a new version of fluent-react tomorrow. I'm still hoping I can find a solution to #192 to include in the same release.

@stasm
Copy link
Contributor

stasm commented May 16, 2018

I'm close to fixing #192, so I'll give myself another day. Thanks for the patience!

@stasm
Copy link
Contributor

stasm commented May 18, 2018

I published fluent-react 0.7.0 today.

@Gregoor
Copy link
Contributor Author

Gregoor commented May 18, 2018

Awesome, thanks for getting a new release out 🙂

@stasm
Copy link
Contributor

stasm commented May 18, 2018

Thanks again for the PR and the patience. I fixed a few build system-related issues in this release (hence 0.7.0 rather than 0.6.2) and wanted to test them thoroughly before publishing.

@stasm
Copy link
Contributor

stasm commented May 18, 2018

(If you're using the /compat builds, however, you shouldn't notice any changes.)

@Gregoor
Copy link
Contributor Author

Gregoor commented May 18, 2018

Sure, happy to have had an excuse to contribute to fluent 🙃

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

Successfully merging this pull request may close these issues.

Switching languages - sharing on Twitter, wrong language
2 participants