3

In a scratch org where the translation workbench is enabled, I added English as a supported language (the language for the organization is Japanese) and ran the command sfdx force:source:pull, which adds force-app/main/default/translations/en_US.translation-meta.xml to my project. However, when running package:version:create I get the following error:

en_US: Not available for deploy for this organization

Has anyone else encountered this error or know how to fix it?

1

There are two things you have to do:

  1. enable Translations in your Scratch-Org-Def (I guess, you already did).
  2. let package-version-create use this scratch org def (I guess, that you didn't)

So you scratch org def should looklike this:

{
  "edition": "Enterprise",
  "language": "en_US",
  "features": [],
  "settings": {
    "languageSettings": {
      "enableTranslationWorkbench":  true,
      "enableEndUserLanguages": true
    }
  }
}

And your package-Version-create like this:

$ sfdx force:package:version:create  -f config/<your scratch-org-def>.json
  • 1
    Thanks! Like you said, it turns out I didn't specify the path to the definition file when creating the package version. Once I did that I was able to create it as intended. Thanks again! – ymgt Feb 25 '19 at 7:24
0

As of today, the setting orgPreferenceSettings.translation does not do anything if other pathAssistantSettings.pathAssistantEnabled setting is present, no idea if this happens with any other setting, I am going to open a support case to inform about this.

{
    "orgName": "Org",
    "edition": "Developer",
    "language": "en_US",
    "features": [
        "PersonAccounts",
        "Entitlements",
        "MultiCurrency"
    ],
    "settings": {
        "orgPreferenceSettings": {
            "s1DesktopEnabled": true,
            "translation": true
        },
        "entitlementSettings": {
            "enableEntitlements": true,
            "enableEntitlementVersioning":true
        },
        "pathAssistantSettings":{
            "pathAssistantEnabled": true
        }
    }
}

A possible workaround is to deploy an OrgPreferenceSettings.settings-meta.xml with that option enabled.

<?xml version="1.0" encoding="UTF-8"?>
<OrgPreferenceSettings xmlns="http://soap.sforce.com/2006/04/metadata">
    <preferences>
        <settingName>Translation</settingName>
        <settingValue>true</settingValue>
    </preferences>
</OrgPreferenceSettings>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.