Custom Labels and Translations in second generation packages with same namespaces fail to install
Last updated 2022-02-10 ·Reference W-6356285 ·Reported By 13 users
Summary
Custom Labels and Translations in second generation packages with same namespaces fail to install
Repro
1. Create a project for Package A
2. Create a scratch org and in the scratch org:
create a custom label
enable Spanish (as an example - any language will do) translation (from translation workbench settings)
for the custom label create a Spanish translation
3. Pull the source from the scratch org (sfdx force:source:pull)
(Alternatively for steps 1-3 generate source metadata through your preferred method)
4. Create a package version for the source (the source should include CustomLabels and Translations metadata, e.g. CustomLabels.labels-meta.xml, es.translation-meta.xml)
Repeat the same for Package B with a different custom label, but also including a Spanish translation
Now in a target org install Package A.
Install Package B.
The installation will fail.
Workaround
Workaround is to include all the custom labels and translations into a single package.
And specify this custom labels package as a dependency for any other package that needs to use the custom labels.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.