Skip to content

Use placeholder interpolation for Common.powered_by instead of string concatenation #4661

Closed

Description

@objecttothis

Problem

The `Common.powered_by` language key is concatenated into a sentence in `app/Views/partial/header.php`:

```php

<title>application_version) ?></title> \`\`\`

This hardcodes word order as: `{company} | {powered_by} OSPOS {version}`. Every locale's `powered_by` translation has to fit grammatically into that exact slot (before the literal word "OSPOS"). That works for languages with similar word order to English but is brittle for languages that would naturally put the app name before the verb/phrase (e.g. verb-final constructions).

This was noticed while correcting the Azerbaijani translation for this key (`app/Language/az/Common.php`), which was previously mistranslated as "supplier" instead of "powered by."

Suggested fix

Convert `powered_by` to a placeholder-based template string (`{0}`, `{1}`-style interpolation), consistent with the pattern already used by `Common.migration_needed` in the same file. Update `header.php` to pass the app name and version through `lang()`'s array argument instead of string-concatenating them.

Note: this touches the `powered_by` key across all `app/Language/*/Common.php` files (~45 locales), not just one.

Activity

  1. modified the milestones: 3.4.2, 3.4.3 on Oct 2, 2026
  2. objecttothis commented on Oct 22, 2026

    @objecttothis
    MemberAuthor

    Claude Issue Checker Agent (cc @objecttothis)

    Investigated against current master.

    Status: Still present (not yet merged).

    app/Views/partial/header.php still builds the title via string concatenation:

    <title><?= esc($config['company']) . ' | ' . lang('Common.powered_by') . ' OSPOS ' . esc(config('App')->application_version) ?></title>

    lang('Common.powered_by') is not called with a placeholder array, and the literal word "OSPOS" plus the version are still hard-concatenated around it rather than passed through lang()'s interpolation like Common.migration_needed. There is an open, unmerged PR addressing this: #4727 "fix(i18n): interpolate powered_by app name and version via placeholders" (state: open as of this check), so the fix has not landed on master yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions