khal icon indicating copy to clipboard operation
khal copied to clipboard

birthday localisation string?

Open sharethewisdom opened this issue 5 years ago • 2 comments

https://github.com/pimutils/khal/blob/fc5c2bfe8f8ea54e665d83d484f00cea0a6777c3/khal/khalendar/backend.py#L288

Could we add a lang option for calendars of type = birthdays, so that a localized string is used?

sharethewisdom avatar Mar 01 '19 09:03 sharethewisdom

Yes, but as there is no localisation in khal of any kind right now, so this would either be a special case or we would need to tackle localisation in general.

geier avatar Sep 12 '19 07:09 geier

Maybe allow users to specify format strings under [locale]? (I randomly chose one-letter specifiers)

[locale]
bdayformat = "%a's %nth birthday"
anniformat = "%a's %nth anniversary"
miscformat = "%nth %l"

where %l in miscformat could be X-ABLABEL (I don't really know how that's used).

I'm referring to

https://github.com/pimutils/khal/blob/6bf9c8e47b3831782d9341ace8ea18b2c78d4860/khal/khalendar/backend.py#L266-L267

where the description could be composed. Would an (english) default be set here?

https://github.com/pimutils/khal/blob/a6d7d62388d33459e85dfb5cf57a31c46f120769/khal/settings/utils.py#L192

sharethewisdom avatar Sep 14 '19 17:09 sharethewisdom