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

Add OneLocBuild template to arcade #6977

Merged
merged 40 commits into from
Mar 17, 2021
Merged

Add OneLocBuild template to arcade #6977

merged 40 commits into from
Mar 17, 2021

Conversation

jonfortescue
Copy link
Contributor

@jonfortescue jonfortescue commented Feb 18, 2021

Tested in sdk and winforms, working in both (winforms pending this PR to OneLocBuild to update their NuGet; working proof of concept for that here).

To double check:

@jonfortescue jonfortescue self-assigned this Feb 18, 2021
@jonfortescue jonfortescue marked this pull request as draft February 18, 2021 18:56
@jonfortescue jonfortescue changed the title Localization tests Add OneLocBuild template to arcade Feb 18, 2021
Base automatically changed from master to main March 8, 2021 23:09
$langXlfFiles = @()
if ($allXlfFiles.Length -gt 0) {
$isMatch = $allXlfFiles[0].FullName -Match "\.([\w-]+)\.xlf" # matches '[langcode].xlf'
$firstLangCode = $Matches.1
Copy link
Member

Choose a reason for hiding this comment

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

What happens if there is more than one "langcode" in the repo (maybe for test assets or soemthing). It seems like the code should at least produce some sort of warning in that situation, since it's going to pick one arbitrarily at that point (and potentially not even deterministically, since we aren't sorting anything)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out that it doesn't matter -- it just needs a file with a langcode since all xlfs also contain English text equivalents, so we just take the first one and make it the "generic" xlf. This solution is actually ripped directly from their docs: https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/1450/OneLocBuild-Non-Enu-source-file-support-(workaround)

Copy link
Member

@ChadNedzlek ChadNedzlek Mar 12, 2021

Choose a reason for hiding this comment

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

But this implies that every set of "xlf" files in the entire repository have the same set of languages. What if I have a.en.xlf, and b.fr.xlf.

This means that b.fr.xlf will be lost, because we are only going to look for *.en.xlf.

Copy link
Member

@ChadNedzlek ChadNedzlek Mar 12, 2021

Choose a reason for hiding this comment

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

Is that first sentence going to be something this code assumes, but doesn't validate? That seems... scary... And validating it shouldn't be too hard... just search for ALL xlf files, and then group them by the first part. (That'd be a lot easier if this was C# and not powershell)

Copy link
Member

Choose a reason for hiding this comment

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

Theoretically "dotnet script" is a thing. :-) Just sayin...

Copy link
Contributor Author

@jonfortescue jonfortescue Mar 12, 2021

Choose a reason for hiding this comment

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

I'm fairly certain that it's a valid assumption to make because the LanguageSet variable applies to the entire repository -- all xlfs will be translated into the same set of languages.

I agree that the second solution is more robust but it's pretty difficult in powershell... that's exactly what I would have done had this been C# haha.

Copy link
Member

Choose a reason for hiding this comment

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

Ouch, quite the assumption for the tool to make, especially with repositories as large as ours. I hope that doesn't bite us. It... seems to hold for the repos I happen to have on my box? :-)

@jonfortescue jonfortescue requested a review from riarenas March 12, 2021 21:35
@jonfortescue
Copy link
Contributor Author

jonfortescue commented Mar 15, 2021

Delaying on merging this per an update I got from the templating team on Friday -- going to implement support for their scenario before I merge.

@jonfortescue
Copy link
Contributor Author

Should be ready to merge now that I got info from the templating team!

@jonfortescue
Copy link
Contributor Author

Successful runs in winforms and sdk.

@jonfortescue jonfortescue merged commit 5747c84 into main Mar 17, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Mar 17, 2021
@riarenas riarenas deleted the LocalizationTests branch March 18, 2021 22:48
lukas-lansky added a commit that referenced this pull request Mar 23, 2021
* [master] Update dependencies from dotnet/xliff-tasks mono/linker (#7048)

[master] Update dependencies from dotnet/xliff-tasks mono/linker

* Post build sign algorithmic description (#7042)

* Post build sign algorithmic description

* Update Documentation/CorePackages/PostBuildSigning.md

Co-authored-by: Christopher Costa <[email protected]>

* Update Documentation/CorePackages/PostBuildSigning.md

Co-authored-by: Christopher Costa <[email protected]>

* Update Documentation/CorePackages/PostBuildSigning.md

Co-authored-by: Christopher Costa <[email protected]>

Co-authored-by: Christopher Costa <[email protected]>

* Preview flow setup script (#6996)

This script sets up flow for a .NET 6 preview given a few input parameters.

* Revert "Saving sdk.txt using utf8" (#7051)

This reverts commit 5624102.

* Update dependencies from https://github.com/mono/linker build 20210304.2 (#7055)

[master] Update dependencies from mono/linker

* [master] Update dependencies from dotnet/roslyn dotnet/xharness (#7061)

[master] Update dependencies from dotnet/roslyn dotnet/xharness

* Add pipeline triggers for main branch (#7067)

* remove triggers for master (#7069)

* use main as the publishing branch (#7070)

* Update dependencies from https://github.com/dotnet/arcade build 20210305.1 (#7072)

[main] Update dependencies from dotnet/arcade

* Add GetCompatibilePackageTargetFrameworks  Task to the new packageValidation package (#7057)

* add package valiation proj

* adding tests

* address feedback

* delete extra file

* correct typo

* set XUnitPublishTargetFramework to net5.0

* use netcoreapp3.1

* Add 'checkDownloadedFiles: true' to all invocations of DownloadBuildArtifacts (#7066)

* Use blob.core.windows instead of azureedge for Helix SDK / CLI acquisition (#7078)

Since Helix agents tend to be in the same data center or geolocated in the Western US, this isn't a perf degradation (gain, in some cases) but also when executed at Helix scale, means a substantial savings

* Add handling for new queues (#7079)

* Send `System.PullRequest.TargetBranch` in job created by SendHelixJob task (#7075)

* [API Compat] Add attribute diffing for generic and regular parameters (#7058)

* Add attribute diffing for generic and regular parameters

* PR Feedback (avoid duplication)

* Mark internal channel configs as internal (#7090)

* Update arcade for publishing fixes (#7093)

* fix parameter name (#7094)

* Update SDK's version to 6.0 Preview 2 (#7096)

* [main] Update dependencies from dotnet/arcade mono/linker (#7081)

[main] Update dependencies from dotnet/arcade mono/linker


 - Merge branch 'main' into darc-main-c7daeaa9-149a-434b-8e58-adbd726d8077

* Improve the M2M guide (#7091)

* Use ubuntu & debian instead of unix & freebsd (#7089)

* use ubuntu & debian instead of unix & freebsd

* use linux instead of ubuntu

* Avoid zipping VS templates (#7056)

* Some meta data was dropping, so I included it so it wouldn't get dropped anymore (#7100)

* Some meta data was dropping, so I included it so it wouldn't get dropped anymore

* remove added whitespace

* using tryGetValue to validate existence of data instead of containsKey

* Documentation update for changes to Arcade Validation (#7063)

* Documentation update for changes to Arcade Validation

* Update documentation to use best judgement about validating against bellwether repos

* Update Documentation/Validation/Overview.md

Co-authored-by: Ricardo Arenas <[email protected]>

* Update Documentation/Validation/Overview.md

Co-authored-by: Ricardo Arenas <[email protected]>

* Update Documentation/Validation/Overview.md

Co-authored-by: Ricardo Arenas <[email protected]>

* Tweaks per code review feedback

Co-authored-by: Ricardo Arenas <[email protected]>

* Add "call" to prevent the wrapper script from causing exit before AzDO reporter execution. (#7103)

* Fix argument escaping when running Command (#7109)

I found out the on Linux, commands were failing because every single one of them was escaped, so things like this would fail:
```
dotnet "tool" "install" "--version" ... 
```

I need this change for #7029

* re-enable component governance (#7105)

* [main] Update dependencies from dotnet/roslyn dotnet/xharness dotnet/arcade mono/linker (#7098)

[main] Update dependencies from dotnet/roslyn dotnet/xharness dotnet/arcade mono/linker

* Update badge branch names (#7112)

* Add OneLocBuild template to arcade (#6977)

* M2M Renaming Guide - Search for master not main (#7026)

* Enable conditional facts/theories to reference static fields (#7117)

* Add net472 to PackageValidation package (#7115)

* add net472 to package

* correcting the csproj

* add net472 to tests

* Add binaryLog option to SB Build command (#7104)

* [main] Update dependencies from dotnet/arcade mono/linker (#7116)

[main] Update dependencies from dotnet/arcade mono/linker

* Add support for Mono AOT perf runs (#7123)

* [main] Update dependencies from dotnet/arcade mono/linker (#7124)

[main] Update dependencies from dotnet/arcade mono/linker

* Add telemetry to generate-locproject.ps1 (#7122)

* Update master -> main for perf scripts (#7127)

* [main] Update dependencies from dotnet/xliff-tasks mono/linker (#7129)

[main] Update dependencies from dotnet/xliff-tasks mono/linker

* Fix the public key token in frameworkList (#7130)

I happened to be referencing this code and noticed it dropped leading 0s from bytes when formatting the public key token.

For example 
`b03f5f7f11d5a3a`
`b03f5f7f11d50a3a`

* [main] Update dependencies from dotnet/xliff-tasks mono/linker dotnet/xharness (#7131)

* Update dependencies from https://github.com/dotnet/xliff-tasks build 20210319.2

XliffTasks
 From Version 1.0.0-beta.21168.1 -> To Version 1.0.0-beta.21169.2

* Update dependencies from https://github.com/mono/linker build 20210319.4

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.2.21169.1 -> To Version 6.0.100-preview.2.21169.4

* Update dependencies from https://github.com/dotnet/xharness build 20210319.2

Microsoft.DotNet.XHarness.CLI
 From Version 1.0.0-prerelease.21162.1 -> To Version 1.0.0-prerelease.21169.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Add .NET 6 previews 3-5 (#7126)

* Add .NET 6 previews 3-5

* Add VS 17.0

* Update OneLocBuild stuff for AzDO repos (#7136)

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Matt Mitchell <[email protected]>
Co-authored-by: Christopher Costa <[email protected]>
Co-authored-by: Ricardo Arenas <[email protected]>
Co-authored-by: Anirudh Agnihotry <[email protected]>
Co-authored-by: Matt Galbraith <[email protected]>
Co-authored-by: Drew Scoggins <[email protected]>
Co-authored-by: Łukasz Patalas <[email protected]>
Co-authored-by: Santiago Fernandez Madero <[email protected]>
Co-authored-by: Bill Wert <[email protected]>
Co-authored-by: Viktor Hofer <[email protected]>
Co-authored-by: Přemek Vysoký <[email protected]>
Co-authored-by: Tomáš Matoušek <[email protected]>
Co-authored-by: Missy Messa <[email protected]>
Co-authored-by: Epsitha Ananth <[email protected]>
Co-authored-by: Jon Fortescue <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Michael Simons <[email protected]>
Co-authored-by: Eric StJohn <[email protected]>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
akoeplinger pushed a commit to akoeplinger/arcade that referenced this pull request Apr 12, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Apr 22, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Apr 22, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Apr 22, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Apr 22, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Apr 22, 2021
jonfortescue added a commit to jonfortescue/arcade that referenced this pull request Apr 22, 2021
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.

6 participants