1. 10
  1. 3

    Finally hunkered down and wrote what I learned from one of my first “bigger” contributions for KDE. :) Hope you like it, I am not the best writer but maybe it helps to learn. Feel free to educate me further.

    1. 1

      Grab the first part of the locale name, stop when - or _ is found.

      ([a-z]*)($|[\-]).*

      Did you retype that wrong? This stops only on - or _.

      Anyhow, do share if you have an idea for simpler solution, be it simpler regex […]

      Wouldn’t ^[a-z]* work too? I’m assuming you don’t care about the characters after the shortcode.

      Good job on the contribution, though! I wish you had written a bit more about the process of getting the patch accepted, that has always seemed pretty scary to me.

      1. 2

        Did you retype that wrong? This stops only on - or _.

        Oops, yeah, that’s a typo.

        Wouldn’t ^[a-z]* work too?

        It should, but it went a bit nuts if the shortcode had EOL after it.

        Good job on the contribution, though! I wish you had written a bit more about the process of getting the patch accepted

        Thanks! The process of getting patch accepted was pretty simple so I kinda glanced over it. Basically I told in the bug tracker that I could work on this feature, then made the initial patch. After that, I made a merge request on the KDE Gitlab and asked if people can comment on it on the dev matrix channel. It just kind of continued from there and I iterated through the feedback until it was done.

        It wasn’t so scary after all! :)