Fixed I18n::Backend::Base.localize to return the correct date format for %p #147

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@alakra
alakra commented Apr 26, 2012

This translates %p into the upper-cased abbreviated meridia, 'PM' and 'AM' not 'pm' and 'am'.
If a case needs to be added for %P, let me know and I will add that in.

@alakra alakra Fixed I18n::Backend::Base.localize to return the correct date format …
…case when translating %p into the abbreviated meridian ('PM' and 'AM' not 'pm' and 'am')
bf144bf
@knapo
Collaborator
knapo commented Nov 25, 2012

I guess that you're trying to change wrong thing. As I see you want to change translation keys to be upper-cased, what's not a desired behaviour (convention is that all translation keys are lower-cased). I understand that Time#strftime supports both %p and %P (IMO - in not a intuitive way, as %P is lower-cased and %p upper-cased ), but...it doesn't need to care about other languages. Note, that in other languages meridian indicators might be regular words or abbrev not supposed to be lower/upper-cased. I don't think that it should be supported by i18n, but strictly defined in translation values. Also, in my opinion - most apps uses only one form - to be consistent.

@knapo knapo closed this Nov 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment