Skip to content

Fix bugs: missing remove_template method, i18n issues, duplicated code#1

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/review-repo-for-bugs
Draft

Fix bugs: missing remove_template method, i18n issues, duplicated code#1
Copilot wants to merge 5 commits into
mainfrom
copilot/review-repo-for-bugs

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 9, 2026

Code review identified several bugs and inconsistencies in the codebase.

Critical Bugs

  • Missing remove_template method - stamp_editor_dialog.py calls self.app.remove_template() which was never defined, causing crashes when deleting templates
  • Duplicated search code - search_text() had lines 605-612 copy-pasted twice, causing double UI updates

i18n Fixes

  • Added 11 missing translation keys (print_error_title, print_error_message, template_content, font, size_*, etc.)
  • Removed duplicate dict keys (signer, sign_date appeared twice in each language)
  • Fixed typos: "criptographically" → "cryptographically", "Ocular" → "Ocultar"
  • Changed default language from "es" to "en" to match config_manager.py

Other Fixes

  • README license - Said MIT but LICENSE file is AGPL-3.0; corrected
  • Search navigation - previous_search_result now wraps around like next_search_result
  • Added .gitignore - Excludes __pycache__/, build artifacts, IDE files

Example: Added remove_template method

def remove_template(self, template_id):
    """Removes a signature template and updates the active template if necessary."""
    was_active = self.config.get_active_template_id() == template_id
    self.config.delete_template(template_id)
    if was_active:
        templates = self.config.get_signature_templates()
        new_active_id = templates[0]['id'] if templates else None
        self.config.set_active_template_id(new_active_id)
    self.config.save()
Original prompt

Review this repo. Find possible bugs, suggest improvements in any way.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 9, 2026 11:47
Co-authored-by: ppgllrd <4742844+ppgllrd@users.noreply.github.com>
Co-authored-by: ppgllrd <4742844+ppgllrd@users.noreply.github.com>
Co-authored-by: ppgllrd <4742844+ppgllrd@users.noreply.github.com>
Co-authored-by: ppgllrd <4742844+ppgllrd@users.noreply.github.com>
Copilot AI changed the title [WIP] Review code for bugs and suggest improvements Fix bugs: missing remove_template method, i18n issues, duplicated code Jan 9, 2026
Copilot AI requested a review from ppgllrd January 9, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants