Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58d5114

Browse files
committed
enable xlf-based localization
1 parent706694a commit58d5114

File tree

385 files changed

+200601
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+200601
-11
lines changed

‎build.cmd‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@ if "%BUILD_PROTO%" == "1" (
627627

628628
if"%BUILD_PROTO_WITH_CORECLR_LKG%"=="1" (
629629

630-
echo%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
631-
%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
630+
echo%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true
631+
%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true
632632
@if ERRORLEVEL1echo Error: compiler proto build failed&&goto :failure
633633
)
634634

@@ -637,8 +637,8 @@ if "%BUILD_PROTO%" == "1" (
637637
echo%_ngenexe% install packages\FSharp.Compiler.Tools.4.1.27\tools\fsc.exe /nologo
638638
%_ngenexe% install packages\FSharp.Compiler.Tools.4.1.27\tools\fsc.exe /nologo
639639

640-
echo%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
641-
%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
640+
echo%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true
641+
%_msbuildexe%%msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true
642642
@if ERRORLEVEL1echo Error: compiler proto build failed&&goto :failure
643643
)
644644

‎build.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,12 @@ if [ "$BUILD_PROTO" = '1' ]; then
503503
{pushd ./lkg/fsc&&eval"$_dotnetexe publish project.json --no-build -o${_scriptdir}Tools/lkg -r$_architecture"&&popd; }|| failwith"dotnet publish failed"
504504
{pushd ./lkg/fsi&&eval"$_dotnetexe publish project.json --no-build -o${_scriptdir}Tools/lkg -r$_architecture"&&popd; }|| failwith"dotnet publish failed"
505505

506-
{ printeval"$_msbuildexe$msbuildflags src/fsharp-proto-build.proj /p:Configuration=Proto"; }|| failwith"compiler proto build failed"
506+
{ printeval"$_msbuildexe$msbuildflags src/fsharp-proto-build.proj /p:Configuration=Proto /p:DisableLocalization=true"; }|| failwith"compiler proto build failed"
507507

508508
# { printeval "$_ngenexe install Proto/net40/bin/fsc-proto.exe /nologo"; } || failwith "NGen of proto failed"
509509
else
510510
# Build proto-compiler and libs
511-
{ printeval"$_msbuildexe$msbuildflags src/fsharp-proto-build.proj /p:UseMonoPackaging=true /p:Configuration=Proto"; }|| failwith"compiler proto build failed"
511+
{ printeval"$_msbuildexe$msbuildflags src/fsharp-proto-build.proj /p:UseMonoPackaging=true /p:Configuration=Proto /p:DisableLocalization=true"; }|| failwith"compiler proto build failed"
512512
fi
513513
fi
514514

‎packages.config‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@
6868
<!-- Perl is used for the fsharpqa test suite-->
6969
<packageid="StrawberryPerl64"version="5.22.2.1" />
7070

71+
<!-- Xliff localization-->
72+
<packageid="XliffTasks"version="0.2.0-beta-000070" />
73+
7174
</packages>

‎src/FSharpSource.Settings.targets‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
<FSharpCore41FrozenPortableVersion>4.1.20</FSharpCore41FrozenPortableVersion>
5050
<FSharpCore41FrozenPortableTargetVersion>4.1.21</FSharpCore41FrozenPortableTargetVersion>
5151
<FSharpCore42TargetVersion>4.2.4</FSharpCore42TargetVersion>
52+
53+
<!-- Localization-->
54+
<UpdateXlfOnBuildCondition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
55+
<XliffTasksVersion>0.2.0-beta-000070</XliffTasksVersion>
5256
</PropertyGroup>
5357

5458
<PropertyGroupCondition="'$(MonoPackaging)' != 'true' AND '$(OS)' != 'Unix'">
@@ -144,6 +148,8 @@
144148
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
145149
</PropertyGroup>
146150

151+
<ImportProject="$(MSBuildThisFileDirectory)..\packages\XliffTasks.$(XliffTasksVersion)\build\XliffTasks.props"Condition="'$(DisableLocalization)' != 'true'" />
152+
<ImportProject="$(RestorePackagesPath)\XliffTasks.$(XliffTasksVersion)\build\XliffTasks.targets"Condition="'$(DisableLocalization)' != 'true'" />
147153
<ImportProject="../Tools/Build.Common.props"Condition="'$(TargetDotnetProfile)'=='coreclr'"/>
148154
<ImportProject="$(BuildVersionFilePath)"Condition="Exists('$(BuildVersionFilePath)')" />
149155

‎src/FSharpSource.targets‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@
368368
Condition="'$(Configuration)' != 'Proto'" />
369369

370370
<TargetName="GenerateFSharpTextResources"
371-
BeforeTargets="CoreResGen;PrepareForBuild"
371+
BeforeTargets="GetXlfSources;CoreResGen;PrepareForBuild"
372372
Condition="'$(Configuration)' != 'Proto'">
373373

374374
<MakeDirDirectories="$(IntermediateOutputPath)" />

‎src/fsharp/FSharp.Build/FSharpEmbedResourceText.fs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ open Printf
354354
File.GetLastWriteTimeUtc(filename)<= File.GetLastWriteTimeUtc(outFilename)&&
355355
File.GetLastWriteTimeUtc(filename)<= File.GetLastWriteTimeUtc(outXmlFilename)then
356356
printMessage(sprintf"Skipping generation of%s and%s since up-to-date" outFilename outXmlFilename)
357-
Some(outFilename, outXmlFilename)
357+
Some(filename,outFilename, outXmlFilename)
358358
else
359359

360360
printMessage(sprintf"Reading%s" filename)
@@ -450,7 +450,7 @@ open Printf
450450
use outXmlStream= File.Create outXmlFilename
451451
xd.Save outXmlStream
452452
printMessage(sprintf"Done%s" outFilename)
453-
Some(outFilename, outXmlFilename)
453+
Some(filename,outFilename, outXmlFilename)
454454
with e->
455455
PrintErr(filename,0, sprintf"An exception occurred when processing '%s'\n%s" filename(e.ToString()))
456456
None
@@ -487,7 +487,7 @@ open Printf
487487
|> Array.choose(fun item-> generateResxAndSource item.ItemSpec)
488488

489489
letgeneratedSource,generatedResx=
490-
[|for(source, resx)in generatedFilesdo
490+
[|for(textFile,source, resx)in generatedFilesdo
491491
letsourceItem=
492492
letitem= TaskItem(source)
493493
item.SetMetadata("AutoGen","true")
@@ -497,6 +497,7 @@ open Printf
497497
letresxItem=
498498
letitem= TaskItem(resx)
499499
item.SetMetadata("ManifestResourceName", Path.GetFileNameWithoutExtension(resx))
500+
item.SetMetadata("SourceDocumentPath", textFile)
500501
item:> ITaskItem
501502
yield(sourceItem, resxItem)|]
502503
|> Array.unzip
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
3+
<filedatatype="xml"source-language="en"target-language="cs"original="../FSBuild.resx">
4+
<body>
5+
<trans-unitid="toolpathUnknown">
6+
<source>ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</source>
7+
<targetstate="new">ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</target>
8+
<note />
9+
</trans-unit>
10+
</body>
11+
</file>
12+
</xliff>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
3+
<filedatatype="xml"source-language="en"target-language="de"original="../FSBuild.resx">
4+
<body>
5+
<trans-unitid="toolpathUnknown">
6+
<source>ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</source>
7+
<targetstate="new">ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</target>
8+
<note />
9+
</trans-unit>
10+
</body>
11+
</file>
12+
</xliff>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
3+
<filedatatype="xml"source-language="en"target-language="es"original="../FSBuild.resx">
4+
<body>
5+
<trans-unitid="toolpathUnknown">
6+
<source>ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</source>
7+
<targetstate="new">ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</target>
8+
<note />
9+
</trans-unit>
10+
</body>
11+
</file>
12+
</xliff>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
3+
<filedatatype="xml"source-language="en"target-language="fr"original="../FSBuild.resx">
4+
<body>
5+
<trans-unitid="toolpathUnknown">
6+
<source>ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</source>
7+
<targetstate="new">ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</target>
8+
<note />
9+
</trans-unit>
10+
</body>
11+
</file>
12+
</xliff>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp