Calendar localization
Description
Environment
Attachments
QAlity Plus - Test Management
Checklists
Activity
Tested and found Translations in the calendar widget are working properly. Tested on Chrome Latest on Mac using test.openlmis.org user 'srmanager2'. French strings and English are appearing there in Requisitions > View and in Stock Management > Adjustments (record and adjustment and set a date). Screenshots attached.
Moving to Done.
@Brandon Bowersox-Johnson
I've troubleshot the ticket – somehow the translations disappeared and were not entered in OpenLMIS
When test.openlmis.org reboots, the testing criteria should be met
I just tried to QA test this on test.openlmis.org, and the calendar widget only showed English strings (not French). Tested on Chrome latest with a fresh browser window.
Passing back to Nick for troubleshooting.
@Paweł Gesek, you bring up a great point about RTL and start of week data.
Glancing at Transifex:
There is support for declaring a language as RTL (even though it seems associated with Transifex Live)
No support for setting the start of week in Transifex
I do think we need to have configuration wide settings for these properties. If we respect setting the start of the week, we should set it universally through all components in the application – and have a clear place for other implementers to change and update that setting.
Currently, we don't really support localization beyond one language – AND we don't have an implementation that uses more than one language (yet)
We don't have completely translated UIs for any language other than english. Supporting translation was part of this ticket – actually translating was not part of this ticket.
Here are two new tickets to capture these side issues, and we will get to them when we can
https://openlmis.atlassian.net/browse/OLMIS-2975#icft=OLMIS-2975
https://openlmis.atlassian.net/browse/OLMIS-2976#icft=OLMIS-2976
I am moving this ticket back to done
CC @Brandon Bowersox-Johnson
@Nick Reid @Brandon Bowersox-Johnson Generally I am getting at that it's easier to maintain to just put the whole js file on transifex, instead of having over 40 strings in transifex and 2 config variables.
If I would want to implement a polish deployment of OpenLMIS I would rather just take https://github.com/smalot/bootstrap-datetimepicker/blob/master/js/locales/bootstrap-datetimepicker.pl.js and put it under a transifex key, rather than translate 46 strings on transifex (even if it is a copy/paste job). But it's not really something I'm really willing to fight for - so we can just put all of this on Transifex if you think that's easier.
I am fine about doing separate tickets for the additional options, not sure about making the week start as a config var though - this is something that changes per locale. For example, people with English(US) locale should see it start at Sunday, people with French at Monday. This seems more like a transifex variable. I was thinking only about how you show the datepicker to the user (that's what they wanted in past OpenLMIS implementations) - wasn't thinking about any logical implications on the backend (don't think we have any currently).
So all that remains to be done n this ticket is the translation work for the languages we have - if we agree on that, I can put the strings there.
Time Assistant
Open Time Assistant
Time Assistant

Calendar labels should always be displayed in language selected by user. This was a reason we adopted AngularStrap as our calendar solution, but the language in the date grid is not changing when the user changes their language.
AngularStrap says they support i18n by using angular's $locale service, which is mostly undocumented (or non-functional)
To change the days of the week and month, we need to insert translated strings here
Additionally, there are hardcoded english strings in AngularStrap's template
If we can't figure out how to fix Angular-Strap's non-translated strings, we should switch the datepicker to use bootstrap-datepicker, which has well documented i18n support here
Acceptance Criteria
For any datepicker, if the language is changed, the names of the days of the week and months should also change