I have an issue on configuration of a CCK Datetime field and search in the code why this problem is happening. I see that date_t_strings function is returning bad values on 'datetime' and 'month_name' indexes.

The language used in my site is 'Brazilian Portuguese' - 'ptbr' but this code is not passed to this function (don't know if this is normal).

On 'datetime' the 'Year' is showing 'datetime Year' and for the 'month_name' it's not showing the 'July' month.

$replace['']['datetime'] => Array
(
    [0] => datetime Ano
    [1] => Mês
    [2] => Dia
    [3] => Semana
    [4] => Hora
    [5] => minutos
    [6] => Segundos
    [7] => Todo Dia
    [8] => Todo dia
)

$replace['']['month_name'] => Array
(
    [0] => 
    [1] => Janeiro
    [2] => Fevereiro
    [3] => Março
    [4] => Abril
    [5] => Maio
    [6] => Junho
    [7] => Agosto
    [8] => Setembro
    [9] => Outubro
    [10] => Novembro
    [11] => Dezembro
)

I have the latest version and seek in -dev version and it's the same code.

CommentFileSizeAuthor
#3 general.pt-br.po2.34 KBpiratinha
field_display.gif5.46 KBasmdec
field_config.gif2.34 KBasmdec

Comments

asmdec’s picture

bump

thepanz’s picture

Try to fix the .po translation file, the list of months are separated with a "|" sign, maybe you're missing the first one in the translation file

piratinha’s picture

StatusFileSize
new2.34 KB

no. it's the seven. add Julho to file translations/date_api.pt-br.po and import in build/translate/import again.

works for me :)

asmdec’s picture

Component: Code » Date API

Hi thaPanz and piratinha, thanks for the reply and the contact mail ;)

I'll try it tomorrow in my work, but I think you're right... checking the 'date_api' .po translation file I saw that the 'July' month was skipped in the string...

#: date_api.module:627
msgid "!month-name |January|February|March|April|May|June|July|August|September|October|November|December"
msgstr "!month-name |Janeiro|Fevereiro|Março|Abril|Maio|Junho|Agosto|Setembro|Outubro|Novembro|Dezembro"

asmdec’s picture

Status: Active » Fixed

Perfect piratinha, changing the translation file fixed the issue.

The lines changed was:

#: date_api.module:620
msgid "!datetime Year|Month|Day|Week|Hour|Minute|Second|All Day|All day"
msgstr "!datetime Ano|Mês|Dia|Semana|Hora|minutos|Segundos|Todo Dia|Todo dia"

The exclamation point was missed in the msgstr "!datetime".

#: date_api.module:627
msgid "!month-name |January|February|March|April|May|June|July|August|September|October|November|December"
msgstr "!month-name |Janeiro|Fevereiro|Março|Abril|Maio|Junho|Julho|Agosto|Setembro|Outubro|Novembro|Dezembro"

The July translation was missed in the msgstr.

Thanks for the help!! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.