mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #33661 -- Corrected Catalan date-format localization.
Changed DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT to use E placeholder (Month, locale specific alternative) to handle both “de gener” and contracted “d’abril” cases. Thanks to Ferran Jovell for review.
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -1071,51 +1071,51 @@ msgstr "Des." | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "January" | ||||
| msgstr "gener" | ||||
| msgstr "de gener" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "February" | ||||
| msgstr "febrer" | ||||
| msgstr "de febrer" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "March" | ||||
| msgstr "març" | ||||
| msgstr "de març" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "April" | ||||
| msgstr "abril" | ||||
| msgstr "d'abril" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "May" | ||||
| msgstr "maig" | ||||
| msgstr "de maig" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "June" | ||||
| msgstr "juny" | ||||
| msgstr "de juny" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "July" | ||||
| msgstr "juliol" | ||||
| msgstr "de juliol" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "August" | ||||
| msgstr "agost" | ||||
| msgstr "d'agost" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "September" | ||||
| msgstr "setembre" | ||||
| msgstr "de setembre" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "October" | ||||
| msgstr "octubre" | ||||
| msgstr "d'octubre" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "November" | ||||
| msgstr "novembre" | ||||
| msgstr "de novembre" | ||||
|  | ||||
| msgctxt "alt. month" | ||||
| msgid "December" | ||||
| msgstr "desembre" | ||||
| msgstr "de desembre" | ||||
|  | ||||
| msgid "This is not a valid IPv6 address." | ||||
| msgstr "Aquesta no és una adreça IPv6 vàlida." | ||||
|   | ||||
| @@ -2,11 +2,11 @@ | ||||
| # | ||||
| # The *_FORMAT strings use the Django date format syntax, | ||||
| # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date | ||||
| DATE_FORMAT = r"j \d\e F \d\e Y" | ||||
| DATE_FORMAT = r"j E \d\e Y" | ||||
| TIME_FORMAT = "G:i" | ||||
| DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\e\s G:i" | ||||
| DATETIME_FORMAT = r"j E \d\e Y \a \l\e\s G:i" | ||||
| YEAR_MONTH_FORMAT = r"F \d\e\l Y" | ||||
| MONTH_DAY_FORMAT = r"j \d\e F" | ||||
| MONTH_DAY_FORMAT = r"j E" | ||||
| SHORT_DATE_FORMAT = "d/m/Y" | ||||
| SHORT_DATETIME_FORMAT = "d/m/Y G:i" | ||||
| FIRST_DAY_OF_WEEK = 1  # Monday | ||||
|   | ||||
| @@ -865,11 +865,14 @@ class FormattingTests(SimpleTestCase): | ||||
|         self.maxDiff = 3000 | ||||
|         # Catalan locale | ||||
|         with translation.override("ca", deactivate=True): | ||||
|             self.assertEqual(r"j \d\e F \d\e Y", get_format("DATE_FORMAT")) | ||||
|             self.assertEqual(r"j E \d\e Y", get_format("DATE_FORMAT")) | ||||
|             self.assertEqual(1, get_format("FIRST_DAY_OF_WEEK")) | ||||
|             self.assertEqual(",", get_format("DECIMAL_SEPARATOR")) | ||||
|             self.assertEqual("10:15", time_format(self.t)) | ||||
|             self.assertEqual("31 de desembre de 2009", date_format(self.d)) | ||||
|             self.assertEqual( | ||||
|                 "1 d'abril de 2009", date_format(datetime.date(2009, 4, 1)) | ||||
|             ) | ||||
|             self.assertEqual( | ||||
|                 "desembre del 2009", date_format(self.d, "YEAR_MONTH_FORMAT") | ||||
|             ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user