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

report: refactor UI string logic #5765

Closed
wants to merge 2 commits into from
Closed

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Aug 1, 2018

cf. #5719

  • all uses of Util.UIString in the renderer pass through Util.str()
  • this fn will use the supplied localized string, if that was provided. otherwise it'll fall back to the original string in the util.js source file. (which is en-us)
  • no more mutate/restore dance on this data

@paulirish paulirish requested a review from brendankenny August 1, 2018 20:02
@paulirish paulirish changed the title report: refactor UI string logic report: refactor UI string logic Aug 1, 2018
@paulirish paulirish added the i18n internationalization thangs label Aug 2, 2018
Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

works for me!

anything spark this? not sure I see it being fundamentally different than the mutation 💃

* @param {string} sourceString
* @return {string}
*/
static str(sourceString) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

does it have to be str? :)

I get that we don't want it to be too similar to i18n ones since it's quite different, but maybe a bit more descriptive since we're already forced to wrap :D

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

at some point we'll want to refactor our global stuff, but not today :)

@brendankenny brendankenny deleted the rendererUIstringrefactor branch January 30, 2019 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n internationalization thangs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants