craigk5n / webcalendar

WebCalendar is a PHP application used to maintain a calendar for a single user or an intranet group of users. It can also be configured as an event calendar.
http://www.k5n.us/webcalendar.php
GNU General Public License v2.0
148 stars 70 forks source link

example of chaining elvis #427

Closed bbannon closed 4 months ago

bbannon commented 9 months ago

This is supposed to select the first that isset(), ! empty() and ! is_null()

see https://stackoverflow.com/questions/34571330/php-short-ternary-elvis-operator-vs-null-coalescing-operator

craigk5n commented 7 months ago

Why are we adding a "en-US.txt" translation file when we already have a "English-US.txt" file?

bbannon commented 7 months ago

I'm looking to make all translations/*.txt files into the 'navigator.language' names like captcha, ckeditor and phpmailer use. It would make it easier to copy just the 1 or 2 language files that the user needs. Eventually.

craigk5n commented 7 months ago

It's interesting, but I think I'll keep including all or most of the translations in the normal release. This is because the language is supposed to be picked up through the browser, which means that your website supports foreign languages (except for event information). However, we could consider creating a release builder that would allow users to select the languages they want to include. I'm just not sure where it would be hosted.

bbannon commented 7 months ago

Could we figure out a checkbox sort of thing in the installer? Let them choose which languages to download. Javascript 'navigator.languages', notice the plural, is an array of all languages the user has set up.

bbannon commented 7 months ago

Also, renaming the *.txt files would eliminate the functions to convert from 2 letter to full names

bbannon commented 7 months ago

Craig, I think if you delete Elven.txt from your side of this, we could both merge it in.

craigk5n commented 7 months ago

I'm not sold on renaming the translation files just yet. In any case, that change should be a separate PR.

bbannon commented 7 months ago

This won't let me 'resolve conflicts'. Can you merge it, if you like the 'chasing Elvis' part? Then delete the *.txt files. Or just close it.