cozy-client 47.1.0 → 47.1.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/CozyClient.js +1 -1
- package/dist/models/document/locales/en.json +1 -1
- package/dist/models/document/locales/fr.json +1 -1
- package/dist/models/document/locales/index.js +2 -2
- package/dist/models/document/locales/index.spec.js +10 -10
- package/dist/models/paper.js +3 -1
- package/package.json +2 -2
package/dist/CozyClient.js
CHANGED
|
@@ -2782,7 +2782,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2782
2782
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2783
2783
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2784
2784
|
|
|
2785
|
-
CozyClient.version = "47.1.
|
|
2785
|
+
CozyClient.version = "47.1.2";
|
|
2786
2786
|
|
|
2787
2787
|
_microee.default.mixin(CozyClient);
|
|
2788
2788
|
|
|
@@ -50,8 +50,8 @@ var getBoundT = function getBoundT(lang) {
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
var country = opts === null || opts === void 0 ? void 0 : opts.country;
|
|
53
|
-
var emojiCountry = country !== '
|
|
54
|
-
var strangerLabel = country === '
|
|
53
|
+
var emojiCountry = country !== 'foreign' ? (0, _countries.getEmojiByCountry)(country) : null;
|
|
54
|
+
var strangerLabel = country === 'foreign' ? t('country.foreign') : null;
|
|
55
55
|
return emojiCountry || strangerLabel ? "".concat(t(label, newOpts), " ").concat(emojiCountry || strangerLabel) : t(label, newOpts);
|
|
56
56
|
};
|
|
57
57
|
};
|
|
@@ -20,16 +20,16 @@ describe('getBoundT', () => {
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
it.each`
|
|
23
|
-
translationKey | country
|
|
24
|
-
${'Scan.items.national_id_card'} | ${undefined}
|
|
25
|
-
${'Scan.items.national_id_card'} | ${'fr'}
|
|
26
|
-
${'Scan.items.national_id_card'} | ${'
|
|
27
|
-
${'Scan.items.national_id_card'} | ${'be'}
|
|
28
|
-
${'Scan.items.national_id_card'} | ${'be'}
|
|
29
|
-
${'Scan.items.national_id_card'} | ${'fr'}
|
|
30
|
-
${'Scan.items.national_id_card'} | ${'fr'}
|
|
31
|
-
${'Scan.items.national_id_card'} | ${undefined}
|
|
32
|
-
${'Scan.items.national_id_card'} | ${undefined}
|
|
23
|
+
translationKey | country | smart_count | lang | expected
|
|
24
|
+
${'Scan.items.national_id_card'} | ${undefined} | ${undefined} | ${'en'} | ${'ID card'}
|
|
25
|
+
${'Scan.items.national_id_card'} | ${'fr'} | ${undefined} | ${'en'} | ${'ID card 🇫🇷'}
|
|
26
|
+
${'Scan.items.national_id_card'} | ${'foreign'} | ${undefined} | ${'en'} | ${'ID card Foreign'}
|
|
27
|
+
${'Scan.items.national_id_card'} | ${'be'} | ${1} | ${'en'} | ${'ID card 🇧🇪'}
|
|
28
|
+
${'Scan.items.national_id_card'} | ${'be'} | ${2} | ${'en'} | ${'ID cards 🇧🇪'}
|
|
29
|
+
${'Scan.items.national_id_card'} | ${'fr'} | ${1} | ${'en'} | ${'ID card 🇫🇷'}
|
|
30
|
+
${'Scan.items.national_id_card'} | ${'fr'} | ${2} | ${'en'} | ${'ID cards 🇫🇷'}
|
|
31
|
+
${'Scan.items.national_id_card'} | ${undefined} | ${1} | ${'en'} | ${'ID card'}
|
|
32
|
+
${'Scan.items.national_id_card'} | ${undefined} | ${2} | ${'en'} | ${'ID cards'}
|
|
33
33
|
`(
|
|
34
34
|
'should test if the translation is suitable with the param country: $country and with the param smart_count: $smart_count',
|
|
35
35
|
({ translationKey, country, smart_count, lang, expected }) => {
|
package/dist/models/paper.js
CHANGED
|
@@ -25,6 +25,8 @@ var _contact = require("./contact");
|
|
|
25
25
|
|
|
26
26
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
27
27
|
|
|
28
|
+
var _countries = require("./country/countries");
|
|
29
|
+
|
|
28
30
|
/**
|
|
29
31
|
* @typedef {import("../types").IOCozyFile} IOCozyFile
|
|
30
32
|
*/
|
|
@@ -447,7 +449,7 @@ var formatInformationMetadataValue = function formatInformationMetadataValue(val
|
|
|
447
449
|
return "".concat(value, " \u20AC");
|
|
448
450
|
}
|
|
449
451
|
|
|
450
|
-
if (name === 'country') {
|
|
452
|
+
if (name === 'country' && (0, _countries.checkCountryCode)(value)) {
|
|
451
453
|
return tCountry("nationalities.".concat(value));
|
|
452
454
|
}
|
|
453
455
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "47.1.
|
|
3
|
+
"version": "47.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "308052cb1f01d11f22787d3a06146b5127eee5b4"
|
|
79
79
|
}
|