Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a czech language/translation #88

Open
kasparekmartin01 opened this issue Sep 29, 2023 · 4 comments
Open

adding a czech language/translation #88

kasparekmartin01 opened this issue Sep 29, 2023 · 4 comments

Comments

@kasparekmartin01
Copy link

Hello,

I'd like to ask for help with updating the code in the calendar. I have changed the code to have English, but now it shows all days marked instead of just the current day. The months are displayed correctly in Czech, but the event list shows "NaN, NaN" instead of the event date.

Here is the part of the code I edited:

[.formatDate(new Date(.$label.months[_.$active.month] +' 1 '+ _.$active.year), _.options.titleFormat, _.options.language);, I modified it to this: .formatDate(new Date((.$active.month + 1) + '/01/' + _.$active.year), _.options.titleFormat, _.options.language);]

Can you please advise me how to properly display the border again for the current date only ? Also, to display the color wheel of events correctly and not for every date. How to fix the problem with "NaN, NaN" on the event sheet?

Thank you for your help.

@kasparekmartin01
Copy link
Author

this is what the part of the code I changed looks like. 1/2 "EvoCalendar = (function() {
var instanceUid = 0;
function EvoCalendar(element, settings) {
var _ = this;
_.defaults = {
theme: "Midnight Blue",
format: 'MM/dd/yyyy',
titleFormat: 'MM yyyy',
eventHeaderFormat: 'MM d, yyyy',
firstDayOfWeek: 1,
language: 'cs',
todayHighlight: false,
sidebarDisplayDefault: true,
sidebarToggler: true,
eventDisplayDefault: true,
eventListToggler: true,
calendarEvents: null
};
_.options = $.extend({}, _.defaults, settings);

        _.initials = {
            default_class: $(element)[0].classList.value,
            validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,
            dates: {
                en: {
                    days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                    daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
                    daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
                    months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
                    monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
                    noEventForToday: "No event for today.. so take a rest! :)",
                    noEventForThisDay: "No event for this day.. so take a rest! :)",
                    previousYearText: "Previous year",
                    nextYearText: "Next year",
                    closeSidebarText: "Close sidebar",
                    closeEventListText: "Close event list"
                },
                cs: {
                    days: ["neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota"],
                    daysShort: ["ne", "po", "út", "st", "čt", "pá", "so"],
                    daysMin: ["ne", "po", "út", "st", "čt", "pá", "so"],
                    months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"],
                    monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čvn", "Čvc", "Srp", "Zář", "Říj", "Lis", "Pro"],
                    noEventForToday: "Pro dnešek žádná událost.. tak si odpočiňte! :)",
                    noEventForThisDay: "Pro tento den se nekoná žádná akce.. tak si odpočiňte! :)",
                    previousYearText: "Předchozí rok",
                    nextYearText: "Nadcházející rok",
                    closeSidebarText: "Zavřít postranní panel",
                    closeEventListText: "Zavřít seznam událostí"
                },"

@kasparekmartin01
Copy link
Author

2/2 "EvoCalendar.prototype.buildCalendar = function() {
var _ = this, markup, title;

    _.calculateDays();

    title = _.formatDate(new Date((_.$active.month + 1) + '/01/' + _.$active.year), _.options.titleFormat, _.options.language);
    _.$elements.innerEl.find('.calendar-table th').text(title);

    _.$elements.innerEl.find('.calendar-body').remove(); // Clear days"

@kasparekmartin01 kasparekmartin01 changed the title adding a new language/translation adding a czech language/translation Sep 29, 2023
@kasparekmartin01
Copy link
Author

image

@avinashtare
Copy link

_.calculateDays();

title = _.formatDate(new Date((_.$active.month + 1) + '/01/' + _.$active.year), _.options.titleFormat, _.options.language);
_.$elements.innerEl.find('.calendar-table th').text(title);

_.$elements.innerEl.find('.calendar-body').remove(); // Clear days"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants