Ticket #1671 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

i18n_checktimelength may vary depending on the season

Reported by: sfionov Owned by: zaytsev
Priority: major Milestone: 4.7.2
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master committed-stable

Description (last modified by andrew_b) (diff)

On some systems i18n_checktimelength may vary not only depending on locale but also on the current month.
For example, with Russian locale on Solaris, 9th month %b is "сент.", 10th month is "окт.".
So, this function returns 14 in September, and 13 in October. September dates are cut in October, and "ент." is displayed.

Attachments

i18n-checktimelength.patch (1.3 KB) - added by sfionov 14 years ago.
Cycle around all months to determine maximum time string length.

Change History

Changed 14 years ago by sfionov

Cycle around all months to determine maximum time string length.

comment:1 Changed 14 years ago by sfionov

Just to clarify, width of "MTime" column is i18n_checktimelength result.

comment:2 Changed 14 years ago by zaytsev

  • Status changed from new to accepted
  • Owner set to zaytsev
  • Version changed from 4.7.0-pre3 to master
  • severity changed from no branch to on review

Branch: 1671_i18n_checktimelength (parent: master)
Changeset: 28eda668032a73e2a433d84b23b8e2a92d04663f

Please review and vote! With the regards to cache, I am not sure about the obscure corner cases e.g. whether the value of str_term_width1 is still valid when the terminal encoding has been modified on fly (I think it still is).

Thanks!

comment:3 Changed 14 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Description modified (diff)
  • Milestone changed from 4.7 to 4.7.2

comment:4 Changed 14 years ago by sfionov

Works as expected on OpenSolaris?.

Current month string is "мая" (3 chars length), and March and September dates - "марта" and "сент." (5 chars length) are not being cut anymore.

comment:5 Changed 14 years ago by zaytsev

Can I get a last vote from some terminal expert (Ilya, Slava?) and merge / backport this before release?

comment:6 Changed 14 years ago by slavazanko

  • Keywords stable-candidate added
  • Votes for changeset changed from andrew_b to andrew_b slavazanko
  • severity changed from on review to approved

comment:7 Changed 14 years ago by zaytsev

  • Status changed from accepted to testing
  • Keywords stable-candidate removed
  • Votes for changeset changed from andrew_b slavazanko to committed-master committed-stable
  • Resolution set to fixed
  • severity changed from approved to merged

Committed to master. Merge changeset: 66ff9186247a3ecd7fb28204a932778b97cccc2c.
Cherry-picked to 4.7.0-stable, changeset: 03ab9342f366d8bd723c75dab649c9519da49688.

comment:8 Changed 14 years ago by slavazanko

Please, don't forgot about NEWS-4.7.2 and NEWS-4.7.0.5...

comment:9 Changed 14 years ago by zaytsev

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.