Skip to content

441101 Make paintops translatable

This MR makes paintops and their properties translatable. Before this commit, they were not localizable because their constructor only took an ID, which the Brush HUD used (incorrectly) as their name. This affected specifically curve options that were constructed indirectly, through KisCurveOptionUniformProperty and a customized curve option instead of their callback-based counterparts:

4.4.8
Captura_de_pantalla_2021-12-03_210651

Fixing these is non-trivial, because they must be changed to take an ID and a localizable name; and this is a problem, because those that use a customized curve option usually override the property's ID with another.

This MR fixes the bug by making options take a KoID throughout their constructors, and by adding a second KisCurveOptionUniformProperty constructor that takes a KoID. The existing constructor is marked as deprecated with a message to let future maintainers know the expected ID is not being applied.

This MR is not expected to add any strings, they are all localized and scattered in our codebase.

BUG: 441101

Test Plan

Build Krita. Open it, select a brush, and right click to pop the HUD up.

fix1

Open the brush's properties,

bug2

and click on "Configure the on-canvas brush editor".

bug3

All the strings should be translated now.

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.
Edited by Amy spark

Merge request reports