This adds the Ablillity to translate the Content of the Date Picker. It is possible to display more than one Letter for the Day Captions.
Details
- Reviewers
speck - Group Reviewers
O1: Blessed Committers - Commits
- rPb293e6ffed0d: Make Datepicker translatable
- Change the Language in the User Preferences, make sure it translates 'S|M|T|W|T|F|S' and Months or add the following to the translation.override config to get German Translation:
{ 'S|M|T|W|T|F|S': 'So|Mo|Di|Mi|Do|Fr|Sa', 'January': 'Januar', 'February': 'Februar', 'March': 'März', 'May': 'Mai', 'June': 'Juni', 'July': 'Juli', 'October': 'Oktober', 'December': 'Dezember' }
- Open Datepicker on a Datefield (Edit Event or Edit for Custom Field of Type date)
- The Day Headers and the Months should now be translated
Diff Detail
- Repository
- rP Phorge
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I think it is complete for Review. But: What ist the Plan for new Features? Or Plans for Prototype Applications? I see they are disabled in this install and there is no Calendar Project. If the Priority is to get Phorge rebrand and related Things done first, this diff can safely lay around until Things are sorted.
webroot/rsrc/js/core/behavior-fancy-datepicker.js | ||
---|---|---|
338 | This assumes that all the day abbreviations will be the same length. Would it be cleaner to use strings like "S|M|T|W|T|F|S" and "So|Mo|Di|Mi|Do|Fr|Sa" instead, which are easily split into an array? That way there's no need to do any manual substring extraction. |
webroot/rsrc/js/core/behavior-fancy-datepicker.js | ||
---|---|---|
338 | This seems like a much saner approach to me too. This would also allow for strings with different lengths, which could be interesting for disambiguation. Something like this "S|M|T|W|TH|F|S" if wanted. It seems that across the Phorge repo there's no other scenario in which this is use, so it should have no side effects. So this would be setting a precedent for changes to follow. |
webroot/rsrc/js/core/behavior-fancy-datepicker.js | ||
---|---|---|
338 | Will take a look at it |
- Merge branch 'master' into arcpatch-D25016
- Use Pipesymbol for splitting Day Abbreviation String
webroot/rsrc/js/core/behavior-fancy-datepicker.js | ||
---|---|---|
337 | This should be able to use weekdays.length again |
webroot/rsrc/js/core/behavior-fancy-datepicker.js | ||
---|---|---|
337 | Yes, but only for readabillity. Providing Stings wich do not split into 7 Parts will produce garbage anyways. |
Thank you! This looks good and the translation stuff you used here answers some questions for me about how to get translated text into the front-end, something that has come up in D25015. I'll try to get this landed shortly.