Closed xfq closed 3 years ago
hrm,,, it seems working for me, showing only English (for English button) or only Japanese (for 日本語 button)... Could you point specific point(s) I can check?
we don't have previousPublishDate in the HEAD yet, so I think this difference is expected behavior.
What is a right way of testing the function?
we don't have previousPublishDate in the HEAD yet, so I think this difference is expected behavior.
That makes sense.
However, we also need to make the code more robust (for example, by handling the exceptions), otherwise when there's a slight change in the ReSpec config or the spec header template, the entire language switching function may not be able to work correctly.
What is a right way of testing the function?
Not sure if you mean how to test the behavior in the current ED, or how to write some JavaScript tests for this functionality.
If you mean the former, you can just click 日本語 in https://w3c.github.io/jlreq/ to see the result.
If you mean the latter, I guess we need to use some testing framework with a test runner to run it in a browser (or jsdom).
However, we also need to make the code more robust (for example, by handling the exceptions), otherwise when there's a slight change in the ReSpec config or the spec header template, the entire language switching function may not be able to work correctly.
Ah, yes on that point. I wondered whether I've made another mistake for upcoming release (and forgot any other item..). Considering both easy to be noticed and not to make any change to the production (after compiled/exported by respec), how about
try { switchLang() }
I would recommend always testing the switch language functionality by clicking on the buttons (as a user would) before sending a publication request (preferably with the console window open, since there are actually problems associated with the English button, although things appear to work).
@himorin, i think you need to urgently warn the webmaster not to publish until this is fixed, given the time zone differences. Otherwise he may publish while you are sleeping.
@himorin, i think you need to urgently warn the webmaster not to publish until this is fixed, given the time zone differences. Otherwise he may publish while you are sleeping.
As noted above, this error is only at github.io ED, since published one has previousPublishDate but ED not. So, no error is detected with the published one.
I would recommend always testing the switch language functionality by clicking on the buttons (as a user would) before sending a publication request (preferably with the console window open, since there are actually problems associated with the English button, although things appear to work).
This will help, but it is not enough for people reading ED (unless we publish new versions frequently).
closing since #234 was merged.
After https://github.com/w3c/jlreq/pull/230 is merged, language switching doesn't seem to work in the ED now.
Click 日本語 in https://w3c.github.io/jlreq/ and https://w3c.github.io/jlreq/?specStatus=WG-NOTE&publishDate=2020-08-11&previousPublishDate=2012-04-03&previousMaturity=WG-NOTE and compare the results.
Since this problem is not the first time (see #123), I suggest that we write some tests for this functionality and run them with Travis CI.
/cc @r12a