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

April snapshot of Mobile roadmap #213

Closed
10 tasks done
tidoust opened this issue Apr 13, 2018 · 7 comments
Closed
10 tasks done

April snapshot of Mobile roadmap #213

tidoust opened this issue Apr 13, 2018 · 7 comments

Comments

@tidoust
Copy link
Member

tidoust commented Apr 13, 2018

Goal is to publish a new snapshot of the Mobile roadmap by 25 April 2018. Some things that need to be done:

@xfq
Copy link
Member

xfq commented Apr 14, 2018

I just updated the Chinese version. It's interesting to see the name of some specs changed to add or remove the level, e.g., 1, 2, 3, 4.

Maybe it's because the spec names in tr.rdf and the names returned by W3C API are different.

@tidoust
Copy link
Member Author

tidoust commented Apr 16, 2018

Maybe it's because the spec names in tr.rdf and the names returned by W3C API are different.

Yes, I do not exactly know what triggers the difference (my understanding is that tr.rdf is generated from the same database), but the new titles seem correct...

@tidoust
Copy link
Member Author

tidoust commented Apr 17, 2018

Note I unchecked "Make sure that the Chinese version is up-to-date" because the About page I just prepared will have to be translated once merged.

I also added the Chrome Platform Status data bug to the list of issues to solve before publishing a snapshot. Never good to publish data we know may be incorrect...

@xfq
Copy link
Member

xfq commented May 3, 2018

I have updated the Chinese version to match the latest English version. One remaining issue is the localization of the date:

01d81e5#diff-2b0256e7169e074ea636d8ad1f0ddbf2R786

It should use zh-CN in the Chinese version. (Although cmn-Hans is more accurate, it isn't supported in the browsers I tested.)

@tidoust
Copy link
Member Author

tidoust commented May 3, 2018

That's a good point. I used toLocaleDateString to generate the date precisely for that purpose, but forgot to use the language of the underlying page as parameter to the call.

Now, trouble is it only seems to work in a "real" browser. JSDOM, used to generate the pages in batch, does not support zh-CN on my computer as far as I can tell :(

That said, am I right to think that the correct way to represent "April 2018" in Chinese would be "2018年4月"? Or would you expect something else? If that's the right output, I'll hardcode the rule for Chinese.

tidoust added a commit to tidoust/media-web-roadmap that referenced this issue May 3, 2018
Last modified dates and publication dates were always formatted in English.
They should now be formatted according to the language of the page.

Under the hoods, the `toLocaleDateString` method gets used to format the date.
Note browsers may only support a subset of locale settings in practice (and
may for instance only support locale settings that are actually local to the
user), so that mechanism may not always work.

In particular, JSDOM, used to generate all roadmap pages in batch, does not
seem to support Chinese, so rules for Chinese are hardcoded if JSDOM is
detected.

This commit is a fix for:
w3c#213 (comment)
@xfq
Copy link
Member

xfq commented May 3, 2018

Right, "2018年4月" is "April 2018" in Chinese.

Besides hardcoding the rule, another option might be using the DateTimeFormat object from intl.

xfq pushed a commit that referenced this issue May 3, 2018
Last modified dates and publication dates were always formatted in English.
They should now be formatted according to the language of the page.

Under the hoods, the `toLocaleDateString` method gets used to format the date.
Note browsers may only support a subset of locale settings in practice (and
may for instance only support locale settings that are actually local to the
user), so that mechanism may not always work.

In particular, JSDOM, used to generate all roadmap pages in batch, does not
seem to support Chinese, so rules for Chinese are hardcoded if JSDOM is
detected.

This commit is a fix for:
#213 (comment)
@tidoust
Copy link
Member Author

tidoust commented May 3, 2018

Although not really advertized yet, the April 2018 version of the mobile roadmap has been released. Closing this meta-issue accordingly.

@tidoust tidoust closed this as completed May 3, 2018
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

2 participants