Rosey Checks File
The Rosey checks file highlights any discrepancies between your base translation file and your translated locale files, such as out of date or missing translations.
#Creating the checks file
At the end of your translation workflow, after running Rosey generate and creating translated locale files, you will have a rosey
directory structure such as:
rosey/
├─ locales/
│ ├─ fr-fr.json
│ └─ ko-kr.json
└─ base.json
With these files in place you can run the Rosey check command, which will generate a file in the following location:
rosey/
├─ locales/
│ ├─ fr-fr.json
│ └─ ko-kr.json
└─ base.json
└─ checks.json
In this case, this new checks.json
file contains a report on the state of the ko-kr
and fr-fr
locales compared to the base.json
file. The contents of this file will look something like:
{
"fr-fr": {
"current": true,
"baseTotal": 2,
"total": 2,
"states": {
"unused": 0,
"current": 2,
"outdated": 0,
"missing": 0
},
"keys": {
"title": "current",
"content": "current"
}
},
"ko-kr": {
"current": false,
"baseTotal": 2,
"total": 2,
"states": {
"unused": 0,
"current": 0,
"outdated": 1,
"missing": 1
},
"keys": {
"title": "outdated",
"content": "missing",
"name": "unused"
}
}
}
For each translated locale, and each translation key, one of the following statuses will be reported:
current
- A translation for this key exists, and the
original
value matches that of thebase.json
file.
- A translation for this key exists, and the
outdated
- A translation for this key exists, but the
original
value does not match thebase.json
, meaning that this translation is out of date and should be re-processed,
- A translation for this key exists, but the
missing
- This key exists in the
base.json
, but does not exist in this locale file.
- This key exists in the
unused
- This key exists in this locale file, but the
base.json
contains no such key, so this translation will not be used anywhere on the site.
- This key exists in this locale file, but the