* Add documentation about XLF localization and updating resx

* Clean up doc a little bit, and make some changes suggested by markdownlint

* Grammar

* Change wording

* Fix formatting mistake

* Fix another typo
This commit is contained in:
John Wostenberg 2018-03-13 06:55:56 -05:00 коммит произвёл Don Syme
Родитель ac9f2af432
Коммит a4927e182d
1 изменённых файлов: 32 добавлений и 24 удалений

Просмотреть файл

@ -2,11 +2,11 @@
Follow the instructions below to build and develop the F# Compiler, Core Library and tools on Windows, macOS and Linux. Follow the instructions below to build and develop the F# Compiler, Core Library and tools on Windows, macOS and Linux.
* [Developing the F# Compiler (Windows)](#developing-the-f-compiler-windows) - [Developing the F# Compiler (Windows)](#developing-the-f-compiler-windows)
* [Developing the F# Compiler (Linux)](#developing-the-f-compiler-linux) - [Developing the F# Compiler (Linux)](#developing-the-f-compiler-linux)
* [Developing the F# Compiler (macOS)](#developing-the-f-compiler-macos) - [Developing the F# Compiler (macOS)](#developing-the-f-compiler-macos)
* [Developing the Visual F# IDE Tools (Windows Only)](#developing-the-visual-f-ide-tools-windows-only) - [Developing the Visual F# IDE Tools (Windows Only)](#developing-the-visual-f-ide-tools-windows-only)
* [Notes and Resources](#notes) - [Notes and Resources](#notes)
### Developing the F# Compiler (Windows) ### Developing the F# Compiler (Windows)
@ -15,8 +15,10 @@ Install
- [.NET 4.6](https://www.microsoft.com/en-gb/download/details.aspx?id=48130) - [.NET 4.6](https://www.microsoft.com/en-gb/download/details.aspx?id=48130)
**NOTE on Windows:** **NOTE on Windows:**
1. It is recommended to run the build.cmd and the qualifiers be on a command prompt with path set to have the location of MSBuild. If you have Visual Studio, we can also run using `Developer Command Prompt for Visual Studio 20xx` (depends on Visual Studio version). This developer command prompt is easier to use than normal command prompt, because it already has the correct path of Visual Studio and .NET's tooling set for us to use (including MSBuild).
2. The running command prompt must be run under Administrator right (`Run as Administrator`). 1. It is recommended to run `build.cmd` in a command prompt with path set to have the location of MSBuild. If you have Visual Studio, we can run using `Developer Command Prompt for Visual Studio 20xx` (depends on Visual Studio version). This developer command prompt is easier to use than normal command prompt, because it already has the correct path of Visual Studio and .NET's tooling set for us to use (including MSBuild).
2. The command prompt must have Administrator rights (`Run as Administrator`).
Before running the build scripts, ensure that you have cleaned up the visualfsharp repo by running this git command: Before running the build scripts, ensure that you have cleaned up the visualfsharp repo by running this git command:
@ -114,10 +116,10 @@ This uses an installed .NET SDK 2.0 to build the various duplicated project
Testing the .NET Core version of the F# compiler on macOS and Linux is TBD. Testing the .NET Core version of the F# compiler on macOS and Linux is TBD.
### Developing the Visual F# IDE Tools (Windows Only) ### Developing the Visual F# IDE Tools (Windows Only)
To build and test Visual F# IDE Tools, install these requirements: To build and test Visual F# IDE Tools, install these requirements:
- [Visual Studio 2017](https://www.visualstudio.com/downloads/) - [Visual Studio 2017](https://www.visualstudio.com/downloads/)
- Under the "Windows" workloads, select ".NET desktop development" - Under the "Windows" workloads, select ".NET desktop development"
- Select "F# desktop language support" under the optional components - Select "F# desktop language support" under the optional components
@ -131,16 +133,16 @@ Steps to build:
Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools. Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools.
Note on Debug vs Release: ``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the ``Debug`` configuration. For more information see https://github.com/Microsoft/visualfsharp/issues/2771 and https://github.com/Microsoft/visualfsharp/pull/2773. Note on Debug vs Release: ``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the ``Debug`` configuration. For more information see issues [#2771](https://github.com/Microsoft/visualfsharp/issues/2771) and [#2773](https://github.com/Microsoft/visualfsharp/pull/2773).
Note: if you face this error [#2351](https://github.com/Microsoft/visualfsharp/issues/2351): Note ([#2351](https://github.com/Microsoft/visualfsharp/issues/2351)): if you face this error:
> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe". > error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe".
Or hard crash on launch ("Unknown Error"), delete these folders: Or hard crash on launch ("Unknown Error"), delete these folders:
* `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev` - `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev`
* `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)` - `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)`
#### [Optional] Install the Visual F# IDE Tools (Windows Only) #### [Optional] Install the Visual F# IDE Tools (Windows Only)
@ -183,7 +185,7 @@ This gives a much tighter inner development loop than uninstalling/reinstalling
#### [Optional] Clobber the F# SDK on the machine #### [Optional] Clobber the F# SDK on the machine
**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 15 is currently the only way to revert this step.** **Note:*- The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 15 is currently the only way to revert this step.**
For **Debug**: For **Debug**:
@ -230,6 +232,12 @@ If you are behind a proxy server, NuGet client tool must be configured to use it
Where you should set proper proxy address, user name and password. Where you should set proper proxy address, user name and password.
#### When modifying, adding, or removing keywords or compiler messages
If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running `msbuild FSharp.Compiler.Private.fsproj /t:UpdateXlf` (located in [src\fsharp\FSharp.Compiler.Private](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private)). This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually.
After this, you must copy any differing `resx` files from the output directory into the corresponding subdirectory in [src\buildfromsource](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private). This step will soon be eliminated (see issue [#3905](https://github.com/Microsoft/visualfsharp/issues/3905)).
#### Resources #### Resources
The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide. The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide.