Skip to content

Maintainer notes

Adil Hanney edited this page Aug 5, 2025 · 2 revisions

These are some notes for myself or whoever else is maintaining their own fork of Saber. These are not intended to be followed by contributors or users of Saber.

Updating the app version

We currently follow Semantic Versioning. There are a lot of places in the codebase that need to be updated when changing the app version, so we use the ./scripts/bump_version.dart script to do it semi-automatically.

ahann:~/Documents/GitHub/saber$ ./scripts/bump_version.dart --help
-M, --major              Bump major version
-m, --minor              Bump minor version
-p, --patch              Bump patch version
-c, --custom             Use a custom buildName (e.g. 0.22.11) or buildNumber (e.g. 22110)
-f, --fail-on-changes    Fail if any changes need to be made
-q, --quiet              Don't open editor
-h, --help               Show help

You can run e.g. ./scripts/bump_version.dart -p to increment the patch component of the version.

It will then open your editor (e.g. VS Code) to let you write a changelog in metadata/en-US/changelogs/_____.txt and flatpak/com.adilhanney.saber.metainfo.xml.

You should then run ./scripts/translate_changelogs.dart to translate the changelog into various languages as directed by the script.

Updating the app icons

After updating the icons, run:

  • General: dart run icons_launcher:create
  • Flatpak icons: cd assets/icon && ./resize-icon.sh

Updating the translations

Adding new strings

You will typically add new strings to the English yaml file: lib/i18n/en.i18n.yaml.

Then run the code generation commands: dart run slang && dart run slang analyze --full.

Then you can automatically translate the new strings with: ./scripts/translate_missing_translations.dart. The translated strings are marked as OUTDATED to indicate that they still need to be properly translated by a human. You may need to re-run the code generation commands after this.

Merging translation pull requests

Locally clone the PR's branch and run ./scripts/process_i18n_pr.sh.

You can then push and squash merge the branch.

Adding a new language

Aside from the normal steps, you also need to update:

  • CFBundleLocalizations in ios/Runner/Info.plist
  • CFBundleLocalizations in macos/Runner/Info.plist
  • android/app/src/main/res/xml/locales_config.xml
  • lib/data/locales.dart
  • Translating.md's list of languages
  • and run dart scripts/translate_changelogs.dart to translate the changelog.
Clone this wiki locally