Mailing List Archive

Arclight 25.12 %DPMTO%, %TID% displayed in right corner
I just discovered after upgrading to Arclight 25.12 on mythtv 0.25-fixes
that the top-right corner on menus and also when displaying the OSD shows
"%DPMTO%, %TID%", as shown in [1].
This string is very similar to the Norwegian translation of %DATE%, %TIME%
(which is %DATO%,%TID%).

I am the translation maintainer for Norwegian Bokmål so this might be a
translation mistake on my part, but I grepped for DPMTO in
mythfrontend_nb.ts and couldn't find any errors, but found the "DATO"
string as expected using this command:

rune@kontor:~/prosjekter/mythtv/mythtv/i18n$grep -3 DATO mythfrontend_nb.ts
<message>
<location filename="../themes/themestrings.h" line="155"/>
<source>%DATE%, %TIME%</source>
<translation>%DATO%, %TID%</translation>
</message>
<message>
<location filename="../themes/themestrings.h" line="610"/>


Is this string coming from translation files or elsewhere ?

Best regards,

Rune

[1]:
http://dl.dropbox.com/u/432335/mythtv%20-%20arclight%20-%20date-time.png
Re: Arclight 25.12 %DPMTO%, %TID% displayed in right corner [ In reply to ]
Hi Rune!

On 4/13/2012 3:53 PM, Rune Evjen wrote:
> I just discovered after upgrading to Arclight 25.12 on mythtv 0.25-fixes
> that the top-right corner on menus and also when displaying the OSD
> shows "%DPMTO%, %TID%", as shown in [1].
> This string is very similar to the Norwegian translation of %DATE%,
> %TIME% (which is %DATO%,%TID%).
>
> I am the translation maintainer for Norwegian Bokmål so this might be a
> translation mistake on my part, but I grepped for DPMTO in
> mythfrontend_nb.ts and couldn't find any errors, but found the "DATO"
> string as expected using this command:

<snip>

> Is this string coming from translation files or elsewhere ?

A little of both...

The code that handles the clock recognizes "%TIME%", "%DATE%" and
"%SHORTDATE%".

What it does when it encounters any of them is replace them with the
time format, the date format or the short time format you configured and
leaves the rest untouched.

So something like

%DATE%, %TIME%

becomes

dddd d MMMM, h:mm

for example.

Now this is later passed to another bit of code which takes this as a
format to display the current date/time so it becomes something like this:

Friday 13 april, 20:49

Everything which is not a code recognized by QDateTime (what we use to
display that date) is put as-is in the output string (this is where that
"," (comma) comes from.

Now what happens when the parsing code that looks for "%TIME%", "%DATE%"
and "%SHORTDATE%" doesn't find them is this:

Something like:

%DATO%, %TID%

(obtained by translating "%DATE%, %TIME%" using the content of the
translation files)

stays as-is as none of the variables/tags in contains are recognized.

This is still passed to the bit of code that tries to use this as a
format to display the current date/time.

The only code that QDateTime recognizes in there is "A" which means
<<interpret as an AM/PM time. AP must be either "AM" or "PM">> (this is
taken from Qt's docs). Now it says "AP" but actually both "AP" and "A"
do exactly the same things, show the time with AM/PM.

So, assuming you are in the afternoon

%DATO%, %TID%

becomes

%DPMTO%, %TID%

because, like the previous example, everything which is not a code
recognized by QDateTime is put as-is in the output string (this is where
"%D", "TO%, %TID%" come from.

Now it doesn't actually show the time but it shows you it's a PM time... (-;

Now I don't know what's actually supposed to be acceptable as a
date/time format string as I am not a themer. In theory you could
directly put the formatting codes QDateTime expect and not use "%TIME%",
"%DATE%" and "%SHORTDATE%" so checking if any of them actually replaced
anything might not be a solution (and I am not sure there are any good
solution to this).

Have a nice day!

Nicolas



_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Arclight 25.12 %DPMTO%, %TID% displayed in right corner [ In reply to ]
On Friday 13 Apr 2012 21:20:29 Nicolas Riendeau wrote:
> Now I don't know what's actually supposed to be acceptable as a
> date/time format string as I am not a themer. In theory you could
> directly put the formatting codes QDateTime expect and not use "%TIME%",
> "%DATE%" and "%SHORTDATE%" so checking if any of them actually replaced
> anything might not be a solution (and I am not sure there are any good
> solution to this).

Really that just should be left as is, without translation or re-ordering. So
line 23855 of mythfrontend_nb.ts needs changing to match the source string.
--
Stuart Morgan
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Arclight 25.12 %DPMTO%, %TID% displayed in right corner [ In reply to ]
Thank you Nicolas and Stuart for clarifying this.

I have tested this by restoring the transtaltion of string %DATE%,
%TIME% in mythfrontend_nb.ts to the original value, and the date/time
is displayed correctly.

I also checked the translation to see if other %xx% strings where
translated, but the above string was the only one.

I will create separate tickets with patches for 0.25-fixes and master
to correct this.

Thank you for your help,

best regards,

Rune

2012/4/14 Nicolas Riendeau <knight@teksavvy.com>
>
> Hi Rune!
>
>
> On 4/13/2012 3:53 PM, Rune Evjen wrote:
>>
>> I just discovered after upgrading to Arclight 25.12 on mythtv 0.25-fixes
>> that the top-right corner on menus and also when displaying the OSD
>> shows "%DPMTO%, %TID%", as shown in [1].
>> This string is very similar to the Norwegian translation of %DATE%,
>> %TIME% (which is %DATO%,%TID%).
>>
>> I am the translation maintainer for Norwegian Bokmål so this might be a
>> translation mistake on my part, but I grepped for DPMTO in
>> mythfrontend_nb.ts and couldn't find any errors, but found the "DATO"
>> string as expected using this command:
>
>
> <snip>
>
>
>> Is this string coming from translation files or elsewhere ?
>
>
> A little of both...
>
> The code that handles the clock recognizes "%TIME%", "%DATE%" and
> "%SHORTDATE%".
>
> What it does when it encounters any of them is replace them with the time
> format, the date format or the short time format you configured and leaves
> the rest untouched.
>
> So something like
>
> %DATE%, %TIME%
>
> becomes
>
> dddd d MMMM, h:mm
>
> for example.
>
> Now this is later passed to another bit of code which takes this as a
> format to display the current date/time so it becomes something like this:
>
> Friday 13 april, 20:49
>
> Everything which is not a code recognized by QDateTime (what we use to
> display that date) is put as-is in the output string (this is where that ","
> (comma) comes from.
>
> Now what happens when the parsing code that looks for "%TIME%", "%DATE%"
> and "%SHORTDATE%" doesn't find them is this:
>
> Something like:
>
> %DATO%, %TID%
>
> (obtained by translating "%DATE%, %TIME%" using the content of the
> translation files)
>
> stays as-is as none of the variables/tags in contains are recognized.
>
> This is still passed to the bit of code that tries to use this as a format
> to display the current date/time.
>
> The only code that QDateTime recognizes in there is "A" which means
> <<interpret as an AM/PM time. AP must be either "AM" or "PM">> (this is
> taken from Qt's docs). Now it says "AP" but actually both "AP" and "A" do
> exactly the same things, show the time with AM/PM.
>
> So, assuming you are in the afternoon
>
> %DATO%, %TID%
>
> becomes
>
> %DPMTO%, %TID%
>
> because, like the previous example, everything which is not a code
> recognized by QDateTime is put as-is in the output string (this is where
> "%D", "TO%, %TID%" come from.
>
> Now it doesn't actually show the time but it shows you it's a PM time...
> (-;
>
> Now I don't know what's actually supposed to be acceptable as a date/time
> format string as I am not a themer. In theory you could directly put the
> formatting codes QDateTime expect and not use "%TIME%", "%DATE%" and
> "%SHORTDATE%" so checking if any of them actually replaced anything might
> not be a solution (and I am not sure there are any good solution to this).
>
> Have a nice day!
>
> Nicolas
>
>
>
>
> _______________________________________________
> mythtv-theming mailing list
> mythtv-theming@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-theming
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Arclight 25.12 %DPMTO%, %TID% displayed in right corner [ In reply to ]
Hi Rune!

On 4/14/2012 2:01 PM, Rune Evjen wrote:
> Thank you Nicolas and Stuart for clarifying this.

No problem...

> I have tested this by restoring the transtaltion of string %DATE%,
> %TIME% in mythfrontend_nb.ts to the original value, and the date/time
> is displayed correctly.

That's good news!

> I will create separate tickets with patches for 0.25-fixes and master
> to correct this.

I don't think you need to make two different patches as I believe no
strings were removed or modified yet so the same patch can be applied to
both (new strings are not a problem, 0.25-fixes will simply not use them).

Have a nice day!

Nicolas
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Arclight 25.12 %DPMTO%, %TID% displayed in right corner [ In reply to ]
Hello Nicolas,

ticket http://code.mythtv.org/trac/ticket/10599 created with patch for master.

If needed I can attach a separate patch for 0.25-fixes.

Best regards,

Rune

2012/4/14 Nicolas Riendeau <knight@teksavvy.com>:
> Hi Rune!
>
>
> On 4/14/2012 2:01 PM, Rune Evjen wrote:
>>
>> Thank you Nicolas and Stuart for clarifying this.
>
>
> No problem...
>
>
>> I have tested this by restoring the transtaltion of string %DATE%,
>> %TIME% in mythfrontend_nb.ts to the original value, and the date/time
>> is displayed correctly.
>
>
> That's good news!
>
>
>> I will create separate tickets with patches for 0.25-fixes and master
>> to correct this.
>
>
> I don't think you need to make two different patches as I believe no strings
> were removed or modified yet so the same patch can be applied to both (new
> strings are not a problem, 0.25-fixes will simply not use them).
>
>
> Have a nice day!
>
> Nicolas
> _______________________________________________
> mythtv-theming mailing list
> mythtv-theming@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-theming
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Arclight 25.12 %DPMTO%, %TID% displayed in right corner [ In reply to ]
Hi Rune!

On 4/14/2012 3:31 PM, Rune Evjen wrote:
> ticket http://code.mythtv.org/trac/ticket/10599 created with patch for master.

It's now committed...

> If needed I can attach a separate patch for 0.25-fixes.

That won't be necessary, 0.25-fixes is modified as well. It looks like
we have already lost full string compatibility between master and
0.25-fixes (some strings were removed in master) so I only applied the
date/time fix on 0.25-fixes, not the rest of the patch which obsoleted
strings which are still used on 0.25 fixes on added new ones.

Have a nice day!

Nicolas
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming