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

Using translated string for state log #7255

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Oct 5, 2019

Fixes: #7254

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

I am wondering if this'll cause issues on filesystems without full UTF-8 support 🤔. This isn't an especially critical button though; we can deal with that if we find a case of it.

@Gudahtt
Copy link
Member

Gudahtt commented Oct 7, 2019

It's too bad... if I had an easy way to test this, I'd suggest wrapping this in try...catch to fallback to using the English string if the localized string fails, but I'm not sure it'd even throw an exception in that case if it did fail. No point in adding a try...catch unless we're sure it'll work.

@ryanml
Copy link
Contributor Author

ryanml commented Oct 7, 2019

@Gudahtt - I think we'd have to modify the behavior of t for that. IIRC if the translation is not available it will just echo out the key.

@Gudahtt
Copy link
Member

Gudahtt commented Oct 7, 2019

@ryanml Sorry I meant to refer to the case where the exportAsFile function fails, not for when t fails. The concern was for the case where the translation is present, but saving the file fails due to filename encoding problems.

Maybe it won't ever fail; I was just speculating. I wasn't confident that all common filesystems supported UTF-8 filenames.

@Gudahtt Gudahtt merged commit 3383eab into MetaMask:develop Oct 7, 2019
@Gudahtt Gudahtt mentioned this pull request Oct 17, 2019
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.

State log file name should use translated string
2 participants