Skip to content

Translate Antares

Fabio Di Stasio edited this page Oct 13, 2023 · 16 revisions

The developer's way

  1. Fork this repo and clone the forked copy on your machine.
  2. Open antares folder with your editor of choice.
  3. Go to antares/src/renderer/i18n/.
  4. Create a copy of en-US.ts and rename with your locale shortcode composed by ISO 639-1, minus (-) and ISO 3166-2 (eg. it-IT).
  5. On first line rename export const enUS in export const (locale shortcode without '-').
  6. Translate all strings contained in this new file. Make sure to not delete {variables} or |.
  7. In the same folder, edit index.ts, import the new translation and add a key: value pair like follow:
import { enUS } from './en-US';
import { itIT } from './it-IT';

messages: {
   'en-US': enUS,// <- do not forget comma on the line above your new locale
   'it-IT': itIT
}
  1. In the same folder, edit supported-locales.js to add a key: value pair with 'short-code': 'Language Name in original language' as follow:
export default {
   'en-US': 'English',// <- do not forget comma on the line above your new locale
   'it-IT': 'Italiano'
};
  1. Install Node.js.
  2. Save and run npm i & npm run debug in antares folder.
  3. In Antares app just opened go to setting, select your brand new translation and test that everything works.
  4. Commit and make a pull request on this repo!

The fast way

  1. Download this file.
  2. Translate all strings contained in this file. Make sure to not delete {variables} or |.
  3. Rename it with your locale shortcode composed by ISO 639-1, minus (-) and ISO 3166-2 (eg. fr-FR).
  4. Open a new issue with title "New Translation: {Locale name in original language}".
  5. Drag the file in the issue, write your name and the link to your Github profile (if you want), i'll add in README.md.
  6. Submit.

Update an existing translation

  1. Fork this repo and clone the forked copy on your machine.
  2. Install Node.js.
  3. Open a terminal in antares folder and run npm run translation:check short-code replacing short-code with the one you are updating.
  4. The command will output which terms are missing or not translated from english.
  5. Open antares folder with your editor of choice.
  6. Go to antares/src/renderer/i18n/ and open the locale file you want to translate.
  7. Add and translate missing terms and consider whether to translate untranslated terms.
  8. Send the updated translation in one of the above ways.

Problems with translation?

Do not hesitate to contact me at [email protected] for any questions or if you have problems with the translation procedure.