@stevenkellner/team-conduct-api 1.0.14 → 1.0.15

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.
@@ -24,6 +24,10 @@
24
24
  "crateOfBeer?count=%s": {
25
25
  "one": "Ein Kasten Bier",
26
26
  "other": "%s Kästen Bier"
27
+ },
28
+ "crateOfBeerWithoutCount?count=%s": {
29
+ "one": "Kasten Bier",
30
+ "other": "Kästen Bier"
27
31
  }
28
32
  }
29
33
  }
@@ -24,6 +24,10 @@
24
24
  "crateOfBeer?count=%s": {
25
25
  "one": "a crate of beer",
26
26
  "other": "%s crates of beer"
27
+ },
28
+ "crateOfBeerWithoutCount?count=%s": {
29
+ "one": "Crate of Beer",
30
+ "other": "Crates of Beer"
27
31
  }
28
32
  }
29
33
  }
@@ -24,6 +24,7 @@ export declare namespace FineAmount {
24
24
  count: number;
25
25
  constructor(item: Item.Type, count: number);
26
26
  formatted(): string;
27
+ formattedWithoutCount(): string;
27
28
  get flatten(): Item.Flatten;
28
29
  }
29
30
  namespace Item {
@@ -40,6 +40,9 @@ var FineAmount;
40
40
  formatted() {
41
41
  return Localization_1.Localization.shared.getN(key => key.fineAmount.item.type[this.item], this.count);
42
42
  }
43
+ formattedWithoutCount() {
44
+ return Localization_1.Localization.shared.getN(key => key.fineAmount.item.type[`${this.item}WithoutCount`], this.count);
45
+ }
43
46
  get flatten() {
44
47
  return {
45
48
  type: 'item',
@@ -49,6 +49,7 @@ export declare const localizationNKey: {
49
49
  item: {
50
50
  type: {
51
51
  crateOfBeer: string;
52
+ crateOfBeerWithoutCount: string;
52
53
  };
53
54
  };
54
55
  };
@@ -85,7 +85,8 @@ exports.localizationNKey = {
85
85
  fineAmount: {
86
86
  item: {
87
87
  type: {
88
- crateOfBeer: 'fineAmount.item.type.crateOfBeer?count=%s'
88
+ crateOfBeer: 'fineAmount.item.type.crateOfBeer?count=%s',
89
+ crateOfBeerWithoutCount: 'fineAmount.item.type.crateOfBeerWithoutCount?count=%s'
89
90
  }
90
91
  }
91
92
  },
@@ -70,11 +70,15 @@ describe('Localization for de', () => {
70
70
  testedKeys.test(key => key.fineAmount.item.type.crateOfBeer, 'Kasten Bier');
71
71
  testedKeys.testN(key => key.fineAmount.item.type.crateOfBeer, 1, 'Ein Kasten Bier');
72
72
  testedKeys.testN(key => key.fineAmount.item.type.crateOfBeer, 4, '4 Kästen Bier');
73
+ testedKeys.testN(key => key.fineAmount.item.type.crateOfBeerWithoutCount, 1, 'Kasten Bier');
74
+ testedKeys.testN(key => key.fineAmount.item.type.crateOfBeerWithoutCount, 4, 'Kästen Bier');
73
75
  });
74
76
  it('fineAmount.item.type.crateOfBeer should be formatted correctly', () => {
75
77
  (0, core_1.expect)(types_1.FineAmount.Item.Type.formatted('crateOfBeer')).toBeEqual('Kasten Bier');
76
78
  (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formatted()).toBeEqual('Ein Kasten Bier');
77
79
  (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formatted()).toBeEqual('4 Kästen Bier');
80
+ (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formattedWithoutCount()).toBeEqual('Kasten Bier');
81
+ (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formattedWithoutCount()).toBeEqual('Kästen Bier');
78
82
  });
79
83
  });
80
84
  describe('fineTemplateRepetition should be tested', () => {
@@ -66,11 +66,15 @@ describe('Localization for en', () => {
66
66
  testedKeys.test(key => key.fineAmount.item.type.crateOfBeer, 'Crate of Beer');
67
67
  testedKeys.testN(key => key.fineAmount.item.type.crateOfBeer, 1, 'a crate of beer');
68
68
  testedKeys.testN(key => key.fineAmount.item.type.crateOfBeer, 4, '4 crates of beer');
69
+ testedKeys.testN(key => key.fineAmount.item.type.crateOfBeerWithoutCount, 1, 'Crate of Beer');
70
+ testedKeys.testN(key => key.fineAmount.item.type.crateOfBeerWithoutCount, 4, 'Crates of Beer');
69
71
  });
70
72
  it('fineAmount.item.type.crateOfBeer should be formatted correctly', () => {
71
73
  (0, core_1.expect)(types_1.FineAmount.Item.Type.formatted('crateOfBeer')).toBeEqual('Crate of Beer');
72
74
  (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formatted()).toBeEqual('a crate of beer');
73
75
  (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formatted()).toBeEqual('4 crates of beer');
76
+ (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formattedWithoutCount()).toBeEqual('Crate of Beer');
77
+ (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formattedWithoutCount()).toBeEqual('Crates of Beer');
74
78
  });
75
79
  });
76
80
  describe('fineTemplateRepetition should be tested', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stevenkellner/team-conduct-api",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Firebase API for Team Conduct",
5
5
  "license": "MIT",
6
6
  "author": "Steven Kellner",
@@ -24,6 +24,10 @@
24
24
  "crateOfBeer?count=%s": {
25
25
  "one": "Ein Kasten Bier",
26
26
  "other": "%s Kästen Bier"
27
+ },
28
+ "crateOfBeerWithoutCount?count=%s": {
29
+ "one": "Kasten Bier",
30
+ "other": "Kästen Bier"
27
31
  }
28
32
  }
29
33
  }
@@ -1,22 +1,22 @@
1
1
  {
2
- "notification": {
3
- "fine": {
4
- "new": {
5
- "title": "%s",
6
- "body": "You have a new fine of %s. Please pay it as soon as possible."
7
- },
8
- "reminder": {
9
- "title": "You still have outstanding fines",
10
- "body": "You still have %s outstanding. Please pay as soon as possible."
11
- },
12
- "state-change": {
13
- "title": "One of your fines has changed",
14
- "body-payed": "You have paid a fine of %1$s (%2$s).",
15
- "body-unpayed": "%1$s, %2$s is still outstanding.",
16
- "body-deleted": "%1$s, %2$s has been deleted."
17
- }
18
- }
19
- },
2
+ "notification": {
3
+ "fine": {
4
+ "new": {
5
+ "title": "%s",
6
+ "body": "You have a new fine of %s. Please pay it as soon as possible."
7
+ },
8
+ "reminder": {
9
+ "title": "You still have outstanding fines",
10
+ "body": "You still have %s outstanding. Please pay as soon as possible."
11
+ },
12
+ "state-change": {
13
+ "title": "One of your fines has changed",
14
+ "body-payed": "You have paid a fine of %1$s (%2$s).",
15
+ "body-unpayed": "%1$s, %2$s is still outstanding.",
16
+ "body-deleted": "%1$s, %2$s has been deleted."
17
+ }
18
+ }
19
+ },
20
20
  "fineAmount": {
21
21
  "item": {
22
22
  "type": {
@@ -24,6 +24,10 @@
24
24
  "crateOfBeer?count=%s": {
25
25
  "one": "a crate of beer",
26
26
  "other": "%s crates of beer"
27
+ },
28
+ "crateOfBeerWithoutCount?count=%s": {
29
+ "one": "Crate of Beer",
30
+ "other": "Crates of Beer"
27
31
  }
28
32
  }
29
33
  }
@@ -55,6 +55,10 @@ export namespace FineAmount {
55
55
  return Localization.shared.getN(key => key.fineAmount.item.type[this.item], this.count);
56
56
  }
57
57
 
58
+ public formattedWithoutCount(): string {
59
+ return Localization.shared.getN(key => key.fineAmount.item.type[`${this.item}WithoutCount`], this.count);
60
+ }
61
+
58
62
  public get flatten(): Item.Flatten {
59
63
  return {
60
64
  type: 'item',
@@ -51,7 +51,8 @@ export const localizationNKey = {
51
51
  fineAmount: {
52
52
  item: {
53
53
  type: {
54
- crateOfBeer: 'fineAmount.item.type.crateOfBeer?count=%s'
54
+ crateOfBeer: 'fineAmount.item.type.crateOfBeer?count=%s',
55
+ crateOfBeerWithoutCount: 'fineAmount.item.type.crateOfBeerWithoutCount?count=%s'
55
56
  }
56
57
  }
57
58
  },