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

change_locale not working. #73

Closed
nicholaelaw opened this issue Jul 18, 2017 · 2 comments
Closed

change_locale not working. #73

nicholaelaw opened this issue Jul 18, 2017 · 2 comments

Comments

@nicholaelaw
Copy link

nicholaelaw commented Jul 18, 2017

Just had a quick trial of the package. Somehow none of the extra locales are working for me. Anything other than English gives an empty page. And if loaded in Chrome, the following errors are logged in the console:

Uncaught TypeError: Cannot read property 'renderers' of undefined
    at Object.renderValue (rpivotTable.js:24)
    at htmlwidgets.js:625
    at Array.forEach (<anonymous>)
    at forEach (htmlwidgets.js:55)
    at htmlwidgets.js:551
    at Array.forEach (<anonymous>)
    at forEach (htmlwidgets.js:55)
    at Object.window.HTMLWidgets.staticRender (htmlwidgets.js:549)
    at HTMLDocument.<anonymous> (htmlwidgets.js:638)

I used the example given in the tutorial:

data(mtcars)
change_locale(rpivotTable(mtcars), 'zh')

So I dug into the temp files, and found the problem: for reasons unknown, the output folder lib/pivottable-zh-1.6.3 is missing its content. I copied over pivot.zh.min.js from the package, and the page is loading fine now.

As I have encountered this sort of behaviour with other packages (flexdashboard, plotly), I am absolutely clueless as how to fix this.

Also, I found a piece of code that looks suspicious at line 33 of locale.R:

system.file("htmlwidgets/lib/pivottable/dist",package="rpivotTable")

It seems that this file, whatever it was meant to do, does not exist in the package. Not sure it's related. Just something that doesn't seem right.

@nicolaskruchten
Copy link
Collaborator

This should be fixed in version 0.3.0 of this library! https://github.com/smartinsightsfromdata/rpivotTable/releases/tag/v0.3.0

@nicholaelaw
Copy link
Author

Nicely done!

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

No branches or pull requests

2 participants