@rushstack/localization-utilities 0.6.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/localization-utilities.d.ts +0 -37
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -4
- package/lib/index.js.map +1 -1
- package/package.json +6 -6
- package/lib/LegacyResxReader.d.ts +0 -37
- package/lib/LegacyResxReader.d.ts.map +0 -1
- package/lib/LegacyResxReader.js +0 -43
- package/lib/LegacyResxReader.js.map +0 -1
|
@@ -82,25 +82,6 @@ export declare interface IPseudolocaleOptions {
|
|
|
82
82
|
override?: string;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* @deprecated
|
|
87
|
-
*
|
|
88
|
-
* This has superseded by {@link IParseResxOptions}
|
|
89
|
-
*
|
|
90
|
-
* @public
|
|
91
|
-
*/
|
|
92
|
-
export declare interface IResxReaderOptions {
|
|
93
|
-
resxFilePath: string;
|
|
94
|
-
terminal: ITerminal;
|
|
95
|
-
newlineNormalization: NewlineKind | undefined;
|
|
96
|
-
warnOnMissingComment: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Optionally, provide a function that will be called for each string. If the function returns `true`
|
|
99
|
-
* the string will not be included.
|
|
100
|
-
*/
|
|
101
|
-
ignoreString?: IgnoreStringFunction;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
85
|
/**
|
|
105
86
|
* @public
|
|
106
87
|
*/
|
|
@@ -141,24 +122,6 @@ export declare function parseResx(options: IParseResxOptions): ILocalizationFile
|
|
|
141
122
|
*/
|
|
142
123
|
export declare type ParserKind = 'resx' | 'loc.json' | 'resjson';
|
|
143
124
|
|
|
144
|
-
/**
|
|
145
|
-
* @deprecated
|
|
146
|
-
*
|
|
147
|
-
* Use {@link parseResx} instead.
|
|
148
|
-
*
|
|
149
|
-
* @public
|
|
150
|
-
*/
|
|
151
|
-
export declare function readResxAsLocFile(resxContents: string, options: IResxReaderOptions): ILocalizationFile;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated
|
|
155
|
-
*
|
|
156
|
-
* Use {@link parseResx} instead.
|
|
157
|
-
*
|
|
158
|
-
* @public
|
|
159
|
-
*/
|
|
160
|
-
export declare function readResxFileAsLocFile(options: IResxReaderOptions): ILocalizationFile;
|
|
161
|
-
|
|
162
125
|
/**
|
|
163
126
|
* This is a simple tool that generates .d.ts files for .loc.json, .resx.json, .resjson, and .resx files.
|
|
164
127
|
*
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,5 @@ export { parseResJson } from './parsers/parseResJson';
|
|
|
4
4
|
export { parseResx, IParseResxOptions, IParseResxOptionsBase } from './parsers/parseResx';
|
|
5
5
|
export { parseLocFile, IParseLocFileOptions, ParserKind } from './LocFileParser';
|
|
6
6
|
export { ITypingsGeneratorOptions, TypingsGenerator } from './TypingsGenerator';
|
|
7
|
-
export { readResxFileAsLocFile, readResxAsLocFile, IResxReaderOptions } from './LegacyResxReader';
|
|
8
7
|
export { getPseudolocalizer } from './Pseudolocalization';
|
|
9
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
3
|
// See LICENSE in the project root for license information.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.getPseudolocalizer = exports.
|
|
5
|
+
exports.getPseudolocalizer = exports.TypingsGenerator = exports.parseLocFile = exports.parseResx = exports.parseResJson = exports.parseLocJson = void 0;
|
|
6
6
|
var parseLocJson_1 = require("./parsers/parseLocJson");
|
|
7
7
|
Object.defineProperty(exports, "parseLocJson", { enumerable: true, get: function () { return parseLocJson_1.parseLocJson; } });
|
|
8
8
|
var parseResJson_1 = require("./parsers/parseResJson");
|
|
@@ -13,9 +13,6 @@ var LocFileParser_1 = require("./LocFileParser");
|
|
|
13
13
|
Object.defineProperty(exports, "parseLocFile", { enumerable: true, get: function () { return LocFileParser_1.parseLocFile; } });
|
|
14
14
|
var TypingsGenerator_1 = require("./TypingsGenerator");
|
|
15
15
|
Object.defineProperty(exports, "TypingsGenerator", { enumerable: true, get: function () { return TypingsGenerator_1.TypingsGenerator; } });
|
|
16
|
-
var LegacyResxReader_1 = require("./LegacyResxReader");
|
|
17
|
-
Object.defineProperty(exports, "readResxFileAsLocFile", { enumerable: true, get: function () { return LegacyResxReader_1.readResxFileAsLocFile; } });
|
|
18
|
-
Object.defineProperty(exports, "readResxAsLocFile", { enumerable: true, get: function () { return LegacyResxReader_1.readResxAsLocFile; } });
|
|
19
16
|
var Pseudolocalization_1 = require("./Pseudolocalization");
|
|
20
17
|
Object.defineProperty(exports, "getPseudolocalizer", { enumerable: true, get: function () { return Pseudolocalization_1.getPseudolocalizer; } });
|
|
21
18
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAS3D,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,iDAA0F;AAAjF,sGAAA,SAAS,OAAA;AAClB,iDAAiF;AAAxE,6GAAA,YAAY,OAAA;AACrB,uDAAgF;AAA7C,oHAAA,gBAAgB,OAAA;AACnD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAS3D,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,iDAA0F;AAAjF,sGAAA,SAAS,OAAA;AAClB,iDAAiF;AAAxE,6GAAA,YAAY,OAAA;AACrB,uDAAgF;AAA7C,oHAAA,gBAAgB,OAAA;AACnD,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nexport type {\n ILocalizationFile,\n ILocalizedString,\n IPseudolocaleOptions,\n IParseFileOptions,\n IgnoreStringFunction\n} from './interfaces';\nexport { parseLocJson } from './parsers/parseLocJson';\nexport { parseResJson } from './parsers/parseResJson';\nexport { parseResx, IParseResxOptions, IParseResxOptionsBase } from './parsers/parseResx';\nexport { parseLocFile, IParseLocFileOptions, ParserKind } from './LocFileParser';\nexport { ITypingsGeneratorOptions, TypingsGenerator } from './TypingsGenerator';\nexport { getPseudolocalizer } from './Pseudolocalization';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/localization-utilities",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "This plugin contains some useful functions for localization.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "dist/localization-utilities.d.ts",
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"directory": "libraries/localization-utilities"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@rushstack/node-core-library": "3.45.
|
|
15
|
-
"@rushstack/typings-generator": "0.6.
|
|
14
|
+
"@rushstack/node-core-library": "3.45.7",
|
|
15
|
+
"@rushstack/typings-generator": "0.6.29",
|
|
16
16
|
"pseudolocale": "~1.1.0",
|
|
17
17
|
"xmldoc": "~1.1.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@rushstack/eslint-config": "2.6.
|
|
21
|
-
"@rushstack/heft": "0.45.
|
|
22
|
-
"@rushstack/heft-node-rig": "1.9.
|
|
20
|
+
"@rushstack/eslint-config": "2.6.1",
|
|
21
|
+
"@rushstack/heft": "0.45.9",
|
|
22
|
+
"@rushstack/heft-node-rig": "1.9.10",
|
|
23
23
|
"@types/heft-jest": "1.0.1",
|
|
24
24
|
"@types/node": "12.20.24",
|
|
25
25
|
"@types/xmldoc": "1.1.4"
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ITerminal, NewlineKind } from '@rushstack/node-core-library';
|
|
2
|
-
import type { IgnoreStringFunction, ILocalizationFile } from './interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated
|
|
5
|
-
*
|
|
6
|
-
* This has superseded by {@link IParseResxOptions}
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export interface IResxReaderOptions {
|
|
11
|
-
resxFilePath: string;
|
|
12
|
-
terminal: ITerminal;
|
|
13
|
-
newlineNormalization: NewlineKind | undefined;
|
|
14
|
-
warnOnMissingComment: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Optionally, provide a function that will be called for each string. If the function returns `true`
|
|
17
|
-
* the string will not be included.
|
|
18
|
-
*/
|
|
19
|
-
ignoreString?: IgnoreStringFunction;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated
|
|
23
|
-
*
|
|
24
|
-
* Use {@link parseResx} instead.
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export declare function readResxFileAsLocFile(options: IResxReaderOptions): ILocalizationFile;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated
|
|
31
|
-
*
|
|
32
|
-
* Use {@link parseResx} instead.
|
|
33
|
-
*
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
export declare function readResxAsLocFile(resxContents: string, options: IResxReaderOptions): ILocalizationFile;
|
|
37
|
-
//# sourceMappingURL=LegacyResxReader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyResxReader.d.ts","sourceRoot":"","sources":["../src/LegacyResxReader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,SAAS,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAElF,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAG5E;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,oBAAoB,EAAE,WAAW,GAAG,SAAS,CAAC;IAC9C,oBAAoB,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,iBAAiB,CASpF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,iBAAiB,CAQtG"}
|
package/lib/LegacyResxReader.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
-
// See LICENSE in the project root for license information.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.readResxAsLocFile = exports.readResxFileAsLocFile = void 0;
|
|
6
|
-
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
7
|
-
const parseResx_1 = require("./parsers/parseResx");
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated
|
|
10
|
-
*
|
|
11
|
-
* Use {@link parseResx} instead.
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
function readResxFileAsLocFile(options) {
|
|
16
|
-
const content = node_core_library_1.FileSystem.readFile(options.resxFilePath);
|
|
17
|
-
return (0, parseResx_1.parseResx)({
|
|
18
|
-
...options,
|
|
19
|
-
content,
|
|
20
|
-
filePath: options.resxFilePath,
|
|
21
|
-
resxNewlineNormalization: options.newlineNormalization,
|
|
22
|
-
ignoreMissingResxComments: !options.warnOnMissingComment
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
exports.readResxFileAsLocFile = readResxFileAsLocFile;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated
|
|
28
|
-
*
|
|
29
|
-
* Use {@link parseResx} instead.
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
function readResxAsLocFile(resxContents, options) {
|
|
34
|
-
return (0, parseResx_1.parseResx)({
|
|
35
|
-
...options,
|
|
36
|
-
content: resxContents,
|
|
37
|
-
filePath: options.resxFilePath,
|
|
38
|
-
resxNewlineNormalization: options.newlineNormalization,
|
|
39
|
-
ignoreMissingResxComments: !options.warnOnMissingComment
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
exports.readResxAsLocFile = readResxAsLocFile;
|
|
43
|
-
//# sourceMappingURL=LegacyResxReader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyResxReader.js","sourceRoot":"","sources":["../src/LegacyResxReader.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,oEAAkF;AAGlF,mDAAgD;AAqBhD;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,OAA2B;IAC/D,MAAM,OAAO,GAAW,8BAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAClE,OAAO,IAAA,qBAAS,EAAC;QACf,GAAG,OAAO;QACV,OAAO;QACP,QAAQ,EAAE,OAAO,CAAC,YAAY;QAC9B,wBAAwB,EAAE,OAAO,CAAC,oBAAoB;QACtD,yBAAyB,EAAE,CAAC,OAAO,CAAC,oBAAoB;KACzD,CAAC,CAAC;AACL,CAAC;AATD,sDASC;AAED;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,YAAoB,EAAE,OAA2B;IACjF,OAAO,IAAA,qBAAS,EAAC;QACf,GAAG,OAAO;QACV,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,OAAO,CAAC,YAAY;QAC9B,wBAAwB,EAAE,OAAO,CAAC,oBAAoB;QACtD,yBAAyB,EAAE,CAAC,OAAO,CAAC,oBAAoB;KACzD,CAAC,CAAC;AACL,CAAC;AARD,8CAQC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { FileSystem, ITerminal, NewlineKind } from '@rushstack/node-core-library';\n\nimport type { IgnoreStringFunction, ILocalizationFile } from './interfaces';\nimport { parseResx } from './parsers/parseResx';\n\n/**\n * @deprecated\n *\n * This has superseded by {@link IParseResxOptions}\n *\n * @public\n */\nexport interface IResxReaderOptions {\n resxFilePath: string;\n terminal: ITerminal;\n newlineNormalization: NewlineKind | undefined;\n warnOnMissingComment: boolean;\n /**\n * Optionally, provide a function that will be called for each string. If the function returns `true`\n * the string will not be included.\n */\n ignoreString?: IgnoreStringFunction;\n}\n\n/**\n * @deprecated\n *\n * Use {@link parseResx} instead.\n *\n * @public\n */\nexport function readResxFileAsLocFile(options: IResxReaderOptions): ILocalizationFile {\n const content: string = FileSystem.readFile(options.resxFilePath);\n return parseResx({\n ...options,\n content,\n filePath: options.resxFilePath,\n resxNewlineNormalization: options.newlineNormalization,\n ignoreMissingResxComments: !options.warnOnMissingComment\n });\n}\n\n/**\n * @deprecated\n *\n * Use {@link parseResx} instead.\n *\n * @public\n */\nexport function readResxAsLocFile(resxContents: string, options: IResxReaderOptions): ILocalizationFile {\n return parseResx({\n ...options,\n content: resxContents,\n filePath: options.resxFilePath,\n resxNewlineNormalization: options.newlineNormalization,\n ignoreMissingResxComments: !options.warnOnMissingComment\n });\n}\n"]}
|