You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LDML has defined an intervalFormats for locale-aware interval formatting since UTS#35 revision 10. Since Babel has added support for formatting durations (timedeltas) it would be convenient to support intervals as well.
@sils1297 is there documentation for the current content of locale dat files (and/or the mapping between the CLDR and locale dat files) aside from the import script and localedata.py? I tried looking quickly if the interval formats were currently parsed/stored but that doesn't seem to be the case so it looks like this issue would require alterations to the CLDR import script, that correct?
@xmo-odoo sorry, I'm not that much into this and can't help you without more time effort. Try asking on gitter, @etanol usually knows his way around :)
@xmo-odoo Yes, the import script does not process all the locale features described in CLDR. So, whenever we need to implement new functionality from the XML files, we change the import script first.
The .dat files are just pickle files. There is no formal documentation because those files are tightly coupled to the package and not intended to be exchanged or reused across releases. This also allow us to change their format whenever we need it.
Therefore, if you would like to implement new functionality, the first step is always to modify the CLDR import script as desired in an independent commit. Then, change the affected module based on the changes to the .dat files.
it also requires extracting parts of parse_pattern to get and split fields sequences, not sure whether DateTimePattern should be changed to have more semantic content or some other intermediate structure should be extracted (and compiled into a DateTimePattern)
For what it's worth, @xmo-odoo, it looks like closest-match resolution might not be needed for an MVP (though I'll look at implementing that too). The skeletons provided by CLDR 28 at present seem to be fairly homogeneous, aside from a couple outliers (at the bottom).
Activity
sils commentedon Oct 14, 2015
@xmo-odoo thanks for proposing this, we're happy to accept pull requests, probably no time to do this soon on our own.
xmo-odoo commentedon Oct 14, 2015
@sils1297 is there documentation for the current content of locale dat files (and/or the mapping between the CLDR and locale dat files) aside from the import script and localedata.py? I tried looking quickly if the interval formats were currently parsed/stored but that doesn't seem to be the case so it looks like this issue would require alterations to the CLDR import script, that correct?
sils commentedon Oct 14, 2015
@xmo-odoo sorry, I'm not that much into this and can't help you without more time effort. Try asking on gitter, @etanol usually knows his way around :)
etanol commentedon Oct 14, 2015
@xmo-odoo Yes, the import script does not process all the locale features described in CLDR. So, whenever we need to implement new functionality from the XML files, we change the import script first.
The
.datfiles are justpicklefiles. There is no formal documentation because those files are tightly coupled to the package and not intended to be exchanged or reused across releases. This also allow us to change their format whenever we need it.Therefore, if you would like to implement new functionality, the first step is always to modify the CLDR import script as desired in an independent commit. Then, change the affected module based on the changes to the
.datfiles.xmo-odoo commentedon Oct 15, 2015
Thanks @etanol
After more spec-reading to see if I could implement it quickly, it looks like this requires way more work than I'd originally expected:
parse_patternto get and split fields sequences, not sure whether DateTimePattern should be changed to have more semantic content or some other intermediate structure should be extracted (and compiled into a DateTimePattern)akx commentedon Jan 3, 2016
I'll take a look at this. :)
akx commentedon Jan 3, 2016
For what it's worth, @xmo-odoo, it looks like closest-match resolution might not be needed for an MVP (though I'll look at implementing that too). The skeletons provided by CLDR 28 at present seem to be fairly homogeneous, aside from a couple outliers (at the bottom).
CLDR: Import interval format data
dates: Add initial implementation of format_interval
CLDR: Import interval format data
dates: Add basic format_interval implementation
CLDR: Import interval format data
dates: Add basic format_interval implementation
CLDR: Import interval format data
dates: Add basic format_interval implementation
dates: Add basic format_interval implementation
dates: Add basic format_interval implementation
CLDR: Import interval format data
dates: Add basic format_interval implementation
CLDR: Import interval format data
dates: Add basic format_interval implementation
dates: Add basic format_interval implementation