Skip to content

Season of KDE 2026 - Untangling Scripty's File Paths

Saturday, 14 March 2026  |  Aviral Singh

Hi everyone, Aviral here :)

I have been a past contributor to the KDE ecosystem for a few projects like Okular and Spectacle. KDE was the first organisation I ever worked with in my open source journey and now I am very excited to share the update of my Season of KDE 2026 project.

Over the past few months, I worked on KDE localization infrastructure with a focus on Scripty along with my partner Keshav Nanda, improving how source file paths are recorded for translators.

Scripty supports translation workflows across the very large KDE ecosystem. During this project, a lot of fixes were shipped to Scripty and validation was run across more than 600 projects, which made it possible to test improvements at real KDE scale and confirm that the results are dependable.

Why paths matter

For those unfamiliar, Scripty is the backbone of KDE's localization pipeline. It handles the extraction of translatable strings from source code into .pot files, which are then translated by our amazing community.

Historically, some extraction scripts generated absolute paths or inconsistent relative paths. My mentor, Finley Watson, originally initiated the effort to fix this in MR 90. Without full project relative paths, we ended up with "ambiguous" references in PO files that didn't clearly point to a single source file within a repository. This makes it harder for translators to find context without confident reliance on these references.

Why this work mattered

We discovered the main issue was not missing files (at least for 99+% of the projects). The real problem was path ambiguity.

In parts of the extraction pipeline, source references were sometimes recorded as file basenames or as paths that were not consistently project relative, which made references ambiguous in repositories with duplicate file names. Loads of modern KDE repositories often contain many files with the same name (T-T).

For translators, this creates friction in daily work:

  1. Source navigation in tools such as Lokalize becomes less reliable
  2. Context gets confusing and unreliable when similar file names exist across multiple components
  3. Name collisions make it harder to trust where a string truly comes from

What was improved

Building on the direction already present in the project, I have focused on making path handling consistent and easier to validate.

Normalization and wrappers

To fix this systematically across l10n-scripty, I implemented a set of sanitization wrappers. These extraction wrappers were added and/or improved so source references are kept in project relative form in generated output:

  • kde_xgettext
  • kde_extractrc
  • kde_extractattr

This helps ensure each reference points to a precise location inside a repository.

Metainfo extraction flow

The metainfo extraction path handling was updated so references are resolved in a project relative way rather than relying on short file name matching. This improves clarity for AppStream and related metadata sources too.

Validation improvements

validate_paths.sh -> the prime path verifier script, was strengthened to check not only missing files but also ambiguous references caused by duplicate file names in different directories. This greatly assisted in debugging and understanding where the issues stem from.

Verification results

A full extraction and validation cycle was run in a controlled Docker environment across 600 plus (all) projects. The latest results showed clean and correct path resolution in most projects with just a dozen edge case ambiguities and missing paths not fixed by current improved wrappers.

Although this might be a good enough fix, it isn't complete - the endgame remains.

Remaining work

There are several key areas on the checklist like:

  • Completing the coverage for the remaining fixable projects by hardening the metainfo extraction logic for complex projects.
  • Communicating with the community regarding the fixes done by me. As I have still not made an actual MR, there is a great chance that this fix isn't optimised and might have some oversights.
  • Finalizing the validate_paths.sh suite along with my mentor for integration into CI to prevent path regressions.
  • Getting the fix verified locally by both my mentor and my mentee partner.

Final thoughts

This project has been a wonderful learning journey through the infrastructure that quietly powers localization for KDE. It was deeply meaningful to contribute improvements that make translator workflows clearer, faster, and more trustworthy.

A big thank you to my mentor, Finley Watson, for thoughtful guidance and constant support throughout the project. Thank you as well to everyone in the KDE community who reviewed ideas, shared feedback, and helped move this work forward.

I have grown in this season with more confidence, more curiosity, and even more appreciation for the people behind free software infrastructure. I am proud that this work would help translators do their best work with better context and fewer obstacles, and I am genuinely excited to keep contributing to KDE.

Happy translating 💙


Follow progress and contribute on KDE Invent and join us in making software more accessible for people everywhere.