On Wed, Feb 11, 2015 at 06:18:02PM +0100, Ancor Gonzalez Sosa wrote:
While writing the YaST Journal module I faced a problem I'm not sure how to solve. I wanted to format a date here: https://github.com/ancorgs/yast-journal/blob/master/src/lib/systemd_journal/...
I wanted to mimic the format used by journalctl itself, which in plain English would be "%b %d %H:%M:%S". The problem is that using %b is not i18n-friendly. Obviously the problem goes further, like those crazy US people writing Feb. 1st as 02/01/2015. :-)
In Rails the i18n gem is used. It offers an "localize" method that deals with date formatting http://www.rubydoc.info/github/svenfuchs/i18n/master/I18n/Backend/Base:local...
But I don't know how to do it in YaST or if I'm the first one facing the problem.
No, you are not the first one - I had a bug for SLES 12 (bsc
#878613) where the weekday was not translated. Since Ruby is
stuck in the last millennium concerning localization the simply
solution was to use the ISO format (which does not require
translations).
ciao Arvin
--
Arvin Schnell,