calendar Preparing for genitive/nominative months

glibc 2.27 introduced new format specifiers for the month names.
It's obligatory to use them in several languages already and it's
encouraged to use them for all languages because it is not destructive
for any language. As more languages are expected to follow this
standard it's better to use the "%OB" format specifier now so it will
start working correctly automatically.
See also: https://sourceware.org/bugzilla/show_bug.cgi?id=10871

This standard has been also working in BSD and OS X since 1990s,
if anyone tries to use gnome-shell in these systems.

Note: This will not work correctly with glibc < 2.27, there is no
detection whether the system is old or new.

https://bugzilla.gnome.org/show_bug.cgi?id=780957
This commit is contained in:
Rafal Luzynski 2018-02-08 12:47:26 +01:00
parent 9dbe10889b
commit a647445b95

View File

@ -376,15 +376,20 @@ var Calendar = new Lang.Class({
/** /**
* Translators: The header displaying just the month name * Translators: The header displaying just the month name
* standalone, when this is a month of the current year. * standalone, when this is a month of the current year.
* "%OB" is the new format specifier introduced in glibc 2.27,
* in most cases you should not change it.
*/ */
this._headerFormatWithoutYear = _('%B'); this._headerFormatWithoutYear = _('%OB');
/** /**
* Translators: The header displaying the month name and the year * Translators: The header displaying the month name and the year
* number, when this is a month of a different year. You can * number, when this is a month of a different year. You can
* reorder the format specifiers or add other modifications * reorder the format specifiers or add other modifications
* according to the requirements of your language. * according to the requirements of your language.
* "%OB" is the new format specifier introduced in glibc 2.27,
* in most cases you should not use the old "%B" here unless you
* absolutely know what you are doing.
*/ */
this._headerFormat = _('%B %Y'); this._headerFormat = _('%OB %Y');
// Start off with the current date // Start off with the current date
this._selectedDate = new Date(); this._selectedDate = new Date();