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

misc: read locale files without using require #12721

Merged
merged 3 commits into from
Jul 23, 2021
Merged

Conversation

connorjclark
Copy link
Collaborator

ref #12689

preliminary change for converting this file (way down the line) to ES modules.

importing JSON modules won't be a thing for quite awhile, so we have to switch to fs. Must do all these reads w/o abstraction (no function for DRY) so that bundler can inline the contents for LR.

@connorjclark connorjclark requested a review from a team as a code owner June 29, 2021 21:40
@connorjclark connorjclark requested review from adamraine and removed request for a team June 29, 2021 21:40
@google-cla google-cla bot added the cla: yes label Jun 29, 2021
Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM

const fs = require('fs');

/** @type {Record<string, LhlMessages>} */
const l = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is too short, maybe something like localeFiles

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

Successfully merging this pull request may close these issues.

3 participants