Skip to content

fix(i18n): use parameterized string for CPU name and thread count#1032

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/nextcloud-1022-i18n-include-parameters
Draft

fix(i18n): use parameterized string for CPU name and thread count#1032
Copilot wants to merge 2 commits into
masterfrom
copilot/nextcloud-1022-i18n-include-parameters

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

The CPU info cell in settings-admin.php concatenated the thread count and translated word "threads" as separate fragments, breaking word ordering for RTL languages and violating Nextcloud i18n guidelines.

Changes

  • templates/settings-admin.php: Replace fragmented output with a single parameterized translatable string:

    // Before
    <?php p($cpu->getName()) ?></strong> (<?= $cpu->getThreads() ?> <?php p($l->t('threads')); ?>)
    
    // After
    <?php p($l->t('%1$s (%2$d threads)', [$cpu->getName(), $cpu->getThreads()])) ?>

    This also removes a stray </strong> with no matching opening tag.

  • l10n/*.json and l10n/*.js (60 files): Remove the now-unused standalone "threads" translation key. The new "%1$s (%2$d threads)" string will be routed through Transifex for re-translation.

…able string

The CPU row in settings-admin.php previously used a standalone translated
"threads" word with the count concatenated outside the string, which
doesn't work properly for RTL languages or languages with different word
order.

Now uses a single translatable string '%1$s (%2$d threads)' with the CPU
name as %1$s and thread count as %2$d, allowing translators to reorder
components as needed.

Removes the old standalone "threads" key from all l10n files.
Copilot AI changed the title [WIP] Add parameters like thread count as variable for i18n fix(i18n): use parameterized string for CPU name and thread count Jun 22, 2026
Copilot AI requested a review from kesselb June 22, 2026 10:23
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