Bug 3997 - Date is not translated when you reply to a mail
Summary: Date is not translated when you reply to a mail
Status: RESOLVED INVALID
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: UI/Translations (show other bugs)
Version: 3.15.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2018-03-27 09:45 CEST by marius.spix
Modified: 2018-03-29 12:32 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marius.spix 2018-03-27 09:45:17 CEST
When you reply to a mail, a text in the form

On Mon, 26 Mar 2018 11:05:19 +0000
Anna <anna@example.com> wrote:

is put in the response mail which is

Am Mon, 26 Mar 2018 11:05:19 +0000
schrieb Anna <anna@example.com>:

in the German localization of Claws Mail (on Linux), however, the name of the month is not correctly translated to German. It must say "Mrz" instead of "Mar". The German short month names are:
Jan, Feb, Mrz, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez

As they only differ in four months ("Mar" -> "Mrz", "May" -> "Mai", "Oct" -> "Okt", "Dec" -> "Dez"), the bug does not always occur.
Comment 1 marius.spix 2018-03-27 10:12:16 CEST
And there is also a missing dots after the day of the month and the month. Valid date formats in German are:


Montag, den 5. Januar 2018
Montag, 5. Januar 2018
Mo., den 5. Januar 2018
Mo., 5. Januar 2018
5. Januar 2018
5. Jan. 2018
05.01.2018
05.01.18
2018-01-05
18-01-05

Instead of Mrz., Jun., Jul. you can also write März, Juni, Juli.

The days of the week are also not correctly translated, they must be:
Mo., Di., Mi., Do., Fr., Sa., So.
Comment 2 Paul 2018-03-27 11:03:36 CEST
You don't say what you are using in your Template(s) to produce that line.

Use %date_fmt{fmt}, e.g. %date_fmt{%c}.

%c is "The preferred date and time representation for the current locale", coming from your system, (strftime), and not claws-mail.
Comment 3 marius.spix 2018-03-27 21:35:41 CEST
I did not change the default template and my system’s locale is "de_DE.utf8". Claws Mail is compiled against glibc 2.25.

The following program

#include <stdio.h>
#include <time.h>
int main(argc, argv)
     int  argc;
     char *argv[]; {
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  char buf[255];
  strftime(buf, sizeof(buf), "%c", timeinfo);
  puts(buf);
  return 0;
}


writes "Tue Mar 27 21:19:35 2018"

However, the program

#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <time.h>
int main(argc, argv)
     int  argc;
     char *argv[]; {
  char *locale;
  locale = getenv("LC_ALL");
  setlocale(LC_ALL, locale);
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  char buf[255];
  strftime(buf, sizeof(buf), "%c", timeinfo);
  puts(buf);
  return 0;
}

correctly prints "Di 27 Mär 2018 21:35:12 CEST".

So I think, you are just missing a setlocale() call in Claws Mail.
Comment 4 Andrej Kacian 2018-03-27 21:56:45 CEST
Nope, it works correctly. When starting Claws mail with "LC_ALL=de_DE claws-mail" and using %date_fmt{%c} in the template, I get this:

On Di 27 Mär 2018 19:35:41 CEST
noreply@thewildbeast.co.uk wrote:
Comment 5 marius.spix 2018-03-27 22:20:15 CEST
This does not work for me,

neither LC_ALL=de, LC_ALL=de_DE nor LC_ALL=de_DE.utf8

The UI text is correctly translated and so is the "Am ... schrieb ..." (English: "On ... ... wrote"). Only date and time are not correctly translated. I am using Gentoo Linux with glibc-2.25-r10.
Comment 6 Andrej Kacian 2018-03-27 23:03:53 CEST
What do "locale" and "locale -a" shell commands print?

What does your sample program print if you replace the setlocale() call with this?
  setlocale(LC_ALL, "");
Comment 7 Paul 2018-03-27 23:39:16 CEST
It also work correctly for me, that's why I said what I said.

I specified using %date_fmt{fmt} rather than simply %date.
Comment 8 marius.spix 2018-03-28 11:37:35 CEST
locale

LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE=C
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=


locale -a

C
POSIX
aa
aa_DJ
aa_DJ.iso88591
aa_DJ.utf8
aa_ER
aa_ER.utf8
aa_ER.utf8@saaho
aa_ER@saaho
aa_ET
aa_ET.utf8
af
af_ZA
af_ZA.iso88591
af_ZA.utf8
ak
ak_GH
ak_GH.utf8
am
am_ET
am_ET.utf8
an
an_ES
an_ES.iso885915
an_ES.utf8
anp
anp_IN
anp_IN.utf8
ar
ar_AE
ar_AE.iso88596
ar_AE.utf8
ar_BH
ar_BH.iso88596
ar_BH.utf8
ar_DZ
ar_DZ.iso88596
ar_DZ.utf8
ar_EG
ar_EG.iso88596
ar_EG.utf8
ar_IN
ar_IN.utf8
ar_IQ
ar_IQ.iso88596
ar_IQ.utf8
ar_JO
ar_JO.iso88596
ar_JO.utf8
ar_KW
ar_KW.iso88596
ar_KW.utf8
ar_LB
ar_LB.iso88596
ar_LB.utf8
ar_LY
ar_LY.iso88596
ar_LY.utf8
ar_MA
ar_MA.iso88596
ar_MA.utf8
ar_OM
ar_OM.iso88596
ar_OM.utf8
ar_QA
ar_QA.iso88596
ar_QA.utf8
ar_SA
ar_SA.iso88596
ar_SA.utf8
ar_SD
ar_SD.iso88596
ar_SD.utf8
ar_SS
ar_SS.utf8
ar_SY
ar_SY.iso88596
ar_SY.utf8
ar_TN
ar_TN.iso88596
ar_TN.utf8
ar_YE
ar_YE.iso88596
ar_YE.utf8
as
as_IN
as_IN.utf8
ast
ast_ES
ast_ES.iso885915
ast_ES.utf8
ayc
ayc_PE
ayc_PE.utf8
az
az_AZ
az_AZ.utf8
be
be_BY
be_BY.cp1251
be_BY.utf8
be_BY.utf8@latin
be_BY@latin
bem
bem_ZM
bem_ZM.utf8
ber
ber_DZ
ber_DZ.utf8
ber_MA
ber_MA.utf8
bg
bg_BG
bg_BG.cp1251
bg_BG.utf8
bhb
bhb_IN
bhb_IN.utf8
bho
bho_IN
bho_IN.utf8
bn
bn_BD
bn_BD.utf8
bn_IN
bn_IN.utf8
bo
bo_CN
bo_CN.utf8
bo_IN
bo_IN.utf8
br
br_FR
br_FR.iso88591
br_FR.iso885915@euro
br_FR.utf8
br_FR@euro
brx
brx_IN
brx_IN.utf8
bs
bs_BA
bs_BA.iso88592
bs_BA.utf8
byn
byn_ER
byn_ER.utf8
ca
ca_AD
ca_AD.iso885915
ca_AD.utf8
ca_ES
ca_ES.iso88591
ca_ES.iso885915@euro
ca_ES.utf8
ca_ES@euro
ca_FR
ca_FR.iso885915
ca_FR.utf8
ca_IT
ca_IT.iso885915
ca_IT.utf8
ce
ce_RU
ce_RU.utf8
chr
chr_US
chr_US.utf8
cmn
cmn_TW
cmn_TW.utf8
crh
crh_UA
crh_UA.utf8
cs
cs_CZ
cs_CZ.iso88592
cs_CZ.utf8
csb
csb_PL
csb_PL.utf8
cv
cv_RU
cv_RU.utf8
cy
cy_GB
cy_GB.iso885914
cy_GB.utf8
da
da_DK
da_DK.iso88591
da_DK.utf8
de
de_AT
de_AT.iso88591
de_AT.iso885915@euro
de_AT.utf8
de_AT@euro
de_BE
de_BE.iso88591
de_BE.iso885915@euro
de_BE.utf8
de_BE@euro
de_CH
de_CH.iso88591
de_CH.utf8
de_DE
de_DE.ebcdic
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE@euro
de_IT
de_IT.iso88591
de_IT.utf8
de_LI.utf8
de_LU
de_LU.iso88591
de_LU.iso885915@euro
de_LU.utf8
de_LU@euro
doi
doi_IN
doi_IN.utf8
dv
dv_MV
dv_MV.utf8
dz
dz_BT
dz_BT.utf8
el
el_CY
el_CY.iso88597
el_CY.utf8
el_GR
el_GR.iso88597
el_GR.utf8
en
en_AG
en_AG.utf8
en_AU
en_AU.iso88591
en_AU.utf8
en_BW
en_BW.iso88591
en_BW.utf8
en_CA
en_CA.iso88591
en_CA.utf8
en_DK
en_DK.iso88591
en_DK.utf8
en_GB
en_GB.iso88591
en_GB.utf8
en_HK
en_HK.iso88591
en_HK.utf8
en_IE
en_IE.iso88591
en_IE.iso885915@euro
en_IE.utf8
en_IE@euro
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ
en_NZ.iso88591
en_NZ.utf8
en_PH
en_PH.iso88591
en_PH.utf8
en_SG
en_SG.iso88591
en_SG.utf8
en_US
en_US.ebcdic
en_US.iso88591
en_US.utf8
en_ZA
en_ZA.iso88591
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW
en_ZW.iso88591
en_ZW.utf8
eo
eo.utf8
es
es_AR
es_AR.iso88591
es_AR.utf8
es_BO
es_BO.iso88591
es_BO.utf8
es_CL
es_CL.iso88591
es_CL.utf8
es_CO
es_CO.iso88591
es_CO.utf8
es_CR
es_CR.iso88591
es_CR.utf8
es_CU
es_CU.utf8
es_DO
es_DO.iso88591
es_DO.utf8
es_EC
es_EC.iso88591
es_EC.utf8
es_ES
es_ES.ebcdic
es_ES.iso88591
es_ES.iso885915@euro
es_ES.utf8
es_ES@euro
es_GT
es_GT.iso88591
es_GT.utf8
es_HN
es_HN.iso88591
es_HN.utf8
es_MX
es_MX.iso88591
es_MX.utf8
es_NI
es_NI.iso88591
es_NI.utf8
es_PA
es_PA.iso88591
es_PA.utf8
es_PE
es_PE.iso88591
es_PE.utf8
es_PR
es_PR.iso88591
es_PR.utf8
es_PY
es_PY.iso88591
es_PY.utf8
es_SV
es_SV.iso88591
es_SV.utf8
es_US
es_US.iso88591
es_US.utf8
es_UY
es_UY.iso88591
es_UY.utf8
es_VE
es_VE.iso88591
es_VE.utf8
et
et_EE
et_EE.iso88591
et_EE.iso885915
et_EE.utf8
eu
eu_ES
eu_ES.iso88591
eu_ES.iso885915@euro
eu_ES.utf8
eu_ES@euro
fa
fa_IR
fa_IR.utf8
ff
ff_SN
ff_SN.utf8
fi
fi_FI
fi_FI.iso88591
fi_FI.iso885915@euro
fi_FI.utf8
fi_FI@euro
fil
fil_PH
fil_PH.utf8
fo
fo_FO
fo_FO.iso88591
fo_FO.utf8
fr
fr_BE
fr_BE.iso88591
fr_BE.iso885915@euro
fr_BE.utf8
fr_BE@euro
fr_CA
fr_CA.iso88591
fr_CA.utf8
fr_CH
fr_CH.iso88591
fr_CH.utf8
fr_FR
fr_FR.ebcdic
fr_FR.iso88591
fr_FR.iso885915@euro
fr_FR.utf8
fr_FR@euro
fr_LU
fr_LU.iso88591
fr_LU.iso885915@euro
fr_LU.utf8
fr_LU@euro
fur
fur_IT
fur_IT.utf8
fy
fy_DE
fy_DE.utf8
fy_NL
fy_NL.utf8
ga
ga_IE
ga_IE.iso88591
ga_IE.iso885915@euro
ga_IE.utf8
ga_IE@euro
gd
gd_GB
gd_GB.iso885915
gd_GB.utf8
gez
gez_ER
gez_ER.utf8
gez_ER.utf8@abegede
gez_ER@abegede
gez_ET
gez_ET.utf8
gez_ET.utf8@abegede
gez_ET@abegede
gl
gl_ES
gl_ES.iso88591
gl_ES.iso885915@euro
gl_ES.utf8
gl_ES@euro
gu
gu_IN
gu_IN.utf8
gv
gv_GB
gv_GB.iso88591
gv_GB.utf8
ha
ha_NG
ha_NG.utf8
hak
hak_TW
hak_TW.utf8
he
he_IL
he_IL.iso88598
he_IL.utf8
hi
hi_IN
hi_IN.utf8
hne
hne_IN
hne_IN.utf8
hr
hr_HR
hr_HR.iso88592
hr_HR.utf8
hsb
hsb_DE
hsb_DE.iso88592
hsb_DE.utf8
ht
ht_HT
ht_HT.utf8
hu
hu_HU
hu_HU.iso88592
hu_HU.utf8
hy
hy_AM
hy_AM.armscii8
hy_AM.utf8
ia
ia_FR
ia_FR.utf8
id
id_ID
id_ID.iso88591
id_ID.utf8
ig
ig_NG
ig_NG.utf8
ik
ik_CA
ik_CA.utf8
is
is_IS
is_IS.iso88591
is_IS.utf8
it
it_CH
it_CH.iso88591
it_CH.utf8
it_IT
it_IT.iso88591
it_IT.iso885915@euro
it_IT.utf8
it_IT@euro
iu
iu_CA
iu_CA.utf8
ja
ja_JP.eucjp
ja_JP.utf8
ka
ka_GE
ka_GE.georgianps
ka_GE.utf8
kk
kk_KZ
kk_KZ.pt154
kk_KZ.utf8
kl
kl_GL
kl_GL.iso88591
kl_GL.utf8
km
km_KH
km_KH.utf8
kn
kn_IN
kn_IN.utf8
ko
ko_KR.euckr
ko_KR.utf8
kok
kok_IN
kok_IN.utf8
ks
ks_IN
ks_IN.utf8
ks_IN.utf8@devanagari
ks_IN@devanagari
ksh
ksh_DE
ksh_DE.utf8
ku
ku_TR
ku_TR.iso88599
ku_TR.utf8
kw
kw_GB
kw_GB.iso88591
kw_GB.utf8
ky
ky_KG
ky_KG.utf8
lb
lb_LU
lb_LU.utf8
lg
lg_UG
lg_UG.iso885910
lg_UG.utf8
li
li_BE
li_BE.utf8
li_NL
li_NL.utf8
lij
lij_IT
lij_IT.utf8
ln
ln_CD
ln_CD.utf8
lo
lo_LA
lo_LA.utf8
lt
lt_LT
lt_LT.iso885913
lt_LT.utf8
lv
lv_LV
lv_LV.iso885913
lv_LV.utf8
lzh
lzh_TW
lzh_TW.utf8
mag
mag_IN
mag_IN.utf8
mai
mai_IN
mai_IN.utf8
mg
mg_MG
mg_MG.iso885915
mg_MG.utf8
mhr
mhr_RU
mhr_RU.utf8
mi
mi_NZ
mi_NZ.iso885913
mi_NZ.utf8
mk
mk_MK
mk_MK.iso88595
mk_MK.utf8
ml
ml_IN
ml_IN.utf8
mn
mn_MN
mn_MN.utf8
mni
mni_IN
mni_IN.utf8
mr
mr_IN
mr_IN.utf8
ms
ms_MY
ms_MY.iso88591
ms_MY.utf8
mt
mt_MT
mt_MT.iso88593
mt_MT.utf8
my
my_MM
my_MM.utf8
nan
nan_TW
nan_TW.utf8
nan_TW.utf8@latin
nan_TW@latin
nb
nb_NO
nb_NO.iso88591
nb_NO.utf8
nds
nds_DE
nds_DE.utf8
nds_NL
nds_NL.utf8
ne
ne_NP
ne_NP.utf8
nhn
nhn_MX
nhn_MX.utf8
niu
niu_NU
niu_NU.utf8
niu_NZ
niu_NZ.utf8
nl
nl_AW
nl_AW.utf8
nl_BE
nl_BE.iso88591
nl_BE.iso885915@euro
nl_BE.utf8
nl_BE@euro
nl_NL
nl_NL.ebcdic
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.utf8
nl_NL@euro
nn
nn_NO
nn_NO.iso88591
nn_NO.utf8
nr
nr_ZA
nr_ZA.utf8
nso
nso_ZA
nso_ZA.utf8
oc
oc_FR
oc_FR.iso88591
oc_FR.utf8
om
om_ET
om_ET.utf8
om_KE
om_KE.iso88591
om_KE.utf8
or
or_IN
or_IN.utf8
os
os_RU
os_RU.utf8
pa
pa_IN
pa_IN.utf8
pa_PK
pa_PK.utf8
pap
pap_AW
pap_AW.utf8
pap_CW
pap_CW.utf8
pl
pl_PL
pl_PL.iso88592
pl_PL.utf8
ps
ps_AF
ps_AF.utf8
pt
pt_BR
pt_BR.ebcdic
pt_BR.iso88591
pt_BR.utf8
pt_PT
pt_PT.iso88591
pt_PT.iso885915@euro
pt_PT.utf8
pt_PT@euro
quz
quz_PE
quz_PE.utf8
raj
raj_IN
raj_IN.utf8
ro
ro_RO
ro_RO.iso88592
ro_RO.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
ru_UA
ru_UA.koi8u
ru_UA.utf8
rw
rw_RW
rw_RW.utf8
sa
sa_IN
sa_IN.utf8
sat
sat_IN
sat_IN.utf8
sc
sc_IT
sc_IT.utf8
sd
sd_IN
sd_IN.utf8
sd_IN.utf8@devanagari
sd_IN@devanagari
se
se_NO
se_NO.utf8
sgs
sgs_LT
sgs_LT.utf8
shs
shs_CA
shs_CA.utf8
si
si_LK
si_LK.utf8
sid
sid_ET
sid_ET.utf8
sk
sk_SK
sk_SK.iso88592
sk_SK.utf8
sl
sl_SI
sl_SI.iso88592
sl_SI.utf8
so
so_DJ
so_DJ.iso88591
so_DJ.utf8
so_ET
so_ET.utf8
so_KE
so_KE.iso88591
so_KE.utf8
so_SO
so_SO.iso88591
so_SO.utf8
sq
sq_AL
sq_AL.iso88591
sq_AL.utf8
sq_MK
sq_MK.utf8
sr
sr_ME
sr_ME.utf8
sr_RS
sr_RS.utf8
sr_RS.utf8@latin
sr_RS@latin
ss
ss_ZA
ss_ZA.utf8
st
st_ZA
st_ZA.iso88591
st_ZA.utf8
sv
sv_FI
sv_FI.iso88591
sv_FI.iso885915@euro
sv_FI.utf8
sv_FI@euro
sv_SE
sv_SE.iso88591
sv_SE.utf8
sw
sw_KE
sw_KE.utf8
sw_TZ
sw_TZ.utf8
szl
szl_PL
szl_PL.utf8
ta
ta_IN
ta_IN.utf8
ta_LK
ta_LK.utf8
tcy
tcy_IN
tcy_IN.utf8
te
te_IN
te_IN.utf8
tg
tg_TJ
tg_TJ.koi8t
tg_TJ.utf8
th
th_TH
th_TH.tis620
th_TH.utf8
the
the_NP
the_NP.utf8
ti
ti_ER
ti_ER.utf8
ti_ET
ti_ET.utf8
tig
tig_ER
tig_ER.utf8
tk
tk_TM
tk_TM.utf8
tl
tl_PH
tl_PH.iso88591
tl_PH.utf8
tn
tn_ZA
tn_ZA.utf8
tr
tr_CY
tr_CY.iso88599
tr_CY.utf8
tr_TR
tr_TR.iso88599
tr_TR.utf8
ts
ts_ZA
ts_ZA.utf8
tt
tt_RU
tt_RU.utf8
tt_RU.utf8@iqtelif
tt_RU@iqtelif
ug
ug_CN
ug_CN.utf8
uk
uk_UA
uk_UA.koi8u
uk_UA.utf8
unm
unm_US
unm_US.utf8
ur
ur_IN
ur_IN.utf8
ur_PK
ur_PK.utf8
uz
uz_UZ
uz_UZ.iso88591
uz_UZ.utf8
uz_UZ.utf8@cyrillic
uz_UZ@cyrillic
ve
ve_ZA
ve_ZA.utf8
vi
vi_VN
vi_VN.utf8
wa
wa_BE
wa_BE.iso88591
wa_BE.iso885915@euro
wa_BE.utf8
wa_BE@euro
wae
wae_CH
wae_CH.utf8
wal
wal_ET
wal_ET.utf8
wo
wo_SN
wo_SN.utf8
xh
xh_ZA
xh_ZA.iso88591
xh_ZA.utf8
yi
yi_US
yi_US.cp1255
yi_US.utf8
yo
yo_NG
yo_NG.utf8
yue
yue_HK
yue_HK.utf8
zh
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.big5hkscs
zh_HK.utf8
zh_SG
zh_SG.gb2312
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8
zu
zu_ZA
zu_ZA.iso88591
zu_ZA.utf8