KnpLabs / KnpLabs/KnpTimeBundle

Unable to choose a translation exception when trying to use duration twig filter using PL locale

Open Beginner friendly
#211 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
625
Forks
103
PR merge metrics
No merged PRs in 30d

Description

Getting an exception when trying to use the duration in twig template:

> An exception has been thrown during the rendering of a template ("Unable to choose a translation for "1 dzień|%count% dni" with locale "pl" for value "185". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %count% apples").").

The problem is with the translation in: https://github.com/KnpLabs/KnpTimeBundle/blob/fb2241377b985f3d68703309cff0f10e77f1c10e/translations/time.pl.xliff#L69

Will post a fix for this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Open translations/time.pl.xliff and inspect the Polish duration translation at line 69. Check its plural options against the failing value of 185 and verify that rendering the duration with the pl locale no longer raises the translation exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
localization
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.