Browse Source

feat(i18n): add localization for Regional Market Cluster Risks (#5107)

rohit 19 hours ago
parent
commit
79fdea592a
  1. 18
      apps/api/src/models/rules/regional-market-cluster-risk/asia-pacific.ts
  2. 16
      apps/api/src/models/rules/regional-market-cluster-risk/emerging-markets.ts
  3. 16
      apps/api/src/models/rules/regional-market-cluster-risk/europe.ts
  4. 16
      apps/api/src/models/rules/regional-market-cluster-risk/japan.ts
  5. 16
      apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts
  6. 3
      apps/client/src/app/pages/i18n/i18n-page.html

18
apps/api/src/models/rules/regional-market-cluster-risk/asia-pacific.ts

@ -33,23 +33,23 @@ export class RegionalMarketClusterRiskAsiaPacific extends Rule<Settings> {
if (asiaPacificMarketValueRatio > ruleSettings.thresholdMax) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskAsiaPacific.false.max',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
valueRatio: (asiaPacificMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
}
},
}),
value: false
};
} else if (asiaPacificMarketValueRatio < ruleSettings.thresholdMin) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskAsiaPacific.false.min',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
valueRatio: (asiaPacificMarketValueRatio * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3)
}
}),
value: false
@ -58,12 +58,12 @@ export class RegionalMarketClusterRiskAsiaPacific extends Rule<Settings> {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskAsiaPacific.true',
languageCode: this.getLanguageCode(),
placeholders: {
valueRatio: (asiaPacificMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
valueRatio: (asiaPacificMarketValueRatio * 100).toPrecision(3),
}
}),
value: true
@ -89,8 +89,8 @@ export class RegionalMarketClusterRiskAsiaPacific extends Rule<Settings> {
public getName() {
return this.i18nService.getTranslation({
id: 'rule.regionalMarketClusterRiskAsiaPacific',
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskAsiaPacific'
});
}

16
apps/api/src/models/rules/regional-market-cluster-risk/emerging-markets.ts

@ -35,11 +35,11 @@ export class RegionalMarketClusterRiskEmergingMarkets extends Rule<Settings> {
if (emergingMarketsValueRatio > ruleSettings.thresholdMax) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEmergingMarkets.false.max',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
valueRatio: (emergingMarketsValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
}
}),
value: false
@ -47,11 +47,11 @@ export class RegionalMarketClusterRiskEmergingMarkets extends Rule<Settings> {
} else if (emergingMarketsValueRatio < ruleSettings.thresholdMin) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEmergingMarkets.false.min',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
valueRatio: (emergingMarketsValueRatio * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3)
}
}),
value: false
@ -60,12 +60,12 @@ export class RegionalMarketClusterRiskEmergingMarkets extends Rule<Settings> {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEmergingMarkets.true',
languageCode: this.getLanguageCode(),
placeholders: {
valueRatio: (emergingMarketsValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
valueRatio: (emergingMarketsValueRatio * 100).toPrecision(3),
}
}),
value: true
@ -91,8 +91,8 @@ export class RegionalMarketClusterRiskEmergingMarkets extends Rule<Settings> {
public getName() {
return this.i18nService.getTranslation({
id: 'rule.regionalMarketClusterRiskEmergingMarkets',
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEmergingMarkets'
});
}

16
apps/api/src/models/rules/regional-market-cluster-risk/europe.ts

@ -33,11 +33,11 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> {
if (europeMarketValueRatio > ruleSettings.thresholdMax) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEurope.false.max',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
valueRatio: (europeMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
}
}),
value: false
@ -45,11 +45,11 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> {
} else if (europeMarketValueRatio < ruleSettings.thresholdMin) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEurope.false.min',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
valueRatio: (europeMarketValueRatio * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3)
}
}),
value: false
@ -58,12 +58,12 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEurope.true',
languageCode: this.getLanguageCode(),
placeholders: {
valueRatio: (europeMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
valueRatio: (europeMarketValueRatio * 100).toPrecision(3),
}
}),
value: true
@ -89,8 +89,8 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> {
public getName() {
return this.i18nService.getTranslation({
id: 'rule.regionalMarketClusterRiskEurope',
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskEurope'
});
}

16
apps/api/src/models/rules/regional-market-cluster-risk/japan.ts

@ -33,11 +33,11 @@ export class RegionalMarketClusterRiskJapan extends Rule<Settings> {
if (japanMarketValueRatio > ruleSettings.thresholdMax) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskJapan.false.max',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
valueRatio: (japanMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
}
}),
value: false
@ -45,11 +45,11 @@ export class RegionalMarketClusterRiskJapan extends Rule<Settings> {
} else if (japanMarketValueRatio < ruleSettings.thresholdMin) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskJapan.false.min',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
valueRatio: (japanMarketValueRatio * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3)
}
}),
value: false
@ -58,12 +58,12 @@ export class RegionalMarketClusterRiskJapan extends Rule<Settings> {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskJapan.true',
languageCode: this.getLanguageCode(),
placeholders: {
valueRatio: (japanMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
valueRatio: (japanMarketValueRatio * 100).toPrecision(3),
}
}),
value: true
@ -89,8 +89,8 @@ export class RegionalMarketClusterRiskJapan extends Rule<Settings> {
public getName() {
return this.i18nService.getTranslation({
id: 'rule.regionalMarketClusterRiskJapan',
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskJapan'
});
}

16
apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts

@ -33,11 +33,11 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> {
if (northAmericaMarketValueRatio > ruleSettings.thresholdMax) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskNorthAmerica.false.max',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
valueRatio: (northAmericaMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
}
}),
value: false
@ -45,11 +45,11 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> {
} else if (northAmericaMarketValueRatio < ruleSettings.thresholdMin) {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskNorthAmerica.false.min',
languageCode: this.getLanguageCode(),
placeholders: {
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
valueRatio: (northAmericaMarketValueRatio * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3)
}
}),
value: false
@ -58,12 +58,12 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> {
return {
evaluation: this.i18nService.getTranslation({
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskNorthAmerica.true',
languageCode: this.getLanguageCode(),
placeholders: {
valueRatio: (northAmericaMarketValueRatio * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3),
thresholdMin: (ruleSettings.thresholdMin * 100).toPrecision(3),
thresholdMax: (ruleSettings.thresholdMax * 100).toPrecision(3)
valueRatio: (northAmericaMarketValueRatio * 100).toPrecision(3),
}
}),
value: true
@ -89,8 +89,8 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> {
public getName() {
return this.i18nService.getTranslation({
id: 'rule.regionalMarketClusterRiskNorthAmerica',
languageCode: this.getLanguageCode(),
id: 'rule.regionalMarketClusterRiskNorthAmerica'
});
}

3
apps/client/src/app/pages/i18n/i18n-page.html

@ -26,7 +26,6 @@
($&#123;valueRatio&#125;%) is within the range of
$&#123;thresholdMin&#125;% and $&#123;thresholdMax&#125;%
</li>
<li i18n="@@rule.regionalMarketClusterRiskEmergingMarkets">
Emerging Markets
</li>
@ -43,7 +42,6 @@
($&#123;valueRatio&#125;%) is within the range of
$&#123;thresholdMin&#125;% and $&#123;thresholdMax&#125;%
</li>
<li i18n="@@rule.regionalMarketClusterRiskEurope">Europe</li>
<li i18n="@@rule.regionalMarketClusterRiskEurope.false.max">
The Europe market contribution of your current investment
@ -58,7 +56,6 @@
($&#123;valueRatio&#125;%) is within the range of
$&#123;thresholdMin&#125;% and $&#123;thresholdMax&#125;%
</li>
<li i18n="@@rule.regionalMarketClusterRiskJapan">Japan</li>
<li i18n="@@rule.regionalMarketClusterRiskJapan.false.max">
The Japan market contribution of your current investment

Loading…
Cancel
Save