dotnet-core - XliffTasks 0.2.0-beta-63723-03

Package Description

PM> Install-Package XliffTasks -Version 0.2.0-beta-63723-03 -Source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

Copy to clipboard

> nuget.exe install XliffTasks -Version 0.2.0-beta-63723-03 -Source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

Copy to clipboard

> dotnet add package XliffTasks --version 0.2.0-beta-63723-03 --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

Copy to clipboard
<PackageReference Include="XliffTasks" Version="0.2.0-beta-63723-03" />
Copy to clipboard
source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

nuget XliffTasks  ~> 0.2.0-beta-63723-03
Copy to clipboard

> choco install XliffTasks --version 0.2.0-beta-63723-03 --source https://dotnet.myget.org/F/dotnet-core/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "dotnet-core" -SourceLocation "https://dotnet.myget.org/F/dotnet-core/api/v2"
Install-Module -Name "XliffTasks" -RequiredVersion "0.2.0-beta-63723-03" -Repository "dotnet-core" -AllowPreRelease
Copy to clipboard

xliff-tasks

A set of MSBuild tasks and targets to automatically update xliff (.xlf) files for localizable resources, and to build satellite assemblies from those xliff files.

Build Status

Windows x64
Build Status

Installing

If you're using the Arcade Toolset then the XliffTasks package is already pulled in, and enabled by default.

Otherwise, you'll need to add the dotnet-core feed on MyGet (https://dotnet.myget.org/F/dotnet-core/api/v3/index.json) to your nuget.config file, and then add a PackageReference for the XliffTasks package, like so:

<PackageReference Include="XliffTasks" Version="1.0.0-beta.19253.1" PrivateAssets="all" />

The PrivateAssets metadata is needed to prevent dotnet pack or msbuild /t:pack from listing XliffTasks as one of your package's dependencies.

Using XliffTasks

Updating .xlf files

Once XliffTasks is installed building a project will automatically build satellite assemblies from .xlf files. To update .xlf files to bring them in line with the source .resx/.vsct/.xaml files you need to run the UpdateXlf target, like so:

msbuild /t:UpdateXlf

This will only update the .xlf files. Alternatively, run a normal build with the UpdateXlfOnBuild property set:

msbuild /p:UpdateXlfOnBuild=true

By default, XliffTasks will produce an error during build if it detects that the .xlf files are out of data with the source .resx/.vsct/.xaml files.

Many teams using XliffTasks default UpdateXlfOnBuild to true for local developer builds, but leave it off for CI builds. This way the .xlf files are automatically updated as the developer works, and the CI build will fail if the developer forgets to include the changes to the .xlf files as part of their PR. This way the .xlf files are always in sync with the source files, and can be handed off to a localization team at any time.

Other workflows are possible by changing the XliffTasks properties (see below)

Sorting .xlf files

XliffTasks attempts to keep .xlf files sorted when inserting new items. This doesn't matter for the generation of satellite assemblies, but can reduce merge conflicts when localizable resources are being added in multiple branches (as opposed to always adding new items at the end, which more or less guarantees merge conflicts).

Note XliffTasks does not force the items into a sorted order if they are not already sorted. You can do that manually by running msbuild /t:SortXlf.

Project Properties

EnableXlfLocalization - The "master switch" for turning locallization with XliffTasks on or off completely. When set to false, .xlf files will not be updated and satellite assemblies will not be generated from the .xlf files, regardless of the other properties. Defaults to true, but it is useful to set it to false for any project that does not need to produce localized resources (unit test projects, packaging projects, etc.).

UpdateXlfOnBuild - When set to true, .xlf files will automatically be brought in sync with the source .resx/.vsct/.xaml files. This may involve adding or removing items from the .xlf files, or creating new .xlf files. Defaults to false.

ErrorOnOutOfDateXlf - When set to true the build will produce an error if the .xlf files are out-of-date with respect to the source files. Defaults to true.

XlfLanguages - The set of locales to which the project is localized. Defaults to the thirteen locales supported by Visual Studio: cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant.

Source File Properties

XlfInput - Set this to false to opt out of .xlf file generation for a specific source file that would otherwise be included by default.

Contact

For more information, contact @tmeschter or @nguerrera on GitHub, or file an issue.

  • .NETFramework 4.6
  • .NETCoreApp 2.0
  • .NETCoreApp 2.0: 2.0.0.0
  • .NETFramework 4.6: 4.6.0.0

Owners

dotnetframework

Authors

Microsoft

Project URL

https://github.com/dotnet/xliff-tasks

License

MS-EULA

Info

23 total downloads
0 downloads for version 0.2.0-beta-63723-03
Download (96.03 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.0.0-beta.19253.2 108.16 KB Fri, 03 May 2019 23:01:36 GMT 0
1.0.0-beta.19253.1 108.14 KB Fri, 03 May 2019 13:16:41 GMT 0
1.0.0-beta.19252.1 108.16 KB Thu, 02 May 2019 13:12:37 GMT 0
1.0.0-beta.19251.1 108.19 KB Wed, 01 May 2019 13:41:11 GMT 0
1.0.0-beta.19230.1 108.17 KB Tue, 30 Apr 2019 13:20:15 GMT 0
1.0.0-beta.19229.3 108.43 KB Mon, 29 Apr 2019 20:20:39 GMT 0
0.2.0-beta-63730-01 97.33 KB Wed, 30 Jan 2019 21:09:05 GMT 0
0.2.0-beta-63723-03 96.03 KB Wed, 23 Jan 2019 21:46:50 GMT 0
0.2.0-beta-63125-01 66.28 KB Wed, 25 Jul 2018 16:33:46 GMT 0
0.2.0-beta-63013-01 65.2 KB Wed, 13 Jun 2018 18:07:30 GMT 0
0.2.0-beta-63004-01 64.97 KB Mon, 04 Jun 2018 22:41:28 GMT 0
0.2.0-beta-62827-03 64.63 KB Fri, 27 Apr 2018 18:45:58 GMT 0
0.2.0-beta-62812-01 64.07 KB Thu, 12 Apr 2018 22:48:41 GMT 0
0.2.0-beta-62730-03 62.7 KB Fri, 30 Mar 2018 20:57:14 GMT 0
0.2.0-beta-000081 36.13 KB Tue, 21 Nov 2017 01:06:03 GMT 5
0.2.0-beta-000078 36.22 KB Mon, 20 Nov 2017 18:30:21 GMT 1
0.2.0-beta-000076 35.95 KB Wed, 15 Nov 2017 20:00:16 GMT 2
0.2.0-beta-000072 31.96 KB Thu, 09 Nov 2017 23:12:19 GMT 2
0.2.0-beta-000070 31.95 KB Tue, 31 Oct 2017 19:02:06 GMT 3
0.2.0-beta-000068 31.67 KB Fri, 20 Oct 2017 20:53:27 GMT 3
0.2.0-beta-000053 29.17 KB Wed, 19 Jul 2017 02:22:26 GMT 3
0.2.0-beta-000051 29.15 KB Tue, 11 Jul 2017 21:27:02 GMT 2
0.2.0-beta-000042 28.97 KB Fri, 02 Jun 2017 22:15:57 GMT 2