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

Prepare extension for localization #15

Merged
merged 13 commits into from
Feb 18, 2020
Merged

Conversation

philliphoff
Copy link
Member

@philliphoff philliphoff commented Feb 16, 2020

Prepares the extension for eventual localization:

  • Adds the localization dependencies (vscode-nls)
  • Updates the codebase to use the localize() function for strings and package.json localization mechanisms
  • Integrates localization into the build pipeline (using vscode-nls-dev)
  • Switches to Gulp as the underlying build process (to accommodate the localization tasks)
  • Updates the CI pipeline accordingly

Resolves #14.

messageFormat: nls.MessageFormat.file
};

// TODO: Should we use VSCODE_NLS_CONFIG?
Copy link
Contributor

@bwateratmsft bwateratmsft Feb 18, 2020

Choose a reason for hiding this comment

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

I think VSCODE_NLS_CONFIG gets automatically consumed by nls.config()? Should double check.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the comment was related to other extensions which seem to pass process.env.VSCODE_NLS_CONFIG directly to the config() method, which seems redundant given that vscode-nls appears to handle that environment variable internally. Personally, I like the ability to configure just our extension as having a specific locale (e.g. pseudo), without having the entire product use that locale.

Until we actually have translations for another language I'm not 100% sure the pipeline works from start to end-packaged-VSIX. That said, it's likely to require, at most, a couple of minor tweaks (which was the point of this PR).

Another question will be how the localization pipeline integrates the with an upcoming bundling change (to use webpack).

Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

Some comments but looks good!

@philliphoff philliphoff merged commit 6bbb2bb into master Feb 18, 2020
@philliphoff philliphoff deleted the philliphoff-localization branch February 18, 2020 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate localizability into development/build process
2 participants