Bug 4917 (int-132990)

Summary: wdgt_va_full_12h_time, wdgt_va_12h_hours should be replaced by wdgt_va_full_12h_time_am/wdgt_va_full_12h_time_pm and wdgt_va_12h_hours_am/wdgt_va_12h_hours_pm
Product: [Maemo Official Platform] Desktop platform Reporter: timeless
Component: hildon-widgetsAssignee: Claudio Saavedra <csaavedra>
Status: RESOLVED FIXED QA Contact: hildon-libs-bugs
Severity: major    
Priority: Low CC: agarcia, andre_klapper, apinheiro
Version: 5.0/(1.2009.42-11)   
Target Milestone: 5.0/(2.2009.51-1)   
Hardware: All   
OS: Maemo   

Description timeless (reporter) 2009-08-13 11:31:17 UTC
# The full localized 12h time, including seconds. E.g. "11:00:04 pm".
# Use this logical string with strftime function.
#See 12h/24h implementation note for details.
msgid "wdgt_va_full_12h_time"
msgstr "%r"

# Localized hours in 12h clock. Use this logical string with strftime function.
See 12h/24h implementation note for details.
msgid "wdgt_va_12h_hours"
msgstr "%l"


# The localized 12h time, before noon. E.g. "11:00 am".
# Use this logical string with strftime function. See 12h/24h implementation
note for details.
msgid "wdgt_va_12h_time_am"
msgstr "%l:%M am"

# The localized 12h time, not before noon. E.g. "11:00 pm".
# Use this logical string with strftime function. See 12h/24h implementation
note for details.msgid "wdgt_va_12h_time_pm"
msgstr "%l:%M pm"
Comment 1 timeless (reporter) 2009-08-13 11:35:34 UTC
sorry, this bug was submitted prematurely.

i'll write the actual bug report here and finish the details later:

If I'm a localizer, and I want to localize am/pm (which I have to be able to
do), I need full control over the placement and text for 'am' and 'pm', making
me rely on strftime's %p isn't acceptable. I might need to stick am and pm in
different locations.

expected results:
for each 12 hour time there should be two localizer controlled strings as there
are for wdgt_va_12h_time_am/wdgt_va_12h_time_pm.

Actual results:
wdgt_va_full_12h_time
wdgt_va_12h_hours
Comment 2 Andre Klapper maemo.org 2009-08-13 17:26:02 UTC
So to summarize:


STEPS LEADING TO PROBLEM: 
I want to localize am/pm and need full control over the placement and text for
'am' and 'pm'. Making me rely on strftime's %p isn't acceptable. I might need
to stick am and pm in different locations.

EXPECTED OUTCOME:
Four strings:
  * wdgt_va_full_12h_time_am
  * wdgt_va_full_12h_time_pm
  * wdgt_va_12h_hours_am
  * wdgt_va_12h_hours_pm
For each 12 hour time there should be two localizer controlled strings as there
are already for "wdgt_va_12h_time_am" and "wdgt_va_12h_time_pm".

ACTUAL OUTCOME:
Only two strings:
  * wdgt_va_full_12h_time
  * wdgt_va_12h_hours

FREQUENCY OF OCCURRENCE: 
always
Comment 3 Andre Klapper maemo.org 2009-08-13 17:45:06 UTC
Moving to hildon-widgets as strings are in hildon-libs-l10n*.
Already imported.
Comment 4 Alejandro Piñeiro Iglesias 2009-08-13 17:56:16 UTC
(In reply to comment #1)
> sorry, this bug was submitted prematurely.
> 
> i'll write the actual bug report here and finish the details later:
> 
> If I'm a localizer, and I want to localize am/pm (which I have to be able to
> do), I need full control over the placement and text for 'am' and 'pm', making
> me rely on strftime's %p isn't acceptable. I might need to stick am and pm in
> different locations.

Yes, you are right, you can rely on %p, and in fact on HildonTimeSelector, we
dont. The reason is that not all languages has AM/PM equivalents, so in most
cases %p returns void
(http://en.wikipedia.org/wiki/AM_PM#Criticism_and_practical_problems)

But, in this case as AM/PM is really usual, and understandable in several
places, we directly put that.

Please confirm that what you are asking is what Andre tried to summarize on
comment 2. If this is true, I think that have sense. In the same way, it should
be good to create a better summary, it is really confusing (IMHO). I think that
a sentence explaining the problem could be better that go into the details of
the logical IDs.
Comment 5 timeless (reporter) 2009-08-13 20:37:02 UTC
andre's description is correct. sorry i was in a hurry and accidentally
committed early.

i'm trying to go through the rest of the platform now and don't really have the
time to come up w/ a better summary, i'm sorry.
Comment 6 Alberto Garcia Gonzalez 2009-08-19 20:35:49 UTC
I admit I haven't slept too last night, but I don't fully understand
this :)

This is what we have right now:

msgid "wdgt_va_12h_hours"
msgstr "%l"

msgid "wdgt_va_24h_hours"
msgstr "%H"

msgid "wdgt_va_24h_time"
msgstr "%H:%M"

msgid "wdgt_va_12h_time_am"
msgstr "%l:%M am"

msgid "wdgt_va_12h_time_pm"
msgstr "%l:%M pm"

msgid "wdgt_va_full_12h_time"
msgstr "%r"

msgid "wdgt_va_full_24h_time"
msgstr "%T"

What else do you need, and which ones would you like to change?
Comment 7 Andre Klapper maemo.org 2009-08-19 23:17:22 UTC
Hmm, what's unclear in my comment 2?
Comment 8 Alejandro Piñeiro Iglesias 2009-08-20 11:31:35 UTC
(In reply to comment #7)
> Hmm, what's unclear in my comment 2?

As Alberto said, he didn't sleep enough ;)

Anyway, I think that he also ask for the default (english) definition for the
new strings, and if timeless requires more strings.

However, thinking this a little, I'm not sure how this can be useful. This
strings defined are the ones used on hildon-widgets. timeless, why do you want
to define on the hildon-libs domain new strings not used on this library? If
you don't use that you will not get that translated.

If you are the developer of a application, you can define your strings, and
create a new translation domain for yourself. 

Or you are proposing as well to use this strings? Where, which? We should
substitute the strings being in use?
Comment 9 timeless (reporter) 2009-08-20 23:40:40 UTC
so,
wdgt_va_full_12h_time_am = "%I:%M:%S am"
wdgt_va_full_12h_time_pm = "%I:%M:%S pm"

and anywhere that you have code which tries to use:
wdgt_va_full_12h_time, you need to instead decide if it's am or pm and then use
the appropriate wdgt_va_full_12h_time_am/wdgt_va_full_12h_time_pm string.

I'm not sure about wdgt_va_12h_hours, it might be the case that the string is
actually sufficient but needs a comment indicating it will be used with
wdgt_va_am and wdgt_va_pm, there is no such localization note.
Comment 10 Andre Klapper maemo.org 2009-09-28 20:30:06 UTC
wdgt_va_full_12h_time should be removed soon according to the internal ticket.
Comment 11 Andre Klapper maemo.org 2009-11-12 15:08:16 UTC
This has been fixed in the internal build.
Comment 12 timeless (reporter) 2010-01-14 11:42:18 UTC
i'm sorry, i can confirm that wdgt_va_full_12h_time doesn't exist, however
wdgt_va_full_24h_time does exist, and it shouldn't. you can't have something
for only one format. the other format has to be supported as a pair.
Comment 13 Andre Klapper maemo.org 2010-01-14 12:28:00 UTC
The problem reported here should be fixed in the update released today for
public: The Maemo5 update version 2.2009.51-1 (also called "PR1.1" sometimes).
Please leave a comment if the problem is not fixed for you in this update
version.