The plural text shows up in the 'Translate Interface', but is no longer shown on pages with more than 1 search result.

I know this for sure, because disabling this module fixes the plural text problem.

CommentFileSizeAuthor
#5 plural-translations-1728496-5.patch5.29 KBcpliakas
#3 1728496-3.patch1.06 KBAnonymous (not verified)

Comments

Anonymous’s picture

Title: Plural text not translated » Plural text translatable, but no longer shown

better title

Anonymous’s picture

Project: Facet API » Facet API Translation
Version: 7.x-1.x-dev » 7.x-1.0-beta2
Status: Needs review » Active

Problem is actually in CurrentSearchItemText where it has a hardcoded singular text:

$translated_text = $this->translate('text', $raw_text);
Anonymous’s picture

Project: Facet API Translation » Facet API
Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.06 KB

Patch attached to allow plural translations to actually be shown to frontend.

cpliakas’s picture

Project: Facet API Translation » Facet API
Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Active » Reviewed & tested by the community

Great catch! I was able to reproduce the bug, and I can confirm the patch in #1728496-3: Plural text translatable, but no longer shown fixes it.

cpliakas’s picture

StatusFileSize
new5.29 KB

Refactored slightly to only execute the ($count != 1) condition once, and added some tests.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.