Say "student" and "profile" in the UI, not "child" and "family"
CI / Tests (PHP 8.1) (pull_request) Successful in 41s
CI / Tests (PHP 8.2) (pull_request) Successful in 40s
CI / No Debug Code (pull_request) Successful in 2s
CI / Coding Standards (pull_request) Successful in 2m55s
CI / PHPStan (pull_request) Successful in 3m1s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m43s
CI / Build Plugin Zip (pull_request) Skipped
CI / Tests (PHP 8.1) (pull_request) Successful in 41s
CI / Tests (PHP 8.2) (pull_request) Successful in 40s
CI / No Debug Code (pull_request) Successful in 2s
CI / Coding Standards (pull_request) Successful in 2m55s
CI / PHPStan (pull_request) Successful in 3m1s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m43s
CI / Build Plugin Zip (pull_request) Skipped
Sweep the translatable strings across the frontend templates, the admin screens, the editor previews and the block inserter entry. Nothing else moves: the database columns, request parameters, form field names, CSS classes, the us_family shortcode and the us-scheduler/family block name are contracts with existing installs and with post content people have already saved, so renaming them would break sites for no user-visible gain. Two strings are reworded rather than swapped, because the direct substitution reads wrong: - The students list said "Child of Jane" and now says "Managed by Jane". "Student of Jane" would read as a teacher's pupil, which is exactly the wrong idea in a music studio. - A managed account is now "a managed student account" rather than "a student account", which would not distinguish it from the account holder. The guardian feature doc gains a short section on the split, so the next person to work on it does not read the mismatch as drift and "fix" it. Closes #144 Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -110,7 +110,7 @@ $renderLessons = static function (array $rows, bool $withActions = false): void
|
||||
</form>
|
||||
|
||||
<?php if ($guardian !== null || ! empty($children)) : ?>
|
||||
<h2><?php esc_html_e('Family', 'unsupervised-schedular'); ?></h2>
|
||||
<h2><?php esc_html_e('Profile', 'unsupervised-schedular'); ?></h2>
|
||||
<?php $detailUrl = static fn(int $id): string => add_query_arg(['page' => $pageSlug, 'student_id' => $id], admin_url('admin.php')); ?>
|
||||
<?php if ($guardian !== null) : ?>
|
||||
<p>
|
||||
@@ -123,7 +123,7 @@ $renderLessons = static function (array $rows, bool $withActions = false): void
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p class="description"><?php esc_html_e('This is a child account: it has no login of its own, and its email address is a placeholder that cannot receive mail.', 'unsupervised-schedular'); ?></p>
|
||||
<p class="description"><?php esc_html_e('This is a managed student account: it has no login of its own, and its email address is a placeholder that cannot receive mail.', 'unsupervised-schedular'); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (! empty($children)) : ?>
|
||||
<p><?php esc_html_e('Books and pays for:', 'unsupervised-schedular'); ?></p>
|
||||
@@ -293,7 +293,7 @@ $renderLessons = static function (array $rows, bool $withActions = false): void
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: name of the parent/guardian whose account holds the balance. */
|
||||
esc_html__('Held on %s’s account — the family shares one balance.', 'unsupervised-schedular'),
|
||||
esc_html__('Held on %s’s account — the profile shares one balance.', 'unsupervised-schedular'),
|
||||
esc_html($payer['name'])
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -25,7 +25,7 @@ $familyCell = static function (array $student) use ($pageSlug): string {
|
||||
if ($student['guardian'] !== null) {
|
||||
return sprintf(
|
||||
/* translators: %s: linked name of the parent/guardian who books for this student. */
|
||||
esc_html__('Child of %s', 'unsupervised-schedular'),
|
||||
esc_html__('Managed by %s', 'unsupervised-schedular'),
|
||||
$link($student['guardian']['id'], $student['guardian']['name'])
|
||||
);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ $familyCell = static function (array $student) use ($pageSlug): string {
|
||||
<tr>
|
||||
<th><?php esc_html_e('Name', 'unsupervised-schedular'); ?></th>
|
||||
<th><?php esc_html_e('Email', 'unsupervised-schedular'); ?></th>
|
||||
<th><?php esc_html_e('Family', 'unsupervised-schedular'); ?></th>
|
||||
<th><?php esc_html_e('Profile', 'unsupervised-schedular'); ?></th>
|
||||
<th><?php esc_html_e('Registered', 'unsupervised-schedular'); ?></th>
|
||||
<th><?php esc_html_e('Upcoming lessons', 'unsupervised-schedular'); ?></th>
|
||||
<th><?php esc_html_e('Active enrolments', 'unsupervised-schedular'); ?></th>
|
||||
|
||||
@@ -16,7 +16,7 @@ if (! defined('ABSPATH')) {
|
||||
*/
|
||||
?>
|
||||
<div class="us-family">
|
||||
<h3><?php esc_html_e('Your family', 'unsupervised-schedular'); ?></h3>
|
||||
<h3><?php esc_html_e('Your profile', 'unsupervised-schedular'); ?></h3>
|
||||
|
||||
<?php if ($notice !== '') : ?>
|
||||
<p class="us-success"><?php echo esc_html($notice); ?></p>
|
||||
@@ -27,7 +27,7 @@ if (! defined('ABSPATH')) {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (empty($children)) : ?>
|
||||
<p><?php esc_html_e('You have not added any children yet. Add one below to start booking lessons for them.', 'unsupervised-schedular'); ?></p>
|
||||
<p><?php esc_html_e('You have not added any students yet. Add one below to start booking lessons for them.', 'unsupervised-schedular'); ?></p>
|
||||
<?php else : ?>
|
||||
<ul class="us-family-list">
|
||||
<?php foreach ($children as $child) : ?>
|
||||
@@ -74,7 +74,7 @@ if (! defined('ABSPATH')) {
|
||||
<?php wp_nonce_field('us_family'); ?>
|
||||
<input type="hidden" name="us_family_action" value="add">
|
||||
|
||||
<h4><?php esc_html_e('Add a child', 'unsupervised-schedular'); ?></h4>
|
||||
<h4><?php esc_html_e('Add a student', 'unsupervised-schedular'); ?></h4>
|
||||
<p>
|
||||
<label for="us-child-name"><?php esc_html_e('Name', 'unsupervised-schedular'); ?></label>
|
||||
<input type="text" name="child_name" id="us-child-name" required>
|
||||
@@ -90,7 +90,7 @@ if (! defined('ABSPATH')) {
|
||||
|
||||
<?php if (! empty($questions)) : ?>
|
||||
<fieldset class="us-reg-questions">
|
||||
<legend><?php esc_html_e('About this child', 'unsupervised-schedular'); ?></legend>
|
||||
<legend><?php esc_html_e('About this student', 'unsupervised-schedular'); ?></legend>
|
||||
<?php foreach ($questions as $question) : ?>
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- QuestionField::render() escapes every interpolated value.
|
||||
@@ -101,7 +101,7 @@ if (! defined('ABSPATH')) {
|
||||
<?php endif; ?>
|
||||
|
||||
<p>
|
||||
<button type="submit"><?php esc_html_e('Add child', 'unsupervised-schedular'); ?></button>
|
||||
<button type="submit"><?php esc_html_e('Add student', 'unsupervised-schedular'); ?></button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -75,18 +75,18 @@ if (! defined('ABSPATH')) {
|
||||
<p>
|
||||
<label>
|
||||
<input type="checkbox" name="us_is_guardian" id="us-is-guardian" value="1">
|
||||
<?php esc_html_e("I'm registering as a parent or guardian, for one or more children", 'unsupervised-schedular'); ?>
|
||||
<?php esc_html_e("I'm registering as a parent or guardian, for one or more students", 'unsupervised-schedular'); ?>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<?php /* Revealed by the checkbox; without JS it is simply always visible. */ ?>
|
||||
<div class="us-children" id="us-children">
|
||||
<p class="us-children-intro"><?php esc_html_e('Add each child you will be booking lessons for. They do not need their own login — you book and pay for them from this account.', 'unsupervised-schedular'); ?></p>
|
||||
<p class="us-children-intro"><?php esc_html_e('Add each student you will be booking lessons for. They do not need their own login — you book and pay for them from this account.', 'unsupervised-schedular'); ?></p>
|
||||
|
||||
<?php /* The first block is the template the "Add another child" button clones. */ ?>
|
||||
<?php /* The first block is the template the "Add another student" button clones. */ ?>
|
||||
<div class="us-child" data-child-index="0">
|
||||
<p>
|
||||
<label for="us-child-0-name"><?php esc_html_e("Child's name", 'unsupervised-schedular'); ?></label>
|
||||
<label for="us-child-0-name"><?php esc_html_e("Student's name", 'unsupervised-schedular'); ?></label>
|
||||
<input type="text" name="children[0][name]" id="us-child-0-name">
|
||||
</p>
|
||||
<p>
|
||||
@@ -107,7 +107,7 @@ if (! defined('ABSPATH')) {
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<button type="button" class="us-add-child"><?php esc_html_e('Add another child', 'unsupervised-schedular'); ?></button>
|
||||
<button type="button" class="us-add-child"><?php esc_html_e('Add another student', 'unsupervised-schedular'); ?></button>
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user