oetiker / mrtg

MRTG - Multi Router Traffic Grapher
http://www.mrtg.org
243 stars 60 forks source link

Sometimes, MRTG forget to translate the second line #74

Open eribertomota opened 2 years ago

eribertomota commented 2 years ago

Hi @oetiker,

Mainly when restarting the service (via systemd) in Debian, MRTG doesn't translate the second line. See below an example for Brazilian Portuguese:

Trafego de rede na br-kvm
The statistics were last updated Terça, 26 de Saíubro de 2021 às 2:17
Gráfico `Diário' (5 minutos Média)

Note that word "Saíubro" doesn't exist in Portuguese and isn't present in source code. The right word is "Outubro". After 5 minutes, I got the same result:

Trafego de rede na br-kvm
The statistics were last updated Terça, 26 de Saíubro de 2021 às 2:22
Gráfico `Diário' (5 minutos - média)

After 15 minutes, the line was translated:

Trafego de rede na br-kvm
Última atualização das estatísticas: Terça, 26 de Outubro de 2021 às 2:37
Gráfico `Diário' (5 minutos Média)

Thanks in advance.

Regards,

Eriberto

youpong commented 2 years ago

I send a PR #88 to fix this.

The rules of translate is stored in the hash like this way.

  1. 'Out' -> 'Saí'
  2. 'The statistics were last updated' -> 'Última atualização das estatísticas:'
  3. so on...

Which one is picked depends on the hash order.

If rule 1 is picked, the translation result is like 'The statistics were last updated Terça, 26 de Saíubro de 2021 às 2:17'. If rule 2 is picked, the translation result is like 'Última atualização das estatísticas: Terça, 26 de Outubro de 2021 às 2:37'.

That's the why 'Saíubro'.

The hash order changed since Perl Version 5.8.0. I think the issue produced then.

youpong commented 1 year ago

It is October(Outubro) again. We can see if the problem can be reproduced. And I think we can close the issue.