Continuing the discussion from Date in digest emails are not localised :
This is one of those cases where I think the existence of the question implies deeper problems.
Omit Needless Words, right? So I am changing it to:
subject_template: "[%{site_name}] Digest"
Simpler, and no more date localization problem…
There is still a date localisation problem in the actual digest message body where at the start of the digest it says "A brief summary of “[%{site_name}] since your last visit on mm-dd-year”.
This date format can be very confusing for our members who are mainly based in the UK.
If it could be localised or alternatively a full textual representation of the month used it would be appreciated.
1 个赞
gerhard
(Gerhard Schlager)
2015 年10 月 27 日 23:11
2
That date is currently not translatable in Transifex. I submitted a fix for it some time ago…
master ← gschlager:locale-keys
merged 06:40PM - 02 Nov 15 UTC
This PR contains 3 related commits:
- A few subtle changes to the locale files i… n order to remove duplicate keys. Ruby's `I18n` and Transifex can't merge duplicates; they use only the value from the last occurrence. After this change it's possible to translate date formats (e.g. used in the digest emails) that were not available in Transifex up until now.
- A spec that fails if it finds duplicate keys in any of the English locale files. It adds a class to the `lib` folder that is reused by the `pull_translations.rb` script. I wasn't sure where to put it, so I hope that's fine.
- Adds support for YAML anchors (e.g. `&datetime`) and aliases (e.g. `<<: *datetime`) to the `pull_translations.rb` script. The English locale files use aliases and anchors in order to prevent duplicate translations. Transifex doesn't support them. The script finds those aliases and anchors in the original locale files and adds them to the locale files pulled from Transifex.
3 个赞
I think there were problems with that commit as I recall, which is why it hasn’t been merged.
@techapj can we change the digest default text so it uses a more universal date format? Maybe something like
Since your last visit on August 23rd
where the year is optional if it was in the current calendar yar.
1 个赞
gerhard
(Gerhard Schlager)
2015 年10 月 27 日 23:19
4
Well, the date format should take the user’s locale into account, anything else is just a hack.
My PR worked perfectly fine in my dev environment. I haven’t been told about any problems, but if there are some, I’ll try to fix them.
3 个赞
techAPJ
(Arpit Jalan)
2015 年10 月 28 日 16:50
5
Done via:
committed 04:48PM - 28 Oct 15 UTC
Will switch to localized date again once @gerhard ’s PR is merged.
4 个赞
eviltrout
(Robin Ward)
2015 年11 月 2 日 18:40
6
I’ve merged in the PR from @gerhard now!
3 个赞
A huge thank you for making this change. It is a great improvement! …on this occasion the like button just didn’t seem enough!
4 个赞
This seems to have reverted back. I’m once again getting digests which are saying: A brief summary of XXXXXX Forum since your last visit on mm-dd-yyyy
Seems like it happened during an update between the 26th of December and the 2nd of January.
2 个赞
Hmm I think you are right, @techapj can you check into this please?
3 个赞
techAPJ
(Arpit Jalan)
2016 年1 月 28 日 17:57
10
Okay, I made the date (with year ) in digest email universal
committed 05:45PM - 28 Jan 16 UTC
(and localized, thanks @gerhard !)
committed 06:08PM - 28 Jan 16 UTC
4 个赞