KiCad EDA Software Suite

Feature request: localize date in the cartridge

Reported by Alain Portal on 2010-05-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Wishlist
Unassigned

Bug Description

It should be nice in the date in the cartridge was localized.
Here is a patch that does the job.

Alain Portal a écrit :
> ** Attachment added: "Localize date"
> http://launchpadlibrarian.net/49041872/kicad-2010.09.23.localize-date.patch
>
>
What happens if the internal Kicad font does not handle a letter, after
translation ?
In others words have you tested your patch using Chinese simplified
language (an existing translation for Kicad GUI)

JP Charras

В сообщении от Вторник 25 мая 2010 21:52:10 автор jean-pierre charras написал:
> Alain Portal a écrit :
> > ** Attachment added: "Localize date"
> >
> > http://launchpadlibrarian.net/49041872/kicad-2010.09.23.localize-date.
> > patch
>
> What happens if the internal Kicad font does not handle a letter, after
> translation ?
> In others words have you tested your patch using Chinese simplified
> language (an existing translation for Kicad GUI)
>
> JP Charras

There's another drawback: patch does not localize date, but only translate
month name. AFAIK, Americans write "June 23, 2005", not "23 june 2005". I
think ISO format (wxDateTime::FormatISODate -- 2005-06-23) will be better than
such "localized" one.
--

--- KeyFP: DC07 D4C3 BB33 E596 CF5E CEF9 D4E3 B618 65BA 2B61

> What happens if the internal Kicad font does not handle a letter, after translation ?
> In others words have you tested your patch using Chinese simplified language (an existing translation for Kicad GUI)
No, only in french.
But as the string date is built with a wx function calling strftime(3) which use OS locale, don't you thinl this should work?

On Tue, 25 May 2010, Vovanium wrote:

> There's another drawback: patch does not localize date, but only translate
> month name. AFAIK, Americans write "June 23, 2005", not "23 june 2005". I
> think ISO format (wxDateTime::FormatISODate -- 2005-06-23) will be better than
> such "localized" one.

What about simply using the dedicated function, i.e.

strptime(dst, "%x", &tm); /* Or whatever in wx repertoire, if exists */

strftime would of course be even better...

As for the 'missing' characters my patch would have shown the 'undef'
symbol (i.e. the solid block)... I don't know the current system since
I don't use it.

--
Lorenzo Marcantonio
Logos Srl

В сообщении от Среда 26 мая 2010 10:17:18 автор Lorenzo Marcantonio написал:
> What about simply using the dedicated function, i.e.
>
> strptime(dst, "%x", &tm); /* Or whatever in wx repertoire, if exists */
>
> strftime would of course be even better...
>
> As for the 'missing' characters my patch would have shown the 'undef'
> symbol (i.e. the solid block)... I don't know the current system since
> I don't use it.

There's also wxDateTime::Format("%x") which makes the same in wxWidgets (i
wonder if author of the patch missed this). But the problem with chinese
hieroglyphs remains.

--

--- KeyFP: DC07 D4C3 BB33 E596 CF5E CEF9 D4E3 B618 65BA 2B61

> There's also wxDateTime::Format("%x") which makes the same in wxWidgets (i wonder if author of the patch missed this).

I didn't miss it, this just doesn't do what I wanted, get the month in letters, not as a number.

> But the problem with chinese hieroglyphs remains.

Does chinese use hieroglyphs to display number?

В сообщении от Суббота 29 мая 2010 17:16:52 автор Alain Portal написал:
> > There's also wxDateTime::Format("%x") which makes the same in
>
> wxWidgets (i wonder if author of the patch missed this).
>
> I didn't miss it, this just doesn't do what I wanted, get the month in
> letters, not as a number.
>
> > But the problem with chinese hieroglyphs remains.
>
> Does chinese use hieroglyphs to display number?

At least they have hieroglyphs for numbers. In which cases they use arabic
digits and in which cases they use hieroglyps, I do not know. There's also
hieroglyphs for mothns exist.

Futhermore, own number glyps used by japanese, arabs, indians...
--

--- KeyFP: DC07 D4C3 BB33 E596 CF5E CEF9 D4E3 B618 65BA 2B61

On Sat, 29 May 2010, Alain Portal wrote:

> I didn't miss it, this just doesn't do what I wanted, get the month in
> letters, not as a number.

Then you have *no way* to format portably a 'long date'... some MSVC
uses %#x or something similar,

> Does chinese use hieroglyphs to display number?

I don't know about chinese but japanese people use something like
2010(ideogram for year) 06(ideogram for month) 01(ideogram for day)

So the problem would apply anyway...

The 'best' way I can think of, since there is no locale information
about the structure of a long date, is to put somewhere in the
preferences the strfdate(3) string to use for the cartouche.

--
Lorenzo Marcantonio
Logos Srl

Stephen Eaton (seaton) on 2010-07-01
Changed in kicad:
importance: Undecided → Wishlist
Stephen Eaton (seaton) on 2010-07-05
Changed in kicad:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers