From 4ef077c593de06e94694db9d65b6545ba43885d7 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Sun, 4 Dec 2005 13:48:50 +0000 Subject: [PATCH] fixes #989 - new 'no' translations for JavaScript git-svn-id: http://code.djangoproject.com/svn/django/trunk@1534 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/conf/locale/no/LC_MESSAGES/djangojs.mo | Bin 0 -> 772 bytes django/conf/locale/no/LC_MESSAGES/djangojs.po | 63 ++++++++++++++++++ django/core/db/backends/ado_mssql.py | 6 ++ django/core/db/backends/mysql.py | 6 ++ django/core/db/backends/postgresql.py | 6 ++ django/core/db/backends/sqlite3.py | 6 ++ django/core/meta/fields.py | 6 +- 7 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 django/conf/locale/no/LC_MESSAGES/djangojs.mo create mode 100644 django/conf/locale/no/LC_MESSAGES/djangojs.po diff --git a/django/conf/locale/no/LC_MESSAGES/djangojs.mo b/django/conf/locale/no/LC_MESSAGES/djangojs.mo new file mode 100644 index 0000000000000000000000000000000000000000..96994068d9ee191125b7b6160118d47520b30ac6 GIT binary patch literal 772 zcmYL`OK;Oa5P%mbF9QeQ%3--7RU7Q|p~#e~#&L@k+llg$+5^(oo;oJZZnWOCMB;Do z6ME#tm0NxU7t|9c4xG3mF`HWINHgEe&SS^kt7jWu2+CvB7pR|6pQ8RmH9~I@au4|u z`2hKimZ~pCKRO`3$*(dVy;Czuvx{{|#yG`;L5$ zT-EUpq^Y~A`3q_0|E}XdNVDHxr0M^M#L?@!5ad3p={I8XkJjGxu2{MjGtc}7BW9Lm zoL$Nrvj*{b2_oYP9g#vw{E3tmP)>C*1LBu5oszi7M3GN4Nu(5LF33=3e2I1@mBR2C zDhq+O+K*<}{hTO`R=wtGQ`AwvC0X59fs$Ue_H5UZ2HX*7oT8t{aD&C*35l zB3@}WR9sXg*HXFka1=!}@#28)1+f=K2VT3~4+evMEEV~J=fH-*XD*Gr(^?^|&g2R9$(G;GV4LW96NmUCQI!zcZEUh+b`q3MLH3iR8BK4Yz$IDrR zW`)RI+Bz+?MVwZ{wn=CG6rhNAeyWz5jG@daXgV$BbP81oT9eM&C(Uis;53a*R+l8C R8PCz;d*mR{$yb+({0DTQsc`@R literal 0 HcmV?d00001 diff --git a/django/conf/locale/no/LC_MESSAGES/djangojs.po b/django/conf/locale/no/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000000..1bb7bc7d84 --- /dev/null +++ b/django/conf/locale/no/LC_MESSAGES/djangojs.po @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-12-04 13:32+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45 +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80 +msgid "Now" +msgstr "Nå" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48 +msgid "Clock" +msgstr "Klokke" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77 +msgid "Choose a time" +msgstr "Velg et klokkeslett" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81 +msgid "Midnight" +msgstr "24.00" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82 +msgid "6 a.m." +msgstr "18.00" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83 +msgid "Noon" +msgstr "12.00" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87 +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168 +msgid "Cancel" +msgstr "Avbryt" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111 +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162 +msgid "Today" +msgstr "I dag" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114 +msgid "Calendar" +msgstr "Kalender" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160 +msgid "Yesterday" +msgstr "I går" + +#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164 +msgid "Tomorrow" +msgstr "I morgen" diff --git a/django/core/db/backends/ado_mssql.py b/django/core/db/backends/ado_mssql.py index bb5b628aca..b6b61d4129 100644 --- a/django/core/db/backends/ado_mssql.py +++ b/django/core/db/backends/ado_mssql.py @@ -132,6 +132,12 @@ OPERATOR_MAPPING = { 'endswith': 'LIKE %s', 'istartswith': 'LIKE %s', 'iendswith': 'LIKE %s', + 'notcontains': 'NOT LIKE %s', + 'notstartswith': 'NOT LIKE %s', + 'notendswith': 'NOT LIKE %s', + 'inotcontains': 'NOT LIKE %s', + 'inotstartswith': 'NOT LIKE %s', + 'inotendswith': 'NOT LIKE %s', } DATA_TYPES = { diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py index 0e31af13fc..8f9bfd26b3 100644 --- a/django/core/db/backends/mysql.py +++ b/django/core/db/backends/mysql.py @@ -146,6 +146,12 @@ OPERATOR_MAPPING = { 'endswith': 'LIKE BINARY %s', 'istartswith': 'LIKE %s', 'iendswith': 'LIKE %s', + 'notcontains': 'NOT LIKE BINARY %s', + 'notstartswith': 'NOT LIKE BINARY %s', + 'notendswith': 'NOT LIKE BINARY %s', + 'inotcontains': 'NOT LIKE %s', + 'inotstartswith': 'NOT LIKE %s', + 'inotendswith': 'NOT LIKE %s', } # This dictionary maps Field objects to their associated MySQL column diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py index c650660ad8..f62f7b3585 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -151,6 +151,12 @@ OPERATOR_MAPPING = { 'endswith': 'LIKE %s', 'istartswith': 'ILIKE %s', 'iendswith': 'ILIKE %s', + 'notcontains': 'NOT LIKE %s', + 'notstartswith': 'NOT LIKE %s', + 'notendswith': 'NOT LIKE %s', + 'inotcontains': 'NOT ILIKE %s', + 'inotstartswith': 'NOT ILIKE %s', + 'inotendswith': 'NOT ILIKE %s', } # This dictionary maps Field objects to their associated PostgreSQL column diff --git a/django/core/db/backends/sqlite3.py b/django/core/db/backends/sqlite3.py index 1a4a80d632..1ff74ea0e8 100644 --- a/django/core/db/backends/sqlite3.py +++ b/django/core/db/backends/sqlite3.py @@ -153,6 +153,12 @@ OPERATOR_MAPPING = { 'endswith': "LIKE %s ESCAPE '\\'", 'istartswith': "LIKE %s ESCAPE '\\'", 'iendswith': "LIKE %s ESCAPE '\\'", + 'notcontains': "NOT LIKE %s ESCAPE '\\'", + 'notstartswith': "NOT LIKE %s ESCAPE '\\'", + 'notendswith': "NOT LIKE %s ESCAPE '\\'", + 'inotcontains': "NOT LIKE %s ESCAPE '\\'", + 'inotstartswith': "NOT LIKE %s ESCAPE '\\'", + 'inotendswith': "NOT LIKE %s ESCAPE '\\'", } # SQLite doesn't actually support most of these types, but it "does the right diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py index c45c7b6e02..19f827c800 100644 --- a/django/core/meta/fields.py +++ b/django/core/meta/fields.py @@ -181,13 +181,13 @@ class Field(object): return value elif lookup_type == 'year': return ['%s-01-01' % value, '%s-12-31' % value] - elif lookup_type in ('contains', 'icontains'): + elif lookup_type in ('contains', 'icontains', 'notcontains', 'inotcontains'): return ["%%%s%%" % prep_for_like_query(value)] elif lookup_type == 'iexact': return [prep_for_like_query(value)] - elif lookup_type in ('startswith', 'istartswith'): + elif lookup_type in ('startswith', 'istartswith', 'notstartswith', 'inotstartswith'): return ["%s%%" % prep_for_like_query(value)] - elif lookup_type in ('endswith', 'iendswith'): + elif lookup_type in ('endswith', 'iendswith', 'notendswith', 'inotendswith'): return ["%%%s" % prep_for_like_query(value)] elif lookup_type == 'isnull': return []