Skip to content

Instantly share code, notes, and snippets.

@object-Object
Last active August 16, 2026 02:34
Show Gist options
  • Select an option

  • Save object-Object/e1e34ce52f40f1d5a96a86f5b6f1354b to your computer and use it in GitHub Desktop.

Select an option

Save object-Object/e1e34ce52f40f1d5a96a86f5b6f1354b to your computer and use it in GitHub Desktop.
Adding a project to Hexxy Weblate

Adding a project to Hexxy Weblate

Hexxy Weblate (also available at https://hexxy-weblate.object.gay if your Internet provider blocks hexxy.media) is a public Weblate instance hosted by me (object-Object, or leftsquarebracket on Discord). Hex Casting community members are welcome to use it for localizing projects (e.g. addons) related to Hex Casting.

Weblate is a web-based translation tool with tight version control integration. It features a simple and clean user interface, propagation of translations across components, quality checks, and automatic linking to source files.

For information about downtime or site issues, see Hexxy Weblate's status page.

Custom features of Hexxy Weblate

Hexxy Weblate includes the following non-standard features as of 2026-08-15:

  • Support for localizing translations stored in JSON5, including correct parsing of PKPCPBP-style .flatten.json5 files.
  • Custom checks for validating Patchouli text formatting.

The source code for Hexxy Weblate's customizations can be found on GitHub at object-Object/hexxy-weblate. Feel free to suggest features or report bugs by opening an issue, or contribute new Hex Casting-related features by opening a pull request.

Getting started

Important

Weblate is a developer-oriented tool with a large amount of configurability; documenting the full range of project setup options is outside the scope of this document.

Please make use of the excellent Weblate documentation and a search engine of your choice. You may also ask Weblate-related questions in the #translation channel in the Hex Casting Discord server.

You should also look through the settings at all levels of your Weblate project and workspace to make sure everything is configured how you want it.

To get permission to create translation projects on Hexxy Weblate, please open an issue.

Git configuration

Caution

When merging Weblate commits into your repository, do not squash them - this can cause merge conflicts in Weblate.

Tip

If using pull requests with Weblate across multiple branches, you should either name your components differently on each branch, or include the branch name in the component slug. This is because the Git branch used for the pull request is only based on the project and component slug, not the category the component is in.

For example, the slug for Hex Casting's Common component on 1.20 is 1-20-common: https://weblate.hexxy.media/projects/hexcasting/1-20/1-20-common/

Weblate supports integrating with many different code-hosting providers in many different ways. This section documents a few of the options. Weblate docs: https://docs.weblate.org/en/latest/admin/code-hosting.html

GitHub pull requests (GitHub app)

Warning

Due to an upstream Weblate issue, this configuration only supports creating a single translation component per branch.

For example, this configuration cannot be used for an addon with a hexdoc web book, because there are two different directories that contain translations, each of which must have its own translation component.

This configuration will automatically create a separate branch in your repository that will be used to open pull requests into the targeted branch.

To use this configuration, select "From GitHub" when creating a translation component, then install the Hexxy Weblate GitHub app on the account or organization that owns the repository you would like to translate.

image

GitHub pull requests (hexxy-weblate bot user)

This configuration will automatically create a fork of your repository that will be used to open pull requests into the targeted branch in your repository.

To use this configuration:

  1. Select "From version control" > "GitHub pull request" when creating the translation component. image
  2. Make sure to leave "Repository push URL" and "Push branch" empty. image
  3. In your GitHub repository, add a webhook for the push event with payload URL https://weblate.hexxy.media/hooks/github so Weblate can be automatically notified when you push changes to your project. image

Squashing commits

You can enable commit squashing by installing the "Squash Git commits" add-on in your project's add-ons menu. Note that Weblate will try to combine a given user's sequential changes into a single commit even without this add-on.

Project configuration

Monolingual base language file

In your component configuration, make sure to set the "Monolingual base language file" to the path to your en_us language file. It's also recommended to uncheck "Edit base file" if you don't intend to add new English strings via Weblate.

image

Minecraft language aliases

This is used to configure the default filename when adding a new language via the Weblate UI. By default, Weblate will create filenames that do not match those required by Minecraft; this config fixes that.

Weblate documentation: https://docs.weblate.org/en/latest/admin/projects.html#project-language-aliases

af_za:af,ar_sa:ar_SA,ast_es:ast,az_az:az,ba_ru:ba,bar:bar,be_by:be,be_latn:be_Latn,bg_bg:bg,br_fr:br,bs_ba:bs,ca_es:ca,cs_cz:cs,cv_cu:cv,cy_gb:cy,da_dk:da,de_at:de_AT,de_ch:de_CH,de_de:de,el_gr:el,en_au:en_AU,en_ca:en_CA,en_gb:en_GB,en_nz:en_NZ,en_pt:en@pirate,en_us:en_US,eo_uy:eo,es_ar:es_AR,es_cl:es_CL,es_ec:es_EC,es_es:es,es_mx:es_MX,es_uy:es_UY,es_ve:es_VE,et_ee:et,eu_es:eu,fa_ir:fa,fi_fi:fi,fil_ph:fil,fo_fo:fo,fr_ca:fr_CA,fr_ch:fr_CH,fr_fr:fr,fur_it:fur,fy_nl:fy,ga_ie:ga,gd_gb:gd,gl_es:gl,got_de:got,haw_us:haw,he_il:he_IL,hi_in:hi,hr_hr:hr,hu_hu:hu,hy_am:hy,id_id:id,ig_ng:ig,io_en:io,is_is:is,isv:isv,it_it:it,ja_jp:ja,jbo_en:jbo,ka_ge:ka,kk_kz:kk,kn_in:kn,ko_kr:ko,ksh:ksh,kw_gb:kw,ky_kg:ky,la_la:la,lb_lu:lb,li_li:li,lmo:lmo,lo_la:lo,lt_lt:lt,lv_lv:lv,lzh:lzh,mk_mk:mk,mn_mn:mn,ms_my:ms,mt_mt:mt,nah:nah,nds_de:nds,nl_be:nl_BE,nl_nl:nl,nn_no:nn,no_no:nb_NO,oc_fr:oc,ovd:ovd,pl_pl:pl,pt_br:pt_BR,pt_pt:pt_PT,qya_aa:qya,ro_ro:ro,ru_ru:ru,ry_ua:rue,sah_sah:sah,se_no:se,sk_sk:sk,sl_si:sl,so_so:so,sq_al:sq,sr_cs:sr,sr_sp:sr_Cyrl,sv_se:sv,sxu:sxu,szl:szl,ta_in:ta,th_th:th,tl_ph:tl,tlh_aa:tlh,tok:tok,tr_tr:tr,tt_ru:tt,uk_ua:uk,uz_uz:uz,val_es:ca@valencia,vec_it:vec,vi_vn:vi,vp_vl:qpv,vro:vro,yi_de:yi,yo_ng:yo,zh_cn:zh_Hans,zh_hk:zh_Hant_HK,zh_tw:zh_Hant,zlm_arab:ms_Arab

Source: https://github.com/object-Object/hexxy-weblate/tree/main/packages/hexxy-weblate-scripts

Patchouli formatting checks

To enable Patchouli text formatting validation and support the custom macros added by Hex Casting, add the following flags to your project:

patchouli-formatting
patchouli-macros:"$(thing)":"$(#8d6acc)":"$(action)":"$(#fc77be)":"$(media)":"$(#74b3f2)":"$(hex)":"$(#b38ef3)":"_Media":"$(#74b3f2)Media/$":"_media":"$(#74b3f2)media/$":"_Hexcasters":"$(#b38ef3)Hexcasters/$":"_Hexcaster":"$(#b38ef3)Hexcaster/$":"_Hexcasting":"$(#b38ef3)Hexcasting/$":"_Hexes":"$(#b38ef3)Hexes/$":"_Hex":"$(#b38ef3)Hex/$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment