[mythtv-users] Watch Recordings doesn't list size of single recording

Nicolas Riendeau knight at teksavvy.com
Thu Dec 17 01:56:53 UTC 2015


Hi Roger!

Sorry for the delayed reply...

On 12/12/2015 4:33 PM, Roger Siddons wrote:
> But I was thinking more about the plurals. If the UI supplied mins/hrs
> as numbers then the theme could template "%n min(s)" but not
> "%n hour(s), %n minute(s)". Concatenating strings in a theme is difficult.

I have a feeling that you are talking from a theming point of view and 
if so the situation is even worse than that...

We use the Qt's translation framework and it cannot handle more than one 
plural per string so even if it was possible to use more than one 
variable (ie "%n" here) we would be unable to "translate" it as one 
string...

I put "translate" in quotes here because even US English uses that to 
have proper handling of plurals (I am the person in charge of updating 
this "translation") depending on the number of items...

That's why the code I was commenting about uses concatenations to handle 
something like "x hour(s), y minute(s)". This is one of the places where 
our choices are somewhat limited.

There are places where concatenations where used and should *not* have 
been used altogether while in this case it's not that clear...

If we are ever to support RTL (Right-To-Left) languages we will have to 
handle this better than we are doing it now... We are currently assuming 
that we are dealing with a LTR (Left-To-Right) language...

But if we handle RTL like I have seen some software do there is a 
loooooot more work on the UI side needed to handle that...

>> I would have to check to make sure but I doubt the translation aspect of
>> things is what is putting the restrictions you guys mentioned and if the
>> problem is lack of formats in the frontend, we can add some more...
>>
>
> Given that the existing formats will remain, then adding window
> attributes for the raw numbers would cover all eventualities.

I am really bad at theming (which I think you are talking about), could 
you please explain what you mean by that?

I was thinking about something like adding short, medium, long, full 
date and time format (of course configurable on a per language basis). 
Each format producing a longer output than the preceding one. The user 
would choose her/his preferable format.

To give the themer some control over what is displayed they could 
specify which format is the maximum they allow and if they don't every 
format is allowed (or a format compatible with what used to be the default).

If the user asks for a format larger than the themer allow we use the 
theme format otherwise we use what the user chose...

It's a very rough idea and there are probably things I have not thought 
of but there has to be a way to reconcile the dev choices, the user 
choices and the themer choices as far as displaying things like dates 
and times is concerned...

Have a nice day!

Nick


More information about the mythtv-users mailing list