The contributing documentation still referenced the old `contrib` branch, which was causing AI tools to incorrectly use it as the base branch for comparisons. Updated all references to use `main` instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
5.8 KiB
Contributing to Localization in the Backoffice
Do you want to help keep our translations accurate and up to standard? 🌍✨
Your input makes a real difference! By reviewing, refining, or suggesting improvements, you ensure that our translations remain clear, consistent, and user-friendly for everyone.
How Can I Contribute?
To contribute to localization in the Backoffice, follow this step-by-step guide:
1. Change the Language in Backoffice
- Open the Backoffice, click on your profile icon in the top-right corner, and select "Edit."
- Under "UI Culture," select the language you want to review from the dropdown menu.
2. Find a Translation Error
-
Navigate through the Backoffice and check if everything is translated correctly.
-
When you find a translation error, right-click on it and select "Inspect."
-
Look for the nearest element that starts with
umb-and has a name indicating something specific to the given location.Example:
- The closest parent element should be specific, such as
umb-document-type-workspace-view-settingsinstead of a generic element likeumb-property-layout.
- The closest parent element should be specific, such as
3. Find the Code in VS Code
- Open VS Code and search for the nearest
umb-element you identified.
- Scroll down to find
render() {and look for the element label that needs updating.
-
If the label is hardcoded, it must be updated.
Example:
label="Vary by culture"
4. Find the Correct Translation
-
Open the
en.tsoren-us.tsfile and search for relevant keywords.
Example:- If the text is "Vary by culture," search for
vary,culture, orVary by culture.
- If the text is "Vary by culture," search for
-
Once you find the translation, take the element name and search for it in the target language file (e.g.,
da-dk.tsfor Danish).
- If a translation exists, insert it into the label element found earlier.
5. Insert the Translation
To display the new translation correctly, insert the following code inside the label element:
${this.localize.term('action_key')}
Replace action_key with the correct translation key.
Example:
${this.localize.term('contentTypeEditor_allowVaryByCulture')}
Save the changes and return to the Backoffice to see the update.
6. Commit and Push
-
Commit your changes to a new temporary branch (avoid committing directly to
main). -
Push the changes to your fork on GitHub.
7. Create a Pull Request
-
In your forked repository on GitHub (
https://github.com/[YourUsername]/Umbraco-CMS), a banner will appear stating that you pushed a new branch. -
Click the button to create a pull request and follow the instructions.
I Can’t Find the Correct Translation
If you can’t find the translation you need, it may not exist yet. In this case, you can create a new action with related keys.
1. Ensure It Doesn’t Already Exist
Search thoroughly in en.ts or en-us.ts for all relevant keywords.
2. Create an Action
-
Choose a meaningful name for the action to avoid confusion.
Example: Translation for the Data Type "Color Picker."- Good name:
colorPickerConfigurations - Bad name:
colorpicker
- Good name:
-
A specific action name prevents unnecessarily long key names.
-
Define the action:
3. Create Keys
- Use clear and descriptive key names.
Example:- Good name:
colorsTitle - Bad name:
colors
- Good name:
- Add the necessary keys inside the action with proper translations.
I Can’t Find a render() Code in VS Code
In some cases, such as Data Types, the label might not be inside render(). Instead, it may be in a manifest file.
1. Search for the Text
Copy the text from the Backoffice and search for it in the code.
2. Open the Manifest File
Once you find the relevant manifest file, open it to confirm you’re in the right place.
3. Change the Label
In Markdown files, localization is slightly different. Instead of:
${this.localize.term('action_key')}
Use: #action_key
Example:
#colorPickerConfigurations_showLabelTitle
4. Change the Description
For descriptions in Markdown files, use:
{umbLocalize: action_key}
Example:
{umbLocalize: colorPickerConfigurations_showLabelDescription}
5. Save and Verify
Once all changes are made, your manifest should look something like this:
Thank you
Following these steps ensures that the Umbraco Backoffice remains accessible and user-friendly in all supported languages. Thanks for contributing! 🎉









