Issue 42014 - calendar popup in agenda wizard ignores locales
Summary: calendar popup in agenda wizard ignores locales
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 680m75
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sw
URL:
Keywords:
Depends on: 50205
Blocks:
  Show dependency tree
 
Reported: 2005-02-03 22:22 UTC by dan
Modified: 2013-08-07 14:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
calendar in agenda wizard (45.99 KB, image/png)
2005-02-03 22:23 UTC, dan
no flags Details
Czech locales for old locales library (15.10 KB, patch)
2005-03-02 14:24 UTC, dan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description dan 2005-02-03 22:22:19 UTC
In agenda wizard is calendar, which should help to choose proper date.

But it is only in English and first day of week is Sunday, it ignores locales
and other settings in localized builds. There is no way to localize it.

See screenshot
Comment 1 dan 2005-02-03 22:23:02 UTC
Created attachment 22166 [details]
calendar in agenda wizard
Comment 2 pavel 2005-02-04 07:07:41 UTC
reassigned.
Comment 3 pavel 2005-02-04 07:45:05 UTC
Interesting thing is that in German version, it is correct.

rpiterman: can you help here?
Comment 4 tom 2005-02-04 10:16:35 UTC
TV->pjanik: I tested it with English, German and French -> All ok. In which
language do you have problems? Maybe there is only support for the Sun big 10
languages..
Comment 5 tom 2005-02-04 10:17:01 UTC
.
Comment 6 tom 2005-02-04 10:19:20 UTC
TV: In case it does not work for languages other than Big10 you shoul contact
Eike Rathke (er@openoffice.org).
Comment 7 dan 2005-02-04 11:07:12 UTC
It doesn't work for czech language. Locale code cs_CZ. You will see English
names of months and week should start here with Monday.

I have looked on it, the control element comes from Sun's awt library, but I am
not able locate, where exactly is defined, or if there is source from this in
OOo tarball at all.
Comment 8 pavel 2005-02-04 14:57:06 UTC
reopening.
Still does not work for Czech.
ain: what is the status for Estonian?
er: can you help danohnesorg to fix this issue also for non-Sun languages, please?
Comment 9 pavel 2005-02-06 19:39:40 UTC
tv: we can't find a person responsible for awt locale implementation inside OOo.

Can you please reassign to him/her or at least tell us who can help us to solve
this?

Thank you.
Comment 10 rafaelda 2005-02-07 02:59:20 UTC
In Brazilian Portuguese (1.9.74) there is no problem.
Comment 11 tom 2005-02-07 10:05:09 UTC
TV->ER: The agenda wizard is using a com.sun.star.awt.XDateField
This should support also locales other than the Sun Big10.
Comment 12 ooo 2005-02-07 14:27:52 UTC
Malte,

From a first glance, implementation seems to be in the toolkit module.
Unfortunately the files don't have an owner set, please reassign this issue to
the proper developer who is in charge now.

Thanks
Eike
Comment 13 malte_timmermann 2005-02-08 14:35:47 UTC
MT->FS: Not sure - you or SSA?
Comment 14 Frank Schönheit 2005-02-09 08:39:37 UTC
This is known as internal issue 109073 - I will close the latter as a duplicate
of this one.

Unfortunately, I once inherited this bug from SSA, because form controls where
the only clients of the particular VCL control.

citing from 109073:
<cite>
SSA->FS: The problem is that the calendar control
(svtools/source/control/calendar.cxx) still uses the deprecated International
class from tools, which only supports a few languages. Greek and Turkish are not
supported, thus only english months are displayed.
According to ER the calendar control should use the LocaleDataWrapper from
unotools which provides ver similar function names, so it should not be that
much effort...

FS: I am not reall happy with the ownership of this control (which we by
accident use in forms :). More precisely, I refuse to have the ownership for
this control :), but I think I could fix this bug here, anyway.

MSC:
"According to the OpenOffice.org roadmap (http://tools.openoffice.org/releases)
this issue was retargeted to OOo Later."
</cite>

As a consequence, I target this one here to Later, too. Sorry, but we're too
late in the schedule to accept issues whose fixes are that bad to judge in their
consequences ...
Comment 15 pavel 2005-02-09 09:18:06 UTC
Huh, this is really ugly tools/source/intntl/intntab.cxx:

// Februar
  
static char const aFebruary[]             = "February";   
static char const aFebruar[]              = "Februar";
static char const afebruar[]              = "februar";
static char const afebruari[]             = "februari";
static char const afeACvrier[]            = "f" EAC "vrier";
static char const afebbraio[]             = "febbraio";
static char const afebrero[]              = "febrero";
static char const afevereiro[]            = "fevereiro";
static char const ahelmikuu[]             = "helmikuu";

Uff :-(

Comment 16 dan 2005-02-09 09:24:24 UTC
There is only needed replace this function for day names and other for months names.

                // DayOffWeekText berechnen (werden im schmalen Font ausgegeben)
                maDayOfWeekText.Erase();
                long nStartOffX = 0;
                USHORT eDay = (USHORT)eStartDay;
                for ( USHORT nDayOfWeek = 0; nDayOfWeek < 7; nDayOfWeek++ )
                {
                        String aDayOfWeek( maIntn.GetAbbrevDayText(
(DayOfWeek)eDay ).GetChar( 0 ) );
                        long nOffX = (mnDayWidth-GetTextWidth( aDayOfWeek ))/2;
                        if ( mnWinStyle & WB_BOLDTEXT )
                                nOffX++;
                        if ( !nDayOfWeek )
                                nStartOffX = nOffX;
                        else
                                nOffX -= nStartOffX;
                        nOffX += nDayOfWeek * mnDayWidth;
                        mnDayOfWeekAry[nDayOfWeek] = nOffX;
                        maDayOfWeekText += aDayOfWeek;
                        eDay++;
                        eDay %= 7;
                }
Comment 17 pavel 2005-02-09 09:29:48 UTC
Dan: i do not think so. Have a look for all lines using maIntn:

- maIntn.GetWeekStart
- maIntn.GetAbbrevDayText
- maIntn.GetMonthText
- maIntn.GetAbbrevMonthText
- maIntn.GetWeekCountStart
Comment 18 Frank Schönheit 2005-02-09 09:48:15 UTC
Dan, if you want to submit a patch, I'll gladly review it.
(And no, I will *not* tag your name onto the owner-label of the file then  :)
Comment 19 dan 2005-02-09 09:48:55 UTC
Seems be not to hard to change.

Eike: Will be a patch against unsuported and oudated component accepted? At
least Czech and Slovak localization needs this, I don't know how other
localizations are working on templates.
Comment 20 dan 2005-02-09 09:58:17 UTC
OK I will prepare in the evening patch, Pavel will make a test build over night
and if it works, i will submit the patch.
Comment 21 ooo 2005-02-09 11:13:33 UTC
Dan,

A simple patch against that deprecated code should be acccepted in this case.
However, instead of simply extending the class International respectively its
use I strongly suggest to use the LocaleDataWrapper from the unotools module
instead. Doing so would fix this for all supported locales. But then again it
must be taken care that the locale's calendar is a Gregorian calendar, or
measurements be taken if it isn't and fall back to an en_US calendar. Otherwise
the code wouldn't work as is.

Instead of initializing
maIntn( Application::GetAppInternational() )
it would be
mrLocaleData( Application::GetSettings().GetLocaleDataWrapper())
with mrLocaleData being a const LocaleDataWrapper &

Eike
Comment 22 berend.cornelius 2005-03-02 14:03:23 UTC
BC: I will remove this issue from cws toolkit01 because not yet fixed
Comment 23 dan 2005-03-02 14:19:08 UTC
I have made a patch, but the UI is still in English, probably the eLanguange is
not set into CZECH somewhere, but I dont see where
Comment 24 dan 2005-03-02 14:24:07 UTC
Created attachment 23244 [details]
Czech locales for old locales library
Comment 25 ooo 2005-03-03 10:33:48 UTC
Dan,

Please modify the patch such that no 8bit characters are used, use escape
sequences instead, like \xAB. This because some compiler is a bit weird in
processing 8bit characters, see issue 36782 ...

Thanks
Eike
Comment 26 dan 2005-04-25 21:29:30 UTC
I have remade the patch and broaded them, becouse I have found, that I must also
patch files tools/inc/intntab.hxx and tools/source/intntl/intn.cxx too, to get
it working.

Patch will be tested in czech builds starting with m97.
Comment 27 h.hristov 2005-05-19 19:20:16 UTC
Hi, I'm doing the same patch for Bulgarian. I use 1251 encoding for our language
in these files. Do I ahve to use escape sequences for every letter?
Comment 28 ooo 2005-05-19 20:29:45 UTC
Hi Hristo,

Not for every character, just make sure you escape characters that are not plain
ASCII (== have the 8th bit set).

Thanks
  Eike
Comment 29 h.hristov 2005-05-22 22:26:08 UTC
If I undestand this correctly. In this file have to be used 7-bit ASCII table.
But Cyrillic characters are above 127 code. So, I have to use escape sequences
for every letter.
Comment 30 ooo 2005-06-01 19:37:42 UTC
Grabbing issue, this is related to issue 50205.
Comment 31 ooo 2005-06-01 19:38:51 UTC
Accepted, assigned to CWS internatiodel.
Comment 32 ooo 2005-06-30 16:51:32 UTC
On branch cws_src680_internatiodel:
svtools/inc/calendar.hxx 1.3.60.1
svtools/source/control/calendar.cxx 1.5.146.1
Comment 33 ooo 2005-07-01 11:16:57 UTC
Reassigning to QA.

re-open issue and reassign to oc@openoffice.org
Comment 34 ooo 2005-07-01 11:17:04 UTC
reassign to oc@openoffice.org
Comment 35 ooo 2005-07-01 11:17:11 UTC
reset resolution to FIXED
Comment 36 ooo 2005-09-01 11:36:36 UTC
Retargeting to OOo3.0
Comment 37 ooo 2006-02-13 15:10:09 UTC
Retargeting to OOo2.0.3.
Comment 38 oc 2006-03-17 15:29:47 UTC
verified in internal build cws_internatiodel
Comment 39 oc 2006-05-10 15:00:45 UTC
closed because fix available in OpenOffice.org Developer Snapshot Build src680_m167