Refactor Translation Wizard markup by NB-Core · Pull Request #27 · NB-Core/modules · GitHub
Skip to content

Refactor Translation Wizard markup#27

Merged
NB-Core merged 3 commits into
tlwizardfrom
codex/update-form-and-table-markup-in-translationwizard
Jul 13, 2025
Merged

Refactor Translation Wizard markup#27
NB-Core merged 3 commits into
tlwizardfrom
codex/update-form-and-table-markup-in-translationwizard

Conversation

@NB-Core

@NB-Core NB-Core commented Jul 13, 2025

Copy link
Copy Markdown
Owner

Summary

  • use tw_form_open and tw_form_close everywhere
  • convert HTML tables to helper methods
  • clean up Translation Wizard pages

Testing

  • php -l systems/translationwizard/translationwizard/pages/central_pull.php
  • php -l systems/translationwizard/translationwizard/pages/central_push.php
  • php -l systems/translationwizard/translationwizard/pages/default.php
  • php -l systems/translationwizard/translationwizard/pages/remove_translated.php
  • php -l systems/translationwizard/translationwizard/pages/searchandedit.php
  • php -l systems/translationwizard/translationwizard/pages/searchandreplace.php
  • php -l systems/translationwizard/translationwizard/pages/untranslated_list.php
  • php -l systems/translationwizard/translationwizard/pages/known.php
  • php -l systems/translationwizard/translationwizard/pages/overview.php
  • php -l systems/translationwizard/translationwizard/WizardService.php

https://chatgpt.com/codex/tasks/task_e_68741d4b82b08329967243b046e89408

@NB-Core NB-Core requested a review from Copilot July 13, 2025 21:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Translation Wizard pages to use the tw_form_* and tw_table_* helper functions instead of raw HTML, cleaning up markup and improving consistency across pages.

  • Replace all raw <form> tags with tw_form_open() and tw_form_close().
  • Convert HTML <table> constructs to tw_table_open(), tw_table_row(), and tw_table_close().
  • General markup cleanup and consistency improvements in all Translation Wizard pages.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
systems/translationwizard/translationwizard/pages/untranslated_list.php Replaced raw form tags with tw_form_open/close.
systems/translationwizard/translationwizard/pages/searchandreplace.php Converted table markup to tw_table_* helpers.
systems/translationwizard/translationwizard/pages/searchandedit.php Converted table markup and forms to helper functions.
systems/translationwizard/translationwizard/pages/scanmodules.php Replaced forms and tables with tw_form_* and tw_table_*.
systems/translationwizard/translationwizard/pages/remove_translated.php Converted HTML table to tw_table_*.
systems/translationwizard/translationwizard/pages/overview.php Replaced raw tables with tw_table_* calls.
systems/translationwizard/translationwizard/pages/known.php Refactored tables and action links to use helpers.
systems/translationwizard/translationwizard/pages/default.php Swapped raw table for tw_table_* and cleaned up form calls.
systems/translationwizard/translationwizard/pages/central_push.php Replaced <form> and closing tags with tw_form_*.
systems/translationwizard/translationwizard/pages/central_pull.php Refactored form and table markup to helper functions.
systems/translationwizard/translationwizard/WizardService.php Converted table output in deleteEmpty to tw_table_*.

Comment thread systems/translationwizard/translationwizard/pages/scanmodules.php Outdated
Comment thread systems/translationwizard/translationwizard/pages/default.php Outdated
Comment on lines +105 to +126

Copilot AI Jul 13, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The repeated table setup (tw_table_open, tw_table_row, tw_table_close) appears across multiple pages. Consider extracting common table-rendering logic into a shared helper or component to reduce duplication.

Copilot uses AI. Check for mistakes.
NB-Core and others added 2 commits July 13, 2025 23:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@NB-Core NB-Core merged commit 9c29717 into tlwizard Jul 13, 2025
@NB-Core NB-Core deleted the codex/update-form-and-table-markup-in-translationwizard branch July 13, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants