Skip to content

Commit 077d64f

Browse files
Merge pull request microsoft#25122 from mprobst/fix-case-insensitive
Fix the build on case-sensitive file systems.
2 parents 43d0794 + 4b7208a commit 077d64f

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

Gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const generatedLCGFile = path.join(builtLocalDirectory, "enu", "diagnosticMessag
164164
* 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg'
165165
* generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json
166166
*/
167-
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]
167+
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"]
168168
.map(f => path.join(builtLocalDirectory, f, "diagnosticMessages.generated.json"))
169169
.concat(generatedLCGFile);
170170

Jakefile.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else if (process.env.PATH !== undefined) {
2121

2222
const host = process.env.TYPESCRIPT_HOST || process.env.host || "node";
2323

24-
const locales = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"];
24+
const locales = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"];
2525

2626
const defaultTestTimeout = 40000;
2727

@@ -172,7 +172,7 @@ task(TaskNames.lkg, [
172172
if (sizeAfter > (sizeBefore * 1.10)) {
173173
throw new Error("The lib folder increased by 10% or more. This likely indicates a bug.");
174174
}
175-
175+
176176
complete();
177177
});
178178
}, { async: true });
@@ -341,7 +341,7 @@ file(Paths.servicesDefinitionFile, [TaskNames.coreBuild], function() {
341341
},
342342
files
343343
};
344-
344+
345345
const configFilePath = `built/local/typescriptServices.tsconfig.json`;
346346
fs.writeFileSync(configFilePath, JSON.stringify(config, undefined, 2));
347347
tsbuild(configFilePath, false, () => {
@@ -683,8 +683,8 @@ function diagnosticsToString(diagnostics, pretty) {
683683

684684
/**
685685
* Concatenate a list of sourceFiles to a destinationFile
686-
* @param {string} destinationFile
687-
* @param {string[]} sourceFiles
686+
* @param {string} destinationFile
687+
* @param {string[]} sourceFiles
688688
* @param {string} extraContent
689689
*/
690690
function concatenateFiles(destinationFile, sourceFiles, extraContent) {
@@ -711,8 +711,8 @@ function appendToFile(path, content) {
711711
}
712712

713713
/**
714-
*
715-
* @param {string} path
714+
*
715+
* @param {string} path
716716
* @returns string
717717
*/
718718
function readFileSync(path) {
@@ -729,7 +729,7 @@ function getDiffTool() {
729729

730730
/**
731731
* Replaces const enum declarations with non-const enums
732-
* @param {string} text
732+
* @param {string} text
733733
*/
734734
function removeConstModifierFromEnumDeclarations(text) {
735735
return text.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, '$1$2enum $3 {$4');

scripts/generateLocalizedDiagnosticMessages.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ function main(): void {
6565
* There are three exceptions, zh-CN, zh-TW and pt-BR.
6666
*/
6767
function getPreferedLocaleName(localeName: string) {
68-
localeName = localeName.toLowerCase();
6968
switch (localeName) {
70-
case "zh-cn":
71-
case "zh-tw":
72-
case "pt-br":
69+
case "zh-CN":
70+
case "zh-TW":
71+
case "pt-BR":
7372
return localeName;
7473
default:
7574
return localeName.split("-")[0];

0 commit comments

Comments
 (0)