Branchless scripty (for kf6 branches, and then earlier)
Maintaining multiple branches
So far we have separate scripty branches for each l10n branch we handle, namely:
- master tracks trunk_kf5
- stable_l10n-kf5 tracks stable_kf5
- stable_l10n-kf5-plasma-lts tracks stable_lts_kf5
- (previously) trunk_l10n-kde4 for trunk
- (previously) stable_l10n-kde4 for stable
But most of the changes to the code applies to all branches, which means a continuous work of backporting.
We will need to track trunk_kf6 and in a non-to-far future also stable_kf6. It is likely we will be able to drop to stable_l10n-kf5-plasma-lts as stable_l10n-kf5 tracks Plasma/5.27 which is the last 5.x and LTS, but nevertheless having too many branches doesn't scale.
Differences
In fact the real differences between the branches are limited and they are limited. Some limited code is only in master, for example the code which handles the i18n translations for websites (not handled through StaticMessages.sh), but that code is just not going to be used in a branch where the code is not handled. For the record, the websites may get their own separate branch, but this is a different story.
- get_paths
- documentation_paths
- find_meinproc
- a special rule in update_translations to handle kconfigwidgets injection
- process_orphans.txt (this is not really needed, it's more a manual registry that should be automated at some point)
- update_xml
Plan
- get_paths: create a get_paths. file for each branch and let update_translations use the appropriate file. The long term plan is to move away from get_paths and rely directly on repo-metadata i18n definitions, but we need a bit more gating to prevent unexpected changes.
- documentation_paths: same as get_paths. The long term plan for documentation_paths is to move the information about the documentation paths inside the repositories and let some tool (for example noktra) use it.
- find_meinproc: add a parameter to set either the meinproc executable name or at least the version suffix.
- special rule: allow update_translations to call branch-specific hooks at the end of the injection and create a hook for the appropriate branch (trunk_kf5 at the moment, and later trunk_kf6).
- update_xml: add a new mandatory parameter to set the i18n branch, and fail if it's not specified.