Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • extensions extensions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 77
    • Issues 77
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inkscape
  • extensionsextensions
  • Merge requests
  • !425

Enable translation of more error messages

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jonathan Neuhauser requested to merge joneuhauser/extensions:make-more-strings-translatable into master Feb 09, 2022
  • Overview 2
  • Commits 1
  • Pipelines 2
  • Changes 45

What does the merge request do?

A lot of error messages previously were not translated. Some localized messages used Python 3.6+ f-Strings, which doesn't work (the f string is evaluated before the call to gettext).

This merge request enables translation of (likely almost) all error messages that can be raised by extensions.

Implementation notes

My regex was

\s\s\s\s\s.*(?<!default=)(?<!help=)(?<!dest=)(?<!== )(?<!!= )(?<!Color\()(?<!_\()(?<!.[gs]et\()(?<!"d", )"+\w(?!")

i.e. excluding Module and class docstrings, parameters of the argparser, equations including strings, Colors, attribute getter/setter, path data and single letter strings. There are still > 5000 results, through which I went manually.

Summary for release notes

More error messages shown when running extensions can now be translated.

Checklist

  • Add unit tests (if applicable)
  • Changes to inkex/ are well documented
  • Clean merge request history
Edited Feb 10, 2022 by Jonathan Neuhauser
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: make-more-strings-translatable