Localize date in the cartridge

Bug #585147 reported by Alain Portal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Won't Fix
Wishlist
Unassigned

Bug Description

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

Revision history for this message
Alain Portal (alain-portal-univ-montp2) wrote :
Revision history for this message
jean-pierre charras (jp-charras) wrote : Re: [Bug 585147] Re: Feature request: localize date in the cartridge

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

Revision history for this message
Vovanium (vovanium) wrote : Re: [Bug 585147] Feature request: localize date in the cartridge

В сообщении от Вторник 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

Revision history for this message
Alain Portal (alain-portal-univ-montp2) wrote : Re: Feature request: localize date in the cartridge

> 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?

Revision history for this message
Lorenzo Marcantonio (l-marcantonio) wrote : Re: [Bug 585147] Feature request: localize date in the cartridge

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

Revision history for this message
Vovanium (vovanium) wrote : Re: [Bug 585147] Feature request: localize date in the cartridge

В сообщении от Среда 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

Revision history for this message
Alain Portal (alain-portal-univ-montp2) wrote : Re: Feature request: localize date in the cartridge

> 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?

Revision history for this message
Vovanium (vovanium) wrote : Re: [Bug 585147] Re: Feature request: localize date in the cartridge

В сообщении от Суббота 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

Revision history for this message
Lorenzo Marcantonio (l-marcantonio) wrote :

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)
Changed in kicad:
importance: Undecided → Wishlist
Stephen Eaton (seaton)
Changed in kicad:
status: New → Triaged
xzcvczx (xzcvczx)
summary: - Feature request: localize date in the cartridge
+ Localize date in the cartridge
Revision history for this message
Jeff Young (jeyjey) wrote :

8 years with no action; I think we can let this one go for now....

Changed in kicad:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.