Skip to content

Use a parameterized translation for CPU thread count#1032

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

Use a parameterized translation for CPU thread count#1032
Copilot wants to merge 3 commits into
masterfrom
copilot/nextcloud-1022-i18n-include-parameters

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

The CPU row in the admin settings rendered the thread count by concatenating a translated label with a raw numeric value. That prevents translators from reordering the phrase correctly for RTL and other locale-specific sentence structures.

  • i18n

    • Replaced the split rendering of CPU name, thread count, and threads label with a single translatable string using positional parameters
    • Lets translators control full phrase order instead of being locked to English word placement
  • Localization assets

    • Left the generated l10n/ files unchanged; the source string change is limited to the template and can be picked up by the normal translation pipeline
<?php p($l->t('%1$s (%2$d threads)', [$cpu->getName(), $cpu->getThreads()])) ?>

…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
Copilot AI changed the title fix(i18n): use parameterized string for CPU name and thread count Use a parameterized translation for CPU thread count Jun 23, 2026
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