question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some locales have missing or incorrect translations

See original GitHub issue

I am using scheduler in an Angular application and I have these issues with locales:

  1. Serbian, serbian cyrillic, bosnian, croatian, macedonian and many other locales do not have a translation for a year
  2. Bosnian and macedonian locales have bad month names, like M03, M04…
  3. Serbian locale has header translated in latin, with month and day names in serbian cyrillic
  4. Montenegrin locale with ‘me’ key is missing in locales. It should be created as me.js like this:
(function(global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined'
    ? (module.exports = factory())
    : typeof define === 'function' && define.amd
    ? define(factory)
    : ((global = global || self),
      ((global.FullCalendarLocales = global.FullCalendarLocales || {}), (global.FullCalendarLocales.me = factory())));
})(this, function() {
  'use strict';

  var me = {
    code: 'me',
    week: {
      dow: 1,
      doy: 7 // The week that contains Jan 1st is the first week of the year.
    },
    buttonText: {
      prev: 'Prethodni',
      next: 'Sljedeći',
      today: 'Danas',
      month: 'Mjеsеc',
      year: 'Godina',
      week: 'Sedmica',
      day: 'Dan',
      list: 'Planеr'
    },
    weekLabel: 'Sed',
    allDayText: 'Cijeli dan',
    eventLimitText: function(n) {
      return '+ još ' + n;
    },
    noEventsMessage: 'Nеma događaja za prikaz'
  };

  return me;
});

Adding new language only translates the buttons in the header of the scheduler. Month names and day names all render in default english. How and where do I translate these, without external libraries like moment.js and luxon?

How do I translate a custom button’s text that’s added to the header?

According to Release notes, a date-formatting plugin or function should be used instead. This page is pretty confusing, without any useful information on how to solve my issue. It only shows info on formatting, but no info on translating.

Where are current day and month names stored internally for the existing locales, mentioned as 1. above?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
micobaraccommented, Mar 14, 2019

If I add a custom button to the header, how do I localize it?

    customButtons: {
      resource: {
        text: 'resource',
        click: (info: any) => {
          console.log(info);
        }
      }
    }

I’ve tried adding the translation into a locale file:

    buttonText: {
      prev: 'Prethodni',
      next: 'Sledeći',
      today: 'Danas',
      month: 'Mеsеc',
      year: 'Godina',
      week: 'Sedmica',
      day: 'Dan',
      list: 'Planеr',
      resource: 'Resurs'
    },

but, it doesn’t work 😦.

1reaction
micobaraccommented, Mar 13, 2019

However, those translations are incomplete / faulty for the locales I have mentioned above, which makes localization of Fullcalendar messy thing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix the Shopify translation missing in your store
Luckily, 'translation missing' errors are easy to fix. 1. Go to your languages panel in the Shopify admin. Login to your Shopify Admin...
Read more >
8 translation errors and how to solve them - Weglot
#1 Missing translations​​ Firstly, it looks messy having certain content translated and other words/ phrases or pages left in the original ...
Read more >
Rails: Remove missing translation errors - Stack Overflow
With locale as fr everything works good, but with en it shows me error as missing translation span. For eg if I have...
Read more >
“langs” folder missing in v5.9.7 - WordPress.org
This was a conscious decision because that folder hasn't been updated in years, and all the language files were copied over to the...
Read more >
Localizing help center content - Zendesk help
Any translated article must also have parent pages (section and ... and its translated versions share the same URL except for the locale....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found