Improve translation wizard forms by NB-Core · Pull Request #18 · NB-Core/modules · GitHub
Skip to content

Improve translation wizard forms#18

Merged
NB-Core merged 2 commits into
tlwizardfrom
codex/update-form-instructions-and-titles
Jul 13, 2025
Merged

Improve translation wizard forms#18
NB-Core merged 2 commits into
tlwizardfrom
codex/update-form-instructions-and-titles

Conversation

@NB-Core

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

Copy link
Copy Markdown
Owner

Summary

  • add step descriptions before forms
  • explain original and translation boxes via title attributes
  • make title attributes translatable

Testing

  • php -l systems/translationwizard/translationwizard/default.php
  • php -l systems/translationwizard/translationwizard/edit_single.php
  • php -l systems/translationwizard/translationwizard/searchandedit.php
  • php -l systems/translationwizard/translationwizard/searchandreplace.php

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

@NB-Core NB-Core requested a review from Copilot July 13, 2025 18:28

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 enhances user guidance and accessibility in the Translation Wizard by adding descriptive prompts before forms and translatable title attributes on textareas.

  • Adds instructional text above form sections to clarify user actions.
  • Introduces title attributes on original and translation textareas with translation support.
  • Updates prompts in push/pull/list modules for better context.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
systems/translationwizard/translationwizard/searchandreplace.php Add form instruction and title attributes to textareas
systems/translationwizard/translationwizard/searchandedit.php Add form instruction and title attributes to textareas
systems/translationwizard/translationwizard/push.php Insert context prompts before namespace and language selection
systems/translationwizard/translationwizard/pull.php Insert context prompt before mirror and directory selection
systems/translationwizard/translationwizard/list.php Add instruction prompts for bulk list operations
systems/translationwizard/translationwizard/editchecked.php Add instruction prompt above bulk edit form
systems/translationwizard/translationwizard/edit_single.php Add instruction prompt and title attributes on single edit form
systems/translationwizard/translationwizard/default.php Add instruction prompt and title attributes on random translation
Comments suppressed due to low confidence (4)

systems/translationwizard/translationwizard/searchandreplace.php:175

  • Relying solely on the title attribute may not be accessible to all users; consider adding an aria-label or visible <label> tied to this textarea for better screen reader support.
                                rawoutput("<textarea name='intext' class='input' cols='60' rows='5' title=\"".translate_inline('Original text')."\">".htmlentities(stripslashes($row['intext']),ENT_COMPAT,$coding)."</textarea>");

systems/translationwizard/translationwizard/edit_single.php:23

  • Adding an aria-label or wrapping the textarea in a <label> element would improve accessibility, as relying on title alone may not be announced by screen readers.
       rawoutput("<textarea name='intext' class='input' cols='60' rows='5' readonly title=\"".translate_inline('Original text')."\">".htmlentities(stripslashes(httpget('intext')),ENT_COMPAT,$coding)."</textarea><br/>");

systems/translationwizard/translationwizard/list.php:8

  • [nitpick] Consider wrapping this instruction in a semantic heading (e.g., <h2>) or paragraph tag for clearer document structure and improved screen reader navigation.
        output("Edit the selected texts below:");

systems/translationwizard/translationwizard/pull.php:84

  • [nitpick] The original prompt included guidance about using the central DB by default; consider reintroducing that context or merging both instructions to avoid confusing users.
                output("Select a mirror and directory to pull from:");

Comment thread systems/translationwizard/translationwizard/push.php Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@NB-Core NB-Core merged commit ece96c7 into tlwizard Jul 13, 2025
@NB-Core NB-Core deleted the codex/update-form-instructions-and-titles branch July 13, 2025 18:33
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