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
Configurable language #1236
Configurable language #1236
Conversation
This has some conflicts with the improvements from one of your other PRs. Also, there is another way to implement configuration which is used in other areas of the app, so can you resubmit this as a new PR with that pattern? A good example can be found by looking at the Marking as wontfix for now, but open to a revised PR. |
That's the correct way to get information from the configuration @aeschylus. Not sure what you are looking for? |
Sorry, was closing like 12 PRs simultaneously and don't think I grasped what this was trying to do. If you need to get the configuration dynamically (rather than on initialisation of the whole App using extend), this makes sense. Can you settle the conflict in viewer.js and we can merge from there? |
7f0eb4c
to
e27cd27
Compare
In the meantime, I fixed the conflict, @aeschylus. I would like to add a testcase for this functionality, what would be the best place to do this? |
Looks like viewer.js is still a stub, but that would be the place I think. You would need to test that the language was one thing in the config before the runtime initialisation. Thanks for fixing this up. Looking forward to merging. |
Is it really necessary to have a separate testcase for setting the language, @aeschylus? |
@morpheus-87 Always a fair question. I think it could be useful since it's happening at runtime. Can one of us help set up the test case? |
Would be great, if somebody could help me with setting up the test case. |
Could somebody help me with setting up the test case? |
4bc0e04
to
69c72e7
Compare
69c72e7
to
451ccb7
Compare
@morpheus-87 Hopefully this will help you set up the tests: Specifically, this is to create a skeleton config: https://github.com/ProjectMirador/mirador/blob/detail_images_and_image_choice/spec/widgets/sidePanel.test.js#L17 And then this actually tests something that is in the config: https://github.com/ProjectMirador/mirador/blob/detail_images_and_image_choice/spec/widgets/sidePanel.test.js#L102 |
528beea
to
fed5a69
Compare
fed5a69
to
96b3df2
Compare
I just updated the branch and set up a testcase in |
Thanks @morpheus-87. This looks good to me. |
This PR makes the language of the UI configurable in the init step.