Skip to content

Add locale selector to the text properties docker.

This adds a language selector to the text properties docker. Language is important for font-shaping, line-break, word-break and text-transform.

Because QLocale doesn't support the full range of BCP47, a BCP47 struct has been added, so we can keep track of minority locales.

Furthermore, to keep language selection sane, it is possible to save favorites as well as filter by code and language.

To Do:

  • Check if we can type in arbitrary bcp47 codes regardless of QLocale support.
  • Figure out how to get rid of warnings.
  • Give a nicer name to C-locale.

Test Plan

  • Add new language property to a text.
  • Type in a language name -- observe filtering.
  • Type in a language code -- observe filtering.
  • Change script.
  • check the dropdown for favorites, they default to KLocale::languages();
  • add and remove favorites.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?
Edited by Wolthera van Hövell

Merge request reports

Loading