# Share theme (component) translations

**URL:** https://meta.discourse.org/t/share-theme-component-translations/371975
**Category:** Theme component
**Tags:** translation
**Created:** [June 27, 2025, 10:03am UTC](https://meta.discourse.org/t/share-theme-component-translations/371975 "2025-06-27T10:03:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [June 27, 2025, 10:03am UTC](https://meta.discourse.org/t/share-theme-component-translations/371975/1 "2025-06-27T10:03:13Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Help translating themes and theme components by easily sharing the translations done in the Discourse interface |
| 👓 | **Preview** | Sharing themes on theme creator is currently not possible |
| 🛠 | **Repository** | [GitHub - moin-Jana/share-theme-translations](https://github.com/moin-Jana/share-theme-translations) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

Discourse makes it easy to translate themes and theme components. But these translations often stay only on your local site.  
This component helps you share your translations with the community and the author as a pull request to the repository or by posting them in the topic here on Meta.

 ![Share translations section below Theme Translations section, which contains some text about sharing translations and a button](https://global.discourse-cdn.com/meta/original/4X/b/d/4/bd40707f8a984522b1bd44927bb4c59ff80838c7.png)  
 ![Share translations modal showing original and modified text and buttons to create a pull request, copy and open Meta and copy YML](https://global.discourse-cdn.com/meta/original/4X/4/2/a/42ab9a486ed7f68a58dff3e02d9d6d5a7a22be48.png)

## How it works

This component adds a section below the translation interface when a remote theme or component contains translatable texts. From there, you can open a modal that helps you share your translations in various ways.

> ⚠ **Note on default branches**  
> The component assumes that the repository’s default branch is named `main`. If the repository uses a different name (like `master`), some links may not work correctly and might require manual adjustment.

### Create new translation files on GitHub

If the theme is hosted on GitHub and the language doesn’t yet have a translation file, the button will:

- open the GitHub editor with the correct path (e.g. `locales/de.yml`)
- pre-fill the editor with your translations, properly formatted
- include theme descriptions and settings (optional)

Descriptions can’t be translated in the Discourse UI, but you can edit them directly in the GitHub editor before saving. If you don’t want to translate them you can also un-check the checkbox to exclude them.

> **Detailed steps**
>
> 1. After translating, click the button to open the modal  
> ![Share translations section, which contains some text about sharing translations and a button to "share translations for Deutsch"](https://global.discourse-cdn.com/meta/original/4X/b/d/4/bd40707f8a984522b1bd44927bb4c59ff80838c7.png)
> 2. Click “Create pull request”  
> ![Share translations modal showing original and modified text, a checkbox that includes descriptions and buttons to create a pull request, copy and open Meta and copy YML](https://global.discourse-cdn.com/meta/original/4X/4/2/a/42ab9a486ed7f68a58dff3e02d9d6d5a7a22be48.png)
> 3. Fork the repository  
> ![GitHub interface telling you that you need to fork the repository and offering a button to do so](https://global.discourse-cdn.com/meta/original/4X/5/0/7/507ad426883b5a71b2aa64f7a82bb6f88e014744.png)
> 4. The editor will open with your translations pre-filled. If you want to you can translate the descriptions directly in the file.  
> ![GitHub interface showing the editor for /locale/de.yml. Theme description and metadata are in English, theme translations are in German](https://global.discourse-cdn.com/meta/original/4X/5/a/8/5a81989a99b203a3b3551180ab55bd235ed0dabd.png)  
> When you disabled the checkbox to exclude descriptions, those won’t be included which simplifies the text in the editor.  
> ![GitHub interface showing the editor for /locale/de.yml. Theme description and metadata are missing](https://global.discourse-cdn.com/meta/original/4X/4/3/f/43f073d5f569900088ca042b465b08767ddfa764.png)
> 5. When you are ready click “Commit changes…”, then “Propose changes”, and finally “Create pull request” (twice).  
> ![Modal for entering the commit message and description with a "Propose changes" button at the bottom](https://global.discourse-cdn.com/meta/original/4X/c/b/a/cba9b840eca58f19d312b0a337822e2fafaee434.png)
> 6. 🥳 That’s it - you’ve shared your translations!

### Improve and add translations on GitHub

Even if a translation for your language exists, you can still improve it and add missing translations. This process is a bit less streamlined. The button will:

- open the GitHub editor with the correct path (e.g. `locales/en_GB.yml`)
- instead of pre-filling the GitHub editor, the translations will be copied to your clipboard so you can easily paste them in.
- including additional information like the theme description and settings is possible if the language of your interface is the same as the translations you are editing. Otherwise the component cannot get the descriptions in the correct language and these are excluded and you copy only the translated texts. In that case, make sure not to overwrite the descriptions when pasting your changes. The component will warn you beforehand, so you can easily switch your interface language and include descriptions.

> **Detailed steps**
>
> 1. When your interface language doesn’t match the translation language (in this case my interface language is English US and I am translating to English UK) you have two options:  
> ![Share translations section, which contains some text about sharing translations, a warning about a language mismatch between the interface and the translation target and a button to "share translations for English UK"](https://global.discourse-cdn.com/meta/original/4X/b/4/0/b4020daac0e22778f59c890425ca56b1469f944d.png)  
> **A**. Change your interface language before opening the modal  
> **B**. Continue and open the modal without switching the language.
> 2. You will see the modal highlighting your edits  
> **A**. In case your interface language is also the language you translate to, you can choose to exclude descriptions using the checkbox  
> ![Share translations modal showing original and modified text, a checkbox that includes descriptions and buttons to create a pull request, copy and open Meta and copy YML](https://global.discourse-cdn.com/meta/original/4X/c/7/b/c7b2ec0d46e5a4c7d4df48ce58c94dfa372db8da.png)  
> **B**. Otherwise, the checkbox will be disabled.  
> ![Share translations modal showing original and modified text, a disabled checkbox about including descriptions and buttons to create a pull request, copy and open Meta and copy YML](https://global.discourse-cdn.com/meta/original/4X/b/b/6/bb69047e302d8a9675d5103d2ba4efe669afe818.png)
> 3. Click “Copy & open GitHub” and fork the repository  
> ![GitHub interface telling you that you need to fork the repository and offering a button to do so](https://global.discourse-cdn.com/meta/original/4X/0/2/7/027260bfca504ce4c7f4924554e34ff00f28fc3c.png)
> 4. You will see the editor with the translations currently saved on GitHub.  
> **A**. If descriptions were included you can simply simply replace the entire file contents.  
> 
>   
> **B**. In case you didn’t switch your locale or you unchecked the checkbox only the theme translations were copied. So only replace those with your translations. Pay attention that everything is indented correctly.  
> 
> 5. You can also edit the descriptions. When you are ready click “Commit changes…”, then “Propose changes”, and finally “Create pull request” (twice).  
> ![Modal for entering the commit message and description with a "Propose changes" button at the bottom](https://global.discourse-cdn.com/meta/original/4X/7/9/5/7950336088538871533c1a2ccb9346fd6ef57783.png)
> 6. 🥳 That’s it - you’ve shared your translations!

> ⚠ Some theme components use a translation platform for translations. For example many #official components are translated on Crowdin. Those files have a warning at the top which tells you where you can contribute your translations instead.
> 
> ![WARNING: Never edit this file. It will be overwritten when translations are pulled from Crowdin. To work with us on translations, join this project:https://translate.discourse.org/](https://global.discourse-cdn.com/meta/original/4X/4/c/7/4c70b7ad62fc97956b8ae3b03f62eb2ee0c8d5a3.png)

### Share translations on Meta

When you don’t have a GitHub Account and the link to the Meta topic is available, you can also post your translations there and ask the author to include them in the next update. Clicking “Copy & open Meta” will format your translations, copy them to your clipboard, and open the Meta topic in a new tab. Then simply click **Reply** and paste the formatted translations that were copied for you.

> **Detailed steps**
>
> 1. After translating, click the button to open the modal.  
> ![Share translations section, which contains some text about sharing translations and a button to "share translations for Deutsch"](https://global.discourse-cdn.com/meta/original/4X/b/d/4/bd40707f8a984522b1bd44927bb4c59ff80838c7.png)
> 2. Click “Copy & open Meta”.  
> ![Share translations modal showing original and modified text, a checkbox that includes descriptions and buttons to create a pull request, copy and open Meta and copy YML](https://global.discourse-cdn.com/meta/original/4X/4/2/a/42ab9a486ed7f68a58dff3e02d9d6d5a7a22be48.png)
> 3. Click “Reply” to open the composer and paste your translations.  
> ![Discourse forum with an open composer at the bottom which contains translations](https://global.discourse-cdn.com/meta/original/4X/4/3/f/43f4401791b06c769cbf56e2ffde37c1333e710d.png)
> 4. If you didn’t exclude the descriptions you can edit them directly before posting your translations.  
> ![Discourse composer still containing the translations but with a message to the theme author above and descriptions in German](https://global.discourse-cdn.com/meta/original/4X/e/b/4/eb446da995847583f263faad0a3986514cae759e.png)
> 5. 🥳 You shared your translations

If no Meta topic link was provided you can copy the translations and search for the relevant topic manually. Don’t forget the formatting of your post in that case.

### Share translations on other platforms

If the theme is hosted on GitLab or another platform, your translations will be copied to your clipboard, and the repository will open in a new tab. Unlike GitHub, GitLab does not support prefilled content in the URL for the file editor. So you’ll need to paste the translations manually, even for new files.  
I didn’t research how links for editing files are built on other platforms. So in that case you are taken to the file or directory in the repository and need to find out how to create or edit a file on your own.

## Settings

This component includes one setting: `hide_texts`  
It hides the introductory explanation and displays a shorter message shown when your interface language doesn’t match the language you’re translating into.

 ![Share translations section, which contains a button to "share translations for Deutsch"](https://global.discourse-cdn.com/meta/original/4X/3/c/2/3c2676d0b3fc66cfd6cc8c8f3042a3da4a514952.png) ![Share translations section, which contains a warning about a language mismatch between the interface and the translation target and a button to "share translations for English UK"](https://global.discourse-cdn.com/meta/original/4X/b/c/8/bc8e9338e2099aa45d6cea1f3ddc9dd3d355aaf8.png)

## Thoughts for the Future

Currently, the component can’t detect if a theme is translated externally - for example, via Crowdin. This would be technically possible if the `about.json` file included an optional `translation_url` field, just like it already can include a license or meta topic link. For example:

```plaintext
"translation_url": "https://discourse.crowdin.com/discotoc"

```

With that in place, the component could:

- hide the sharing button when translations are handled elsewhere
- display a message that explains where to contribute instead
- avoid unnecessary pull requests or confusion

This wouldn’t only help this component - it would be helpful in general for admins to find where to contribute translations.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [June 27, 2025, 10:07am UTC](https://meta.discourse.org/t/share-theme-component-translations/371975/2 "2025-06-27T10:07:24Z")

</div>

Amazing work Moin. Thanks for building this. 🧑‍🚀 👏
