sfsam / Itsycal

Itsycal is a tiny calendar for your Mac's menu bar. http://www.mowglii.com/itsycal
MIT License
3.3k stars 235 forks source link

Russian localization doesn't work on macOS 10.13 #71

Closed sfsam closed 6 years ago

sfsam commented 6 years ago

Itsycal doesn't localize properly when the preferred language in System Preferences > Language & Region is set to Russian on macOS 10.13. It works properly on macOS 10.12.

sfsam commented 6 years ago

Upon further inspection, this bug affects any language for which an explicit localization is not provided. Currently Itsycal localizes its UI strings in English, French, German, Italian, Simplified Chinese, and Spanish.

Prior to 10.13, the macOS Foundation API (NSDateFormatter) would localize dates and times according to the user's locale as set in System Preferences. Whether or not the rest of the app was localized in that language didn't matter. Users in Russia or Japan, for instance, would get the calendar localized in their language even though Itsycal doesn't localize the rest of the app in Russian or Japanese.

In 10.13, macOS Foundation inexplicably no longer localizes dates and times unless it finds strings files for the current locale. As a temporary "fix" for this issue, I can provide empty strings files for Russian or Japanese to trick the system into thinking it is fully localized in that language. The real fix would be for macOS 10.13 to behave like all previous versions of macOS. I've filed a bug report with Apple.

For what it's worth, you can also see this behavior in the amazing Mac app Fantastical 2. This app isn't localized localized in Russian. On 10.12, it still draws its calendar in Russian. On 10.13, it doesn't.

sfsam commented 6 years ago

This was fixed in Itsycal with a hack in 0.11.8, but the underlying issue still exists in macOS High Sierra.