Skip to content

Commit

Permalink
fix(models/document): Rename "stranger" locale
Browse files Browse the repository at this point in the history
This term had been replaced in the MyPapers app
but was forgotten here.
As a result, we've lost the ''(Foreign)'' display on papers
such as the foreign driver's license, and this generates
a lot of error logs.
  • Loading branch information
Merkur39 committed May 17, 2024
1 parent 20be1ba commit 59b42bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/cozy-client/src/models/document/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"country": {
"stranger": "Stranger"
"foreign": "Stranger"
},
"Scan": {
"scan_a_doc": "Scan a doc",
Expand Down
2 changes: 1 addition & 1 deletion packages/cozy-client/src/models/document/locales/fr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"country": {
"stranger": "Étranger"
"foreign": "Étranger"
},
"Scan": {
"scan_a_doc": "Numériser un doc",
Expand Down
4 changes: 2 additions & 2 deletions packages/cozy-client/src/models/document/locales/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const getBoundT = lang => {
const country = opts?.country

const emojiCountry =
country !== 'stranger' ? getEmojiByCountry(country) : null
const strangerLabel = country === 'stranger' ? t('country.stranger') : null
country !== 'foreign' ? getEmojiByCountry(country) : null
const strangerLabel = country === 'foreign' ? t('country.foreign') : null

return emojiCountry || strangerLabel
? `${t(label, newOpts)} ${emojiCountry || strangerLabel}`
Expand Down

0 comments on commit 59b42bf

Please sign in to comment.