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

Move package.nls.*.json to root #6118

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

Cosifne
Copy link
Member

@Cosifne Cosifne commented Aug 11, 2023

Looks like vs code can only load package.nls.*json from root dir.
Verified:
image

@Cosifne Cosifne requested a review from a team as a code owner August 11, 2023 19:45
package.json Outdated
@@ -70,7 +70,7 @@
"unpackage:vsix": "gulp vsix:release:unpackage",
"updatePackageDependencies": "gulp updatePackageDependencies",
"l10nDevGenerateXlf": "npx @vscode/l10n-dev generate-xlf ./package.nls.json ./l10n/bundle.l10n.json --outFile ./loc/vscode-csharp.xlf",
"l10nDevImportXlf": "npx @vscode/l10n-dev import-xlf ./loc/vscode-csharp.*.xlf --outDir ./l10n"
"l10nDevImportXlf": "npx @vscode/l10n-dev import-xlf ./loc/vscode-csharp.*.xlf --outDir ./l10n && move /l10n/package.nls.*.json ."
Copy link
Member Author

Choose a reason for hiding this comment

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

'move' can't be used on bash. (mv should be there)
But for package.nls.json, if a contributor makes a change in package.json and creates a reference to it. That's everything.
This task should not be run on dev's machine. It should only be run on CI (windows environment, because localization tasks can only be run there)

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't find anything about @vscode/l10n-dev import-xlf to support multiple output-dir. Seems like it can only have one out dir
image

Copy link
Member

Choose a reason for hiding this comment

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

CI is currently linux based I believe

Copy link
Member

Choose a reason for hiding this comment

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

Can we just specify '.' as the output dir so we don't have to move it?

Copy link
Member Author

@Cosifne Cosifne Aug 11, 2023

Choose a reason for hiding this comment

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

No, localization CI is windows see

demands: ImageOverride -equals windows.vs2022preview.amd64

OneLocBuild Task is required to run on windows

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we just specify '.' as the output dir so we don't have to move it?

Yeah but in that case we need to move bundle.l10.*.json to l10 folder

Copy link
Member Author

Choose a reason for hiding this comment

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

Or it's can be something like this, we put all bundle.l10.*.json and package.nls.*.json to root. And change this

"l10n": "./l10n",

I just feel it's too many things under the root

Copy link
Member

Choose a reason for hiding this comment

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

Yeah but in that case we need to move bundle.l10.*.json to l10 folder

Oooh ok yeah can leave it there and move it

OneLocBuild Task is required to run on windows

Ah this runs in the separate pipeline - my bad.

@Cosifne Cosifne merged commit 01e5afd into dotnet:main Aug 11, 2023
@Cosifne Cosifne deleted the dev/shech/correctPackageJsonLocazation branch August 11, 2023 21:03
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.

2 participants