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

Internationalization : remove English static strings from javascript files #4679

Closed
JayanthyChengan opened this issue May 16, 2018 · 2 comments

Comments

@JayanthyChengan
Copy link
Contributor

JayanthyChengan commented May 16, 2018

Example 1 :
/src/main/webapp/file-versions.xhtml [Line 27 ]
/src/main/webapp/dataset-versions.xhtml [Line 27 ]

preload_message = "(Loading versions...)"

Example 2 :
/src/main/webapp/loginpage.xhtml [Line 162 ]
"Your Browser does not support javascript. Please use"

Example 3:
src/main/webapp/resources/js/dv_rebind_bootstrap_ui.js
show_info_msg('Edit Dataverse', 'Edit your dataverse and click Save Changes. Asterisks indicate required fields.');

Example 4:
/src/main/webapp/resources/js/mydata.js [Line 318-322] -- View Next... Results...

@mheppler
Copy link
Contributor

While looking at the pull request for #5299, I did some research on how to solve this javascript issue, and found a Stack Overflow answer which should solve Example 1 and Example 2.

<script>
    var message = '#{bundle[some.key]}';
</script>

For Example 3, I believe I have a workaround for dv_rebind_bootstrap_ui.js which removes that message text, and properly delivers the text via the dataverse pg manage bean -- to be delivered as part of #5299.

That would leave the mydata.js text as the last remaining unsolved example in this issue.

@JayanthyChengan
Copy link
Contributor Author

JayanthyChengan commented Nov 28, 2018

@mheppler Implemented the above mentioned solution for Example 1 and 2. Thanks.

And handled mydata.js(Example 4) by adding hidden field in dataverseuser.xhtml. Could you please review the code . #5351 ? Thanks

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

No branches or pull requests

5 participants