Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e78aaed

Browse files
committed
[WIP] autofix
1 parent 68064a4 commit e78aaed

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

i18n/spec/closureI18nExtractorSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe("findLocaleId", function() {
7272

7373
it("should throw an error otherwise", function() {
7474
expect(function() {
75-
findLocaleId("str", "otherwise")
75+
findLocaleId("str", "otherwise");
7676
}).toThrowError("unknown type in findLocaleId: otherwise");
7777
});
7878
});
@@ -117,7 +117,7 @@ describe("extractNumberSymbols", function() {
117117
expect(localeInfo).toEqual({
118118
'en_GB': { NUMBER_FORMATS: expectedNumberFormats }
119119
});
120-
})
120+
});
121121
});
122122

123123
describe("extractCurrencySymbols", function() {
@@ -257,7 +257,7 @@ describe("pluralExtractor", function() {
257257
// Confirm some expectations for pluralCat in fr_CA.
258258
expect(pluralCat(0)).toEqual("one");
259259
expect(pluralCat(3)).toEqual("other");
260-
})
260+
});
261261
});
262262

263263
describe("serializeContent", function() {

i18n/src/closureSlurper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function writeLocaleFiles() {
7777
var content = closureI18nExtractor.outputLocale(localeInfo, localeID);
7878
if (!content) return;
7979
var correctedLocaleId = closureI18nExtractor.correctedLocaleId(localeID);
80-
var filename = NG_LOCALE_DIR + 'angular-locale_' + correctedLocaleId + '.js'
80+
var filename = NG_LOCALE_DIR + 'angular-locale_' + correctedLocaleId + '.js';
8181
console.log('Writing ' + filename);
8282
return qfs.write(filename, content)
8383
.then(function() {

i18n/src/converter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function convertNumberData(dataObj, currencySymbols) {
1717
GROUP_SEP: dataObj.GROUP_SEP,
1818
PATTERNS: [parsePattern(dataObj.DECIMAL_PATTERN),
1919
parsePattern(dataObj.CURRENCY_PATTERN)]
20-
}
20+
};
2121

2222
if (currencySymbols[dataObj.DEF_CURRENCY_CODE]) {
2323
numberFormats.CURRENCY_SYM = currencySymbols[dataObj.DEF_CURRENCY_CODE][1];
@@ -27,7 +27,7 @@ function convertNumberData(dataObj, currencySymbols) {
2727
} else {
2828
// if there is no corresponding currency symbol, just use currency code.
2929
var code = numberFormats.CURRENCY_SYM = dataObj.DEF_CURRENCY_CODE;
30-
console.log(code +' has no currency symbol in closure, used ' + code + ' instead!');
30+
console.log(code + ' has no currency symbol in closure, used ' + code + ' instead!');
3131
}
3232
}
3333
return numberFormats;

i18n/src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ exports.findLocaleId = function findLocaleId(str, type) {
44
} else if (type == 'datetime') {
55
return (str.match(/^DateTimeSymbols_(.+)$/) || [])[1];
66
}
7-
}
7+
};

i18n/ucd/spec/extactValuesSpec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,39 @@ describe('extractValues', function() {
1414
it('should extract the values from the xml', function(done) {
1515
var str = '<ucd><repertoire><char cp="0000" IDS="N"></char><char cp="0001" IDS="Y"></char><char cp="0002" IDS="Y"></char><char cp="0003" IDS="N"></char></repertoire></ucd>';
1616
extractValues(StringStream(str), {'IDS': 'Y'}, function(values) {
17-
expect(values).toEqual({ IDS_Y : [ [ '0001', '0002' ] ] });
17+
expect(values).toEqual({ IDS_Y : [['0001', '0002']] });
1818
done();
1919
});
2020
});
2121

2222
it('should extract the values from the xml if the last element matches', function(done) {
2323
var str = '<ucd><repertoire><char cp="0000" IDS="N"></char><char cp="0001" IDS="Y"></char><char cp="0002" IDS="Y"></char><char cp="0003" IDS="Y"></char></repertoire></ucd>';
2424
extractValues(StringStream(str), {'IDS': 'Y'}, function(values) {
25-
expect(values).toEqual({ IDS_Y : [ [ '0001', '0003' ] ] });
25+
expect(values).toEqual({ IDS_Y : [['0001', '0003']] });
2626
done();
2727
});
2828
});
2929

3030
it('should support `reserved`', function(done) {
3131
var str = '<ucd><repertoire><char cp="0000" IDS="N"></char><char cp="0001" IDS="Y"></char><reserved first-cp="0002" last-cp="0005" IDS="N"></reserved><char cp="0006" IDS="Y"></char></repertoire></ucd>';
3232
extractValues(StringStream(str), {'IDS': 'Y'}, function(values) {
33-
expect(values).toEqual({ IDS_Y : [ [ '0001', '0001' ], [ '0006', '0006' ] ] });
33+
expect(values).toEqual({ IDS_Y : [['0001', '0001'], ['0006', '0006']] });
3434
done();
3535
});
3636
});
3737

3838
it('should support `surrogate`', function(done) {
3939
var str = '<ucd><repertoire><char cp="0000" IDS="N"></char><char cp="0001" IDS="Y"></char><surrogate first-cp="0002" last-cp="0005" IDS="N"></surrogate><char cp="0006" IDS="Y"></char></repertoire></ucd>';
4040
extractValues(StringStream(str), {'IDS': 'Y'}, function(values) {
41-
expect(values).toEqual({ IDS_Y : [ [ '0001', '0001' ], [ '0006', '0006' ] ] });
41+
expect(values).toEqual({ IDS_Y : [['0001', '0001'], ['0006', '0006']] });
4242
done();
4343
});
4444
});
4545

4646
it('should support `noncharactere`', function(done) {
4747
var str = '<ucd><repertoire><char cp="0000" IDS="N"></char><char cp="0001" IDS="Y"></char><noncharacter first-cp="0002" last-cp="0005" IDS="N"></noncharacter><char cp="0006" IDS="Y"></char></repertoire></ucd>';
4848
extractValues(StringStream(str), {'IDS': 'Y'}, function(values) {
49-
expect(values).toEqual({ IDS_Y : [ [ '0001', '0001' ], [ '0006', '0006' ] ] });
49+
expect(values).toEqual({ IDS_Y : [['0001', '0001'], ['0006', '0006']] });
5050
done();
5151
});
5252
});

i18n/ucd/spec/generateCodeSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ var generateFunction = generateCodeModule.generateFunction;
55

66
describe('generateFunction', function() {
77
it('should generate function with ranges', function() {
8-
expect(generateFunction([ [ '0001', '0003' ] ], 'IDS_Y')).toEqual('\
8+
expect(generateFunction([['0001', '0003']], 'IDS_Y')).toEqual('\
99
function IDS_Y(cp) {\n\
1010
if (0x0001 <= cp && cp <= 0x0003) return true;\n\
1111
return false;\n\
1212
}\n');
1313
});
1414

1515
it('should generate function with multiple ranges', function() {
16-
expect(generateFunction([ [ '0001', '0003' ], [ '0005', '0009'] ], 'IDS_Y')).toEqual('\
16+
expect(generateFunction([['0001', '0003'], ['0005', '0009']], 'IDS_Y')).toEqual('\
1717
function IDS_Y(cp) {\n\
1818
if (0x0001 <= cp && cp <= 0x0003) return true;\n\
1919
if (0x0005 <= cp && cp <= 0x0009) return true;\n\
@@ -22,7 +22,7 @@ function IDS_Y(cp) {\n\
2222
});
2323

2424
it('should generate function with unique values', function() {
25-
expect(generateFunction([ [ '0001', '0001' ], [ '0005', '0009'] ], 'IDS_Y')).toEqual('\
25+
expect(generateFunction([['0001', '0001'], ['0005', '0009']], 'IDS_Y')).toEqual('\
2626
function IDS_Y(cp) {\n\
2727
if (cp === 0x0001) return true;\n\
2828
if (0x0005 <= cp && cp <= 0x0009) return true;\n\
@@ -33,7 +33,7 @@ function IDS_Y(cp) {\n\
3333

3434
describe('generateCode', function() {
3535
it('should generate the function for all the values', function() {
36-
expect(generateCode({ IDS_Y : [ [ '0001', '0001' ], [ '0006', '0006' ] ], IDC_Y : [ [ '0002', '0002' ], [ '0007', '0007' ] ] })).toEqual('\
36+
expect(generateCode({ IDS_Y : [['0001', '0001'], ['0006', '0006']], IDC_Y : [['0002', '0002'], ['0007', '0007']] })).toEqual('\
3737
/******************************************************\n\
3838
* Generated file, do not modify *\n\
3939
* *\n\

0 commit comments

Comments
 (0)