translation.exchange_unit_unknown
A file given to jadpo translations import holds a unit of wording the project doesn't have.
Area 14, Tools; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
jadpo translations import writes what a translation service sends back
into the project's language files, one unit for each message, named as
jadpo translations export wrote it. A unit with a name the project
doesn't have would word nothing, and is usually a name the service
changed or a message renamed since the export. The import reads the
whole file first, so it stops, points at the unit, and writes nothing.
What it looks like
A project words an email subject in British English and is being translated into French:
The JSON the service sent back has the unit's name misspelt:
cat > fr_fr.json <<'EOF2'{ "shipping.order_shiped": "Votre commande pour {name} a été expédiée."}EOF2jadpo translations import fr_fr.json
error shipping.order_shiped isn't a unit of wording in this project
--> fr_fr.json:2:3
|2 | "shipping.order_shiped": "Votre commande pour {name} a été expédiée." | ^ no such unit
- reason
- A unit is named
<domain>.<message>, with.<value>or.<plural form>for a message whose wording is chosen by one, asjadpo translations exportwrites them. Did you meanshipping.order_shipped? - next
- Rename the unit to
shipping.order_shippedin the file, or export again withjadpo translations export fr_fr(agent) - rule
- translation.
exchange_ unit_ unknown - help
- https://jadpo.
dev/docs/errors/translation. exchange_ unit_ unknown
(agent) at the end of the next: line means your coding agent can make the fix itself.
A unit no name of the project is near, such as one for a message deleted since the export, is refused with the export to make again.
How to fix it
If the unit is one of the project's, misspelt, rename it in the
file as the next: line says, then import it:
sed -i.bak 's/shipping.order_shiped/shipping.order_shipped/' fr_fr.jsonjadpo translations import fr_fr.json
The French wording goes into
domains/shipping/translations/fr_fr.jadpo.
If the project's messages changed since the export, export again, send the new file to the service, and import what it returns:
jadpo translations export fr_fr --format jsonThe new file has a unit for each message the project has now.
Related
Markdown for agents: /docs/errors/translation.exchange_unit_unknown.md.Built from Jadpo main at aee2e8f.