Skip to content

Incorrect translation of breadcrumb in CustomerFAQExplorer view #47

@tpham2882

Description

@tpham2882

Problem

In CustomerFAQExplorer.pm, the code uses:

my $SearchName = Translatable("Search") . ":";
$SearchName .= " " .Translatable($ModeName) . " \"$String\";";

This approach is problematic because:

  1. Translatable("Search") marks "Search" for translation at build time but does NOT translate it immediately at runtime
  2. The colon ":" is concatenated as plain text after translation registration
  3. The resulting string "Search:" is passed to the template
  4. The template calls Translate("Search:") but this exact string was never registered for translation
  5. Result: The translation fails and "Search:" is displayed untranslated

Current State

  • Translation file de_FAQ.pm has: 'Search' => 'Suche' (translated)
  • But there is NO translation for "Search:" (with colon)
  • The original string "Search:" was never properly registered for translation

Solution
Replace the string concatenation approach with immediate translation:

my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
my $SearchName = $LayoutObject->{LanguageObject}->Translate("Search") . ":";
$SearchName .= " " . $LayoutObject->{LanguageObject}->Translate($ModeName) . " \"$String\";";

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions