[i18n] Add variable to usermetrics string

Bug #1448258 reported by David Planella
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
podbird
Status tracked in Trunk
Devel
Fix Released
Low
Nekhelesh Ramananthan
Trunk
Fix Released
Low
Nekhelesh Ramananthan

Bug Description

I cannot translate this string correctly into my language:

 "podcasts listened to today"

Generally such strings present the variable, so that its position can be rearranged depending on the language. As an example:

- This is how I can translate it (incorrect): "3 podcasts escoltats avui"
- This is how I would like to translate it (correct): "Heu escoltat 3 podcasts"

Would it be possible to add the number variable to the translatable string as it's customarily done with such messages?

Related branches

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Yeah I copied this thing straight from the music app. Can you let which one of the following is correct,

Method 1: i18n.tr("<b>%1</b> podcasts listened to today")
Method 2: i18n.tr("podcasts listened to today: <b>%1</b>")

The issue with method 1 is that it could show "1 podcasts listened to today" which is grammatical incorrect. But since the usermetrics library doesn't support gettext plurals may be method 2 might be better?

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

We had a similar bug 1445972 reported by another translator.

Changed in podbird:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Nekhelesh Ramananthan (nik90)
Changed in podbird:
status: Confirmed → Incomplete
Revision history for this message
David Planella (dpm) wrote : Re: [Bug 1448258] Re: Add variable to usermetrics string

On Fri, Apr 24, 2015 at 9:09 PM, Nekhelesh Ramananthan <
<email address hidden>> wrote:

> Yeah I copied this thing straight from the music app. Can you let which
> one of the following is correct,
>
> Method 1: i18n.tr("<b>%1</b> podcasts listened to today")
> Method 2: i18n.tr("podcasts listened to today: <b>%1</b>")
>
> The issue with method 1 is that it could show "1 podcasts listened to
> today" which is grammatical incorrect. But since the usermetrics library
> doesn't support gettext plurals may be method 2 might be better?
>

I'd suggest method 2 as well (starting podcasts with a capital P). I think
everything we do will be a workaround for the missing plurals support, but
for translators, it does not matter which one of the two we pick, as they
will translate it as it better fits their language.

>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1448258
>
> Title:
> Add variable to usermetrics string
>
> Status in Podbird:
> Confirmed
>
> Bug description:
> I cannot translate this string correctly into my language:
>
> "podcasts listened to today"
>
> Generally such strings present the variable, so that its position can
> be rearranged depending on the language. As an example:
>
> - This is how I can translate it (incorrect): "3 podcasts escoltats avui"
> - This is how I would like to translate it (correct): "Heu escoltat 3
> podcasts"
>
> Would it be possible to add the number variable to the translatable
> string as it's customarily done with such messages?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/podbird/+bug/1448258/+subscriptions
>

Changed in podbird:
status: Incomplete → New
Changed in podbird:
status: New → In Progress
summary: - Add variable to usermetrics string
+ [i18n] Add variable to usermetrics string
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.