Closed (fixed)
Project:
Timeago
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2011 at 09:57 UTC
Updated:
16 Dec 2011 at 04:30 UTC
The translation option is not sufficient for proper time localization. The option of downloading language files works best but we needed a way to switch the file as per the current language.
Patch attached, please comment.
| Comment | File | Size | Author |
|---|---|---|---|
| timeago.module.patch | 713 bytes | josepvalls |
Comments
Comment #1
icecreamyou commentedI like the idea of looking for language files to include, but I'm not going to bundle them with the module because I can't possibly maintain them (since I don't know any languages other than English and some Spanish and a little Hebrew). So they would need to be treated as library files, i.e. stored in sites/all/libraries.
Also new features need to be written for the D7 branch first and then backported.
No need to have a separate base language file, just loading a language-specific file after the existing timeago.js file will override the language settings. Also, there needs to be a space between "if" and the parentheses, and "else" should be on its own line, and there should be a space between the concatenation operator (.) and the variable ($language->language). (In Drupal 7 there should be a space between the concatenation operator and strings as well.)
Comment #2
icecreamyou commentedCommitted patch to 7.x-2.x-dev. Needs backport to 6.x-2.x.
Comment #3
icecreamyou commentedCommitted backport to 6.x-2.x-dev.