diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index d7c23d635..5a830ca53 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ +github: encode custom: https://fund.django-rest-framework.org/topics/funding/ diff --git a/.github/ISSUE_TEMPLATE/1-issue.md b/.github/ISSUE_TEMPLATE/1-issue.md new file mode 100644 index 000000000..0da154953 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-issue.md @@ -0,0 +1,10 @@ +--- +name: Issue +about: Please only raise an issue if you've been advised to do so after discussion. Thanks! 🙏 +--- + +## Checklist + +- [ ] Raised initially as discussion #... +- [ ] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages) where possible.) +- [ ] I have reduced the issue to the simplest possible case. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..382fc521a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +blank_issues_enabled: false +contact_links: +- name: Discussions + url: https://github.com/encode/django-rest-framework/discussions + about: > + The "Discussions" forum is where you want to start. 💖 diff --git a/.gitignore b/.gitignore index 41768084c..82e885ede 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ *.db *~ .* +*.py.bak + /site/ /htmlcov/ diff --git a/.travis.yml b/.travis.yml index a4a4ed8b5..f9f22336f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,36 @@ language: python cache: pip -dist: xenial +dist: bionic matrix: fast_finish: true include: - - { python: "3.5", env: DJANGO=1.11 } - - { python: "3.5", env: DJANGO=2.0 } - - { python: "3.5", env: DJANGO=2.1 } - { python: "3.5", env: DJANGO=2.2 } - - { python: "3.6", env: DJANGO=1.11 } - - { python: "3.6", env: DJANGO=2.0 } - - { python: "3.6", env: DJANGO=2.1 } - { python: "3.6", env: DJANGO=2.2 } - - { python: "3.6", env: DJANGO=master } + - { python: "3.6", env: DJANGO=3.0 } + - { python: "3.6", env: DJANGO=3.1 } + - { python: "3.6", env: DJANGO=3.2 } - - { python: "3.7", env: DJANGO=2.0 } - - { python: "3.7", env: DJANGO=2.1 } - { python: "3.7", env: DJANGO=2.2 } - - { python: "3.7", env: DJANGO=master } + - { python: "3.7", env: DJANGO=3.0 } + - { python: "3.7", env: DJANGO=3.1 } + - { python: "3.7", env: DJANGO=3.2 } - - { python: "3.7", env: TOXENV=base } - - { python: "3.7", env: TOXENV=lint } - - { python: "3.7", env: TOXENV=docs } + - { python: "3.8", env: DJANGO=3.0 } + - { python: "3.8", env: DJANGO=3.1 } + - { python: "3.8", env: DJANGO=3.2 } + - { python: "3.8", env: DJANGO=master } - - python: "3.7" + - { python: "3.9", env: DJANGO=3.1 } + - { python: "3.9", env: DJANGO=3.2 } + - { python: "3.9", env: DJANGO=master } + + - { python: "3.8", env: TOXENV=base } + - { python: "3.8", env: TOXENV=lint } + - { python: "3.8", env: TOXENV=docs } + + - python: "3.8" env: TOXENV=dist script: - python setup.py bdist_wheel @@ -35,9 +40,10 @@ matrix: allow_failures: - env: DJANGO=master + - env: DJANGO=3.2 install: - - pip install tox tox-venv tox-travis + - pip install tox tox-travis script: - tox diff --git a/.tx/config b/.tx/config new file mode 100644 index 000000000..e151a7e6f --- /dev/null +++ b/.tx/config @@ -0,0 +1,9 @@ +[main] +host = https://www.transifex.com +lang_map = sr@latin:sr_Latn, zh-Hans:zh_Hans, zh-Hant:zh_Hant + +[django-rest-framework.djangopo] +file_filter = rest_framework/locale//LC_MESSAGES/django.po +source_file = rest_framework/locale/en_US/LC_MESSAGES/django.po +source_lang = en_US +type = PO diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 566bf9543..000000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,14 +0,0 @@ -## Checklist - -- [ ] I have verified that that issue exists against the `master` branch of Django REST framework. -- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate. -- [ ] This is not a usage question. (Those should be directed to the [discussion group](https://groups.google.com/forum/#!forum/django-rest-framework) instead.) -- [ ] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages) where possible.) -- [ ] I have reduced the issue to the simplest possible case. -- [ ] I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.) - -## Steps to reproduce - -## Expected behavior - -## Actual behavior diff --git a/MANIFEST.in b/MANIFEST.in index 6f7cb8f13..262e3dc91 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include README.md include LICENSE.md +recursive-include tests/* * recursive-include rest_framework/static *.js *.css *.png *.ico *.eot *.svg *.ttf *.woff *.woff2 recursive-include rest_framework/templates *.html schema.js recursive-include rest_framework/locale *.mo diff --git a/README.md b/README.md index 13ad47aef..8af1466f8 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,11 @@ The initial aim is to provide a single full-time position on REST framework. [![][sentry-img]][sentry-url] [![][stream-img]][stream-url] [![][rollbar-img]][rollbar-url] -[![][cadre-img]][cadre-url] -[![][kloudless-img]][kloudless-url] [![][esg-img]][esg-url] -[![][lightson-img]][lightson-url] +[![][retool-img]][retool-url] +[![][bitio-img]][bitio-url] -Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Rollbar][rollbar-url], [Cadre][cadre-url], [Kloudless][kloudless-url], [ESG][esg-url], and [Lights On Software][lightson-url]. +Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Rollbar][rollbar-url], [ESG][esg-url], [Retool][retool-url], and [bit.io][bitio-url]. --- @@ -53,8 +52,8 @@ There is a live example API for testing purposes, [available here][sandbox]. # Requirements -* Python (3.5, 3.6, 3.7) -* Django (1.11, 2.0, 2.1, 2.2) +* Python (3.5, 3.6, 3.7, 3.8, 3.9) +* Django (2.2, 3.0, 3.1) We **highly recommend** and only officially support the latest patch release of each Python and Django series. @@ -88,7 +87,7 @@ Startup up a new project like so... Now edit the `example/urls.py` module in your project: ```python -from django.conf.urls import url, include +from django.urls import path, include from django.contrib.auth.models import User from rest_framework import serializers, viewsets, routers @@ -113,8 +112,8 @@ router.register(r'users', UserViewSet) # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ - url(r'^', include(router.urls)), - url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) + path('', include(router.urls)), + path('api-auth/', include('rest_framework.urls', namespace='rest_framework')) ] ``` @@ -190,23 +189,19 @@ Please see the [security policy][security-policy]. [funding]: https://fund.django-rest-framework.org/topics/funding/ [sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors -[rover-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rover-readme.png [sentry-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png [stream-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png [rollbar-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png -[cadre-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/cadre-readme.png -[load-impact-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/load-impact-readme.png -[kloudless-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/kloudless-readme.png [esg-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/esg-readme.png -[lightson-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/lightson-readme.png +[retool-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/retool-readme.png +[bitio-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/bitio-readme.png [sentry-url]: https://getsentry.com/welcome/ [stream-url]: https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf [rollbar-url]: https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial -[cadre-url]: https://cadre.com/ -[kloudless-url]: https://hubs.ly/H0f30Lf0 [esg-url]: https://software.esg-usa.com/ -[lightson-url]: https://lightsonsoftware.com +[retool-url]: https://retool.com/?utm_source=djangorest&utm_medium=sponsorship +[bitio-url]: https://bit.io/jobs?utm_source=DRF&utm_medium=sponsor&utm_campaign=DRF_sponsorship [oauth1-section]: https://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth [oauth2-section]: https://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index c4dbe8856..61687e642 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -60,8 +60,8 @@ using the `APIView` class-based views. def get(self, request, format=None): content = { - 'user': unicode(request.user), # `django.contrib.auth.User` instance. - 'auth': unicode(request.auth), # None + 'user': str(request.user), # `django.contrib.auth.User` instance. + 'auth': str(request.auth), # None } return Response(content) @@ -72,8 +72,8 @@ Or, if you're using the `@api_view` decorator with function based views. @permission_classes([IsAuthenticated]) def example_view(request, format=None): content = { - 'user': unicode(request.user), # `django.contrib.auth.User` instance. - 'auth': unicode(request.auth), # None + 'user': str(request.user), # `django.contrib.auth.User` instance. + 'auth': str(request.auth), # None } return Response(content) @@ -199,7 +199,7 @@ When using `TokenAuthentication`, you may want to provide a mechanism for client from rest_framework.authtoken import views urlpatterns += [ - url(r'^api-token-auth/', views.obtain_auth_token) + path('api-token-auth/', views.obtain_auth_token) ] Note that the URL part of the pattern can be whatever you want to use. @@ -238,7 +238,7 @@ For example, you may return additional user information beyond the `token` value And in your `urls.py`: urlpatterns += [ - url(r'^api-token-auth/', CustomAuthToken.as_view()) + path('api-token-auth/', CustomAuthToken.as_view()) ] @@ -304,7 +304,7 @@ If successfully authenticated, `RemoteUserAuthentication` provides the following Consult your web server's documentation for information about configuring an authentication method, e.g.: * [Apache Authentication How-To](https://httpd.apache.org/docs/2.4/howto/auth.html) -* [NGINX (Restricting Access)](https://www.nginx.com/resources/admin-guide/#restricting_access) +* [NGINX (Restricting Access)](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/) # Custom authentication @@ -357,7 +357,7 @@ The following third party packages are also available. ## Django OAuth Toolkit -The [Django OAuth Toolkit][django-oauth-toolkit] package provides OAuth 2.0 support and works with Python 3.4+. The package is maintained by [Evonove][evonove] and uses the excellent [OAuthLib][oauthlib]. The package is well documented, and well supported and is currently our **recommended package for OAuth 2.0 support**. +The [Django OAuth Toolkit][django-oauth-toolkit] package provides OAuth 2.0 support and works with Python 3.4+. The package is maintained by [jazzband][jazzband] and uses the excellent [OAuthLib][oauthlib]. The package is well documented, and well supported and is currently our **recommended package for OAuth 2.0 support**. #### Installation & configuration @@ -410,9 +410,15 @@ HTTP Signature (currently a [IETF draft][http-signature-ietf-draft]) provides a [Djoser][djoser] library provides a set of views to handle basic actions such as registration, login, logout, password reset and account activation. The package works with a custom user model and it uses token based authentication. This is a ready to use REST implementation of Django authentication system. -## django-rest-auth +## django-rest-auth / dj-rest-auth -[Django-rest-auth][django-rest-auth] library provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc. By having these API endpoints, your client apps such as AngularJS, iOS, Android, and others can communicate to your Django backend site independently via REST APIs for user management. +This library provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc. By having these API endpoints, your client apps such as AngularJS, iOS, Android, and others can communicate to your Django backend site independently via REST APIs for user management. + + +There are currently two forks of this project. + +* [Django-rest-auth][django-rest-auth] is the original project, [but is not currently receiving updates](https://github.com/Tivix/django-rest-auth/issues/568). +* [Dj-rest-auth][dj-rest-auth] is a newer fork of the project. ## django-rest-framework-social-oauth2 @@ -442,7 +448,7 @@ HTTP Signature (currently a [IETF draft][http-signature-ietf-draft]) provides a [djangorestframework-digestauth]: https://github.com/juanriaza/django-rest-framework-digestauth [oauth-1.0a]: https://oauth.net/core/1.0a/ [django-oauth-toolkit]: https://github.com/evonove/django-oauth-toolkit -[evonove]: https://github.com/evonove/ +[jazzband]: https://github.com/jazzband/ [oauthlib]: https://github.com/idan/oauthlib [djangorestframework-simplejwt]: https://github.com/davesque/django-rest-framework-simplejwt [etoccalino]: https://github.com/etoccalino/ @@ -456,6 +462,7 @@ HTTP Signature (currently a [IETF draft][http-signature-ietf-draft]) provides a [mac]: https://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05 [djoser]: https://github.com/sunscrapers/djoser [django-rest-auth]: https://github.com/Tivix/django-rest-auth +[dj-rest-auth]: https://github.com/jazzband/dj-rest-auth [django-rest-framework-social-oauth2]: https://github.com/PhilipGarnero/django-rest-framework-social-oauth2 [django-rest-knox]: https://github.com/James1345/django-rest-knox [drfpasswordless]: https://github.com/aaronn/django-rest-framework-passwordless diff --git a/docs/api-guide/caching.md b/docs/api-guide/caching.md index 502a0a9a9..96517b15e 100644 --- a/docs/api-guide/caching.md +++ b/docs/api-guide/caching.md @@ -17,11 +17,16 @@ other cache decorators such as [`cache_page`][page] and [`vary_on_cookie`][cookie]. ```python +from django.utils.decorators import method_decorator +from django.views.decorators.cache import cache_page +from django.views.decorators.vary import vary_on_cookie + from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import viewsets -class UserViewSet(viewsets.Viewset): + +class UserViewSet(viewsets.ViewSet): # Cache requested url for each user for 2 hours @method_decorator(cache_page(60*60*2)) @@ -32,6 +37,7 @@ class UserViewSet(viewsets.Viewset): } return Response(content) + class PostView(APIView): # Cache page for the requested url diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index d7d73a2f2..fbf3097e0 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -38,7 +38,7 @@ Might receive an error response indicating that the `DELETE` method is not allow Validation errors are handled slightly differently, and will include the field names as the keys in the response. If the validation error was not specific to a particular field then it will use the "non_field_errors" key, or whatever string value has been set for the `NON_FIELD_ERRORS_KEY` setting. -Any example validation error might look like this: +An example validation error might look like this: HTTP/1.1 400 Bad Request Content-Type: application/json diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 19abb0424..0492af9aa 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -50,9 +50,21 @@ If set, this gives the default value that will be used for the field if no input The `default` is not applied during partial update operations. In the partial update case only fields that are provided in the incoming data will have a validated value returned. -May be set to a function or other callable, in which case the value will be evaluated each time it is used. When called, it will receive no arguments. If the callable has a `set_context` method, that will be called each time before getting the value with the field instance as only argument. This works the same way as for [validators](validators.md#using-set_context). +May be set to a function or other callable, in which case the value will be evaluated each time it is used. When called, it will receive no arguments. If the callable has a `requires_context = True` attribute, then the serializer field will be passed as an argument. -When serializing the instance, default will be used if the the object attribute or dictionary key is not present in the instance. +For example: + + class CurrentUserDefault: + """ + May be applied as a `default=...` value on a serializer field. + Returns the current user. + """ + requires_context = True + + def __call__(self, serializer_field): + return serializer_field.context['request'].user + +When serializing the instance, default will be used if the object attribute or dictionary key is not present in the instance. Note that setting a `default` value implies that the field is not required. Including both the `default` and `required` keyword arguments is invalid and will raise an error. @@ -359,7 +371,7 @@ Corresponds to `django.db.models.fields.TimeField` * `format` - A string representing the output format. If not specified, this defaults to the same value as the `TIME_FORMAT` settings key, which will be `'iso-8601'` unless set. Setting to a format string indicates that `to_representation` return values should be coerced to string output. Format strings are described below. Setting this value to `None` indicates that Python `time` objects should be returned by `to_representation`. In this case the time encoding will be determined by the renderer. * `input_formats` - A list of strings representing the input formats which may be used to parse the date. If not specified, the `TIME_INPUT_FORMATS` setting will be used, which defaults to `['iso-8601']`. -#### `TimeField` format strings +#### `TimeField` format strings Format strings may either be [Python strftime formats][strftime] which explicitly specify the format, or the special string `'iso-8601'`, which indicates that [ISO 8601][iso8601] style times should be used. (eg `'12:34:56.000000'`) @@ -583,9 +595,7 @@ If you want to create a custom field, you'll need to subclass `Field` and then o The `.to_representation()` method is called to convert the initial datatype into a primitive, serializable datatype. -The `to_internal_value()` method is called to restore a primitive datatype into its internal python representation. This method should raise a `serializers.ValidationError` if the data is invalid. - -Note that the `WritableField` class that was present in version 2.x no longer exists. You should subclass `Field` and override `to_internal_value()` if the field supports data input. +The `.to_internal_value()` method is called to restore a primitive datatype into its internal python representation. This method should raise a `serializers.ValidationError` if the data is invalid. ## Examples @@ -593,7 +603,7 @@ Note that the `WritableField` class that was present in version 2.x no longer ex Let's look at an example of serializing a class that represents an RGB color value: - class Color(object): + class Color: """ A color represented in the RGB colorspace. """ @@ -713,7 +723,7 @@ the coordinate pair: fields = ['label', 'coordinates'] Note that this example doesn't handle validation. Partly for that reason, in a -real project, the coordinate nesting might be better handled with a nested serialiser +real project, the coordinate nesting might be better handled with a nested serializer using `source='*'`, with two `IntegerField` instances, each with their own `source` pointing to the relevant field. @@ -746,7 +756,7 @@ suitable for updating our target object. With `source='*'`, the return from ('y_coordinate', 4), ('x_coordinate', 3)]) -For completeness lets do the same thing again but with the nested serialiser +For completeness lets do the same thing again but with the nested serializer approach suggested above: class NestedCoordinateSerializer(serializers.Serializer): @@ -768,14 +778,14 @@ declarations. It's our `NestedCoordinateSerializer` that takes `source='*'`. Our new `DataPointSerializer` exhibits the same behaviour as the custom field approach. -Serialising: +Serializing: >>> out_serializer = DataPointSerializer(instance) >>> out_serializer.data ReturnDict([('label', 'testing'), ('coordinates', OrderedDict([('x', 1), ('y', 2)]))]) -Deserialising: +Deserializing: >>> in_serializer = DataPointSerializer(data=data) >>> in_serializer.is_valid() @@ -802,8 +812,8 @@ But we also get the built-in validation for free: {'x': ['A valid integer is required.'], 'y': ['A valid integer is required.']})]) -For this reason, the nested serialiser approach would be the first to try. You -would use the custom field approach when the nested serialiser becomes infeasible +For this reason, the nested serializer approach would be the first to try. You +would use the custom field approach when the nested serializer becomes infeasible or overly complex. diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index 1bdb6c52b..d305ede6b 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -45,7 +45,7 @@ Another style of filtering might involve restricting the queryset based on some For example if your URL config contained an entry like this: - url('^purchases/(?P.+)/$', PurchaseList.as_view()), + re_path('^purchases/(?P.+)/$', PurchaseList.as_view()), You could then write a view that returned a purchase queryset filtered by the username portion of the URL: @@ -145,10 +145,18 @@ Note that you can use both an overridden `.get_queryset()` and generic filtering The [`django-filter`][django-filter-docs] library includes a `DjangoFilterBackend` class which supports highly customizable field filtering for REST framework. -To use `DjangoFilterBackend`, first install `django-filter`. Then add `django_filters` to Django's `INSTALLED_APPS` +To use `DjangoFilterBackend`, first install `django-filter`. pip install django-filter +Then add `'django_filters'` to Django's `INSTALLED_APPS`: + + INSTALLED_APPS = [ + ... + 'django_filters', + ... + ] + You should now either add the filter backend to your settings: REST_FRAMEWORK = { @@ -205,6 +213,10 @@ This will allow the client to filter the items in the list by making queries suc You can also perform a related lookup on a ForeignKey or ManyToManyField with the lookup API double-underscore notation: search_fields = ['username', 'email', 'profile__profession'] + +For [JSONField][JSONField] and [HStoreField][HStoreField] fields you can filter based on nested values within the data structure using the same double-underscore notation: + + search_fields = ['data__breed', 'data__owner__other_pets__0__name'] By default, searches will use case-insensitive partial matches. The search parameter may contain multiple search terms, which should be whitespace and/or comma separated. If multiple search terms are used then objects will be returned in the list only if all the provided terms are matched. @@ -212,7 +224,7 @@ The search behavior may be restricted by prepending various characters to the `s * '^' Starts-with search. * '=' Exact matches. -* '@' Full-text search. (Currently only supported Django's MySQL backend.) +* '@' Full-text search. (Currently only supported Django's [PostgreSQL backend](https://docs.djangoproject.com/en/dev/ref/contrib/postgres/search/).) * '$' Regex search. For example: @@ -360,3 +372,5 @@ The [djangorestframework-word-filter][django-rest-framework-word-search-filter] [django-rest-framework-word-search-filter]: https://github.com/trollknurr/django-rest-framework-word-search-filter [django-url-filter]: https://github.com/miki725/django-url-filter [drf-url-filter]: https://github.com/manjitkumar/drf-url-filters +[HStoreField]: https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#hstorefield +[JSONField]: https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#jsonfield diff --git a/docs/api-guide/format-suffixes.md b/docs/api-guide/format-suffixes.md index 04467b3d3..dfdf24953 100644 --- a/docs/api-guide/format-suffixes.md +++ b/docs/api-guide/format-suffixes.md @@ -32,9 +32,9 @@ Example: from blog import views urlpatterns = [ - url(r'^/$', views.apt_root), - url(r'^comments/$', views.comment_list), - url(r'^comments/(?P[0-9]+)/$', views.comment_detail) + path('', views.apt_root), + path('comments/', views.comment_list), + path('comments//', views.comment_detail) ] urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html']) diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md index 8d9ead107..afc2cab56 100644 --- a/docs/api-guide/generic-views.md +++ b/docs/api-guide/generic-views.md @@ -45,7 +45,7 @@ For more complex cases you might also want to override various methods on the vi For very simple cases you might want to pass through any class attributes using the `.as_view()` method. For example, your URLconf might include something like the following entry: - url(r'^/users/', ListCreateAPIView.as_view(queryset=User.objects.all(), serializer_class=UserSerializer), name='user-list') + path('users/', ListCreateAPIView.as_view(queryset=User.objects.all(), serializer_class=UserSerializer), name='user-list') --- @@ -175,8 +175,6 @@ You can also use these hooks to provide additional validation, by raising a `Val raise ValidationError('You have already signed up') serializer.save(user=self.request.user) -**Note**: These methods replace the old-style version 2.x `pre_save`, `post_save`, `pre_delete` and `post_delete` methods, which are no longer available. - **Other methods**: You won't typically need to override the following methods, although you might need to call into them if you're writing custom views using `GenericAPIView`. @@ -321,7 +319,7 @@ Often you'll want to use the existing generic views, but use some slightly custo For example, if you need to lookup objects based on multiple fields in the URL conf, you could create a mixin class like the following: - class MultipleFieldLookupMixin(object): + class MultipleFieldLookupMixin: """ Apply this mixin to any view or viewset to get multiple field filtering based on a `lookup_fields` attribute, instead of the default single field filtering. @@ -378,10 +376,6 @@ If you need to generic PUT-as-create behavior you may want to include something The following third party packages provide additional generic view implementations. -## Django REST Framework bulk - -The [django-rest-framework-bulk package][django-rest-framework-bulk] implements generic view mixins as well as some common concrete generic views to allow to apply bulk operations via API requests. - ## Django Rest Multiple Models [Django Rest Multiple Models][django-rest-multiple-models] provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request. @@ -394,5 +388,4 @@ The [django-rest-framework-bulk package][django-rest-framework-bulk] implements [RetrieveModelMixin]: #retrievemodelmixin [UpdateModelMixin]: #updatemodelmixin [DestroyModelMixin]: #destroymodelmixin -[django-rest-framework-bulk]: https://github.com/miki725/django-rest-framework-bulk [django-rest-multiple-models]: https://github.com/MattBroach/DjangoRestMultipleModels diff --git a/docs/api-guide/metadata.md b/docs/api-guide/metadata.md index fdb778626..20708c6e3 100644 --- a/docs/api-guide/metadata.md +++ b/docs/api-guide/metadata.md @@ -71,7 +71,7 @@ If you have specific requirements for creating schema endpoints that are accesse For example, the following additional route could be used on a viewset to provide a linkable schema endpoint. @action(methods=['GET'], detail=False) - def schema(self, request): + def api_schema(self, request): meta = self.metadata_class() data = meta.determine_metadata(request, self) return Response(data) diff --git a/docs/api-guide/parsers.md b/docs/api-guide/parsers.md index a3bc74a2b..dde77c3e0 100644 --- a/docs/api-guide/parsers.md +++ b/docs/api-guide/parsers.md @@ -73,7 +73,7 @@ Or, if you're using the `@api_view` decorator with function based views. ## JSONParser -Parses `JSON` request content. +Parses `JSON` request content. `request.data` will be populated with a dictionary of data. **.media_type**: `application/json` @@ -125,7 +125,7 @@ If it is called without a `filename` URL keyword argument, then the client must # urls.py urlpatterns = [ # ... - url(r'^upload/(?P[^/]+)$', FileUploadView.as_view()) + re_path(r'^upload/(?P[^/]+)$', FileUploadView.as_view()) ] --- diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index 25baa4813..ade146257 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -231,7 +231,7 @@ If you need to test if a request is a read operation or a write operation, you s --- -Custom permissions will raise a `PermissionDenied` exception if the test fails. To change the error message associated with the exception, implement a `message` attribute directly on your custom permission. Otherwise the `default_detail` attribute from `PermissionDenied` will be used. +Custom permissions will raise a `PermissionDenied` exception if the test fails. To change the error message associated with the exception, implement a `message` attribute directly on your custom permission. Otherwise the `default_detail` attribute from `PermissionDenied` will be used. Similarly, to change the code identifier associated with the exception, implement a `code` attribute directly on your custom permission - otherwise the `default_code` attribute from `PermissionDenied` will be used. from rest_framework import permissions @@ -243,19 +243,19 @@ Custom permissions will raise a `PermissionDenied` exception if the test fails. ## Examples -The following is an example of a permission class that checks the incoming request's IP address against a blacklist, and denies the request if the IP has been blacklisted. +The following is an example of a permission class that checks the incoming request's IP address against a blocklist, and denies the request if the IP has been blocked. from rest_framework import permissions - class BlacklistPermission(permissions.BasePermission): + class BlocklistPermission(permissions.BasePermission): """ - Global permission check for blacklisted IPs. + Global permission check for blocked IPs. """ def has_permission(self, request, view): ip_addr = request.META['REMOTE_ADDR'] - blacklisted = Blacklist.objects.filter(ip_addr=ip_addr).exists() - return not blacklisted + blocked = Blocklist.objects.filter(ip_addr=ip_addr).exists() + return not blocked As well as global permissions, that are run against all incoming requests, you can also create object-level permissions, that are only run against operations that affect a particular object instance. For example: @@ -312,6 +312,11 @@ The [Django REST Framework API Key][djangorestframework-api-key] package provide The [Django Rest Framework Role Filters][django-rest-framework-role-filters] package provides simple filtering over multiple types of roles. +## Django Rest Framework PSQ + +The [Django Rest Framework PSQ][drf-psq] package is an extension that gives support for having action-based **permission_classes**, **serializer_class**, and **queryset** dependent on permission-based rules. + + [cite]: https://developer.apple.com/library/mac/#documentation/security/Conceptual/AuthenticationAndAuthorizationGuide/Authorization/Authorization.html [authentication]: authentication.md [throttling]: throttling.md @@ -322,9 +327,10 @@ The [Django Rest Framework Role Filters][django-rest-framework-role-filters] pac [filtering]: filtering.md [composed-permissions]: https://github.com/niwibe/djangorestframework-composed-permissions [rest-condition]: https://github.com/caxap/rest_condition -[dry-rest-permissions]: https://github.com/Helioscene/dry-rest-permissions +[dry-rest-permissions]: https://github.com/FJNR-inc/dry-rest-permissions [django-rest-framework-roles]: https://github.com/computer-lab/django-rest-framework-roles [djangorestframework-api-key]: https://florimondmanca.github.io/djangorestframework-api-key/ [django-rest-framework-role-filters]: https://github.com/allisson/django-rest-framework-role-filters [django-rest-framework-guardian]: https://github.com/rpkilby/django-rest-framework-guardian [drf-access-policy]: https://github.com/rsinger86/drf-access-policy +[drf-psq]: https://github.com/drf-psq/drf-psq diff --git a/docs/api-guide/relations.md b/docs/api-guide/relations.md index 14f197b21..f444125cf 100644 --- a/docs/api-guide/relations.md +++ b/docs/api-guide/relations.md @@ -56,7 +56,7 @@ In order to explain the various types of relational fields, we'll use a couple o `StringRelatedField` may be used to represent the target of the relationship using its `__str__` method. -For example, the following serializer. +For example, the following serializer: class AlbumSerializer(serializers.ModelSerializer): tracks = serializers.StringRelatedField(many=True) @@ -65,7 +65,7 @@ For example, the following serializer. model = Album fields = ['album_name', 'artist', 'tracks'] -Would serialize to the following representation. +Would serialize to the following representation: { 'album_name': 'Things We Lost In The Fire', @@ -245,7 +245,9 @@ This field is always read-only. # Nested relationships -Nested relationships can be expressed by using serializers as fields. +As opposed to previously discussed _references_ to another entity, the referred entity can instead also be embedded or _nested_ +in the representation of the object that refers to it. +Such nested relationships can be expressed by using serializers as fields. If the field is used to represent a to-many relationship, you should add the `many=True` flag to the serializer field. @@ -289,7 +291,7 @@ Would serialize to a nested representation like this: ## Writable nested serializers -By default nested serializers are read-only. If you want to support write-operations to a nested serializer field you'll need to create `create()` and/or `update()` methods in order to explicitly specify how the child relationships should be saved. +By default nested serializers are read-only. If you want to support write-operations to a nested serializer field you'll need to create `create()` and/or `update()` methods in order to explicitly specify how the child relationships should be saved: class TrackSerializer(serializers.ModelSerializer): class Meta: @@ -335,13 +337,13 @@ output representation should be generated from the model instance. To implement a custom relational field, you should override `RelatedField`, and implement the `.to_representation(self, value)` method. This method takes the target of the field as the `value` argument, and should return the representation that should be used to serialize the target. The `value` argument will typically be a model instance. -If you want to implement a read-write relational field, you must also implement the `.to_internal_value(self, data)` method. +If you want to implement a read-write relational field, you must also implement the [`.to_internal_value(self, data)` method][to_internal_value]. To provide a dynamic queryset based on the `context`, you can also override `.get_queryset(self)` instead of specifying `.queryset` on the class or when initializing the field. ## Example -For example, we could define a relational field to serialize a track to a custom string representation, using its ordering, title, and duration. +For example, we could define a relational field to serialize a track to a custom string representation, using its ordering, title, and duration: import time @@ -357,7 +359,7 @@ For example, we could define a relational field to serialize a track to a custom model = Album fields = ['album_name', 'artist', 'tracks'] -This custom field would then serialize to the following representation. +This custom field would then serialize to the following representation: { 'album_name': 'Sometimes I Wish We Were an Eagle', @@ -533,7 +535,7 @@ And the following two models, which may have associated tags: text = models.CharField(max_length=1000) tags = GenericRelation(TaggedItem) -We could define a custom field that could be used to serialize tagged instances, using the type of each instance to determine how it should be serialized. +We could define a custom field that could be used to serialize tagged instances, using the type of each instance to determine how it should be serialized: class TaggedObjectRelatedField(serializers.RelatedField): """ @@ -601,5 +603,6 @@ The [rest-framework-generic-relations][drf-nested-relations] library provides re [generic-relations]: https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/#id1 [drf-nested-routers]: https://github.com/alanjds/drf-nested-routers [drf-nested-relations]: https://github.com/Ian-Foote/rest-framework-generic-relations -[django-intermediary-manytomany]: https://docs.djangoproject.com/en/2.2/topics/db/models/#intermediary-manytomany +[django-intermediary-manytomany]: https://docs.djangoproject.com/en/stable/topics/db/models/#intermediary-manytomany [dealing-with-nested-objects]: https://www.django-rest-framework.org/api-guide/serializers/#dealing-with-nested-objects +[to_internal_value]: https://www.django-rest-framework.org/api-guide/serializers/#to_internal_valueself-data diff --git a/docs/api-guide/renderers.md b/docs/api-guide/renderers.md index a3321e860..954fb3bb9 100644 --- a/docs/api-guide/renderers.md +++ b/docs/api-guide/renderers.md @@ -103,6 +103,16 @@ Unlike other renderers, the data passed to the `Response` does not need to be se The TemplateHTMLRenderer will create a `RequestContext`, using the `response.data` as the context dict, and determine a template name to use to render the context. +--- + +**Note:** When used with a view that makes use of a serializer the `Response` sent for rendering may not be a dictionay and will need to be wrapped in a dict before returning to allow the TemplateHTMLRenderer to render it. For example: + +``` +response.data = {'results': response.data} +``` + +--- + The template name is determined by (in order of preference): 1. An explicit `template_name` argument passed to the response. @@ -273,7 +283,7 @@ By default this will include the following keys: `view`, `request`, `response`, The following is an example plaintext renderer that will return a response with the `data` parameter as the content of the response. - from django.utils.encoding import smart_unicode + from django.utils.encoding import smart_text from rest_framework import renderers @@ -282,7 +292,7 @@ The following is an example plaintext renderer that will return a response with format = 'txt' def render(self, data, media_type=None, renderer_context=None): - return data.encode(self.charset) + return smart_text(data, encoding=self.charset) ## Setting the character set @@ -503,7 +513,7 @@ Comma-separated values are a plain-text tabular data format, that can be easily ## UltraJSON -[UltraJSON][ultrajson] is an optimized C JSON encoder which can give significantly faster JSON rendering. [Jacob Haslehurst][hzy] maintains the [drf-ujson-renderer][drf-ujson-renderer] package which implements JSON rendering using the UJSON package. +[UltraJSON][ultrajson] is an optimized C JSON encoder which can give significantly faster JSON rendering. [Adam Mertz][Amertz08] maintains [drf_ujson2][drf_ujson2], a fork of the now unmaintained [drf-ujson-renderer][drf-ujson-renderer], which implements JSON rendering using the UJSON package. ## CamelCase JSON @@ -547,8 +557,9 @@ Comma-separated values are a plain-text tabular data format, that can be easily [djangorestframework-msgpack]: https://github.com/juanriaza/django-rest-framework-msgpack [djangorestframework-csv]: https://github.com/mjumbewu/django-rest-framework-csv [ultrajson]: https://github.com/esnme/ultrajson -[hzy]: https://github.com/hzy +[Amertz08]: https://github.com/Amertz08 [drf-ujson-renderer]: https://github.com/gizmag/drf-ujson-renderer +[drf_ujson2]: https://github.com/Amertz08/drf_ujson2 [djangorestframework-camel-case]: https://github.com/vbabiy/djangorestframework-camel-case [Django REST Pandas]: https://github.com/wq/django-rest-pandas [Pandas]: https://pandas.pydata.org/ diff --git a/docs/api-guide/requests.md b/docs/api-guide/requests.md index 3bc083893..e877c868d 100644 --- a/docs/api-guide/requests.md +++ b/docs/api-guide/requests.md @@ -23,7 +23,7 @@ REST framework's Request objects provide flexible request parsing that allows yo * It includes all parsed content, including *file and non-file* inputs. * It supports parsing the content of HTTP methods other than `POST`, meaning that you can access the content of `PUT` and `PATCH` requests. -* It supports REST framework's flexible request parsing, rather than just supporting form data. For example you can handle incoming JSON data in the same way that you handle incoming form data. +* It supports REST framework's flexible request parsing, rather than just supporting form data. For example you can handle incoming [JSON data] similarly to how you handle incoming [form data]. For more details see the [parsers documentation]. @@ -49,7 +49,7 @@ If a client sends a request with a content-type that cannot be parsed then a `Un # Content negotiation -The request exposes some properties that allow you to determine the result of the content negotiation stage. This allows you to implement behaviour such as selecting a different serialisation schemes for different media types. +The request exposes some properties that allow you to determine the result of the content negotiation stage. This allows you to implement behaviour such as selecting a different serialization schemes for different media types. ## .accepted_renderer @@ -136,5 +136,7 @@ Note that due to implementation reasons the `Request` class does not inherit fro [cite]: https://groups.google.com/d/topic/django-developers/dxI4qVzrBY4/discussion [parsers documentation]: parsers.md +[JSON data]: parsers.md#jsonparser +[form data]: parsers.md#formparser [authentication documentation]: authentication.md [browser enhancements documentation]: ../topics/browser-enhancements.md diff --git a/docs/api-guide/responses.md b/docs/api-guide/responses.md index 1a56b0101..dbdc8ff2c 100644 --- a/docs/api-guide/responses.md +++ b/docs/api-guide/responses.md @@ -94,5 +94,5 @@ As with any other `TemplateResponse`, this method is called to render the serial You won't typically need to call `.render()` yourself, as it's handled by Django's standard response cycle. -[cite]: https://docs.djangoproject.com/en/stable/stable/template-response/ +[cite]: https://docs.djangoproject.com/en/stable/ref/template-response/ [statuscodes]: status-codes.md diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md index 5f6802222..8d8594eee 100644 --- a/docs/api-guide/routers.md +++ b/docs/api-guide/routers.md @@ -63,7 +63,7 @@ For example, you can append `router.urls` to a list of existing views... router.register(r'accounts', AccountViewSet) urlpatterns = [ - url(r'^forgot-password/$', ForgotPasswordFormView.as_view()), + path('forgot-password/', ForgotPasswordFormView.as_view()), ] urlpatterns += router.urls @@ -71,22 +71,22 @@ For example, you can append `router.urls` to a list of existing views... Alternatively you can use Django's `include` function, like so... urlpatterns = [ - url(r'^forgot-password/$', ForgotPasswordFormView.as_view()), - url(r'^', include(router.urls)), + path('forgot-password', ForgotPasswordFormView.as_view()), + path('', include(router.urls)), ] You may use `include` with an application namespace: urlpatterns = [ - url(r'^forgot-password/$', ForgotPasswordFormView.as_view()), - url(r'^api/', include((router.urls, 'app_name'))), + path('forgot-password/', ForgotPasswordFormView.as_view()), + path('api/', include((router.urls, 'app_name'))), ] Or both an application and instance namespace: urlpatterns = [ - url(r'^forgot-password/$', ForgotPasswordFormView.as_view()), - url(r'^api/', include((router.urls, 'app_name'), namespace='instance_name')), + path('forgot-password/', ForgotPasswordFormView.as_view()), + path('api/', include((router.urls, 'app_name'), namespace='instance_name')), ] See Django's [URL namespaces docs][url-namespace-docs] and the [`include` API reference][include-api-reference] for more details. diff --git a/docs/api-guide/schemas.md b/docs/api-guide/schemas.md index 040c2ed14..b4832b369 100644 --- a/docs/api-guide/schemas.md +++ b/docs/api-guide/schemas.md @@ -1,6 +1,6 @@ --- source: - - schemas.py + - schemas --- # Schema @@ -16,21 +16,40 @@ can interact with your API. Django REST Framework provides support for automatic generation of [OpenAPI][openapi] schemas. +## Overview + +Schema generation has several moving parts. It's worth having an overview: + +* `SchemaGenerator` is a top-level class that is responsible for walking your + configured URL patterns, finding `APIView` subclasses, enquiring for their + schema representation, and compiling the final schema object. +* `AutoSchema` encapsulates all the details necessary for per-view schema + introspection. Is attached to each view via the `schema` attribute. You + subclass `AutoSchema` in order to customize your schema. +* The `generateschema` management command allows you to generate a static schema + offline. +* Alternatively, you can route `SchemaView` to dynamically generate and serve + your schema. +* `settings.DEFAULT_SCHEMA_CLASS` allows you to specify an `AutoSchema` + subclass to serve as your project's default. + +The following sections explain more. + ## Generating an OpenAPI Schema -### Install `pyyaml` +### Install dependencies -You'll need to install `pyyaml`, so that you can render your generated schema -into the commonly used YAML-based OpenAPI format. + pip install pyyaml uritemplate - pip install pyyaml +* `pyyaml` is used to generate schema into YAML-based OpenAPI format. +* `uritemplate` is used internally to get parameters in path. ### Generating a static schema with the `generateschema` management command If your schema is static, you can use the `generateschema` management command: ```bash -./manage.py generateschema > openapi-schema.yml +./manage.py generateschema --file openapi-schema.yml ``` Once you've generated a schema in this way you can annotate it with any @@ -60,7 +79,8 @@ urlpatterns = [ # * Provide view name for use with `reverse()`. path('openapi', get_schema_view( title="Your Project", - description="API for all things …" + description="API for all things …", + version="1.0.0" ), name='openapi-schema'), # ... ] @@ -72,6 +92,7 @@ The `get_schema_view()` helper takes the following keyword arguments: * `title`: May be used to provide a descriptive title for the schema definition. * `description`: Longer descriptive text. +* `version`: The version of the API. * `url`: May be used to pass a canonical base URL for the schema. schema_view = get_schema_view( @@ -88,11 +109,12 @@ The `get_schema_view()` helper takes the following keyword arguments: url='https://www.example.org/api/', urlconf='myproject.urls' ) + * `patterns`: List of url patterns to limit the schema introspection to. If you only want the `myproject.api` urls to be exposed in the schema: schema_url_patterns = [ - url(r'^api/', include('myproject.api.urls')), + path('api/', include('myproject.api.urls')), ] schema_view = get_schema_view( @@ -113,23 +135,19 @@ The `get_schema_view()` helper takes the following keyword arguments: be used to render the API root endpoint. -## Customizing Schema Generation +## SchemaGenerator -You may customize schema generation at the level of the schema as a whole, or -on a per-view basis. +**Schema-level customization** -### Schema Level Customization +```python +from rest_framework.schemas.openapi import SchemaGenerator +``` -In order to customize the top-level schema sublass -`rest_framework.schemas.openapi.SchemaGenerator` and provide it as an argument -to the `generateschema` command or `get_schema_view()` helper function. +`SchemaGenerator` is a class that walks a list of routed URL patterns, requests +the schema for each view and collates the resulting OpenAPI schema. -#### SchemaGenerator - -A class that walks a list of routed URL patterns, requests the schema for each -view and collates the resulting OpenAPI schema. - -Typically you'll instantiate `SchemaGenerator` with a `title` argument, like so: +Typically you won't need to instantiate `SchemaGenerator` yourself, but you can +do so like so: generator = SchemaGenerator(title='Stock Prices API') @@ -137,11 +155,17 @@ Arguments: * `title` **required**: The name of the API. * `description`: Longer descriptive text. +* `version`: The version of the API. Defaults to `0.1.0`. * `url`: The root URL of the API schema. This option is not required unless the schema is included under path prefix. * `patterns`: A list of URLs to inspect when generating the schema. Defaults to the project's URL conf. * `urlconf`: A URL conf module name to use when generating the schema. Defaults to `settings.ROOT_URLCONF`. -##### get_schema(self, request) +In order to customize the top-level schema, subclass +`rest_framework.schemas.openapi.SchemaGenerator` and provide your subclass +as an argument to the `generateschema` command or `get_schema_view()` helper +function. + +### get_schema(self, request) Returns a dictionary that represents the OpenAPI schema: @@ -151,68 +175,245 @@ Returns a dictionary that represents the OpenAPI schema: The `request` argument is optional, and may be used if you want to apply per-user permissions to the resulting schema generation. -This is a good point to override if you want to customise the generated -dictionary, for example to add custom -[specification extensions][openapi-specification-extensions]. +This is a good point to override if you want to customize the generated +dictionary For example you might wish to add terms of service to the [top-level +`info` object][info-object]: -### Per-View Customization +``` +class TOSSchemaGenerator(SchemaGenerator): + def get_schema(self, *args, **kwargs): + schema = super().get_schema(*args, **kwargs) + schema["info"]["termsOfService"] = "https://example.com/tos.html" + return schema +``` + +## AutoSchema + +**Per-View Customization** + +```python +from rest_framework.schemas.openapi import AutoSchema +``` By default, view introspection is performed by an `AutoSchema` instance -accessible via the `schema` attribute on `APIView`. This provides the -appropriate [Open API operation object][openapi-operation] for the view, -request method and path: +accessible via the `schema` attribute on `APIView`. - auto_schema = view.schema - operation = auto_schema.get_operation(...) + auto_schema = some_view.schema -In compiling the schema, `SchemaGenerator` calls `view.schema.get_operation()` -for each view, allowed method, and path. +`AutoSchema` provides the OpenAPI elements needed for each view, request method +and path: ---- +* A list of [OpenAPI components][openapi-components]. In DRF terms these are + mappings of serializers that describe request and response bodies. +* The appropriate [OpenAPI operation object][openapi-operation] that describes + the endpoint, including path and query parameters for pagination, filtering, + and so on. -**Note**: For basic `APIView` subclasses, default introspection is essentially -limited to the URL kwarg path parameters. For `GenericAPIView` -subclasses, which includes all the provided class based views, `AutoSchema` will -attempt to introspect serialiser, pagination and filter fields, as well as -provide richer path field descriptions. (The key hooks here are the relevant -`GenericAPIView` attributes and methods: `get_serializer`, `pagination_class`, -`filter_backends` and so on.) +```python +components = auto_schema.get_components(...) +operation = auto_schema.get_operation(...) +``` ---- +In compiling the schema, `SchemaGenerator` calls `get_components()` and +`get_operation()` for each view, allowed method, and path. -In order to customise the operation generation, you should provide an `AutoSchema` subclass, overriding `get_operation()` as you need: +---- +**Note**: The automatic introspection of components, and many operation +parameters relies on the relevant attributes and methods of +`GenericAPIView`: `get_serializer()`, `pagination_class`, `filter_backends`, +etc. For basic `APIView` subclasses, default introspection is essentially limited to +the URL kwarg path parameters for this reason. - from rest_framework.views import APIView - from rest_framework.schemas.openapi import AutoSchema +---- - class CustomSchema(AutoSchema): - def get_link(...): - # Implement custom introspection here (or in other sub-methods) +`AutoSchema` encapsulates the view introspection needed for schema generation. +Because of this all the schema generation logic is kept in a single place, +rather than being spread around the already extensive view, serializer and +field APIs. - class CustomView(APIView): - """APIView subclass with custom schema introspection.""" - schema = CustomSchema() +Keeping with this pattern, try not to let schema logic leak into your own +views, serializers, or fields when customizing the schema generation. You might +be tempted to do something like this: -This provides complete control over view introspection. +```python +class CustomSchema(AutoSchema): + """ + AutoSchema subclass using schema_extra_info on the view. + """ + ... -You may disable schema generation for a view by setting `schema` to `None`: +class CustomView(APIView): + schema = CustomSchema() + schema_extra_info = ... some extra info ... +``` - class CustomView(APIView): - ... - schema = None # Will not appear in schema +Here, the `AutoSchema` subclass goes looking for `schema_extra_info` on the +view. This is _OK_ (it doesn't actually hurt) but it means you'll end up with +your schema logic spread out in a number of different places. -This also applies to extra actions for `ViewSet`s: +Instead try to subclass `AutoSchema` such that the `extra_info` doesn't leak +out into the view: - class CustomViewSet(viewsets.ModelViewSet): +```python +class BaseSchema(AutoSchema): + """ + AutoSchema subclass that knows how to use extra_info. + """ + ... - @action(detail=True, schema=None) - def extra_action(self, request, pk=None): - ... +class CustomSchema(BaseSchema): + extra_info = ... some extra info ... -If you wish to provide a base `AutoSchema` subclass to be used throughout your -project you may adjust `settings.DEFAULT_SCHEMA_CLASS` appropriately. +class CustomView(APIView): + schema = CustomSchema() +``` + +This style is slightly more verbose but maintains the encapsulation of the +schema related code. It's more _cohesive_ in the _parlance_. It'll keep the +rest of your API code more tidy. + +If an option applies to many view classes, rather than creating a specific +subclass per-view, you may find it more convenient to allow specifying the +option as an `__init__()` kwarg to your base `AutoSchema` subclass: + +```python +class CustomSchema(BaseSchema): + def __init__(self, **kwargs): + # store extra_info for later + self.extra_info = kwargs.pop("extra_info") + super().__init__(**kwargs) + +class CustomView(APIView): + schema = CustomSchema( + extra_info=... some extra info ... + ) +``` + +This saves you having to create a custom subclass per-view for a commonly used option. + +Not all `AutoSchema` methods expose related `__init__()` kwargs, but those for +the more commonly needed options do. + +### `AutoSchema` methods + +#### `get_components()` + +Generates the OpenAPI components that describe request and response bodies, +deriving their properties from the serializer. + +Returns a dictionary mapping the component name to the generated +representation. By default this has just a single pair but you may override +`get_components()` to return multiple pairs if your view uses multiple +serializers. + +#### `get_component_name()` + +Computes the component's name from the serializer. + +You may see warnings if your API has duplicate component names. If so you can override `get_component_name()` or pass the `component_name` `__init__()` kwarg (see below) to provide different names. + +#### `map_serializer()` + +Maps serializers to their OpenAPI representations. + +Most serializers should conform to the standard OpenAPI `object` type, but you may +wish to override `map_serializer()` in order to customize this or other +serializer-level fields. + +#### `map_field()` + +Maps individual serializer fields to their schema representation. The base implementation +will handle the default fields that Django REST Framework provides. + +For `SerializerMethodField` instances, for which the schema is unknown, or custom field subclasses you should override `map_field()` to generate the correct schema: + +```python +class CustomSchema(AutoSchema): + """Extension of ``AutoSchema`` to add support for custom field schemas.""" + + def map_field(self, field): + # Handle SerializerMethodFields or custom fields here... + # ... + return super().map_field(field) +``` + +Authors of third-party packages should aim to provide an `AutoSchema` subclass, +and a mixin, overriding `map_field()` so that users can easily generate schemas +for their custom fields. + +#### `get_tags()` + +OpenAPI groups operations by tags. By default tags taken from the first path +segment of the routed URL. For example, a URL like `/users/{id}/` will generate +the tag `users`. + +You can pass an `__init__()` kwarg to manually specify tags (see below), or +override `get_tags()` to provide custom logic. + +#### `get_operation()` + +Returns the [OpenAPI operation object][openapi-operation] that describes the +endpoint, including path and query parameters for pagination, filtering, and so +on. + +Together with `get_components()`, this is the main entry point to the view +introspection. + +#### `get_operation_id()` + +There must be a unique [operationid](openapi-operationid) for each operation. +By default the `operationId` is deduced from the model name, serializer name or +view name. The operationId looks like "listItems", "retrieveItem", +"updateItem", etc. The `operationId` is camelCase by convention. + +#### `get_operation_id_base()` + +If you have several views with the same model name, you may see duplicate +operationIds. + +In order to work around this, you can override `get_operation_id_base()` to +provide a different base for name part of the ID. + +### `AutoSchema.__init__()` kwargs + +`AutoSchema` provides a number of `__init__()` kwargs that can be used for +common customizations, if the default generated values are not appropriate. + +The available kwargs are: + +* `tags`: Specify a list of tags. +* `component_name`: Specify the component name. +* `operation_id_base`: Specify the resource-name part of operation IDs. + +You pass the kwargs when declaring the `AutoSchema` instance on your view: + +``` +class PetDetailView(generics.RetrieveUpdateDestroyAPIView): + schema = AutoSchema( + tags=['Pets'], + component_name='Pet', + operation_id_base='Pet', + ) + ... +``` + +Assuming a `Pet` model and `PetSerializer` serializer, the kwargs in this +example are probably not needed. Often, though, you'll need to pass the kwargs +if you have multiple view targeting the same model, or have multiple views with +identically named serializers. + +If your views have related customizations that are needed frequently, you can +create a base `AutoSchema` subclass for your project that takes additional +`__init__()` kwargs to save subclassing `AutoSchema` for each view. [openapi]: https://github.com/OAI/OpenAPI-Specification [openapi-specification-extensions]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specification-extensions -[openapi-operation]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject \ No newline at end of file +[openapi-operation]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject +[openapi-tags]: https://swagger.io/specification/#tagObject +[openapi-operationid]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#fixed-fields-17 +[openapi-components]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#componentsObject +[openapi-reference]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#referenceObject +[openapi-generator]: https://github.com/OpenAPITools/openapi-generator +[swagger-codegen]: https://github.com/swagger-api/swagger-codegen +[info-object]: https://swagger.io/specification/#infoObject diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index ef70adbe1..f05fe7e7e 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -21,7 +21,7 @@ Let's start by creating a simple object we can use for example purposes: from datetime import datetime - class Comment(object): + class Comment: def __init__(self, email, content, created=None): self.email = email self.content = content @@ -161,7 +161,7 @@ Each key in the dictionary will be the field name, and the values will be lists When deserializing a list of items, errors will be returned as a list of dictionaries representing each of the deserialized items. -#### Raising an exception on invalid data +#### Raising an exception on invalid data The `.is_valid()` method takes an optional `raise_exception` flag that will cause it to raise a `serializers.ValidationError` exception if there are validation errors. @@ -238,10 +238,12 @@ Serializer classes can also include reusable validators that are applied to the class Meta: # Each room only has one event per day. - validators = UniqueTogetherValidator( - queryset=Event.objects.all(), - fields=['room_number', 'date'] - ) + validators = [ + UniqueTogetherValidator( + queryset=Event.objects.all(), + fields=['room_number', 'date'] + ) + ] For more information see the [validators documentation](validators.md). @@ -249,7 +251,7 @@ For more information see the [validators documentation](validators.md). When passing an initial object or queryset to a serializer instance, the object will be made available as `.instance`. If no initial object is passed then the `.instance` attribute will be `None`. -When passing data to a serializer instance, the unmodified data will be made available as `.initial_data`. If the data keyword argument is not passed then the `.initial_data` attribute will not exist. +When passing data to a serializer instance, the unmodified data will be made available as `.initial_data`. If the `data` keyword argument is not passed then the `.initial_data` attribute will not exist. ## Partial updates @@ -280,7 +282,7 @@ If a nested representation may optionally accept the `None` value you should pas content = serializers.CharField(max_length=200) created = serializers.DateTimeField() -Similarly if a nested representation should be a list of items, you should pass the `many=True` flag to the nested serialized. +Similarly if a nested representation should be a list of items, you should pass the `many=True` flag to the nested serializer. class CommentSerializer(serializers.Serializer): user = UserSerializer(required=False) @@ -333,7 +335,7 @@ Here's an example for an `.update()` method on our previous `UserSerializer` cla def update(self, instance, validated_data): profile_data = validated_data.pop('profile') # Unless the application properly enforces that this field is - # always set, the follow could raise a `DoesNotExist`, which + # always set, the following could raise a `DoesNotExist`, which # would need to be handled. profile = instance.profile @@ -382,8 +384,8 @@ This manager class now more nicely encapsulates that user instances and profile def create(self, validated_data): return User.objects.create( username=validated_data['username'], - email=validated_data['email'] - is_premium_member=validated_data['profile']['is_premium_member'] + email=validated_data['email'], + is_premium_member=validated_data['profile']['is_premium_member'], has_support_contract=validated_data['profile']['has_support_contract'] ) @@ -593,7 +595,7 @@ Normally if a `ModelSerializer` does not generate the fields you need by default ### `.serializer_field_mapping` -A mapping of Django model classes to REST framework serializer classes. You can override this mapping to alter the default serializer classes that should be used for each model class. +A mapping of Django model fields to REST framework serializer fields. You can override this mapping to alter the default serializer fields that should be used for each model field. ### `.serializer_related_field` @@ -887,10 +889,10 @@ To implement a read-only serializer using the `BaseSerializer` class, we just ne It's simple to create a read-only serializer for converting `HighScore` instances into primitive data types. class HighScoreSerializer(serializers.BaseSerializer): - def to_representation(self, obj): + def to_representation(self, instance): return { - 'score': obj.score, - 'player_name': obj.player_name + 'score': instance.score, + 'player_name': instance.player_name } We can now use this class to serialize single `HighScore` instances: @@ -945,10 +947,10 @@ Here's a complete example of our previous `HighScoreSerializer`, that's been upd 'player_name': player_name } - def to_representation(self, obj): + def to_representation(self, instance): return { - 'score': obj.score, - 'player_name': obj.player_name + 'score': instance.score, + 'player_name': instance.player_name } def create(self, validated_data): @@ -965,10 +967,10 @@ The following class is an example of a generic serializer that can handle coerci A read-only serializer that coerces arbitrary complex objects into primitive representations. """ - def to_representation(self, obj): + def to_representation(self, instance): output = {} - for attribute_name in dir(obj): - attribute = getattr(obj, attribute_name) + for attribute_name in dir(instance): + attribute = getattr(instance, attribute_name) if attribute_name.startswith('_'): # Ignore private attributes. pass @@ -1010,11 +1012,11 @@ Some reasons this might be useful include... The signatures for these methods are as follows: -#### `.to_representation(self, obj)` +#### `.to_representation(self, instance)` Takes the object instance that requires serialization, and should return a primitive representation. Typically this means returning a structure of built-in Python datatypes. The exact types that can be handled will depend on the render classes you have configured for your API. -May be overridden in order modify the representation style. For example: +May be overridden in order to modify the representation style. For example: def to_representation(self, instance): """Convert `username` to lowercase.""" @@ -1176,6 +1178,11 @@ The [html-json-forms][html-json-forms] package provides an algorithm and seriali The [drf-writable-nested][drf-writable-nested] package provides writable nested model serializer which allows to create/update models with nested related data. +## DRF Encrypt Content + +The [drf-encrypt-content][drf-encrypt-content] package helps you encrypt your data, serialized through ModelSerializer. It also contains some helper functions. Which helps you to encrypt your data. + + [cite]: https://groups.google.com/d/topic/django-users/sVFaOfQi4wY/discussion [relations]: relations.md [model-managers]: https://docs.djangoproject.com/en/stable/topics/db/managers/ @@ -1197,3 +1204,4 @@ The [drf-writable-nested][drf-writable-nested] package provides writable nested [drf-serializer-extensions]: https://github.com/evenicoulddoit/django-rest-framework-serializer-extensions [djangorestframework-queryfields]: https://djangorestframework-queryfields.readthedocs.io/ [drf-writable-nested]: https://github.com/beda-software/drf-writable-nested +[drf-encrypt-content]: https://github.com/oguzhancelikarslan/drf-encrypt-content diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 768e343a7..d42000260 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -101,7 +101,7 @@ Default: `'rest_framework.negotiation.DefaultContentNegotiation'` A view inspector class that will be used for schema generation. -Default: `'rest_framework.schemas.AutoSchema'` +Default: `'rest_framework.schemas.openapi.AutoSchema'` --- diff --git a/docs/api-guide/testing.md b/docs/api-guide/testing.md index dab0e264d..73de68a76 100644 --- a/docs/api-guide/testing.md +++ b/docs/api-guide/testing.md @@ -221,7 +221,7 @@ If you're using `RequestsClient` you'll want to ensure that test setup, and resu ## Headers & Authentication Custom headers and authentication credentials can be provided in the same way -as [when using a standard `requests.Session` instance](http://docs.python-requests.org/en/master/user/advanced/#session-objects). +as [when using a standard `requests.Session` instance][session_objects]. from requests.auth import HTTPBasicAuth @@ -414,3 +414,4 @@ For example, to add support for using `format='html'` in test requests, you migh [requestfactory]: https://docs.djangoproject.com/en/stable/topics/testing/advanced/#django.test.client.RequestFactory [configuration]: #configuration [refresh_from_db_docs]: https://docs.djangoproject.com/en/1.11/ref/models/instances/#django.db.models.Model.refresh_from_db +[session_objects]: https://requests.readthedocs.io/en/master/user/advanced/#session-objects diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md index 215c735bf..a3e42cacf 100644 --- a/docs/api-guide/throttling.md +++ b/docs/api-guide/throttling.md @@ -59,7 +59,7 @@ using the `APIView` class-based views. } return Response(content) -Or, if you're using the `@api_view` decorator with function based views. +If you're using the `@api_view` decorator with function based views you can use the following decorator. @api_view(['GET']) @throttle_classes([UserRateThrottle]) @@ -69,6 +69,16 @@ Or, if you're using the `@api_view` decorator with function based views. } return Response(content) +It's also possible to set throttle classes for routes that are created using the `@action` decorator. +Throttle classes set in this way will override any viewset level class settings. + + @action(detail=True, methods=["post"], throttle_classes=[UserRateThrottle]) + def example_adhoc_method(request, pk=None): + content = { + 'status': 'request was permitted' + } + return Response(content) + ## How clients are identified The `X-Forwarded-For` HTTP header and `REMOTE_ADDR` WSGI variable are used to uniquely identify client IP addresses for throttling. If the `X-Forwarded-For` header is present then it will be used, otherwise the value of the `REMOTE_ADDR` variable from the WSGI environment will be used. diff --git a/docs/api-guide/validators.md b/docs/api-guide/validators.md index 87417b7f1..4451489d4 100644 --- a/docs/api-guide/validators.md +++ b/docs/api-guide/validators.md @@ -218,7 +218,7 @@ in the `.validate()` method, or else in the view. For example: class BillingRecordSerializer(serializers.ModelSerializer): - def validate(self, data): + def validate(self, attrs): # Apply custom validation either here, or in the view. class Meta: @@ -282,7 +282,7 @@ to your `Serializer` subclass. This is documented in the To write a class-based validator, use the `__call__` method. Class-based validators are useful as they allow you to parameterize and reuse behavior. - class MultipleOf(object): + class MultipleOf: def __init__(self, base): self.base = base @@ -291,13 +291,17 @@ To write a class-based validator, use the `__call__` method. Class-based validat message = 'This field must be a multiple of %d.' % self.base raise serializers.ValidationError(message) -#### Using `set_context()` +#### Accessing the context -In some advanced cases you might want a validator to be passed the serializer field it is being used with as additional context. You can do so by declaring a `set_context` method on a class-based validator. +In some advanced cases you might want a validator to be passed the serializer +field it is being used with as additional context. You can do so by setting +a `requires_context = True` attribute on the validator. The `__call__` method +will then be called with the `serializer_field` +or `serializer` as an additional argument. - def set_context(self, serializer_field): - # Determine if this is an update or a create operation. - # In `__call__` we can then use that information to modify the validation behavior. - self.is_update = serializer_field.parent.instance is not None + requires_context = True + + def __call__(self, value, serializer_field): + ... [cite]: https://docs.djangoproject.com/en/stable/ref/validators/ diff --git a/docs/api-guide/versioning.md b/docs/api-guide/versioning.md index ad76ced3d..6076b1ed2 100644 --- a/docs/api-guide/versioning.md +++ b/docs/api-guide/versioning.md @@ -132,12 +132,12 @@ This scheme requires the client to specify the version as part of the URL path. Your URL conf must include a pattern that matches the version with a `'version'` keyword argument, so that this information is available to the versioning scheme. urlpatterns = [ - url( + re_path( r'^(?P(v1|v2))/bookings/$', bookings_list, name='bookings-list' ), - url( + re_path( r'^(?P(v1|v2))/bookings/(?P[0-9]+)/$', bookings_detail, name='bookings-detail' @@ -158,14 +158,14 @@ In the following example we're giving a set of views two different possible URL # bookings/urls.py urlpatterns = [ - url(r'^$', bookings_list, name='bookings-list'), - url(r'^(?P[0-9]+)/$', bookings_detail, name='bookings-detail') + re_path(r'^$', bookings_list, name='bookings-list'), + re_path(r'^(?P[0-9]+)/$', bookings_detail, name='bookings-detail') ] # urls.py urlpatterns = [ - url(r'^v1/bookings/', include('bookings.urls', namespace='v1')), - url(r'^v2/bookings/', include('bookings.urls', namespace='v2')) + re_path(r'^v1/bookings/', include('bookings.urls', namespace='v1')), + re_path(r'^v2/bookings/', include('bookings.urls', namespace='v2')) ] Both `URLPathVersioning` and `NamespaceVersioning` are reasonable if you just need a simple versioning scheme. The `URLPathVersioning` approach might be better suitable for small ad-hoc projects, and the `NamespaceVersioning` is probably easier to manage for larger projects. diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md index 45226d57b..2224c1f3a 100644 --- a/docs/api-guide/views.md +++ b/docs/api-guide/views.md @@ -169,7 +169,7 @@ To override the default settings, REST framework provides a set of additional de from rest_framework.throttling import UserRateThrottle class OncePerDayUserThrottle(UserRateThrottle): - rate = '1/day' + rate = '1/day' @api_view(['GET']) @throttle_classes([OncePerDayUserThrottle]) diff --git a/docs/api-guide/viewsets.md b/docs/api-guide/viewsets.md index cd765d3e6..d5815127b 100644 --- a/docs/api-guide/viewsets.md +++ b/docs/api-guide/viewsets.md @@ -152,7 +152,7 @@ A more complete example of extra actions: user = self.get_object() serializer = PasswordSerializer(data=request.data) if serializer.is_valid(): - user.set_password(serializer.data['password']) + user.set_password(serializer.validated_data['password']) user.save() return Response({'status': 'password set'}) else: @@ -171,11 +171,6 @@ A more complete example of extra actions: serializer = self.get_serializer(recent_users, many=True) return Response(serializer.data) -The decorator can additionally take extra arguments that will be set for the routed view only. For example: - - @action(detail=True, methods=['post'], permission_classes=[IsAdminOrIsSelf]) - def set_password(self, request, pk=None): - ... The `action` decorator will route `GET` requests by default, but may also accept other HTTP methods by setting the `methods` argument. For example: @@ -183,7 +178,14 @@ The `action` decorator will route `GET` requests by default, but may also accept def unset_password(self, request, pk=None): ... -The two new actions will then be available at the urls `^users/{pk}/set_password/$` and `^users/{pk}/unset_password/$` + +The decorator allows you to override any viewset-level configuration such as `permission_classes`, `serializer_class`, `filter_backends`...: + + @action(detail=True, methods=['post'], permission_classes=[IsAdminOrIsSelf]) + def set_password(self, request, pk=None): + ... + +The two new actions will then be available at the urls `^users/{pk}/set_password/$` and `^users/{pk}/unset_password/$`. Use the `url_path` and `url_name` parameters to change the URL segement and the reverse URL name of the action. To view all extra actions, call the `.get_extra_actions()` method. @@ -317,5 +319,5 @@ To create a base viewset class that provides `create`, `list` and `retrieve` ope By creating your own base `ViewSet` classes, you can provide common behavior that can be reused in multiple viewsets across your API. -[cite]: https://guides.rubyonrails.org/routing.html +[cite]: https://guides.rubyonrails.org/action_controller_overview.html [routers]: routers.md diff --git a/docs/community/3.10-announcement.md b/docs/community/3.10-announcement.md index 065dd3480..19748aa40 100644 --- a/docs/community/3.10-announcement.md +++ b/docs/community/3.10-announcement.md @@ -84,7 +84,7 @@ urlpatterns = [ ### Customization -For customizations that you want to apply across the the entire API, you can subclass `rest_framework.schemas.openapi.SchemaGenerator` and provide it as an argument +For customizations that you want to apply across the entire API, you can subclass `rest_framework.schemas.openapi.SchemaGenerator` and provide it as an argument to the `generateschema` command or `get_schema_view()` helper function. For specific per-view customizations, you can subclass `AutoSchema`, @@ -144,4 +144,4 @@ continued development by **[signing up for a paid plan][funding]**. [legacy-core-api-docs]:https://github.com/encode/django-rest-framework/blob/master/docs/coreapi/index.md [sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors -[funding]: community/funding.md +[funding]: funding.md diff --git a/docs/community/3.11-announcement.md b/docs/community/3.11-announcement.md new file mode 100644 index 000000000..83dd636d1 --- /dev/null +++ b/docs/community/3.11-announcement.md @@ -0,0 +1,117 @@ + + +# Django REST framework 3.11 + +The 3.11 release adds support for Django 3.0. + +* Our supported Python versions are now: 3.5, 3.6, 3.7, and 3.8. +* Our supported Django versions are now: 1.11, 2.0, 2.1, 2.2, and 3.0. + +This release will be the last to support Python 3.5 or Django 1.11. + +## OpenAPI Schema Generation Improvements + +The OpenAPI schema generation continues to mature. Some highlights in 3.11 +include: + +* Automatic mapping of Django REST Framework renderers and parsers into OpenAPI + request and response media-types. +* Improved mapping JSON schema mapping types, for example in HStoreFields, and + with large integer values. +* Porting of the old CoreAPI parsing of docstrings to form OpenAPI operation + descriptions. + +In this example view operation descriptions for the `get` and `post` methods will +be extracted from the class docstring: + +```python +class DocStringExampleListView(APIView): +""" +get: A description of my GET operation. +post: A description of my POST operation. +""" + permission_classes = [permissions.IsAuthenticatedOrReadOnly] + + def get(self, request, *args, **kwargs): + ... + + def post(self, request, *args, **kwargs): + ... +``` + +## Validator / Default Context + +In some circumstances a Validator class or a Default class may need to access the serializer field with which it is called, or the `.context` with which the serializer was instantiated. In particular: + +* Uniqueness validators need to be able to determine the name of the field to which they are applied, in order to run an appropriate database query. +* The `CurrentUserDefault` needs to be able to determine the context with which the serializer was instantiated, in order to return the current user instance. + +Previous our approach to this was that implementations could include a `set_context` method, which would be called prior to validation. However this approach had issues with potential race conditions. We have now move this approach into a pending deprecation state. It will continue to function, but will be escalated to a deprecated state in 3.12, and removed entirely in 3.13. + +Instead, validators or defaults which require the serializer context, should include a `requires_context = True` attribute on the class. + +The `__call__` method should then include an additional `serializer_field` argument. + +Validator implementations will look like this: + +```python +class CustomValidator: + requires_context = True + + def __call__(self, value, serializer_field): + ... +``` + +Default implementations will look like this: + +```python +class CustomDefault: + requires_context = True + + def __call__(self, serializer_field): + ... +``` + +--- + +## Funding + +REST framework is a *collaboratively funded project*. If you use +REST framework commercially we strongly encourage you to invest in its +continued development by **[signing up for a paid plan][funding]**. + +*Every single sign-up helps us make REST framework long-term financially sustainable.* + + +
+ +*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [ESG](https://software.esg-usa.com/), [Rollbar](https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial), [Cadre](https://cadre.com), [Kloudless](https://hubs.ly/H0f30Lf0), [Lights On Software](https://lightsonsoftware.com), and [Retool](https://retool.com/?utm_source=djangorest&utm_medium=sponsorship).* + +[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors +[funding]: funding.md diff --git a/docs/community/3.12-announcement.md b/docs/community/3.12-announcement.md new file mode 100644 index 000000000..9d2220933 --- /dev/null +++ b/docs/community/3.12-announcement.md @@ -0,0 +1,169 @@ + + +# Django REST framework 3.12 + +REST framework 3.12 brings a handful of refinements to the OpenAPI schema +generation, plus support for Django's new database-agnostic `JSONField`, +and some improvements to the `SearchFilter` class. + +## Grouping operations with tags. + +Open API schemas will now automatically include tags, based on the first element +in the URL path. + +For example... + +Method | Path | Tags +--------------------------------|-----------------|------------- +`GET`, `PUT`, `PATCH`, `DELETE` | `/users/{id}/` | `['users']` +`GET`, `POST` | `/users/` | `['users']` +`GET`, `PUT`, `PATCH`, `DELETE` | `/orders/{id}/` | `['orders']` +`GET`, `POST` | `/orders/` | `['orders']` + +The tags used for a particular view may also be overridden... + +```python +class MyOrders(APIView): + schema = AutoSchema(tags=['users', 'orders']) + ... +``` + +See [the schema documentation](https://www.django-rest-framework.org/api-guide/schemas/#grouping-operations-with-tags) for more information. + +## Customizing the operation ID. + +REST framework automatically determines operation IDs to use in OpenAPI +schemas. The latest version provides more control for overriding the behaviour +used to generate the operation IDs. + +See [the schema documentation](https://www.django-rest-framework.org/api-guide/schemas/#operationid) for more information. + +## Support for OpenAPI components. + +In order to output more graceful OpenAPI schemes, REST framework 3.12 now +defines components in the schema, and then references them inside request +and response objects. This is in contrast with the previous approach, which +fully expanded the request and response bodies for each operation. + +The names used for a component default to using the serializer class name, [but +may be overridden if needed](https://www.django-rest-framework.org/api-guide/schemas/#components +)... + +```python +class MyOrders(APIView): + schema = AutoSchema(component_name="OrderDetails") +``` + +## More Public API + +Many methods on the `AutoSchema` class have now been promoted to public API, +allowing you to more fully customize the schema generation. The following methods +are now available for overriding... + +* `get_path_parameters` +* `get_pagination_parameters` +* `get_filter_parameters` +* `get_request_body` +* `get_responses` +* `get_serializer` +* `get_paginator` +* `map_serializer` +* `map_field` +* `map_choice_field` +* `map_field_validators` +* `allows_filters`. + +See [the schema docs](https://www.django-rest-framework.org/api-guide/schemas/#per-view-customization) +for details on using custom `AutoSchema` subclasses. + +## Support for JSONField. + +Django 3.1 deprecated the existing `django.contrib.postgres.fields.JSONField` +in favour of a new database-agnositic `JSONField`. + +REST framework 3.12 now supports this new model field, and `ModelSerializer` +classes will correctly map the model field. + +## SearchFilter improvements + +There are a couple of significant improvements to the `SearchFilter` class. + +### Nested searches against JSONField and HStoreField + +The class now supports nested search within `JSONField` and `HStoreField`, using +the double underscore notation for traversing which element of the field the +search should apply to. + +```python +class SitesSearchView(generics.ListAPIView): + """ + An API view to return a list of archaeological sites, optionally filtered + by a search against the site name or location. (Location searches are + matched against the region and country names.) + """ + queryset = Sites.objects.all() + serializer_class = SitesSerializer + filter_backends = [filters.SearchFilter] + search_fields = ['site_name', 'location__region', 'location__country'] +``` + +### Searches against annotate fields + +Django allows querysets to create additional virtual fields, using the `.annotate` +method. We now support searching against annotate fields. + +```python +class PublisherSearchView(generics.ListAPIView): + """ + Search for publishers, optionally filtering the search against the average + rating of all their books. + """ + queryset = Publisher.objects.annotate(avg_rating=Avg('book__rating')) + serializer_class = PublisherSerializer + filter_backends = [filters.SearchFilter] + search_fields = ['avg_rating'] +``` + +--- + +## Funding + +REST framework is a *collaboratively funded project*. If you use +REST framework commercially we strongly encourage you to invest in its +continued development by **[signing up for a paid plan][funding]**. + +*Every single sign-up helps us make REST framework long-term financially sustainable.* + + +
+ +*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [ESG](https://software.esg-usa.com/), [Rollbar](https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial), [Cadre](https://cadre.com), [Kloudless](https://hubs.ly/H0f30Lf0), [Lights On Software](https://lightsonsoftware.com), and [Retool](https://retool.com/?utm_source=djangorest&utm_medium=sponsorship).* + +[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors +[funding]: funding.md diff --git a/docs/community/3.5-announcement.md b/docs/community/3.5-announcement.md index cce2dd050..91bfce428 100644 --- a/docs/community/3.5-announcement.md +++ b/docs/community/3.5-announcement.md @@ -69,7 +69,7 @@ schema_view = get_schema_view( ) urlpatterns = [ - url(r'^swagger/$', schema_view), + path('swagger/', schema_view), ... ] ``` @@ -198,8 +198,8 @@ Make sure to include the view before your router urls. For example: schema_view = get_schema_view(title='Example API') urlpatterns = [ - url('^$', schema_view), - url(r'^', include(router.urls)), + path('', schema_view), + path('', include(router.urls)), ] ### Schema path representations diff --git a/docs/community/3.6-announcement.md b/docs/community/3.6-announcement.md index c41ad8ecb..35704eb58 100644 --- a/docs/community/3.6-announcement.md +++ b/docs/community/3.6-announcement.md @@ -73,7 +73,7 @@ To install the API documentation, you'll need to include it in your projects URL urlpatterns = [ ... - url(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION)) + path('docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION)) ] Once installed you should see something a little like this: diff --git a/docs/community/3.9-announcement.md b/docs/community/3.9-announcement.md index 1cf4464d6..fee6e6909 100644 --- a/docs/community/3.9-announcement.md +++ b/docs/community/3.9-announcement.md @@ -62,6 +62,7 @@ Here's an example of adding an OpenAPI schema to the URL conf: ```python from rest_framework.schemas import get_schema_view from rest_framework.renderers import JSONOpenAPIRenderer +from django.urls import path schema_view = get_schema_view( title='Server Monitoring API', @@ -70,7 +71,7 @@ schema_view = get_schema_view( ) urlpatterns = [ - url('^schema.json$', schema_view), + path('schema.json', schema_view), ... ] ``` diff --git a/docs/community/project-management.md b/docs/community/project-management.md index 5d7dab561..293c65e24 100644 --- a/docs/community/project-management.md +++ b/docs/community/project-management.md @@ -195,7 +195,6 @@ If `@tomchristie` ceases to participate in the project then `@j4mie` has respons The following issues still need to be addressed: -* [Consider moving the repo into a proper GitHub organization][github-org]. * Ensure `@jamie` has back-up access to the `django-rest-framework.org` domain setup and admin. * Document ownership of the [live example][sandbox] API. * Document ownership of the [mailing list][mailing-list] and IRC channel. @@ -206,6 +205,5 @@ The following issues still need to be addressed: [transifex-project]: https://www.transifex.com/projects/p/django-rest-framework/ [transifex-client]: https://pypi.org/project/transifex-client/ [translation-memory]: http://docs.transifex.com/guides/tm#let-tm-automatically-populate-translations -[github-org]: https://github.com/encode/django-rest-framework/issues/2162 [sandbox]: https://restframework.herokuapp.com/ [mailing-list]: https://groups.google.com/forum/#!forum/django-rest-framework diff --git a/docs/community/release-notes.md b/docs/community/release-notes.md index e3f3820d3..c981b9ac9 100644 --- a/docs/community/release-notes.md +++ b/docs/community/release-notes.md @@ -1,9 +1,5 @@ # Release Notes -> Release Early, Release Often -> -> — Eric S. Raymond, [The Cathedral and the Bazaar][cite]. - ## Versioning Minor version numbers (0.0.x) are used for changes that are API compatible. You should be able to upgrade between minor point releases without any other code changes. @@ -38,8 +34,132 @@ You can determine your currently installed version using `pip show`: --- +## 3.12.x series + +### 3.12.2 + +Date: 13th October 2020 + +* Fix issue if `rest_framework.authtoken.models` is imported, but `rest_framework.authtoken` is not in INSTALLED_APPS. [#7571] +* Ignore subclasses of BrowsableAPIRenderer in OpenAPI schema. [#7497] +* Narrower exception catching in serilizer fields, to ensure that any errors in broken `get_queryset()` methods are not masked. [#7480] + +### 3.12.1 + +Date: 28th September 2020 + +* Add `TokenProxy` migration. [#7557] + +### 3.12.0 + +Date: 28th September 2020 + +* Add `--file` option to `generateschema` command. [#7130] +* Support `tags` for OpenAPI schema generation. See [the schema docs](https://www.django-rest-framework.org/api-guide/schemas/#grouping-operations-with-tags). [#7184] +* Support customising the operation ID for schema generation. See [the schema docs](https://www.django-rest-framework.org/api-guide/schemas/#operationid). [#7190] +* Support OpenAPI components for schema generation. See [the schema docs](https://www.django-rest-framework.org/api-guide/schemas/#components). [#7124] +* The following methods on `AutoSchema` become public API: `get_path_parameters`, `get_pagination_parameters`, `get_filter_parameters`, `get_request_body`, `get_responses`, `get_serializer`, `get_paginator`, `map_serializer`, `map_field`, `map_choice_field`, `map_field_validators`, `allows_filters`. See [the schema docs](https://www.django-rest-framework.org/api-guide/schemas/#autoschema) +* Add support for Django 3.1's database-agnositic `JSONField`. [#7467] +* `SearchFilter` now supports nested search on `JSONField` and `HStoreField` model fields. [#7121] +* `SearchFilter` now supports searching on `annotate()` fields. [#6240] +* The authtoken model no longer exposes the `pk` in the admin URL. [#7341] +* Add `__repr__` for Request instances. [#7239] +* UTF-8 decoding with Latin-1 fallback for basic auth credentials. [#7193] +* CharField treats surrogate characters as a validation failure. [#7026] +* Don't include callables as default values in schemas. [#7105] +* Improve `ListField` schema output to include all available child information. [#7137] +* Allow `default=False` to be included for `BooleanField` schema outputs. [#7165] +* Include `"type"` information in `ChoiceField` schema outputs. [#7161] +* Include `"type": "object"` on schema objects. [#7169] +* Don't include component in schema output for DELETE requests. [#7229] +* Fix schema types for `DecimalField`. [#7254] +* Fix schema generation for `ObtainAuthToken` view. [#7211] +* Support passing `context=...` to view `.get_serializer()` methods. [#7298] +* Pass custom code to `PermissionDenied` if permission class has one set. [#7306] +* Include "example" in schema pagination output. [#7275] +* Default status code of 201 on schema output for POST requests. [#7206] +* Use camelCase for operation IDs in schema output. [#7208] +* Warn if duplicate operation IDs exist in schema output. [#7207] +* Improve handling of decimal type when mapping `ChoiceField` to a schema output. [#7264] +* Disable YAML aliases for OpenAPI schema outputs. [#7131] +* Fix action URL names for APIs included under a namespaced URL. [#7287] +* Update jQuery version from 3.4 to 3.5. [#7313] +* Fix `UniqueTogether` handling when serializer fields use `source=...`. [#7143] +* HTTP `HEAD` requests now set `self.action` correctly on a ViewSet instance. [#7223] +* Return a valid OpenAPI schema for the case where no API schema paths exist. [#7125] +* Include tests in package distribution. [#7145] +* Allow type checkers to support annotations like `ModelSerializer[Author]`. [#7385] +* Don't include invalid `charset=None` portion in the request `Content-Type` header when using APIClient. [#7400] +* Fix `\Z`/`\z` tokens in OpenAPI regexs. [#7389] +* Fix `PrimaryKeyRelatedField` and `HyperlinkedRelatedField` when source field is actually a property. [#7142] +* `Token.generate_key` is now a class method. [#7502] +* `@action` warns if method is wrapped in a decorator that does not preserve information using `@functools.wraps`. [#7098] + +--- + +## 3.11.x series + +### 3.11.2 + +**Date**: 30th September 2020 + +* **Security**: Drop `urlize_quoted_links` template tag in favour of Django's built-in `urlize`. Removes a XSS vulnerability for some kinds of content in the browsable API. + +### 3.11.1 + +**Date**: 5th August 2020 + +* Fix compat with Django 3.1 + +### 3.11.0 + +**Date**: 12th December 2019 + +* Drop `.set_context` API [in favour of a `requires_context` marker](3.11-announcement.md#validator-default-context). +* Changed default widget for TextField with choices to select box. [#6892][gh6892] +* Supported nested writes on non-relational fields, such as JSONField. [#6916][gh6916] +* Include request/response media types in OpenAPI schemas, based on configured parsers/renderers. [#6865][gh6865] +* Include operation descriptions in OpenAPI schemas, based on the docstring on the view. [#6898][gh6898] +* Fix representation of serializers with all optional fields in OpenAPI schemas. [#6941][gh6941], [#6944][gh6944] +* Fix representation of `serializers.HStoreField` in OpenAPI schemas. [#6914][gh6914] +* Fix OpenAPI generation when title or version is not provided. [#6912][gh6912] +* Use `int64` representation for large integers in OpenAPI schemas. [#7018][gh7018] +* Improved error messages if no `.to_representation` implementation is provided on a field subclass. [#6996][gh6996] +* Fix for serializer classes that use multiple inheritance. [#6980][gh6980] +* Fix for reversing Hyperlinked URL fields with percent encoded components in the path. [#7059][gh7059] +* Update bootstrap to 3.4.1. [#6923][gh6923] + ## 3.10.x series +### 3.10.3 + +**Date**: 4th September 2019 + +* Include API version in OpenAPI schema generation, defaulting to empty string. +* Add pagination properties to OpenAPI response schemas. +* Add missing "description" property to OpenAPI response schemas. +* Only include "required" for non-empty cases in OpenAPI schemas. +* Fix response schemas for "DELETE" case in OpenAPI schemas. +* Use an array type for list view response schemas. +* Use consistent `lowerInitialCamelCase` style in OpenAPI operation IDs. +* Fix `minLength`/`maxLength`/`minItems`/`maxItems` properties in OpenAPI schemas. +* Only call `FileField.url` once in serialization, for improved performance. +* Fix an edge case where throttling calculations could error after a configuration change. + +### 3.10.2 + +**Date**: 29th July 2019 + +* Various `OpenAPI` schema fixes. +* Ability to specify urlconf in include_docs_urls. + +### 3.10.1 + +**Date**: 17th July 2019 + +* Don't include autocomplete fields on TokenAuth admin, since it forces constraints on custom user models & admin. +* Require `uritemplate` for OpenAPI schema generation, but not `coreapi`. + ### 3.10.0 **Date**: [15th July 2019][3.10.0-milestone] @@ -129,7 +249,7 @@ Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10. * Add testing of Python 3.7 support [#6141][gh6141] * Test using Django 2.1 final release. [#6109][gh6109] * Added djangorestframework-datatables to third-party packages [#5931][gh5931] -* Change ISO 8601 date format to exclude year/month [#5936][gh5936] +* Change ISO 8601 date format to exclude year/month-only options [#5936][gh5936] * Update all pypi.python.org URLs to pypi.org [#5942][gh5942] * Ensure that html forms (multipart form data) respect optional fields [#5927][gh5927] * Allow hashing of ErrorDetail. [#5932][gh5932] @@ -142,7 +262,7 @@ Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10. * Fixed Javascript `e.indexOf` is not a function error [#5982][gh5982] * Fix schemas for extra actions [#5992][gh5992] * Improved get_error_detail to use error_dict/error_list [#5785][gh5785] -* Imprvied URLs in Admin renderer [#5988][gh5988] +* Improved URLs in Admin renderer [#5988][gh5988] * Add "Community" section to docs, minor cleanup [#5993][gh5993] * Moved guardian imports out of compat [#6054][gh6054] * Deprecate the `DjangoObjectPermissionsFilter` class, moved to the `djangorestframework-guardian` package. [#6075][gh6075] @@ -193,11 +313,11 @@ Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10. def perform_create(self, serializer): serializer.save(owner=self.request.user) - Alternatively you may override `save()` or `create()` or `update()` on the serialiser as appropriate. + Alternatively you may override `save()` or `create()` or `update()` on the serializer as appropriate. * Correct allow_null behaviour when required=False [#5888][gh5888] - Without an explicit `default`, `allow_null` implies a default of `null` for outgoing serialisation. Previously such + Without an explicit `default`, `allow_null` implies a default of `null` for outgoing serialization. Previously such fields were being skipped when read-only or otherwise not required. **Possible backwards compatibility break** if you were relying on such fields being excluded from the outgoing @@ -435,7 +555,7 @@ Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10. * Deprecated `exclude_from_schema` on `APIView` and `api_view` decorator. Set `schema = None` or `@schema(None)` as appropriate. [#5422][gh5422] * Timezone-aware `DateTimeField`s now respect active or default `timezone` during serialization, instead of always using UTC. [#5435][gh5435] - Resolves inconsistency whereby instances were serialised with supplied datetime for `create` but UTC for `retrieve`. [#3732][gh3732] + Resolves inconsistency whereby instances were serialized with supplied datetime for `create` but UTC for `retrieve`. [#3732][gh3732] **Possible backwards compatibility break** if you were relying on datetime strings being UTC. Have client interpret datetimes or [set default or active timezone (docs)][djangodocs-set-timezone] to UTC if needed. @@ -2150,3 +2270,18 @@ For older release notes, [please see the version 2.x documentation][old-release- [gh6680]: https://github.com/encode/django-rest-framework/issues/6680 [gh6317]: https://github.com/encode/django-rest-framework/issues/6317 + + +[gh6892]: https://github.com/encode/django-rest-framework/issues/6892 +[gh6916]: https://github.com/encode/django-rest-framework/issues/6916 +[gh6865]: https://github.com/encode/django-rest-framework/issues/6865 +[gh6898]: https://github.com/encode/django-rest-framework/issues/6898 +[gh6941]: https://github.com/encode/django-rest-framework/issues/6941 +[gh6944]: https://github.com/encode/django-rest-framework/issues/6944 +[gh6914]: https://github.com/encode/django-rest-framework/issues/6914 +[gh6912]: https://github.com/encode/django-rest-framework/issues/6912 +[gh7018]: https://github.com/encode/django-rest-framework/issues/7018 +[gh6996]: https://github.com/encode/django-rest-framework/issues/6996 +[gh6980]: https://github.com/encode/django-rest-framework/issues/6980 +[gh7059]: https://github.com/encode/django-rest-framework/issues/7059 +[gh6923]: https://github.com/encode/django-rest-framework/issues/6923 diff --git a/docs/community/third-party-packages.md b/docs/community/third-party-packages.md index 0f8bdc4a4..d4359890d 100644 --- a/docs/community/third-party-packages.md +++ b/docs/community/third-party-packages.md @@ -198,6 +198,7 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque * [rest_condition][rest-condition] - Another extension for building complex permissions in a simple and convenient way. * [dry-rest-permissions][dry-rest-permissions] - Provides a simple way to define permissions for individual api actions. * [drf-access-policy][drf-access-policy] - Declarative and flexible permissions inspired by AWS' IAM policies. +* [drf-psq][drf-psq] - An extension that gives support for having action-based **permission_classes**, **serializer_class**, and **queryset** dependent on permission-based rules. ### Serializers @@ -211,6 +212,8 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque * [djangorestframework-queryfields][djangorestframework-queryfields] - Serializer mixin allowing clients to control which fields will be sent in the API response. * [drf-flex-fields][drf-flex-fields] - Serializer providing dynamic field expansion and sparse field sets via URL parameters. * [drf-action-serializer][drf-action-serializer] - Serializer providing per-action fields config for use with ViewSets to prevent having to write multiple serializers. +* [djangorestframework-dataclasses][djangorestframework-dataclasses] - Serializer providing automatic field generation for Python dataclasses, like the built-in ModelSerializer does for models. +* [django-restql][django-restql] - Turn your REST API into a GraphQL like API(It allows clients to control which fields will be sent in a response, uses GraphQL like syntax, supports read and write on both flat and nested fields). ### Serializer fields @@ -220,8 +223,8 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque ### Views -* [djangorestframework-bulk][djangorestframework-bulk] - Implements generic view mixins as well as some common concrete generic views to allow to apply bulk operations via API requests. * [django-rest-multiple-models][django-rest-multiple-models] - Provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request. +* [drf-typed-views][drf-typed-views] - Use Python type annotations to validate/deserialize request parameters. Inspired by API Star, Hug and FastAPI. ### Routers @@ -238,7 +241,7 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque * [djangorestframework-csv][djangorestframework-csv] - Provides CSV renderer support. * [djangorestframework-jsonapi][djangorestframework-jsonapi] - Provides a parser, renderer, serializers, and other tools to help build an API that is compliant with the jsonapi.org spec. -* [drf_ujson][drf_ujson] - Implements JSON rendering using the UJSON package. +* [drf_ujson2][drf_ujson2] - Implements JSON rendering using the UJSON package. * [rest-pandas][rest-pandas] - Pandas DataFrame-powered renderers including Excel, CSV, and SVG formats. * [djangorestframework-rapidjson][djangorestframework-rapidjson] - Provides rapidjson support with parser and renderer. @@ -252,8 +255,7 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque ### Misc * [cookiecutter-django-rest][cookiecutter-django-rest] - A cookiecutter template that takes care of the setup and configuration so you can focus on making your REST apis awesome. -* [djangorestrelationalhyperlink][djangorestrelationalhyperlink] - A hyperlinked serialiser that can can be used to alter relationships via hyperlinks, but otherwise like a hyperlink model serializer. -* [django-rest-swagger][django-rest-swagger] - An API documentation generator for Swagger UI. +* [djangorestrelationalhyperlink][djangorestrelationalhyperlink] - A hyperlinked serializer that can can be used to alter relationships via hyperlinks, but otherwise like a hyperlink model serializer. * [django-rest-framework-proxy][django-rest-framework-proxy] - Proxy to redirect incoming request to another API server. * [gaiarestframework][gaiarestframework] - Utils for django-rest-framework * [drf-extensions][drf-extensions] - A collection of custom extensions @@ -270,6 +272,10 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque * [django-rest-framework-condition][django-rest-framework-condition] - Decorators for managing HTTP cache headers for Django REST framework (ETag and Last-modified). * [django-rest-witchcraft][django-rest-witchcraft] - Provides DRF integration with SQLAlchemy with SQLAlchemy model serializers/viewsets and a bunch of other goodies * [djangorestframework-mvt][djangorestframework-mvt] - An extension for creating views that serve Postgres data as Map Box Vector Tiles. +* [drf-viewset-profiler][drf-viewset-profiler] - Lib to profile all methods from a viewset line by line. +* [djangorestframework-features][djangorestframework-features] - Advanced schema generation and more based on named features. +* [django-elasticsearch-dsl-drf][django-elasticsearch-dsl-drf] - Integrate Elasticsearch DSL with Django REST framework. Package provides views, serializers, filter backends, pagination and other handy add-ons. +* [django-api-client][django-api-client] - DRF client that groups the Endpoint response, for use in CBVs and FBV as if you were working with Django's Native Models.. [cite]: http://www.software-ecosystems.com/Software_Ecosystems/Ecosystems.html [cookiecutter]: https://github.com/jpadilla/cookiecutter-django-rest-framework @@ -303,19 +309,17 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque [djangorestframework-hstore]: https://github.com/djangonauts/django-rest-framework-hstore [drf-compound-fields]: https://github.com/estebistec/drf-compound-fields [django-extra-fields]: https://github.com/Hipo/drf-extra-fields -[djangorestframework-bulk]: https://github.com/miki725/django-rest-framework-bulk [django-rest-multiple-models]: https://github.com/MattBroach/DjangoRestMultipleModels [drf-nested-routers]: https://github.com/alanjds/drf-nested-routers [wq.db.rest]: https://wq.io/docs/about-rest [djangorestframework-msgpack]: https://github.com/juanriaza/django-rest-framework-msgpack [djangorestframework-camel-case]: https://github.com/vbabiy/djangorestframework-camel-case [djangorestframework-csv]: https://github.com/mjumbewu/django-rest-framework-csv -[drf_ujson]: https://github.com/gizmag/drf-ujson-renderer +[drf_ujson2]: https://github.com/Amertz08/drf_ujson2 [rest-pandas]: https://github.com/wq/django-rest-pandas [djangorestframework-rapidjson]: https://github.com/allisson/django-rest-framework-rapidjson [djangorestframework-chain]: https://github.com/philipn/django-rest-framework-chain [djangorestrelationalhyperlink]: https://github.com/fredkingham/django_rest_model_hyperlink_serializers_project -[django-rest-swagger]: https://github.com/marcgibbons/django-rest-swagger [django-rest-framework-proxy]: https://github.com/eofs/django-rest-framework-proxy [gaiarestframework]: https://github.com/AppsFuel/gaiarestframework [drf-extensions]: https://github.com/chibisov/drf-extensions @@ -325,7 +329,7 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque [django-versatileimagefield-drf-docs]:https://django-versatileimagefield.readthedocs.io/en/latest/drf_integration.html [drf-tracking]: https://github.com/aschn/drf-tracking [django-rest-framework-braces]: https://github.com/dealertrack/django-rest-framework-braces -[dry-rest-permissions]: https://github.com/Helioscene/dry-rest-permissions +[dry-rest-permissions]: https://github.com/FJNR-inc/dry-rest-permissions [django-url-filter]: https://github.com/miki725/django-url-filter [drf-url-filter]: https://github.com/manjitkumar/drf-url-filters [cookiecutter-django-rest]: https://github.com/agconti/cookiecutter-django-rest @@ -347,6 +351,14 @@ To submit new content, [open an issue][drf-create-issue] or [create a pull reque [django-rest-witchcraft]: https://github.com/shosca/django-rest-witchcraft [drf-access-policy]: https://github.com/rsinger86/drf-access-policy [drf-flex-fields]: https://github.com/rsinger86/drf-flex-fields +[drf-typed-views]: https://github.com/rsinger86/drf-typed-views [drf-action-serializer]: https://github.com/gregschmit/drf-action-serializer +[djangorestframework-dataclasses]: https://github.com/oxan/djangorestframework-dataclasses +[django-restql]: https://github.com/yezyilomo/django-restql [djangorestframework-mvt]: https://github.com/corteva/djangorestframework-mvt [django-rest-framework-guardian]: https://github.com/rpkilby/django-rest-framework-guardian +[drf-viewset-profiler]: https://github.com/fvlima/drf-viewset-profiler +[djangorestframework-features]: https://github.com/cloudcode-hungary/django-rest-framework-features/ +[django-elasticsearch-dsl-drf]: https://github.com/barseghyanartur/django-elasticsearch-dsl-drf +[django-api-client]: https://github.com/rhenter/django-api-client +[drf-psq]: https://github.com/drf-psq/drf-psq diff --git a/docs/community/tutorials-and-resources.md b/docs/community/tutorials-and-resources.md index 7993f54fb..cfd3ba852 100644 --- a/docs/community/tutorials-and-resources.md +++ b/docs/community/tutorials-and-resources.md @@ -11,8 +11,8 @@ There are a wide range of resources available for learning and using Django REST - - + + @@ -101,12 +101,12 @@ Want your Django REST Framework talk/tutorial/article to be added to our website [django-rest-framework-course]: https://teamtreehouse.com/library/django-rest-framework [pycon-uk-2016]: https://www.youtube.com/watch?v=FjmiGh7OqVg [django-under-hood-2014]: https://www.youtube.com/watch?v=3cSsbe-tA0E -[integrating-pandas-drf-and-bokeh]: https://machinalis.com/blog/pandas-django-rest-framework-bokeh/ -[controlling-uncertainty-on-web-apps-and-apis]: https://machinalis.com/blog/controlling-uncertainty-on-web-applications-and-apis/ -[full-text-search-in-drf]: https://machinalis.com/blog/full-text-search-on-django-rest-framework/ -[oauth2-authentication-with-drf]: https://machinalis.com/blog/oauth2-authentication/ -[nested-resources-with-drf]: https://machinalis.com/blog/nested-resources-with-django/ -[image-fields-with-drf]: https://machinalis.com/blog/image-fields-with-django-rest-framework/ +[integrating-pandas-drf-and-bokeh]: https://web.archive.org/web/20180104205117/http://machinalis.com/blog/pandas-django-rest-framework-bokeh/ +[controlling-uncertainty-on-web-apps-and-apis]: https://web.archive.org/web/20180104205043/https://machinalis.com/blog/controlling-uncertainty-on-web-applications-and-apis/ +[full-text-search-in-drf]: https://web.archive.org/web/20180104205059/http://machinalis.com/blog/full-text-search-on-django-rest-framework/ +[oauth2-authentication-with-drf]: https://web.archive.org/web/20180104205054/http://machinalis.com/blog/oauth2-authentication/ +[nested-resources-with-drf]: https://web.archive.org/web/20180104205109/http://machinalis.com/blog/nested-resources-with-django/ +[image-fields-with-drf]: https://web.archive.org/web/20180104205048/http://machinalis.com/blog/image-fields-with-django-rest-framework/ [chatbot-using-drf-part1]: https://chatbotslife.com/chatbot-using-django-rest-framework-api-ai-slack-part-1-3-69c7e38b7b1e#.g2aceuncf [new-django-admin-with-drf-and-emberjs]: https://blog.levit.be/new-django-admin-with-emberjs-what-are-the-news/ [drf-schema]: https://drf-schema-adapter.readthedocs.io/en/latest/ diff --git a/docs/coreapi/from-documenting-your-api.md b/docs/coreapi/from-documenting-your-api.md index 9ac3be686..604dfa668 100644 --- a/docs/coreapi/from-documenting-your-api.md +++ b/docs/coreapi/from-documenting-your-api.md @@ -19,7 +19,7 @@ To install the API documentation, you'll need to include it in your project's UR urlpatterns = [ ... - url(r'^docs/', include_docs_urls(title='My API title')) + path('docs/', include_docs_urls(title='My API title')) ] This will include two different views: @@ -41,7 +41,7 @@ You may ensure views are given a `request` instance by calling `include_docs_url urlpatterns = [ ... # Generate schema with valid `request` instance: - url(r'^docs/', include_docs_urls(title='My API title', public=False)) + path('docs/', include_docs_urls(title='My API title', public=False)) ] diff --git a/docs/coreapi/schemas.md b/docs/coreapi/schemas.md index 6ee620343..653105a7a 100644 --- a/docs/coreapi/schemas.md +++ b/docs/coreapi/schemas.md @@ -43,11 +43,12 @@ To add a dynamically generated schema view to your API, use `get_schema_view`. ```python from rest_framework.schemas import get_schema_view +from django.urls import path schema_view = get_schema_view(title="Example API") urlpatterns = [ - url('^schema$', schema_view), + path('schema', schema_view), ... ] ``` @@ -191,7 +192,7 @@ each view, allowed method and path.) **Note**: For basic `APIView` subclasses, default introspection is essentially limited to the URL kwarg path parameters. For `GenericAPIView` subclasses, which includes all the provided class based views, `AutoSchema` will -attempt to introspect serialiser, pagination and filter fields, as well as +attempt to introspect serializer, pagination and filter fields, as well as provide richer path field descriptions. (The key hooks here are the relevant `GenericAPIView` attributes and methods: `get_serializer`, `pagination_class`, `filter_backends` and so on.) @@ -292,7 +293,7 @@ The simplest way to include a schema in your project is to use the schema_view = get_schema_view(title="Server Monitoring API") urlpatterns = [ - url('^$', schema_view), + path('', schema_view), ... ] @@ -358,7 +359,7 @@ List of url patterns to limit the schema introspection to. If you only want the to be exposed in the schema: schema_url_patterns = [ - url(r'^api/', include('myproject.api.urls')), + path('api/', include('myproject.api.urls')), ] schema_view = get_schema_view( @@ -411,7 +412,7 @@ return the schema. **urls.py:** urlpatterns = [ - url('/', schema_view), + path('', schema_view), ... ] @@ -827,10 +828,17 @@ A short description of the meaning and intended usage of the input field. [drf-yasg][drf-yasg] generates [OpenAPI][open-api] documents suitable for code generation - nested schemas, named models, response bodies, enum/pattern/min/max validators, form parameters, etc. + +## drf-spectacular - Sane and flexible OpenAPI 3.0 schema generation for Django REST framework + +[drf-spectacular][drf-spectacular] is a [OpenAPI 3][open-api] schema generation tool with explicit focus on extensibility, +customizability and client generation. It's usage patterns are very similar to [drf-yasg][drf-yasg]. + [cite]: https://blog.heroku.com/archives/2014/1/8/json_schema_for_heroku_platform_api [coreapi]: https://www.coreapi.org/ [corejson]: https://www.coreapi.org/specification/encoding/#core-json-encoding [drf-yasg]: https://github.com/axnsan12/drf-yasg/ +[drf-spectacular]: https://github.com/tfranzel/drf-spectacular/ [open-api]: https://openapis.org/ [json-hyperschema]: https://json-schema.org/latest/json-schema-hypermedia.html [api-blueprint]: https://apiblueprint.org/ diff --git a/docs/img/apiary.png b/docs/img/apiary.png deleted file mode 100644 index 923d384eb..000000000 Binary files a/docs/img/apiary.png and /dev/null differ diff --git a/docs/img/books/dfa-cover.jpg b/docs/img/books/dfa-cover.jpg new file mode 100644 index 000000000..09ed268f2 Binary files /dev/null and b/docs/img/books/dfa-cover.jpg differ diff --git a/docs/img/books/rad-cover.png b/docs/img/books/rad-cover.png deleted file mode 100644 index 75b19df64..000000000 Binary files a/docs/img/books/rad-cover.png and /dev/null differ diff --git a/docs/img/django-rest-swagger.png b/docs/img/django-rest-swagger.png deleted file mode 100644 index 96a6b2380..000000000 Binary files a/docs/img/django-rest-swagger.png and /dev/null differ diff --git a/docs/img/premium/bitio-readme.png b/docs/img/premium/bitio-readme.png new file mode 100644 index 000000000..c47118cc6 Binary files /dev/null and b/docs/img/premium/bitio-readme.png differ diff --git a/docs/img/premium/cadre-readme.png b/docs/img/premium/cadre-readme.png index 08290b727..412a09359 100644 Binary files a/docs/img/premium/cadre-readme.png and b/docs/img/premium/cadre-readme.png differ diff --git a/docs/img/premium/esg-readme.png b/docs/img/premium/esg-readme.png index 5aeb93fd2..8f84e5669 100644 Binary files a/docs/img/premium/esg-readme.png and b/docs/img/premium/esg-readme.png differ diff --git a/docs/img/premium/kloudless-readme.png b/docs/img/premium/kloudless-readme.png index e2f05831d..054ab9394 100644 Binary files a/docs/img/premium/kloudless-readme.png and b/docs/img/premium/kloudless-readme.png differ diff --git a/docs/img/premium/lightson-readme.png b/docs/img/premium/lightson-readme.png index 82cd61364..9afc1eee9 100644 Binary files a/docs/img/premium/lightson-readme.png and b/docs/img/premium/lightson-readme.png differ diff --git a/docs/img/premium/release-history.png b/docs/img/premium/release-history.png index b732b1ca2..d14024f32 100644 Binary files a/docs/img/premium/release-history.png and b/docs/img/premium/release-history.png differ diff --git a/docs/img/premium/retool-readme.png b/docs/img/premium/retool-readme.png new file mode 100644 index 000000000..56adba04d Binary files /dev/null and b/docs/img/premium/retool-readme.png differ diff --git a/docs/img/premium/rollbar-readme.png b/docs/img/premium/rollbar-readme.png index 630cddb32..3c07105ae 100644 Binary files a/docs/img/premium/rollbar-readme.png and b/docs/img/premium/rollbar-readme.png differ diff --git a/docs/img/premium/sentry-readme.png b/docs/img/premium/sentry-readme.png index b322e3735..420e8ee87 100644 Binary files a/docs/img/premium/sentry-readme.png and b/docs/img/premium/sentry-readme.png differ diff --git a/docs/img/premium/stream-readme.png b/docs/img/premium/stream-readme.png index 967ee7fc8..15da6ba71 100644 Binary files a/docs/img/premium/stream-readme.png and b/docs/img/premium/stream-readme.png differ diff --git a/docs/index.md b/docs/index.md index 6e55c10bf..0e6bb48f2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -52,7 +52,7 @@ Some reasons you might want to use REST framework: * [Authentication policies][authentication] including packages for [OAuth1a][oauth1-section] and [OAuth2][oauth2-section]. * [Serialization][serializers] that supports both [ORM][modelserializer-section] and [non-ORM][serializer-section] data sources. * Customizable all the way down - just use [regular function-based views][functionview-section] if you don't need the [more][generic-views] [powerful][viewsets] [features][routers]. -* [Extensive documentation][index], and [great community support][group]. +* Extensive documentation, and [great community support][group]. * Used and trusted by internationally recognised companies including [Mozilla][mozilla], [Red Hat][redhat], [Heroku][heroku], and [Eventbrite][eventbrite]. --- @@ -70,13 +70,12 @@ continued development by **[signing up for a paid plan][funding]**.
  • Stream
  • ESG
  • Rollbar
  • -
  • Cadre
  • -
  • Kloudless
  • -
  • Lights On Software
  • +
  • Retool
  • +
  • bit.io
  • -*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [ESG](https://software.esg-usa.com/), [Rollbar](https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial), [Cadre](https://cadre.com), [Kloudless](https://hubs.ly/H0f30Lf0), and [Lights On Software](https://lightsonsoftware.com).* +*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [ESG](https://software.esg-usa.com/), [Rollbar](https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial), [Cadre](https://cadre.com), [Kloudless](https://hubs.ly/H0f30Lf0), [Lights On Software](https://lightsonsoftware.com), [Retool](https://retool.com/?utm_source=djangorest&utm_medium=sponsorship), and [bit.io](https://bit.io/jobs?utm_source=DRF&utm_medium=sponsor&utm_campaign=DRF_sponsorship).* --- @@ -84,15 +83,15 @@ continued development by **[signing up for a paid plan][funding]**. REST framework requires the following: -* Python (3.5, 3.6, 3.7) -* Django (1.11, 2.0, 2.1, 2.2) +* Python (3.5, 3.6, 3.7, 3.8, 3.9) +* Django (2.2, 3.0, 3.1) We **highly recommend** and only officially support the latest patch release of each Python and Django series. The following packages are optional: -* [coreapi][coreapi] (1.32.0+) - Schema generation support. +* [PyYAML][pyyaml], [uritemplate][uriteemplate] (5.1+, 3.0.0+) - Schema generation support. * [Markdown][markdown] (3.0.0+) - Markdown support for the browsable API. * [Pygments][pygments] (2.4.0+) - Add syntax highlighting to Markdown processing. * [django-filter][django-filter] (1.0.1+) - Filtering support. @@ -121,7 +120,7 @@ If you're intending to use the browsable API you'll probably also want to add RE urlpatterns = [ ... - url(r'^api-auth/', include('rest_framework.urls')) + path('api-auth/', include('rest_framework.urls')) ] Note that the URL path can be whatever you want. @@ -147,7 +146,7 @@ Don't forget to make sure you've also added `rest_framework` to your `INSTALLED_ We're ready to create our API now. Here's our project's root `urls.py` module: - from django.conf.urls import url, include + from django.urls import path, include from django.contrib.auth.models import User from rest_framework import routers, serializers, viewsets @@ -169,8 +168,8 @@ Here's our project's root `urls.py` module: # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ - url(r'^', include(router.urls)), - url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) + path('', include(router.urls)), + path('api-auth/', include('rest_framework.urls', namespace='rest_framework')) ] You can now open the API in your browser at [http://127.0.0.1:8000/](http://127.0.0.1:8000/), and view your new 'users' API. If you use the login control in the top right corner you'll also be able to add, create and delete users from the system. @@ -191,11 +190,6 @@ For support please see the [REST framework discussion group][group], try the `# For priority support please sign up for a [professional or premium sponsorship plan](https://fund.django-rest-framework.org/topics/funding/). -For updates on REST framework development, you may also want to follow [the author][twitter] on Twitter. - - - - ## Security If you believe you’ve found something in Django REST framework which has security implications, please **do not raise the issue in a public forum**. @@ -236,7 +230,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [redhat]: https://www.redhat.com/ [heroku]: https://www.heroku.com/ [eventbrite]: https://www.eventbrite.co.uk/about/ -[coreapi]: https://pypi.org/project/coreapi/ +[pyyaml]: https://pypi.org/project/PyYAML/ +[uriteemplate]: https://pypi.org/project/uritemplate/ [markdown]: https://pypi.org/project/Markdown/ [pygments]: https://pypi.org/project/Pygments/ [django-filter]: https://pypi.org/project/django-filter/ diff --git a/docs/topics/api-clients.md b/docs/topics/api-clients.md index 3fd560634..9b61eaf42 100644 --- a/docs/topics/api-clients.md +++ b/docs/topics/api-clients.md @@ -384,7 +384,7 @@ First, install the API documentation views. These will include the schema resour urlpatterns = [ ... - url(r'^docs/', include_docs_urls(title='My API service')) + path('docs/', include_docs_urls(title='My API service'), name='api-docs'), ] Once the API documentation URLs are installed, you'll be able to include both the required JavaScript resources. Note that the ordering of these two lines is important, as the schema loading requires CoreAPI to already be installed. @@ -401,14 +401,14 @@ Once the API documentation URLs are installed, you'll be able to include both th The `coreapi` library, and the `schema` object will now both be available on the `window` instance. - const coreapi = window.coreapi - const schema = window.schema + const coreapi = window.coreapi; + const schema = window.schema; ## Instantiating a client In order to interact with the API you'll need a client instance. - var client = new coreapi.Client() + var client = new coreapi.Client(); Typically you'll also want to provide some authentication credentials when instantiating the client. @@ -421,9 +421,9 @@ the user to login, and then instantiate a client using session authentication: let auth = new coreapi.auth.SessionAuthentication({ csrfCookieName: 'csrftoken', - csrfHeaderName: 'X-CSRFToken' - }) - let client = new coreapi.Client({auth: auth}) + csrfHeaderName: 'X-CSRFToken', + }); + let client = new coreapi.Client({auth: auth}); The authentication scheme will handle including a CSRF header in any outgoing requests for unsafe HTTP methods. @@ -434,10 +434,10 @@ The `TokenAuthentication` class can be used to support REST framework's built-in `TokenAuthentication`, as well as OAuth and JWT schemes. let auth = new coreapi.auth.TokenAuthentication({ - scheme: 'JWT' - token: '' - }) - let client = new coreapi.Client({auth: auth}) + scheme: 'JWT', + token: '', + }); + let client = new coreapi.Client({auth: auth}); When using TokenAuthentication you'll probably need to implement a login flow using the CoreAPI client. @@ -448,20 +448,20 @@ request to an "obtain token" endpoint For example, using the "Django REST framework JWT" package // Setup some globally accessible state - window.client = new coreapi.Client() - window.loggedIn = false + window.client = new coreapi.Client(); + window.loggedIn = false; function loginUser(username, password) { - let action = ["api-token-auth", "obtain-token"] - let params = {username: "example", email: "example@example.com"} + let action = ["api-token-auth", "obtain-token"]; + let params = {username: "example", email: "example@example.com"}; client.action(schema, action, params).then(function(result) { // On success, instantiate an authenticated client. let auth = window.coreapi.auth.TokenAuthentication({ scheme: 'JWT', - token: result['token'] + token: result['token'], }) - window.client = coreapi.Client({auth: auth}) - window.loggedIn = true + window.client = coreapi.Client({auth: auth}); + window.loggedIn = true; }).catch(function (error) { // Handle error case where eg. user provides incorrect credentials. }) @@ -473,23 +473,23 @@ The `BasicAuthentication` class can be used to support HTTP Basic Authentication let auth = new coreapi.auth.BasicAuthentication({ username: '', - password: '' + password: '', }) - let client = new coreapi.Client({auth: auth}) + let client = new coreapi.Client({auth: auth}); ## Using the client Making requests: - let action = ["users", "list"] + let action = ["users", "list"]; client.action(schema, action).then(function(result) { // Return value is in 'result' }) Including parameters: - let action = ["users", "create"] - let params = {username: "example", email: "example@example.com"} + let action = ["users", "create"]; + let params = {username: "example", email: "example@example.com"}; client.action(schema, action, params).then(function(result) { // Return value is in 'result' }) @@ -512,12 +512,12 @@ The coreapi package is available on NPM. You'll either want to include the API schema in your codebase directly, by copying it from the `schema.js` resource, or else load the schema asynchronously. For example: - let client = new coreapi.Client() - let schema = null + let client = new coreapi.Client(); + let schema = null; client.get("https://api.example.org/").then(function(data) { // Load a CoreJSON API schema. - schema = data - console.log('schema loaded') + schema = data; + console.log('schema loaded'); }) [heroku-api]: https://devcenter.heroku.com/categories/platform-api diff --git a/docs/topics/documenting-your-api.md b/docs/topics/documenting-your-api.md index 5cdf631a6..cd7e5098f 100644 --- a/docs/topics/documenting-your-api.md +++ b/docs/topics/documenting-your-api.md @@ -45,7 +45,11 @@ this: SwaggerUIBundle.presets.apis, SwaggerUIBundle.SwaggerUIStandalonePreset ], - layout: "BaseLayout" + layout: "BaseLayout", + requestInterceptor: (request) => { + request.headers['X-CSRFToken'] = "{{ csrf_token }}" + return request; + } }) @@ -74,7 +78,7 @@ See the [Swagger UI documentation][swagger-ui] for advanced usage. ### A minimal example with ReDoc. Assuming you've followed the example from the schemas documentation for routing -a dynamic `SchemaView`, a minimal Django template for using Swagger UI might be +a dynamic `SchemaView`, a minimal Django template for using ReDoc might be this: ```html @@ -138,55 +142,15 @@ This also translates into a very useful interactive documentation viewer in the ![Screenshot - drf-yasg][image-drf-yasg] ---- +#### drf-spectacular - Sane and flexible OpenAPI 3.0 schema generation for Django REST framework -#### Django REST Swagger +[drf-spectacular][drf-spectacular] is a [OpenAPI 3][open-api] schema generation tool with explicit focus on extensibility, +customizability and client generation. Usage patterns are very similar to [drf-yasg][drf-yasg]. -Marc Gibbons' [Django REST Swagger][django-rest-swagger] integrates REST framework with the [Swagger][swagger] API documentation tool. The package produces well presented API documentation, and includes interactive tools for testing API endpoints. - -Django REST Swagger supports REST framework versions 2.3 and above. - -Mark is also the author of the [REST Framework Docs][rest-framework-docs] package which offers clean, simple autogenerated documentation for your API but is deprecated and has moved to Django REST Swagger. - -This package is fully documented, well supported, and comes highly recommended. - -![Screenshot - Django REST Swagger][image-django-rest-swagger] - ---- - -### DRF AutoDocs - -Oleksander Mashianovs' [DRF Auto Docs][drfautodocs-repo] automated api renderer. - -Collects almost all the code you written into documentation effortlessly. - -Supports: - - * functional view docs - * tree-like structure - * Docstrings: - * markdown - * preserve space & newlines - * formatting with nice syntax - * Fields: - * choices rendering - * help_text (to specify SerializerMethodField output, etc) - * smart read_only/required rendering - * Endpoint properties: - * filter_backends - * authentication_classes - * permission_classes - * extra url params(GET params) - -![whole structure](http://joxi.ru/52aBGNI4k3oyA0.jpg) - ---- - -#### Apiary - -There are various other online tools and services for providing API documentation. One notable service is [Apiary][apiary]. With Apiary, you describe your API using a simple markdown-like syntax. The generated documentation includes API interaction, a mock server for testing & prototyping, and various other tools. - -![Screenshot - Apiary][image-apiary] +It aims to extract as much schema information as possible, while providing decorators and extensions for easy +customization. There is explicit support for [swagger-codegen][swagger], [SwaggerUI][swagger-ui] and [Redoc][redoc], +i18n, versioning, authentication, polymorphism (dynamic requests and responses), query/path/header parameters, +documentation and more. Several popular plugins for DRF are supported out-of-the-box as well. --- @@ -221,7 +185,7 @@ If the python `Markdown` library is installed, then [markdown syntax][markdown] [ref]: http://example.com/activating-accounts """ -Note that when using viewsets the basic docstring is used for all generated views. To provide descriptions for each view, such as for the the list and retrieve views, use docstring sections as described in [Schemas as documentation: Examples][schemas-examples]. +Note that when using viewsets the basic docstring is used for all generated views. To provide descriptions for each view, such as for the list and retrieve views, use docstring sections as described in [Schemas as documentation: Examples][schemas-examples]. #### The `OPTIONS` method @@ -253,22 +217,18 @@ In this approach, rather than documenting the available API endpoints up front, To implement a hypermedia API you'll need to decide on an appropriate media type for the API, and implement a custom renderer and parser for that media type. The [REST, Hypermedia & HATEOAS][hypermedia-docs] section of the documentation includes pointers to background reading, as well as links to various hypermedia formats. [cite]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven -[drf-yasg]: https://github.com/axnsan12/drf-yasg/ -[image-drf-yasg]: ../img/drf-yasg.png -[drfautodocs-repo]: https://github.com/iMakedonsky/drf-autodocs -[django-rest-swagger]: https://github.com/marcgibbons/django-rest-swagger -[swagger]: https://swagger.io/ -[open-api]: https://openapis.org/ -[rest-framework-docs]: https://github.com/marcgibbons/django-rest-framework-docs -[apiary]: https://apiary.io/ -[markdown]: https://daringfireball.net/projects/markdown/syntax + [hypermedia-docs]: rest-hypermedia-hateoas.md -[image-django-rest-swagger]: ../img/django-rest-swagger.png -[image-apiary]: ../img/apiary.png +[metadata-docs]: ../api-guide/metadata.md +[schemas-examples]: ../api-guide/schemas.md#examples + +[image-drf-yasg]: ../img/drf-yasg.png [image-self-describing-api]: ../img/self-describing.png -[metadata-docs]: ../api-guide/metadata/ -[schemas-examples]: ../api-guide/schemas/#examples -[swagger-ui]: https://swagger.io/tools/swagger-ui/ +[drf-yasg]: https://github.com/axnsan12/drf-yasg/ +[drf-spectacular]: https://github.com/tfranzel/drf-spectacular/ +[markdown]: https://daringfireball.net/projects/markdown/syntax +[open-api]: https://openapis.org/ [redoc]: https://github.com/Rebilly/ReDoc - +[swagger]: https://swagger.io/ +[swagger-ui]: https://swagger.io/tools/swagger-ui/ diff --git a/docs/topics/internationalization.md b/docs/topics/internationalization.md index 7cfc6e247..c20cf9e33 100644 --- a/docs/topics/internationalization.md +++ b/docs/topics/internationalization.md @@ -103,10 +103,10 @@ You can find more information on how the language preference is determined in th For API clients the most appropriate of these will typically be to use the `Accept-Language` header; Sessions and cookies will not be available unless using session authentication, and generally better practice to prefer an `Accept-Language` header for API clients rather than using language URL prefixes. [cite]: https://youtu.be/Wa0VfS2q94Y -[django-translation]: https://docs.djangoproject.com/en/1.7/topics/i18n/translation +[django-translation]: https://docs.djangoproject.com/en/stable/topics/i18n/translation [custom-exception-handler]: ../api-guide/exceptions.md#custom-exception-handling [transifex-project]: https://www.transifex.com/projects/p/django-rest-framework/ [django-po-source]: https://raw.githubusercontent.com/encode/django-rest-framework/master/rest_framework/locale/en_US/LC_MESSAGES/django.po -[django-language-preference]: https://docs.djangoproject.com/en/1.7/topics/i18n/translation/#how-django-discovers-language-preference -[django-locale-paths]: https://docs.djangoproject.com/en/1.7/ref/settings/#std:setting-LOCALE_PATHS -[django-locale-name]: https://docs.djangoproject.com/en/1.7/topics/i18n/#term-locale-name +[django-language-preference]: https://docs.djangoproject.com/en/stable/topics/i18n/translation/#how-django-discovers-language-preference +[django-locale-paths]: https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-LOCALE_PATHS +[django-locale-name]: https://docs.djangoproject.com/en/stable/topics/i18n/#term-locale-name diff --git a/docs/topics/rest-hypermedia-hateoas.md b/docs/topics/rest-hypermedia-hateoas.md index d48319a26..a11bd6cc7 100644 --- a/docs/topics/rest-hypermedia-hateoas.md +++ b/docs/topics/rest-hypermedia-hateoas.md @@ -34,7 +34,7 @@ REST framework also includes [serialization] and [parser]/[renderer] components What REST framework doesn't do is give you machine readable hypermedia formats such as [HAL][hal], [Collection+JSON][collection], [JSON API][json-api] or HTML [microformats] by default, or the ability to auto-magically create fully HATEOAS style APIs that include hypermedia-based form descriptions and semantically labelled hyperlinks. Doing so would involve making opinionated choices about API design that should really remain outside of the framework's scope. -[cite]: https://vimeo.com/channels/restfest/page:2 +[cite]: https://vimeo.com/channels/restfest/49503453 [dissertation]: https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm [hypertext-driven]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven [restful-web-apis]: http://restfulwebapis.org/ diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md index e3d21e864..f2b369615 100644 --- a/docs/tutorial/2-requests-and-responses.md +++ b/docs/tutorial/2-requests-and-responses.md @@ -29,13 +29,11 @@ REST framework provides two wrappers you can use to write API views. These wrappers provide a few bits of functionality such as making sure you receive `Request` instances in your view, and adding context to `Response` objects so that content negotiation can be performed. -The wrappers also provide behaviour such as returning `405 Method Not Allowed` responses when appropriate, and handling any `ParseError` exception that occurs when accessing `request.data` with malformed input. +The wrappers also provide behaviour such as returning `405 Method Not Allowed` responses when appropriate, and handling any `ParseError` exceptions that occur when accessing `request.data` with malformed input. ## Pulling it all together -Okay, let's go ahead and start using these new components to write a few views. - -We don't need our `JSONResponse` class in `views.py` any more, so go ahead and delete that. Once that's done we can start refactoring our views slightly. +Okay, let's go ahead and start using these new components to refactor our views slightly. from rest_framework import status from rest_framework.decorators import api_view diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md index 6808780fa..79ce355c9 100644 --- a/docs/tutorial/4-authentication-and-permissions.md +++ b/docs/tutorial/4-authentication-and-permissions.md @@ -137,7 +137,7 @@ We can add a login view for use with the browsable API, by editing the URLconf i Add the following import at the top of the file: - from django.conf.urls import include + from django.urls import path, include And, at the end of the file, add a pattern to include the login and logout views for the browsable API. diff --git a/docs/tutorial/6-viewsets-and-routers.md b/docs/tutorial/6-viewsets-and-routers.md index 11e24448f..f012677d3 100644 --- a/docs/tutorial/6-viewsets-and-routers.md +++ b/docs/tutorial/6-viewsets-and-routers.md @@ -2,7 +2,7 @@ REST framework includes an abstraction for dealing with `ViewSets`, that allows the developer to concentrate on modeling the state and interactions of the API, and leave the URL construction to be handled automatically, based on common conventions. -`ViewSet` classes are almost the same thing as `View` classes, except that they provide operations such as `read`, or `update`, and not method handlers such as `get` or `put`. +`ViewSet` classes are almost the same thing as `View` classes, except that they provide operations such as `retrieve`, or `update`, and not method handlers such as `get` or `put`. A `ViewSet` class is only bound to a set of method handlers at the last moment, when it is instantiated into a set of views, typically by using a `Router` class which handles the complexities of defining the URL conf for you. @@ -16,7 +16,7 @@ First of all let's refactor our `UserList` and `UserDetail` views into a single class UserViewSet(viewsets.ReadOnlyModelViewSet): """ - This viewset automatically provides `list` and `detail` actions. + This viewset automatically provides `list` and `retrieve` actions. """ queryset = User.objects.all() serializer_class = UserSerializer @@ -27,6 +27,7 @@ Next we're going to replace the `SnippetList`, `SnippetDetail` and `SnippetHighl from rest_framework.decorators import action from rest_framework.response import Response + from rest_framework import permissions class SnippetViewSet(viewsets.ModelViewSet): """ diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md index e69f6eb14..a5529ac9d 100644 --- a/docs/tutorial/quickstart.md +++ b/docs/tutorial/quickstart.md @@ -85,6 +85,7 @@ Right, we'd better write some views then. Open `tutorial/quickstart/views.py` a from django.contrib.auth.models import User, Group from rest_framework import viewsets + from rest_framework import permissions from quickstart.serializers import UserSerializer, GroupSerializer @@ -94,6 +95,7 @@ Right, we'd better write some views then. Open `tutorial/quickstart/views.py` a """ queryset = User.objects.all().order_by('-date_joined') serializer_class = UserSerializer + permission_classes = [permissions.IsAuthenticated] class GroupViewSet(viewsets.ModelViewSet): @@ -102,6 +104,7 @@ Right, we'd better write some views then. Open `tutorial/quickstart/views.py` a """ queryset = Group.objects.all() serializer_class = GroupSerializer + permission_classes = [permissions.IsAuthenticated] Rather than write multiple views we're grouping together all the common behavior into classes called `ViewSets`. @@ -134,12 +137,12 @@ Finally, we're including default login and logout views for use with the browsab ## Pagination Pagination allows you to control how many objects per page are returned. To enable it add the following lines to `tutorial/settings.py` - + REST_FRAMEWORK = { 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 10 } - + ## Settings Add `'rest_framework'` to `INSTALLED_APPS`. The settings module will be in `tutorial/settings.py` @@ -175,7 +178,7 @@ We can now access our API, both from the command-line, using tools like `curl`.. }, { "email": "tom@example.com", - "groups": [ ], + "groups": [], "url": "http://127.0.0.1:8000/users/2/", "username": "tom" } @@ -201,7 +204,7 @@ Or using the [httpie][httpie], command line tool... }, { "email": "tom@example.com", - "groups": [ ], + "groups": [], "url": "http://127.0.0.1:8000/users/2/", "username": "tom" } @@ -221,5 +224,5 @@ If you want to get a more in depth understanding of how REST framework fits toge [image]: ../img/quickstart.png [tutorial]: 1-serialization.md -[guide]: ../#api-guide +[guide]: ../api-guide/requests.md [httpie]: https://github.com/jakubroztocil/httpie#installation diff --git a/docs_theme/404.html b/docs_theme/404.html index a89c0a418..bbb6b70ff 100644 --- a/docs_theme/404.html +++ b/docs_theme/404.html @@ -4,6 +4,6 @@

    404

    Page not found

    -

    Try the homepage, or search the documentation.

    +

    Try the homepage, or search the documentation.

    {% endblock %} diff --git a/docs_theme/css/default.css b/docs_theme/css/default.css index bb17a3a11..992bc60a4 100644 --- a/docs_theme/css/default.css +++ b/docs_theme/css/default.css @@ -6,7 +6,7 @@ pre { .dropdown .dropdown-menu { display: none; - overflow-y: scroll; + overflow-y: auto; } .dropdown.open .dropdown-menu { @@ -74,6 +74,12 @@ pre { white-space: pre; } +code, pre { + font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif; + font-size: 13px; +} + + /* Preserve the spacing of the navbar across different screen sizes. */ .navbar-inner { /*padding: 5px 0;*/ @@ -432,3 +438,4 @@ ul.sponsor { margin: 0 !important; display: inline-block !important; } + diff --git a/docs_theme/main.html b/docs_theme/main.html index 21e9171a2..b4e894781 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -5,22 +5,18 @@ {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }} - + - - - - + + + + - - - - - - + + + + {% for path in config.extra_javascript %} diff --git a/mkdocs.yml b/mkdocs.yml index 83a345a3d..573898bca 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -66,6 +66,8 @@ nav: - 'Contributing to REST framework': 'community/contributing.md' - 'Project management': 'community/project-management.md' - 'Release Notes': 'community/release-notes.md' + - '3.12 Announcement': 'community/3.12-announcement.md' + - '3.11 Announcement': 'community/3.11-announcement.md' - '3.10 Announcement': 'community/3.10-announcement.md' - '3.9 Announcement': 'community/3.9-announcement.md' - '3.8 Announcement': 'community/3.8-announcement.md' diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt index 8cbd41c50..4f54d6e77 100644 --- a/requirements/requirements-codestyle.txt +++ b/requirements/requirements-codestyle.txt @@ -1,7 +1,7 @@ # PEP8 code linting, which we run on all commits. -flake8==3.5.0 -flake8-tidy-imports==1.1.0 -pycodestyle==2.3.1 +flake8==3.8.3 +flake8-tidy-imports==4.1.0 +pycodestyle==2.6.0 # Sort and lint imports -isort==4.3.3 +isort==5.4.2 diff --git a/requirements/requirements-documentation.txt b/requirements/requirements-documentation.txt index 73158043e..e969ff471 100644 --- a/requirements/requirements-documentation.txt +++ b/requirements/requirements-documentation.txt @@ -1,2 +1,2 @@ # MkDocs to build our documentation. -mkdocs==1.0.4 +mkdocs==1.1 diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index a33248d10..739555667 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -1,8 +1,9 @@ # Optional packages which may be used with REST framework. -psycopg2-binary>=2.8.2, <2.9 -markdown==3.1.1 +psycopg2-binary>=2.8.5, <2.9 +markdown==3.3;python_version>="3.6" +markdown==3.2.2;python_version=="3.5" pygments==2.4.2 -django-guardian==1.5.0 +django-guardian==2.2.0 django-filter>=2.2.0, <2.3 coreapi==2.3.1 coreschema==0.0.4 diff --git a/requirements/requirements-packaging.txt b/requirements/requirements-packaging.txt index 48de9e768..091622fbe 100644 --- a/requirements/requirements-packaging.txt +++ b/requirements/requirements-packaging.txt @@ -1,8 +1,8 @@ # Wheel for PyPI installs. -wheel==0.30.0 +wheel==0.34.2 # Twine for secured PyPI uploads. -twine==1.11.0 +twine==3.1.1 # Transifex client for managing translation resources. -transifex-client==0.11 +transifex-client==0.13.9 diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index 83ec9ab9e..99463560e 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,4 +1,5 @@ # Pytest for running the tests. -pytest>=5.0,<5.1 -pytest-django>=3.5.1,<3.6 +pytest>=5.4.1,<5.5 +pytest-django>=3.9.0,<3.10 pytest-cov>=2.7.1 +six>=1.14.0 diff --git a/rest_framework/__init__.py b/rest_framework/__init__.py index 6a64c8b18..7ff188a5a 100644 --- a/rest_framework/__init__.py +++ b/rest_framework/__init__.py @@ -7,10 +7,12 @@ ______ _____ _____ _____ __ \_| \_\____/\____/ \_/ |_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_| """ +import django + __title__ = 'Django REST framework' -__version__ = '3.10.1' +__version__ = '3.12.2' __author__ = 'Tom Christie' -__license__ = 'BSD 2-Clause' +__license__ = 'BSD 3-Clause' __copyright__ = 'Copyright 2011-2019 Encode OSS Ltd' # Version synonym @@ -22,12 +24,14 @@ HTTP_HEADER_ENCODING = 'iso-8859-1' # Default datetime input and output formats ISO_8601 = 'iso-8601' -default_app_config = 'rest_framework.apps.RestFrameworkConfig' + +if django.VERSION < (3, 2): + default_app_config = 'rest_framework.apps.RestFrameworkConfig' -class RemovedInDRF311Warning(DeprecationWarning): +class RemovedInDRF313Warning(DeprecationWarning): pass -class RemovedInDRF312Warning(PendingDeprecationWarning): +class RemovedInDRF314Warning(PendingDeprecationWarning): pass diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index 1e30728d3..9111007c0 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -74,7 +74,11 @@ class BasicAuthentication(BaseAuthentication): raise exceptions.AuthenticationFailed(msg) try: - auth_parts = base64.b64decode(auth[1]).decode(HTTP_HEADER_ENCODING).partition(':') + try: + auth_decoded = base64.b64decode(auth[1]).decode('utf-8') + except UnicodeDecodeError: + auth_decoded = base64.b64decode(auth[1]).decode('latin-1') + auth_parts = auth_decoded.partition(':') except (TypeError, UnicodeDecodeError, binascii.Error): msg = _('Invalid basic header. Credentials not correctly base64 encoded.') raise exceptions.AuthenticationFailed(msg) @@ -132,7 +136,10 @@ class SessionAuthentication(BaseAuthentication): """ Enforce CSRF validation for session based authentication. """ - check = CSRFCheck() + def dummy_get_response(request): # pragma: no cover + return None + + check = CSRFCheck(dummy_get_response) # populates request.META['CSRF_COOKIE'], which is used in process_view() check.process_request(request) reason = check.process_view(request, None, (), {}) diff --git a/rest_framework/authtoken/__init__.py b/rest_framework/authtoken/__init__.py index 82f5b9171..285fe15c6 100644 --- a/rest_framework/authtoken/__init__.py +++ b/rest_framework/authtoken/__init__.py @@ -1 +1,4 @@ -default_app_config = 'rest_framework.authtoken.apps.AuthTokenConfig' +import django + +if django.VERSION < (3, 2): + default_app_config = 'rest_framework.authtoken.apps.AuthTokenConfig' diff --git a/rest_framework/authtoken/admin.py b/rest_framework/authtoken/admin.py index 1a507249b..b359e4cfe 100644 --- a/rest_framework/authtoken/admin.py +++ b/rest_framework/authtoken/admin.py @@ -1,12 +1,51 @@ from django.contrib import admin +from django.contrib.admin.utils import quote +from django.contrib.admin.views.main import ChangeList +from django.contrib.auth import get_user_model +from django.core.exceptions import ValidationError +from django.urls import reverse -from rest_framework.authtoken.models import Token +from rest_framework.authtoken.models import Token, TokenProxy + +User = get_user_model() + + +class TokenChangeList(ChangeList): + """Map to matching User id""" + def url_for_result(self, result): + pk = result.user.pk + return reverse('admin:%s_%s_change' % (self.opts.app_label, + self.opts.model_name), + args=(quote(pk),), + current_app=self.model_admin.admin_site.name) class TokenAdmin(admin.ModelAdmin): list_display = ('key', 'user', 'created') fields = ('user',) ordering = ('-created',) + actions = None # Actions not compatible with mapped IDs. + + def get_changelist(self, request, **kwargs): + return TokenChangeList + + def get_object(self, request, object_id, from_field=None): + """ + Map from User ID to matching Token. + """ + queryset = self.get_queryset(request) + field = User._meta.pk + try: + object_id = field.to_python(object_id) + user = User.objects.get(**{field.name: object_id}) + return queryset.get(user=user) + except (queryset.model.DoesNotExist, User.DoesNotExist, ValidationError, ValueError): + return None + + def delete_model(self, request, obj): + # Map back to actual Token, since delete() uses pk. + token = Token.objects.get(key=obj.key) + return super().delete_model(request, token) -admin.site.register(Token, TokenAdmin) +admin.site.register(TokenProxy, TokenAdmin) diff --git a/rest_framework/authtoken/migrations/0003_tokenproxy.py b/rest_framework/authtoken/migrations/0003_tokenproxy.py new file mode 100644 index 000000000..79405a7c0 --- /dev/null +++ b/rest_framework/authtoken/migrations/0003_tokenproxy.py @@ -0,0 +1,25 @@ +# Generated by Django 3.1.1 on 2020-09-28 09:34 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('authtoken', '0002_auto_20160226_1747'), + ] + + operations = [ + migrations.CreateModel( + name='TokenProxy', + fields=[ + ], + options={ + 'verbose_name': 'token', + 'proxy': True, + 'indexes': [], + 'constraints': [], + }, + bases=('authtoken.token',), + ), + ] diff --git a/rest_framework/authtoken/models.py b/rest_framework/authtoken/models.py index bff42d3de..540049295 100644 --- a/rest_framework/authtoken/models.py +++ b/rest_framework/authtoken/models.py @@ -32,8 +32,23 @@ class Token(models.Model): self.key = self.generate_key() return super().save(*args, **kwargs) - def generate_key(self): + @classmethod + def generate_key(cls): return binascii.hexlify(os.urandom(20)).decode() def __str__(self): return self.key + + +class TokenProxy(Token): + """ + Proxy mapping pk to user pk for use in admin. + """ + @property + def pk(self): + return self.user.pk + + class Meta: + proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS + abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS + verbose_name = "token" diff --git a/rest_framework/authtoken/serializers.py b/rest_framework/authtoken/serializers.py index bb552f3e5..63e64d668 100644 --- a/rest_framework/authtoken/serializers.py +++ b/rest_framework/authtoken/serializers.py @@ -5,11 +5,19 @@ from rest_framework import serializers class AuthTokenSerializer(serializers.Serializer): - username = serializers.CharField(label=_("Username")) + username = serializers.CharField( + label=_("Username"), + write_only=True + ) password = serializers.CharField( label=_("Password"), style={'input_type': 'password'}, - trim_whitespace=False + trim_whitespace=False, + write_only=True + ) + token = serializers.CharField( + label=_("Token"), + read_only=True ) def validate(self, attrs): diff --git a/rest_framework/authtoken/views.py b/rest_framework/authtoken/views.py index a8c751d51..50f9acbd9 100644 --- a/rest_framework/authtoken/views.py +++ b/rest_framework/authtoken/views.py @@ -4,6 +4,7 @@ from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.compat import coreapi, coreschema from rest_framework.response import Response from rest_framework.schemas import ManualSchema +from rest_framework.schemas import coreapi as coreapi_schema from rest_framework.views import APIView @@ -13,7 +14,8 @@ class ObtainAuthToken(APIView): parser_classes = (parsers.FormParser, parsers.MultiPartParser, parsers.JSONParser,) renderer_classes = (renderers.JSONRenderer,) serializer_class = AuthTokenSerializer - if coreapi is not None and coreschema is not None: + + if coreapi_schema.is_enabled(): schema = ManualSchema( fields=[ coreapi.Field( @@ -38,9 +40,19 @@ class ObtainAuthToken(APIView): encoding="application/json", ) + def get_serializer_context(self): + return { + 'request': self.request, + 'format': self.format_kwarg, + 'view': self + } + + def get_serializer(self, *args, **kwargs): + kwargs['context'] = self.get_serializer_context() + return self.serializer_class(*args, **kwargs) + def post(self, request, *args, **kwargs): - serializer = self.serializer_class(data=request.data, - context={'request': request}) + serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) user = serializer.validated_data['user'] token, created = Token.objects.get_or_create(user=user) diff --git a/rest_framework/checks.py b/rest_framework/checks.py index c1e626018..d5d77bc59 100644 --- a/rest_framework/checks.py +++ b/rest_framework/checks.py @@ -9,7 +9,7 @@ def pagination_system_check(app_configs, **kwargs): if api_settings.PAGE_SIZE and not api_settings.DEFAULT_PAGINATION_CLASS: errors.append( Warning( - "You have specified a default PAGE_SIZE pagination rest_framework setting," + "You have specified a default PAGE_SIZE pagination rest_framework setting, " "without specifying also a DEFAULT_PAGINATION_CLASS.", hint="The default for DEFAULT_PAGINATION_CLASS is None. " "In previous versions this was PageNumberPagination. " diff --git a/rest_framework/compat.py b/rest_framework/compat.py index df100966b..4bae7729f 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -2,75 +2,9 @@ The `compat` module provides support for backwards compatibility with older versions of Django/Python, and compatibility wrappers around optional packages. """ -import sys - from django.conf import settings from django.views.generic import View -try: - from django.urls import ( # noqa - URLPattern, - URLResolver, - ) -except ImportError: - # Will be removed in Django 2.0 - from django.urls import ( # noqa - RegexURLPattern as URLPattern, - RegexURLResolver as URLResolver, - ) - -try: - from django.core.validators import ProhibitNullCharactersValidator # noqa -except ImportError: - ProhibitNullCharactersValidator = None - - -def get_original_route(urlpattern): - """ - Get the original route/regex that was typed in by the user into the path(), re_path() or url() directive. This - is in contrast with get_regex_pattern below, which for RoutePattern returns the raw regex generated from the path(). - """ - if hasattr(urlpattern, 'pattern'): - # Django 2.0 - return str(urlpattern.pattern) - else: - # Django < 2.0 - return urlpattern.regex.pattern - - -def get_regex_pattern(urlpattern): - """ - Get the raw regex out of the urlpattern's RegexPattern or RoutePattern. This is always a regular expression, - unlike get_original_route above. - """ - if hasattr(urlpattern, 'pattern'): - # Django 2.0 - return urlpattern.pattern.regex.pattern - else: - # Django < 2.0 - return urlpattern.regex.pattern - - -def is_route_pattern(urlpattern): - if hasattr(urlpattern, 'pattern'): - # Django 2.0 - from django.urls.resolvers import RoutePattern - return isinstance(urlpattern.pattern, RoutePattern) - else: - # Django < 2.0 - return False - - -def make_url_resolver(regex, urlpatterns): - try: - # Django 2.0 - from django.urls.resolvers import RegexPattern - return URLResolver(RegexPattern(regex), urlpatterns) - - except ImportError: - # Django < 2.0 - return URLResolver(regex, urlpatterns) - def unicode_http_header(value): # Coerce HTTP header value to unicode. @@ -162,8 +96,8 @@ except ImportError: try: import pygments - from pygments.lexers import get_lexer_by_name, TextLexer from pygments.formatters import HtmlFormatter + from pygments.lexers import TextLexer, get_lexer_by_name def pygments_highlight(text, lang, style): lexer = get_lexer_by_name(lang, stripall=False) @@ -187,9 +121,10 @@ if markdown is not None and pygments is not None: # starting from this blogpost and modified to support current markdown extensions API # https://zerokspot.com/weblog/2008/06/18/syntax-highlighting-in-markdown-with-pygments/ - from markdown.preprocessors import Preprocessor import re + from markdown.preprocessors import Preprocessor + class CodeBlockPreprocessor(Preprocessor): pattern = re.compile( r'^\s*``` *([^\n]+)\n(.+?)^\s*```', re.M | re.S) @@ -217,22 +152,8 @@ else: return False -# Django 1.x url routing syntax. Remove when dropping Django 1.11 support. -try: - from django.urls import include, path, re_path, register_converter # noqa -except ImportError: - from django.conf.urls import include, url # noqa - path = None - register_converter = None - re_path = url - - # `separators` argument to `json.dumps()` differs between 2.x and 3.x # See: https://bugs.python.org/issue22767 SHORT_SEPARATORS = (',', ':') LONG_SEPARATORS = (', ', ': ') INDENT_SEPARATORS = (',', ': ') - - -# Version Constants. -PY36 = sys.version_info >= (3, 6) diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py index eb1cad9e4..30b9d84d4 100644 --- a/rest_framework/decorators.py +++ b/rest_framework/decorators.py @@ -124,8 +124,23 @@ def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs): """ Mark a ViewSet method as a routable action. - Set the `detail` boolean to determine if this action should apply to - instance/detail requests or collection/list requests. + `@action`-decorated functions will be endowed with a `mapping` property, + a `MethodMapper` that can be used to add additional method-based behaviors + on the routed action. + + :param methods: A list of HTTP method names this action responds to. + Defaults to GET only. + :param detail: Required. Determines whether this action applies to + instance/detail requests or collection/list requests. + :param url_path: Define the URL segment for this action. Defaults to the + name of the method decorated. + :param url_name: Define the internal (`reverse`) URL name for this action. + Defaults to the name of the method decorated with underscores + replaced with dashes. + :param kwargs: Additional properties to set on the view. This can be used + to override viewset-level *_classes settings, equivalent to + how the `@renderer_classes` etc. decorators work for function- + based API views. """ methods = ['get'] if (methods is None) else methods methods = [method.lower() for method in methods] @@ -144,6 +159,10 @@ def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs): func.detail = detail func.url_path = url_path if url_path else func.__name__ func.url_name = url_name if url_name else func.__name__.replace('_', '-') + + # These kwargs will end up being passed to `ViewSet.as_view()` within + # the router, which eventually delegates to Django's CBV `View`, + # which assigns them as instance attributes for each request. func.kwargs = kwargs # Set descriptive arguments for viewsets diff --git a/rest_framework/documentation.py b/rest_framework/documentation.py index ce61fa6bf..53e5ab551 100644 --- a/rest_framework/documentation.py +++ b/rest_framework/documentation.py @@ -1,4 +1,4 @@ -from django.conf.urls import include, url +from django.urls import include, path from rest_framework.renderers import ( CoreJSONRenderer, DocumentationRenderer, SchemaJSRenderer @@ -82,7 +82,7 @@ def include_docs_urls( permission_classes=permission_classes, ) urls = [ - url(r'^$', docs_view, name='docs-index'), - url(r'^schema.js$', schema_js_view, name='schema-js') + path('', docs_view, name='docs-index'), + path('schema.js', schema_js_view, name='schema-js') ] return include((urls, 'api-docs'), namespace='api-docs') diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 345a40524..fee8f024f 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -20,7 +20,7 @@ def _get_error_details(data, default_code=None): Descend into a nested data structure, forcing any lazy translation strings or strings into `ErrorDetail`. """ - if isinstance(data, list): + if isinstance(data, (list, tuple)): ret = [ _get_error_details(item, default_code) for item in data ] @@ -73,6 +73,8 @@ class ErrorDetail(str): def __eq__(self, other): r = super().__eq__(other) + if r is NotImplemented: + return NotImplemented try: return r and self.code == other.code except AttributeError: @@ -148,7 +150,9 @@ class ValidationError(APIException): # For validation failures, we may collect many errors together, # so the details should always be coerced to a list if not already. - if not isinstance(detail, dict) and not isinstance(detail, list): + if isinstance(detail, tuple): + detail = list(detail) + elif not isinstance(detail, dict) and not isinstance(detail, list): detail = [detail] self.detail = _get_error_details(detail, code) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 0be6a7c12..fdfba13f2 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -5,6 +5,7 @@ import functools import inspect import re import uuid +import warnings from collections import OrderedDict from collections.abc import Mapping @@ -13,7 +14,8 @@ from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ValidationError as DjangoValidationError from django.core.validators import ( EmailValidator, MaxLengthValidator, MaxValueValidator, MinLengthValidator, - MinValueValidator, RegexValidator, URLValidator, ip_address_validators + MinValueValidator, ProhibitNullCharactersValidator, RegexValidator, + URLValidator, ip_address_validators ) from django.forms import FilePathField as DjangoFilePathField from django.forms import ImageField as DjangoImageField @@ -22,19 +24,21 @@ from django.utils.dateparse import ( parse_date, parse_datetime, parse_duration, parse_time ) from django.utils.duration import duration_string -from django.utils.encoding import is_protected_type, smart_text +from django.utils.encoding import is_protected_type, smart_str from django.utils.formats import localize_input, sanitize_separators from django.utils.ipv6 import clean_ipv6_address from django.utils.timezone import utc from django.utils.translation import gettext_lazy as _ from pytz.exceptions import InvalidTimeError -from rest_framework import ISO_8601 -from rest_framework.compat import ProhibitNullCharactersValidator +from rest_framework import ( + ISO_8601, RemovedInDRF313Warning, RemovedInDRF314Warning +) from rest_framework.exceptions import ErrorDetail, ValidationError from rest_framework.settings import api_settings from rest_framework.utils import html, humanize_datetime, json, representation from rest_framework.utils.formatting import lazy_format +from rest_framework.validators import ProhibitSurrogateCharactersValidator class empty: @@ -249,19 +253,30 @@ class CreateOnlyDefault: for create operations, but that do not return any value for update operations. """ + requires_context = True + def __init__(self, default): self.default = default - def set_context(self, serializer_field): - self.is_update = serializer_field.parent.instance is not None - if callable(self.default) and hasattr(self.default, 'set_context') and not self.is_update: - self.default.set_context(serializer_field) - - def __call__(self): - if self.is_update: + def __call__(self, serializer_field): + is_update = serializer_field.parent.instance is not None + if is_update: raise SkipField() if callable(self.default): - return self.default() + if hasattr(self.default, 'set_context'): + warnings.warn( + "Method `set_context` on defaults is deprecated and will " + "no longer be called starting with 3.13. Instead set " + "`requires_context = True` on the class, and accept the " + "context as an additional argument.", + RemovedInDRF313Warning, stacklevel=2 + ) + self.default.set_context(self) + + if getattr(self.default, 'requires_context', False): + return self.default(serializer_field) + else: + return self.default() return self.default def __repr__(self): @@ -269,11 +284,10 @@ class CreateOnlyDefault: class CurrentUserDefault: - def set_context(self, serializer_field): - self.user = serializer_field.context['request'].user + requires_context = True - def __call__(self): - return self.user + def __call__(self, serializer_field): + return serializer_field.context['request'].user def __repr__(self): return '%s()' % self.__class__.__name__ @@ -489,8 +503,20 @@ class Field: raise SkipField() if callable(self.default): if hasattr(self.default, 'set_context'): + warnings.warn( + "Method `set_context` on defaults is deprecated and will " + "no longer be called starting with 3.13. Instead set " + "`requires_context = True` on the class, and accept the " + "context as an additional argument.", + RemovedInDRF313Warning, stacklevel=2 + ) self.default.set_context(self) - return self.default() + + if getattr(self.default, 'requires_context', False): + return self.default(self) + else: + return self.default() + return self.default def validate_empty_values(self, data): @@ -551,10 +577,20 @@ class Field: errors = [] for validator in self.validators: if hasattr(validator, 'set_context'): + warnings.warn( + "Method `set_context` on validators is deprecated and will " + "no longer be called starting with 3.13. Instead set " + "`requires_context = True` on the class, and accept the " + "context as an additional argument.", + RemovedInDRF313Warning, stacklevel=2 + ) validator.set_context(self) try: - validator(value) + if getattr(validator, 'requires_context', False): + validator(value, self) + else: + validator(value) except ValidationError as exc: # If the validation error contains a mapping of fields to # errors then simply raise it immediately rather than @@ -572,8 +608,11 @@ class Field: Transform the *incoming* primitive data into a native value. """ raise NotImplementedError( - '{cls}.to_internal_value() must be implemented.'.format( - cls=self.__class__.__name__ + '{cls}.to_internal_value() must be implemented for field ' + '{field_name}. If you do not need to support write operations ' + 'you probably want to subclass `ReadOnlyField` instead.'.format( + cls=self.__class__.__name__, + field_name=self.field_name, ) ) @@ -582,9 +621,7 @@ class Field: Transform the *outgoing* native value into primitive data. """ raise NotImplementedError( - '{cls}.to_representation() must be implemented for field ' - '{field_name}. If you do not need to support write operations ' - 'you probably want to subclass `ReadOnlyField` instead.'.format( + '{cls}.to_representation() must be implemented for field {field_name}.'.format( cls=self.__class__.__name__, field_name=self.field_name, ) @@ -705,55 +742,22 @@ class BooleanField(Field): return bool(value) -class NullBooleanField(Field): - default_error_messages = { - 'invalid': _('Must be a valid boolean.') - } +class NullBooleanField(BooleanField): initial = None - TRUE_VALUES = { - 't', 'T', - 'y', 'Y', 'yes', 'YES', - 'true', 'True', 'TRUE', - 'on', 'On', 'ON', - '1', 1, - True - } - FALSE_VALUES = { - 'f', 'F', - 'n', 'N', 'no', 'NO', - 'false', 'False', 'FALSE', - 'off', 'Off', 'OFF', - '0', 0, 0.0, - False - } - NULL_VALUES = {'null', 'Null', 'NULL', '', None} def __init__(self, **kwargs): + warnings.warn( + "The `NullBooleanField` is deprecated and will be removed starting " + "with 3.14. Instead use the `BooleanField` field and set " + "`allow_null=True` which does the same thing.", + RemovedInDRF314Warning, stacklevel=2 + ) + assert 'allow_null' not in kwargs, '`allow_null` is not a valid option.' kwargs['allow_null'] = True + super().__init__(**kwargs) - def to_internal_value(self, data): - try: - if data in self.TRUE_VALUES: - return True - elif data in self.FALSE_VALUES: - return False - elif data in self.NULL_VALUES: - return None - except TypeError: # Input is an unhashable type - pass - self.fail('invalid', input=data) - - def to_representation(self, value): - if value in self.NULL_VALUES: - return None - if value in self.TRUE_VALUES: - return True - elif value in self.FALSE_VALUES: - return False - return bool(value) - # String types... @@ -781,9 +785,8 @@ class CharField(Field): self.validators.append( MinLengthValidator(self.min_length, message=message)) - # ProhibitNullCharactersValidator is None on Django < 2.0 - if ProhibitNullCharactersValidator is not None: - self.validators.append(ProhibitNullCharactersValidator()) + self.validators.append(ProhibitNullCharactersValidator()) + self.validators.append(ProhibitSurrogateCharactersValidator()) def run_validation(self, data=empty): # Test for the empty string here so that it does not get validated, @@ -1049,7 +1052,7 @@ class DecimalField(Field): instance. """ - data = smart_text(data).strip() + data = smart_str(data).strip() if self.localize: data = sanitize_separators(data) @@ -1062,9 +1065,7 @@ class DecimalField(Field): except decimal.DecimalException: self.fail('invalid') - # Check for NaN. It is the only value that isn't equal to itself, - # so we can use this to identify NaN values. - if value != value: + if value.is_nan(): self.fail('invalid') # Check for infinity and negative infinity. @@ -1757,6 +1758,7 @@ class JSONField(Field): def __init__(self, *args, **kwargs): self.binary = kwargs.pop('binary', False) self.encoder = kwargs.pop('encoder', None) + self.decoder = kwargs.pop('decoder', None) super().__init__(*args, **kwargs) def get_value(self, dictionary): @@ -1764,8 +1766,8 @@ class JSONField(Field): # When HTML form input is used, mark up the input # as being a JSON string, rather than a JSON primitive. class JSONString(str): - def __new__(self, value): - ret = str.__new__(self, value) + def __new__(cls, value): + ret = str.__new__(cls, value) ret.is_json_string = True return ret return JSONString(dictionary[self.field_name]) @@ -1776,7 +1778,7 @@ class JSONField(Field): if self.binary or getattr(data, 'is_json_string', False): if isinstance(data, bytes): data = data.decode() - return json.loads(data) + return json.loads(data, cls=self.decoder) else: json.dumps(data, cls=self.encoder) except (TypeError, ValueError): @@ -1857,14 +1859,9 @@ class SerializerMethodField(Field): super().__init__(**kwargs) def bind(self, field_name, parent): - # In order to enforce a consistent style, we error if a redundant - # 'method_name' argument has been used. For example: - # my_field = serializer.SerializerMethodField(method_name='get_my_field') - default_method_name = 'get_{field_name}'.format(field_name=field_name) - - # The method name should default to `get_{field_name}`. + # The method name defaults to `get_{field_name}`. if self.method_name is None: - self.method_name = default_method_name + self.method_name = 'get_{field_name}'.format(field_name=field_name) super().bind(field_name, parent) diff --git a/rest_framework/filters.py b/rest_framework/filters.py index c15723ec3..366577519 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -8,7 +8,6 @@ from functools import reduce from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.constants import LOOKUP_SEP -from django.db.models.sql.constants import ORDER_PATTERN from django.template import loader from django.utils.encoding import force_str from django.utils.translation import gettext_lazy as _ @@ -86,7 +85,7 @@ class SearchFilter(BaseFilterBackend): search_field = search_field[1:] # Annotated fields do not need to be distinct if isinstance(queryset, models.QuerySet) and search_field in queryset.query.annotations: - return False + continue parts = search_field.split(LOOKUP_SEP) for part in parts: field = opts.get_field(part) @@ -97,6 +96,9 @@ class SearchFilter(BaseFilterBackend): if any(path.m2m for path in path_info): # This field is a m2m relation so we know we need to call distinct return True + else: + # This field has a custom __ query transform but is not a relational field. + break return False def filter_queryset(self, request, queryset, view): @@ -256,7 +258,13 @@ class OrderingFilter(BaseFilterBackend): def remove_invalid_fields(self, queryset, fields, view, request): valid_fields = [item[0] for item in self.get_valid_fields(queryset, view, {'request': request})] - return [term for term in fields if term.lstrip('-') in valid_fields and ORDER_PATTERN.match(term)] + + def term_valid(term): + if term.startswith("-"): + term = term[1:] + return term in valid_fields + + return [term for term in fields if term_valid(term)] def filter_queryset(self, request, queryset, view): ordering = self.get_ordering(request, queryset, view) diff --git a/rest_framework/generics.py b/rest_framework/generics.py index c39b02ab7..55cfafda4 100644 --- a/rest_framework/generics.py +++ b/rest_framework/generics.py @@ -106,7 +106,7 @@ class GenericAPIView(views.APIView): deserializing input, and for serializing output. """ serializer_class = self.get_serializer_class() - kwargs['context'] = self.get_serializer_context() + kwargs.setdefault('context', self.get_serializer_context()) return serializer_class(*args, **kwargs) def get_serializer_class(self): diff --git a/rest_framework/locale/ar/LC_MESSAGES/django.mo b/rest_framework/locale/ar/LC_MESSAGES/django.mo index 19a41dfd6..f793d7c73 100644 Binary files a/rest_framework/locale/ar/LC_MESSAGES/django.mo and b/rest_framework/locale/ar/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ar/LC_MESSAGES/django.po b/rest_framework/locale/ar/LC_MESSAGES/django.po index 968ce0661..58f72ec17 100644 --- a/rest_framework/locale/ar/LC_MESSAGES/django.po +++ b/rest_framework/locale/ar/LC_MESSAGES/django.po @@ -7,13 +7,14 @@ # aymen chaieb , 2017 # Bashar Al-Abdulhadi, 2016-2017 # Eyad Toma , 2015,2017 +# zak zak , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-10-18 09:51+0000\n" -"Last-Translator: Andrew Ayoub \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Arabic (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,40 +22,40 @@ msgstr "" "Language: ar\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." -msgstr "" +msgstr "رأس أساسي غير صالح, لم تقدم اي بيانات." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "" +msgstr "رأس أساسي غير صالح, سلسلة البيانات لا يجب أن تحتوي على أي أحرف مسافات" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "" +msgstr "رأس أساسي غير صالح, البيانات ليست مرمّزة بصحة على أساس64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "اسم المستخدم/كلمة السر غير صحيحين." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "المستخدم غير مفعل او تم حذفه." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "" +msgstr "رمز الراْس المميّز غير صالح, لم تقدم أي بيانات." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "" +msgstr "رمز الراْس المميّز غير صالح, سلسلة الرمز المميّز لا يجب أن تحتوي على أي أحرف مسافات." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "رمز الراْس المميّز غير صالح, سلسلة الرمز المميّز لا يجب أن تحتوي على أي أحرف غير صالحة." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "رمز غير صحيح." @@ -62,382 +63,515 @@ msgstr "رمز غير صحيح." msgid "Auth Token" msgstr "رمز التفويض" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "المفتاح" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "المستخدم" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "أنشئ" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "الرمز" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "الرموز" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "اسم المستخدم" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "كلمة المرور" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "حساب المستخدم غير مفعل." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "تعذر تسجيل الدخول بالبيانات التي ادخلتها." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "يجب أن تتضمن \"اسم المستخدم\" و \"كلمة المرور\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "حدث خطأ في المخدم." -#: exceptions.py:84 -msgid "Malformed request." +#: exceptions.py:142 +msgid "Invalid input." msgstr "" -#: exceptions.py:89 +#: exceptions.py:161 +msgid "Malformed request." +msgstr "الطلب صيغ بشكل سيء." + +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "بيانات الدخول غير صحيحة." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "لم يتم تزويد بيانات الدخول." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "ليس لديك صلاحية للقيام بهذا الإجراء." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "غير موجود." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "طلب غير مسموح به" +msgstr "الطريقة \"{method}\" غير مسموح بها." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "لم نتمكن من تلبية الرٱس Accept في الطلب." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." -msgstr "" +msgstr "الوسيط \"{media_type}\" الموجود في الطلب غير معتمد." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." +msgstr "تم تقييد الطلب." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "هذا الحقل مطلوب." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "لا يمكن لهذا الحقل ان يكون فارغاً null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" ليس قيمة منطقية." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "لا يمكن لهذا الحقل ان يكون فارغاً." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "تأكد ان الحقل لا يزيد عن {max_length} محرف." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "تأكد ان الحقل {min_length} محرف على الاقل." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "عليك ان تدخل بريد إلكتروني صالح." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "هذه القيمة لا تطابق النمط المطلوب." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." +msgstr "أدخل \"slug\" صالح يحتوي على حروف، أرقام، شُرط سفلية أو واصلات." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." msgstr "" -#: fields.py:747 +#: fields.py:854 msgid "Enter a valid URL." msgstr "الرجاء إدخال رابط إلكتروني صالح." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "برجاء إدخال عنوان IPV4 أو IPV6 صحيح" +msgstr "أدخِل عنوان IPV4 أو IPV6 صحيح." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "الرجاء إدخال رقم صحيح صالح." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "تأكد ان القيمة أقل أو تساوي {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "تأكد ان القيمة أكبر أو تساوي {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." -msgstr "القيمه اكبر من المسموح" +msgstr "السلسلة اطول من القيمة المسموح بها." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "الرجاء إدخال رقم صالح." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "تأكد ان القيمة لا تحوي أكثر من {max_digits} رقم." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "" +msgstr "تأكد انه لا يوجد اكثر من {max_decimal_places} منازل عشرية." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." -msgstr "" +msgstr "تأكد انه لا يوجد اكثر من {max_whole_digits} أرقام قبل النقطة العشرية." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "صيغة التاريخ و الوقت غير صحيحة. عليك أن تستخدم واحدة من هذه الصيغ التالية: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "متوقع تاريخ و وقت و وجد تاريخ فقط" -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "صيغة التاريخ غير صحيحة. عليك أن تستخدم واحدة من هذه الصيغ التالية: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "متوقع تاريخ فقط و وجد تاريخ ووقت" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "صيغة الوقت غير صحيحة. عليك أن تستخدم واحدة من هذه الصيغ التالية: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "صيغة المده غير صحيحه, برجاء إستخدام أحد هذه الصيغ {format}" +msgstr "صيغة المدة غير صحيحه, يرجى إستخدام إحدى هذه الصيغ: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" ليست واحدة من الخيارات الصالحة." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "أكثر من {count} عنصر..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "" +msgstr "المتوقع وجود قائمة عناصر لكن وجد النوع \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "هذا التحديد لا يجب أن يكون فارغا." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "{input} كإختيار مسار غير صالح." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "لم يتم إرسال أي ملف." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." -msgstr "" +msgstr "المعطيات المرسولة ليست ملف. إفحص نوع الترميز في النموذج." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." -msgstr "" +msgstr "ما من إسم ملف أمكن تحديده." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "الملف الذي تم إرساله فارغ." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "تأكد ان اسم الملف لا يحوي أكثر من {max_length} محرف (الإسم المرسل يحوي {length} محرف)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." -msgstr "" +msgstr "الرجاء تحميل صورة صالحة. الملف الذي تم تحميله إما لم يكن صورة او انه كان صورة تالفة." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "القائمة يجب أن لا تكون فارغة." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "المتوقع كان قاموس عناصر و لكن النوع المتحصل عليه هو \"{input_type}\"." + +#: fields.py:1683 +msgid "This dictionary may not be empty." msgstr "" -#: fields.py:1549 +#: fields.py:1755 msgid "Value must be valid JSON." -msgstr "" +msgstr "القيمة يجب أن تكون JSON صالح." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "أرسل" - -#: filters.py:336 -msgid "ascending" -msgstr "تصاعدي" - -#: filters.py:337 -msgid "descending" -msgstr "تنازلي" - -#: pagination.py:193 -msgid "Invalid page." -msgstr "صفحة غير صحيحة." - -#: pagination.py:427 -msgid "Invalid cursor" -msgstr "" - -#: relations.py:207 -msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "معرف العنصر \"{pk_value}\" غير صالح - العنصر غير موجود." - -#: relations.py:208 -msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "" - -#: relations.py:240 -msgid "Invalid hyperlink - No URL match." -msgstr "" - -#: relations.py:241 -msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" - -#: relations.py:242 -msgid "Invalid hyperlink - Object does not exist." -msgstr "" - -#: relations.py:243 -msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "" - -#: relations.py:401 -msgid "Object with {slug_name}={value} does not exist." -msgstr "" - -#: relations.py:402 -msgid "Invalid value." -msgstr "قيمة غير صالحة." - -#: serializers.py:326 -msgid "Invalid data. Expected a dictionary, but got {datatype}." -msgstr "" - -#: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 -msgid "Filters" -msgstr "مرشحات" - -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "مرشحات الحقول" - -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "الترتيب" - -#: templates/rest_framework/filters/search.html:2 +#: filters.py:49 templates/rest_framework/filters/search.html:2 msgid "Search" msgstr "بحث" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "الترتيب" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "تصاعدي" + +#: filters.py:288 +msgid "descending" +msgstr "تنازلي" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "صفحة غير صحيحة." + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "مؤشر غير صالح" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "معرف العنصر \"{pk_value}\" غير صالح - العنصر غير موجود." + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "نوع خاطئ. المتوقع قيمة من pk، لكن المتحصل عليه {data_type}." + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "إرتباط تشعبي غير صالح - لا مطابقة لURL." + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "إرتباط تشعبي غير صالح - مطابقة خاطئة لURL." + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "إرتباط تشعبي غير صالح - عنصر غير موجود." + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "نوع خاطئ. المتوقع سلسلة URL، لكن المتحصل عليه {data_type}." + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "عنصر ب {slug_name}={value} غير موجود." + +#: relations.py:449 +msgid "Invalid value." +msgstr "قيمة غير صالحة." + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "معطيات غير صالحة. المتوقع هو قاموس، لكن المتحصل عليه {datatype}." + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "مرشحات" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "لا شيء" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "ما من عناصر للتحديد." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "هذا الحقل يجب أن يكون فريد" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." +msgstr "الحقول {field_names} يجب أن تشكل مجموعة فريدة." + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." msgstr "" -#: validators.py:245 +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." -msgstr "" +msgstr "الحقل يجب ان يكون فريد للتاريخ {date_field}." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." -msgstr "" +msgstr "الحقل يجب ان يكون فريد للشهر {date_field}." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." -msgstr "" +msgstr "الحقل يجب ان يكون فريد للعام {date_field}." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." -msgstr "" +msgstr "إصدار غير صالح في الرٱس \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." -msgstr "" +msgstr "إصدار غير صالح في المسار URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr " إصدار غير صالح في المسار URL. لا يطابق أي إصدار من مساحة الإسم." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." -msgstr "" +msgstr "إصدار غير صالح في اسم المضيف." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." -msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "ليس لديك صلاحية." +msgstr "إصدار غير صالح في معلمة الإستعلام." diff --git a/rest_framework/locale/az/LC_MESSAGES/django.mo b/rest_framework/locale/az/LC_MESSAGES/django.mo new file mode 100644 index 000000000..08648351e Binary files /dev/null and b/rest_framework/locale/az/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/az/LC_MESSAGES/django.po b/rest_framework/locale/az/LC_MESSAGES/django.po new file mode 100644 index 000000000..43a224259 --- /dev/null +++ b/rest_framework/locale/az/LC_MESSAGES/django.po @@ -0,0 +1,573 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Emin Mastizada , 2020 +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Azerbaijani (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/az/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: az\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "Xətalı sadə başlıq. İstifadəçi məlumatları təchiz edilməyib." + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "Xətalı sadə başlıq. İstifadəçi məlumatlarında boşluq olmamalıdır." + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "Xətalı sadə başlıq. İstifadəçi məlumatları base64 ilə düzgün şifrələnməyib." + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "Xətalı istifadəçi adı/parol." + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "İstifadəçi aktiv deyil və ya silinib." + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "Xətalı token başlığı. İstifadəçi məlumatları təchiz edilməyib." + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "Xətalı token başlığı. Token mətnində boşluqlar olmamalıdır." + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "Xətalı token başlığı. Token mətnində xətalı simvollar olmamalıdır." + +#: authentication.py:203 +msgid "Invalid token." +msgstr "Xətalı token." + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "Təsdiqləmə Tokeni" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "Açar" + +#: authtoken/models.py:16 +msgid "User" +msgstr "İstifadəçi" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "Yaradılıb" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "Token" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "Tokenlər" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "İstifadəçi adı" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "Parol" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "Təchiz edilən istifadəçi məlumatları ilə daxil olmaq mümkün olmadı." + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "Mütləq \"username\" və \"password\" olmalıdır." + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "Server xətası yaşandı." + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "Qüsurlu istək." + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "Səhv təsdiqləmə məlumatları." + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "Təsdiqləmə məlumatları təchiz edilməyib." + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "Bu əməliyyat üçün icazəniz yoxdur." + +#: exceptions.py:185 +msgid "Not found." +msgstr "Tapılmadı." + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "\"{method}\" yöntəminə icazə verilmir." + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "İstəyin Accept başlığını qane etmək mümkün olmadı." + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "İstəkdə dəstəklənməyən \"{media_type}\" mediya növü." + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "İstək nəzərə alınmadı." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "Bu sahə tələb edilir." + +#: fields.py:317 +msgid "This field may not be null." +msgstr "Bu sahə null ola bilməz." + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "Bu sahə boş ola bilməz." + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "Bu sahənin ən çox {max_length} simvolu olduğuna əmin olun." + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "Bu sahənin ən az {min_length} simvolu olduğuna əmin olun." + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "Keçərli e-poçt ünvanı daxil edin." + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "Bu dəyər tələb edilən formaya uyğun gəlmir." + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "Hərf, rəqəm, alt xətt və defislərdən ibarət keçərli \"slug\" daxil edin." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "Keçərli URL daxil edin." + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Keçərli IPv4 və ya IPv6 ünvanı daxil edin." + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "Keçərli tam ədəd tələb edilir." + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "Bu dəyərin uzunluğunun ən çox {max_value} olduğuna əmin olun." + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "Bu dəyərin uzunluğunun ən az {min_value} olduğuna əmin olun." + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "Yazı dəyəri çox uzundur." + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "Keçərli rəqəm tələb edilir." + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "Ən çox {max_digits} rəqəm olduğuna əmin olun." + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "Ən çox {max_decimal_places} onluq kəsr hissəsi olduğuna əmin olun." + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "Onluq kərsdən əvvəl ən çox {max_whole_digits} rəqəm olduğuna əmin olun." + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "Datetime dəyəri səhvdir. Əvəzinə bu formatlardan birini işlədin: {format}." + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "Datetime gözlənirdi amma date gəldi." + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Date dəyəri səhvdir. Əvəzinə bu formatlardan birini işlədin: {format}." + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "Date gözlənirdi amma datetime gəldi." + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "Vaxt formatı səhvdir. Əvəzinə bu formatlardan birini işlədin: {format}." + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "Müddət formatı səhvdir. Əvəzinə bu formatlardan birini işlədin: {format}." + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" keçərli seçim deyil." + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "{count} elementdən daha çoxdur..." + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "Elementlər siyahısı gözlənirdi, amma \"{input_type}\" növü gəldi." + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "Bu seçim boş ola bilməz." + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "\"{input}\" keçərli yol seçimi deyil." + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "Heç bir fayl göndərilmədi." + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "Göndərilən məlumat fayl deyildi. Anketin şifrələmə (encoding) növünü yoxlayın." + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "Faylın adı təyin edilə bilmədi." + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "Göndərilən fayl boşdur." + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "Fayl adının ən çox {max_length} simvoldan ibarət olduğuna əmin olun (hazırki: {length})." + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "Keçərli şəkil yükləyin. Yüklədiyiniz fayl ya şəkil deyil, ya da ola bilsin zədələnib." + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "Bu siyahı boş ola bilməz." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Elementlərin kitabçası (dictionary) gözlənirdi amma \"{input_type}\" növü gəldi." + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "Dəyər keçərli JSON olmalıdır." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Axtarış" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sıralama" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "artan" + +#: filters.py:288 +msgid "descending" +msgstr "azalan" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "Xətalı səhifə." + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "Xətalı kursor" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "Xətalı pk \"{pk_value}\" - obyekt mövcud deyil." + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "Xətalı növ. PK dəyəri gözlənirdi, {data_type} alındı." + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "Xətalı hiperkeçid - Heç bir URL uyğun gəlmir." + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "Xətalı hiperkeçid - Xətalı URL uyğunluğu." + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "Xətalı hiperkeçid - Obyekt mövcud deyil." + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "Xətalı növ. URL yazısı gözlənirdi, {data_type} gəldi." + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "{slug_name}={value} üçün uyğun obyekt mövcud deyil." + +#: relations.py:449 +msgid "Invalid value." +msgstr "Xətalı dəyər." + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "Xətalı məlumat. Kitabça (dictionary) gözlənirdi, {datatype} gəldi." + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "Filterlər" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "Heç nə" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "Seçiləcək element yoxdur." + +#: validators.py:39 +msgid "This field must be unique." +msgstr "Bu sahə unikal olmalıdır." + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "{field_names} sahələri birlikdə unikal dəst olmalıdırlar." + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "Bu sahə \"{date_field}\" günü üçün unikal olmalıdır." + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "Bu sahə \"{date_field}\" ayı üçün unikal olmalıdır." + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "Bu sahə \"{date_field}\" ili üçün unikal olmalıdır." + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "\"Accept\" başlığında xətalı versiya." + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "URL yolunda xətalı versiya." + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "URL yolunda xətalı versiya. Heç bir versiya namespace-inə uyğun gəlmir." + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "Hostname-də xətalı versiya." + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr "Sorğu parametrində xətalı versiya." diff --git a/rest_framework/locale/bg/LC_MESSAGES/django.mo b/rest_framework/locale/bg/LC_MESSAGES/django.mo new file mode 100644 index 000000000..71a0d8a74 Binary files /dev/null and b/rest_framework/locale/bg/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/bg/LC_MESSAGES/django.po b/rest_framework/locale/bg/LC_MESSAGES/django.po new file mode 100644 index 000000000..56e1c9ef8 --- /dev/null +++ b/rest_framework/locale/bg/LC_MESSAGES/django.po @@ -0,0 +1,572 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Bulgarian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "Невалиден header за базово удостоверение (basic authentication). Не се предоставени удостоверения." + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "Невалиден header за базово удостоверение (basic authentication). Носителите на удостоверение не трябва да съдържат интервали." + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "Невалиден header за базово удостоверение (basic authentication). Носителите на удостоверение не са кодирани в base64." + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "Невалидни потребителско име/парола." + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "Потребителят е неактивен или изтрит." + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "Невалиден token header. Не са предоставени носители на удостоверение." + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "Невалиден token header. Жетона (token-a) не трябва да съдържа интервали." + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "Невалиден token header. Жетона (token-a) не трябва да съдържа невалидни символи." + +#: authentication.py:203 +msgid "Invalid token." +msgstr "Невалиден жетон." + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "Жетон за удостоверение" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "Ключ" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Потребител" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "Създаден" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "Жетон" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "Жетони" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "Потребителско име" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "Парола" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "Не е възможен вход с предоставените удостоверения." + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "Трябва да съдържа \"username\" (потребителско име) и \"password\" (парола)." + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "Сървърна грешка." + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "Неправилно оформена заявка." + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "Невалидни носители на удостоверение." + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "Носители на удостоверение не са предоставени." + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "Нямате права да се направи това действие." + +#: exceptions.py:185 +msgid "Not found." +msgstr "Обектът не е намерен." + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "Метод \"{method}\" не е позволен." + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "Не може да бъде удовлетворен Accept header." + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "Неподдържан тип на документа \"{media_type}\" в заявката." + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "Заявката е ограничена." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "Това поле е задължително." + +#: fields.py:317 +msgid "This field may not be null." +msgstr "Това поле не може да има празна стойност." + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "Това поле не може да е празно." + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "Това поле не трябва да съдържа повече от {max_length} символа." + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "Това поле трябва да съдържа поде {min_length} символа." + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "Въведете валиден имейл адрес." + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "Тази стойност не съответства на изисквания шаблон." + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "Въведете валиден \"slug\" съдържащ латински букви, цифри, долни черти или тирета." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "Въведете валиден URL." + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Въведете валиден IPv4 или IPv6 адрес." + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "Необходимо е валидно цяло число." + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "Тази стойност трябва да е не повече от {max_value}." + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "Тази стойност трябва да е поне {min_value}." + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "Низът е прекалено голям." + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "Необходимо е валидно число." + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "Допустими са не повече от {max_digits} цифри." + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "Допустими са не повече от {max_decimal_places} цифри след десетичната запетая." + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "Допустими са не повече от {max_whole_digits} цифри преди десетичната запетая." + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "Датата и часът са в невалиден формат. Валидни са следните формати: {format}." + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "Очаква се дата и час, но е намерена само дата." + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Дата е в невалиден формат. Валидни са следните формати: {format}." + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "Очаква се дата, но са подадени дата и час." + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "Времето е в невалиден формат. Валидни са следните формати: {format}." + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "Отрязъкът от време е в невалиден формат. Валидни са следните формати: {format}." + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" не е валиден избор." + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "Повече от {count} неща..." + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "Очаква се списък от неща, но е получен тип \"{input_type}\"." + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "Този избор не може да е празен." + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "\"{input}\" не е валиден избор за път." + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "Не е подаден файл." + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "Подадените данни не са файл. Проверете кодировката на формата." + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "Не може да бъде определено името на файла." + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "Подадения файл е празен." + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "Името на файла може да е до {max_length} символа (то е {length})." + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "Невалидно изображение. Подадения файл не е изображение или е повредено изображение." + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "Този списък не може да е празен." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Очаква се асоциативен масив, но е получен \"{input_type}\"." + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "Стойността трябва да е валиден JSON." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Търсене" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Подредба" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "в нарастващ ред" + +#: filters.py:288 +msgid "descending" +msgstr "в намаляващ ред" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "Невалидна страница." + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "Невалиден курсор" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "Невалиден идентификатор \"{pk_value}\" - обектът не съществува." + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "Неправилен тип. Очакван е тип за основен ключ, получен е {data_type}." + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "Невалидна връзка (hyperlink) - няма намерен URL." + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "Невалидна връзка (hyperlink) - неправилно съвпадение на URL." + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "Невалидна връзка (hyperlink) - обектът не съществува." + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "Невалиден тип. Очаква се URL низ, получен е {data_type}." + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "Обект с {slug_name}={value} не съществува." + +#: relations.py:449 +msgid "Invalid value." +msgstr "Невалидна стойност." + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "Невалидни данни. Очаква се асоциативен масив, но е получен {datatype}." + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "Филтри" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "Нищо" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "Няма неща за избиране." + +#: validators.py:39 +msgid "This field must be unique." +msgstr "Това поле трябва да е уникално." + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "Полетата {field_names} трябва да образуват уникална комбинация." + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "Това поле трябва да е уникално за \"{date_field}\" дата." + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "Това поле трябва да е уникално за \"{date_field}\" месец." + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "Това поле трябва да е уникално за \"{date_field}\" година." + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "Невалидна версия в \"Accept\" header." + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "Невалидна версия в URL пътя." + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "Невалидна версия в URL пътя. Няма съвпадение с пространството от имена на версии." + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "Невалидна версия в името на сървъра (hostname)." + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr "Невалидна версия в GET параметър." diff --git a/rest_framework/locale/ca/LC_MESSAGES/django.mo b/rest_framework/locale/ca/LC_MESSAGES/django.mo index 0f72ec039..7da9971a8 100644 Binary files a/rest_framework/locale/ca/LC_MESSAGES/django.mo and b/rest_framework/locale/ca/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ca/LC_MESSAGES/django.po b/rest_framework/locale/ca/LC_MESSAGES/django.po index f82de0068..03dbbad60 100644 --- a/rest_framework/locale/ca/LC_MESSAGES/django.po +++ b/rest_framework/locale/ca/LC_MESSAGES/django.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Catalan (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,40 +17,40 @@ msgstr "" "Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Header Basic invàlid. No hi ha disponibles les credencials." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Header Basic invàlid. Les credencials no poden contenir espais." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Header Basic invàlid. Les credencials no estan codificades correctament en base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Usuari/Contrasenya incorrectes." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Usuari inactiu o esborrat." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Token header invàlid. No s'han indicat les credencials." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Token header invàlid. El token no ha de contenir espais." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Token header invàlid. El token no pot contenir caràcters invàlids." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Token invàlid." @@ -58,382 +58,515 @@ msgstr "Token invàlid." msgid "Auth Token" msgstr "" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Compte d'usuari desactivat." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "No es possible loguejar-se amb les credencials introduïdes." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "S'ha d'incloure \"username\" i \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "S'ha produït un error en el servidor." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Request amb format incorrecte." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Credencials d'autenticació incorrectes." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Credencials d'autenticació no disponibles." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "No té permisos per realitzar aquesta acció." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "No trobat." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Mètode \"{method}\" no permès." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "No s'ha pogut satisfer l'Accept header de la petició." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Media type \"{media_type}\" no suportat." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "La petició ha estat limitada pel número màxim de peticions definit." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Aquest camp és obligatori." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Aquest camp no pot ser nul." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" no és un booleà." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Aquest camp no pot estar en blanc." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Aquest camp no pot tenir més de {max_length} caràcters." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Aquest camp ha de tenir un mínim de {min_length} caràcters." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Introdueixi una adreça de correu vàlida." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Aquest valor no compleix el patró requerit." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Introdueix un \"slug\" vàlid consistent en lletres, números, guions o guions baixos." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Introdueixi una URL vàlida." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" no és un UUID vàlid." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Introdueixi una adreça IPv4 o IPv6 vàlida." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Es requereix un nombre enter vàlid." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Aquest valor ha de ser menor o igual a {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Aquest valor ha de ser més gran o igual a {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Valor del text massa gran." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Es requereix un nombre vàlid." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "No pot haver-hi més de {max_digits} dígits en total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "No pot haver-hi més de {max_decimal_places} decimals." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "No pot haver-hi més de {max_whole_digits} dígits abans del punt decimal." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "El Datetime té un format incorrecte. Utilitzi un d'aquests formats: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "S'espera un Datetime però s'ha rebut un Date." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "El Date té un format incorrecte. Utilitzi un d'aquests formats: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "S'espera un Date però s'ha rebut un Datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "El Time té un format incorrecte. Utilitzi un d'aquests formats: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "La durada té un format incorrecte. Utilitzi un d'aquests formats: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" no és una opció vàlida." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "S'espera una llista d'ítems però s'ha rebut el tipus \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Aquesta selecció no pot estar buida." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" no és un path vàlid." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "No s'ha enviat cap fitxer." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Les dades enviades no són un fitxer. Comproveu l'encoding type del formulari." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "No s'ha pogut determinar el nom del fitxer." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "El fitxer enviat està buit." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "El nom del fitxer ha de tenir com a màxim {max_length} caràcters (en té {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Envieu una imatge vàlida. El fitxer enviat no és una imatge o és una imatge corrompuda." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Aquesta llista no pot estar buida." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "S'espera un diccionari però s'ha rebut el tipus \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" msgstr "" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Cursor invàlid." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "PK invàlida \"{pk_value}\" - l'objecte no existeix." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Tipus incorrecte. S'espera el valor d'una PK, s'ha rebut {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Hyperlink invàlid - Cap match d'URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Hyperlink invàlid - Match d'URL incorrecta." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Hyperlink invàlid - L'objecte no existeix." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Tipus incorrecte. S'espera una URL, s'ha rebut {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "L'objecte amb {slug_name}={value} no existeix." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Valor invàlid." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Dades invàlides. S'espera un diccionari però s'ha rebut {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Cap" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Cap opció seleccionada." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Aquest camp ha de ser únic." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Aquests camps {field_names} han de constituir un conjunt únic." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Aquest camp ha de ser únic per a la data \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Aquest camp ha de ser únic per al mes \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Aquest camp ha de ser únic per a l'any \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Versió invàlida al header \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Versió invàlida a la URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Versió invàlida al hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Versió invàlida al paràmetre de consulta." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permís denegat." diff --git a/rest_framework/locale/cs/LC_MESSAGES/django.mo b/rest_framework/locale/cs/LC_MESSAGES/django.mo index 1561cd98c..ebf7db5aa 100644 Binary files a/rest_framework/locale/cs/LC_MESSAGES/django.mo and b/rest_framework/locale/cs/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/cs/LC_MESSAGES/django.po b/rest_framework/locale/cs/LC_MESSAGES/django.po index b6ee1ea48..ee6bad9ab 100644 --- a/rest_framework/locale/cs/LC_MESSAGES/django.po +++ b/rest_framework/locale/cs/LC_MESSAGES/django.po @@ -9,433 +9,566 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Czech (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Chybná hlavička. Nebyly poskytnuty přihlašovací údaje." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Chybná hlavička. Přihlašovací údaje by neměly obsahovat mezery." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Chybná hlavička. Přihlašovací údaje nebyly správně zakódovány pomocí base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Chybné uživatelské jméno nebo heslo." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Uživatelský účet je neaktivní nebo byl smazán." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Chybná hlavička tokenu. Nebyly zadány přihlašovací údaje." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Chybná hlavička tokenu. Přihlašovací údaje by neměly obsahovat mezery." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "Chybná hlavička s tokenem. Token nesmí obsahovat nevalidní znaky." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Chybný token." #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "Autentizační token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "Klíč" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Uživatel" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "Vytvořeno" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "Tokeny" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Uživatelské jméno" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Heslo" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Uživatelský účet je uzamčen." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Zadanými údaji se nebylo možné přihlásit." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Musí obsahovat \"uživatelské jméno\" a \"heslo\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Chyba na straně serveru." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Neplatný formát požadavku." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Chybné přihlašovací údaje." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Nebyly zadány přihlašovací údaje." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "K této akci nemáte oprávnění." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nenalezeno." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metoda \"{method}\" není povolena." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Nelze vyhovět požadavku v hlavičce Accept." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Nepodporovaný media type \"{media_type}\" v požadavku." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Požadavek byl limitován kvůli omezení počtu požadavků za časovou periodu." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Toto pole je vyžadováno." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Toto pole nesmí být prázdné (null)." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" nelze použít jako typ boolean." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Toto pole nesmí být prázdné." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Zkontrolujte, že toto pole není delší než {max_length} znaků." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Zkontrolujte, že toto pole obsahuje alespoň {min_length} znaků." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Vložte platnou e-mailovou adresu." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Hodnota v tomto poli neodpovídá požadovanému formátu." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Vložte platnou \"zkrácenou formu\" obsahující pouze malá písmena, čísla, spojovník nebo podtržítko." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Vložte platný odkaz." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" není platné UUID." - -#: fields.py:796 -msgid "Enter a valid IPv4 or IPv6 address." +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:821 +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Vložte platnou IPv4 nebo IPv6 adresu." + +#: fields.py:931 msgid "A valid integer is required." msgstr "Je vyžadováno celé číslo." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Zkontrolujte, že hodnota je menší nebo rovna {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Zkontrolujte, že hodnota je větší nebo rovna {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Řetězec je příliš dlouhý." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Je vyžadováno číslo." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Zkontrolujte, že číslo neobsahuje více než {max_digits} čislic." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Zkontrolujte, že číslo nemá více než {max_decimal_places} desetinných míst." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Zkontrolujte, že číslo neobsahuje více než {max_whole_digits} čislic před desetinnou čárkou." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Chybný formát data a času. Použijte jeden z těchto formátů: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Bylo zadáno pouze datum bez času." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Chybný formát data. Použijte jeden z těchto formátů: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Bylo zadáno datum a čas, místo samotného data." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Chybný formát času. Použijte jeden z těchto formátů: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Trvání má nesprávný formát. Použijte jeden z následujících: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" není platnou možností." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "Více než {count} položek..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Byl očekáván seznam položek ale nalezen \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "Tento výběr by neměl být prázdný." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "\"{input}\" není validní cesta k souboru." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Nebyl zaslán žádný soubor." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Zaslaná data neobsahují soubor. Zkontrolujte typ kódování ve formuláři." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Nebylo možné zjistit jméno souboru." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Zaslaný soubor je prázdný." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Zajistěte, aby jméno souboru obsahovalo maximálně {max_length} znaků (teď má {length} znaků)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Nahrajte platný obrázek. Nahraný soubor buď není obrázkem nebo je poškozen." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "Tento list by neměl být prázdný." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Byl očekáván slovník položek ale nalezen \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "Hodnota musí být platná hodnota JSON." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Hledat" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Řazení" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "vzestupně" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "sestupně" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "Nevalidní strana." + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 -msgid "Invalid cursor" -msgstr "Chybný kurzor." +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" -#: relations.py:207 +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "Chybný kurzor" + +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Chybný primární klíč \"{pk_value}\" - objekt neexistuje." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Chybný typ. Byl přijat typ {data_type} místo hodnoty primárního klíče." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Chybný odkaz - nebyla nalezena žádní shoda." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Chybný odkaz - byla nalezena neplatná shoda." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Chybný odkaz - objekt neexistuje." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Chybný typ. Byl přijat typ {data_type} místo očekávaného odkazu." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekt s {slug_name}={value} neexistuje." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Chybná hodnota." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Chybná data. Byl přijat typ {datatype} místo očekávaného slovníku." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "Filtry" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "Neuvedeno" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "Žádné položky k výběru." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Tato položka musí být unikátní." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Položka {field_names} musí tvořit unikátní množinu." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Tato položka musí být pro datum \"{date_field}\" unikátní." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Tato položka musí být pro měsíc \"{date_field}\" unikátní." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Tato položka musí být pro rok \"{date_field}\" unikátní." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Chybné číslo verze v hlavičce Accept." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Chybné číslo verze v odkazu." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Nevalidní verze v URL cestě. Neodpovídá žádnému z jmenných prostorů pro verze." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Chybné číslo verze v hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Chybné čislo verze v URL parametru." - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/da/LC_MESSAGES/django.mo b/rest_framework/locale/da/LC_MESSAGES/django.mo index 77fd7c2ab..d70bc13a5 100644 Binary files a/rest_framework/locale/da/LC_MESSAGES/django.mo and b/rest_framework/locale/da/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/da/LC_MESSAGES/django.po b/rest_framework/locale/da/LC_MESSAGES/django.po index 900695649..574066f2a 100644 --- a/rest_framework/locale/da/LC_MESSAGES/django.po +++ b/rest_framework/locale/da/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Mads Jensen \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Danish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/da/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,40 +19,40 @@ msgstr "" "Language: da\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Ugyldig basic header. Ingen legitimation angivet." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Ugyldig basic header. Legitimationsstrenge må ikke indeholde mellemrum." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Ugyldig basic header. Legitimationen er ikke base64 encoded på korrekt vis." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Ugyldigt brugernavn/kodeord." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Inaktiv eller slettet bruger." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Ugyldig token header." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Ugyldig token header. Token-strenge må ikke indeholde mellemrum." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Ugyldig token header. Token streng bør ikke indeholde ugyldige karakterer." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Ugyldigt token." @@ -60,382 +60,515 @@ msgstr "Ugyldigt token." msgid "Auth Token" msgstr "" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Nøgle" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Bruger" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Oprettet" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Brugernavn" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Kodeord" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Brugerkontoen er deaktiveret." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Kunne ikke logge ind med den angivne legitimation." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Skal indeholde \"username\" og \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Der er sket en serverfejl." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Misdannet forespørgsel." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Ugyldig legitimation til autentificering." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Legitimation til autentificering blev ikke angivet." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Du har ikke lov til at udføre denne handling." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Ikke fundet." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metoden \"{method}\" er ikke tilladt." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Kunne ikke efterkomme forespørgslens Accept header." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Forespørgslens media type, \"{media_type}\", er ikke understøttet." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Forespørgslen blev neddroslet." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Dette felt er påkrævet." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Dette felt må ikke være null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" er ikke en tilladt boolsk værdi." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Dette felt må ikke være tomt." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Tjek at dette felt ikke indeholder flere end {max_length} tegn." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Tjek at dette felt indeholder mindst {min_length} tegn." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Angiv en gyldig e-mailadresse." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Denne værdi passer ikke med det påkrævede mønster." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Indtast en gyldig \"slug\", bestående af bogstaver, tal, bund- og bindestreger." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Indtast en gyldig URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" er ikke et gyldigt UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Indtast en gyldig IPv4 eller IPv6 adresse." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Et gyldigt heltal er påkrævet." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Tjek at værdien er mindre end eller lig med {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Tjek at værdien er større end eller lig med {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Strengværdien er for stor." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Et gyldigt tal er påkrævet." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Tjek at der ikke er flere end {max_digits} cifre i alt." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Tjek at der ikke er flere end {max_decimal_places} cifre efter kommaet." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Tjek at der ikke er flere end {max_whole_digits} cifre før kommaet." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datotid har et forkert format. Brug i stedet et af disse formater: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Forventede en datotid, men fik en dato." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Dato har et forkert format. Brug i stedet et af disse formater: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Forventede en dato men fik en datotid." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Klokkeslæt har forkert format. Brug i stedet et af disse formater: {format}. " -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Varighed har forkert format. Brug istedet et af følgende formater: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" er ikke et gyldigt valg." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Flere end {count} objekter..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Forventede en liste, men fik noget af typen \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Dette valg kan være tomt." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" er ikke et gyldigt valg af adresse." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Ingen medsendt fil." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Det medsendte data var ikke en fil. Tjek typen af indkodning på formularen." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Filnavnet kunne ikke afgøres." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Den medsendte fil er tom." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Sørg for at filnavnet er højst {max_length} langt (det er {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Medsend et gyldigt billede. Den medsendte fil var enten ikke et billede eller billedfilen var ødelagt." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Denne liste er muligvis ikke tom." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Forventede en dictionary, men fik noget af typen \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Værdi skal være gyldig JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Indsend." +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Søg" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sortering" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "stigende" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "faldende" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Ugyldig side" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Ugyldig cursor" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Ugyldig primærnøgle \"{pk_value}\" - objektet findes ikke." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Ugyldig type. Forventet værdi er primærnøgle, fik {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Ugyldigt hyperlink - intet URL match." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Ugyldigt hyperlink - forkert URL match." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Ugyldigt hyperlink - objektet findes ikke." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Forkert type. Forventede en URL-streng, fik {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Object med {slug_name}={value} findes ikke." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Ugyldig værdi." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Ugyldig data. Forventede en dictionary, men fik {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtre" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Søgefiltre" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Sortering" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Søg" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Ingen" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Intet at vælge." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Dette felt skal være unikt." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Felterne {field_names} skal udgøre et unikt sæt." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Dette felt skal være unikt for \"{date_field}\"-datoen." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Dette felt skal være unikt for \"{date_field}\"-måneden." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Dette felt skal være unikt for \"{date_field}\"-året." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Ugyldig version i \"Accept\" headeren." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Ugyldig version i URL-stien." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Ugyldig version in URLen. Den stemmer ikke overens med nogen versionsnumre." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Ugyldig version i hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Ugyldig version i forespørgselsparameteren." - -#: views.py:88 -msgid "Permission denied." -msgstr "Adgang nægtet." diff --git a/rest_framework/locale/de/LC_MESSAGES/django.mo b/rest_framework/locale/de/LC_MESSAGES/django.mo index 0042572ef..986880397 100644 Binary files a/rest_framework/locale/de/LC_MESSAGES/django.mo and b/rest_framework/locale/de/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/de/LC_MESSAGES/django.po b/rest_framework/locale/de/LC_MESSAGES/django.po index 725a0f757..12ae5ba18 100644 --- a/rest_framework/locale/de/LC_MESSAGES/django.po +++ b/rest_framework/locale/de/LC_MESSAGES/django.po @@ -4,7 +4,7 @@ # # Translators: # Fabian Büchler , 2015 -# datKater , 2017 +# 5a85a00218ad0559ac6870a4179f4dbc, 2017 # Lukas Bischofberger , 2017 # Mads Jensen , 2015 # Niklas P , 2015-2016 @@ -15,9 +15,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Lukas Bischofberger \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: German (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,40 +25,40 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Ungültiger basic header. Keine Zugangsdaten angegeben." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Ungültiger basic header. Zugangsdaten sollen keine Leerzeichen enthalten." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Ungültiger basic header. Zugangsdaten sind nicht korrekt mit base64 kodiert." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Ungültiger Benutzername/Passwort" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Benutzer inaktiv oder gelöscht." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Ungültiger token header. Keine Zugangsdaten angegeben." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Ungültiger token header. Zugangsdaten sollen keine Leerzeichen enthalten." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Ungültiger Token Header. Tokens dürfen keine ungültigen Zeichen enthalten." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Ungültiges Token" @@ -66,382 +66,515 @@ msgstr "Ungültiges Token" msgid "Auth Token" msgstr "Auth Token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Schlüssel" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Benutzer" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Erzeugt" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Benutzername" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Passwort" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Benutzerkonto ist gesperrt." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Die angegebenen Zugangsdaten stimmen nicht." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "\"username\" und \"password\" sind erforderlich." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Ein Serverfehler ist aufgetreten." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Fehlerhafte Anfrage." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Falsche Anmeldedaten." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Anmeldedaten fehlen." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Sie sind nicht berechtigt diese Aktion durchzuführen." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nicht gefunden." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Methode \"{method}\" nicht erlaubt." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Kann die Accept Kopfzeile der Anfrage nicht erfüllen." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Nicht unterstützter Medientyp \"{media_type}\" in der Anfrage." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Die Anfrage wurde gedrosselt." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Dieses Feld ist erforderlich." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Dieses Feld darf nicht null sein." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" ist kein gültiger Wahrheitswert." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Dieses Feld darf nicht leer sein." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Stelle sicher, dass dieses Feld nicht mehr als {max_length} Zeichen lang ist." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Stelle sicher, dass dieses Feld mindestens {min_length} Zeichen lang ist." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Gib eine gültige E-Mail Adresse an." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Dieser Wert passt nicht zu dem erforderlichen Muster." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Gib ein gültiges \"slug\" aus Buchstaben, Ziffern, Unterstrichen und Minuszeichen ein." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Gib eine gültige URL ein." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" ist keine gültige UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Geben Sie eine gültige IPv4 oder IPv6 Adresse an" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Eine gültige Ganzzahl ist erforderlich." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Stelle sicher, dass dieser Wert kleiner oder gleich {max_value} ist." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Stelle sicher, dass dieser Wert größer oder gleich {min_value} ist." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Zeichenkette zu lang." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Eine gültige Zahl ist erforderlich." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Stelle sicher, dass es insgesamt nicht mehr als {max_digits} Ziffern lang ist." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Stelle sicher, dass es nicht mehr als {max_decimal_places} Nachkommastellen lang ist." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Stelle sicher, dass es nicht mehr als {max_whole_digits} Stellen vor dem Komma lang ist." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datums- und Zeitangabe hat das falsche Format. Nutze stattdessen eines dieser Formate: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Erwarte eine Datums- und Zeitangabe, erhielt aber ein Datum." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Datum hat das falsche Format. Nutze stattdessen eines dieser Formate: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Erwarte ein Datum, erhielt aber eine Datums- und Zeitangabe." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Zeitangabe hat das falsche Format. Nutze stattdessen eines dieser Formate: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Laufzeit hat das falsche Format. Benutze stattdessen eines dieser Formate {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" ist keine gültige Option." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Mehr als {count} Ergebnisse" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Erwarte eine Liste von Elementen, erhielt aber den Typ \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Diese Auswahl darf nicht leer sein" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" ist ein ungültiger Pfad." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Es wurde keine Datei übermittelt." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Die übermittelten Daten stellen keine Datei dar. Prüfe den Kodierungstyp im Formular." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Der Dateiname konnte nicht ermittelt werden." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Die übermittelte Datei ist leer." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Stelle sicher, dass dieser Dateiname höchstens {max_length} Zeichen lang ist (er hat {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Lade ein gültiges Bild hoch. Die hochgeladene Datei ist entweder kein Bild oder ein beschädigtes Bild." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Diese Liste darf nicht leer sein." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Erwartete ein Dictionary mit Elementen, erhielt aber den Typ \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Wert muss gültiges JSON sein." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Abschicken" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Suche" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sortierung" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "Aufsteigend" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "Absteigend" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Ungültige Seite." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Ungültiger Zeiger" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Ungültiger pk \"{pk_value}\" - Object existiert nicht." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Falscher Typ. Erwarte pk Wert, erhielt aber {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Ungültiger Hyperlink - entspricht keiner URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Ungültiger Hyperlink - URL stimmt nicht überein." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Ungültiger Hyperlink - Objekt existiert nicht." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Falscher Typ. Erwarte URL Zeichenkette, erhielt aber {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekt mit {slug_name}={value} existiert nicht." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Ungültiger Wert." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Ungültige Daten. Dictionary erwartet, aber {datatype} erhalten." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filter" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Feldfilter" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Sortierung" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Suche" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Nichts" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Keine Elemente zum Auswählen." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Dieses Feld muss eindeutig sein." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Die Felder {field_names} müssen eine eindeutige Menge bilden." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Dieses Feld muss bezüglich des \"{date_field}\" Datums eindeutig sein." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Dieses Feld muss bezüglich des \"{date_field}\" Monats eindeutig sein." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Dieses Feld muss bezüglich des \"{date_field}\" Jahrs eindeutig sein." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Ungültige Version in der \"Accept\" Kopfzeile." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Ungültige Version im URL Pfad." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Ungültige Version im URL-Pfad. Entspricht keinem Versions-Namensraum." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Ungültige Version im Hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Ungültige Version im Anfrageparameter." - -#: views.py:88 -msgid "Permission denied." -msgstr "Zugriff verweigert." diff --git a/rest_framework/locale/el/LC_MESSAGES/django.mo b/rest_framework/locale/el/LC_MESSAGES/django.mo index b44b9ea9c..f434e6fc9 100644 Binary files a/rest_framework/locale/el/LC_MESSAGES/django.mo and b/rest_framework/locale/el/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/el/LC_MESSAGES/django.po b/rest_framework/locale/el/LC_MESSAGES/django.po index 18eb371c9..65459fc7b 100644 --- a/rest_framework/locale/el/LC_MESSAGES/django.po +++ b/rest_framework/locale/el/LC_MESSAGES/django.po @@ -3,14 +3,16 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Christos Barkonikos , 2020 +# Panagiotis Pavlidis , 2019 # Serafeim Papastefanos , 2016 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Greek (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,40 +20,40 @@ msgstr "" "Language: el\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Λανθασμένη επικεφαλίδα basic. Δεν υπάρχουν διαπιστευτήρια." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "Λανθασμένη επικεφαλίδα basic. Τα διαπιστευτήρια δε μπορεί να περιέχουν κενά." +msgstr "Λανθασμένη επικεφαλίδα basic. Τα διαπιστευτήρια δεν πρέπει να περιέχουν κενά." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Λανθασμένη επικεφαλίδα basic. Τα διαπιστευτήρια δεν είναι κωδικοποιημένα κατά base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Λανθασμένο όνομα χρήστη/κωδικός." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Ο χρήστης είναι ανενεργός ή διεγραμμένος." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Λανθασμένη επικεφαλίδα token. Δεν υπάρχουν διαπιστευτήρια." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "Λανθασμένη επικεφαλίδα token. Το token δε πρέπει να περιέχει κενά." +msgstr "Λανθασμένη επικεφαλίδα token. Το token δεν πρέπει να περιέχει κενά." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Λανθασμένη επικεφαλίδα token. Το token περιέχει μη επιτρεπτούς χαρακτήρες." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Λανθασμένο token" @@ -59,382 +61,515 @@ msgstr "Λανθασμένο token" msgid "Auth Token" msgstr "Token πιστοποίησης" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Κλειδί" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Χρήστης" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Δημιουργήθηκε" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Όνομα χρήστη" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Κωδικός" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Ο λογαριασμός χρήστη είναι απενεργοποιημένος." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Δεν είναι δυνατή η σύνδεση με τα διαπιστευτήρια." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Πρέπει να περιέχει \"όνομα χρήστη\" και \"κωδικό\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Σφάλμα διακομιστή." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Λανθασμένο αίτημα." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Λάθος διαπιστευτήρια." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Δεν δόθηκαν διαπιστευτήρια." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Δεν έχετε δικαίωματα για αυτή την ενέργεια." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Δε βρέθηκε." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "Η μέθοδος \"{method\"} δεν επιτρέπεται." +msgstr "Η μέθοδος \"{method}\" δεν επιτρέπεται." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Δεν ήταν δυνατή η ικανοποίηση της επικεφαλίδας Accept της αίτησης." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Δεν υποστηρίζεται το media type \"{media_type}\" της αίτησης." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Το αίτημα έγινε throttle." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Το πεδίο είναι απαραίτητο." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Το πεδίο δε μπορεί να είναι null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "Το \"{input}\" δεν είναι έγκυρο boolean." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Το πεδίο δε μπορεί να είναι κενό." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Επιβεβαιώσατε ότι το πεδίο δεν έχει περισσότερους από {max_length} χαρακτήρες." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Επιβεβαιώσατε ότι το πεδίο έχει τουλάχιστον {min_length} χαρακτήρες." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Συμπληρώσατε μια έγκυρη διεύθυνση e-mail." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Η τιμή δε ταιριάζει με το pattern." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Εισάγετε ένα έγκυρο \"slug\" που αποτελείται από γράμματα, αριθμούς παύλες και κάτω παύλες." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Εισάγετε έγκυρο URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "Το \"{value}\" δεν είναι έγκυρο UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Εισάγετε μια έγκυρη διεύθυνση IPv4 ή IPv6." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Ένας έγκυρος ακέραιος είναι απαραίτητος." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Επιβεβαιώσατε ότι η τιμή είναι μικρότερη ή ίση του {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Επιβεβαιώσατε ότι η τιμή είναι μεγαλύτερη ή ίση του {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Το κείμενο είναι πολύ μεγάλο." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Ένας έγκυρος αριθμός είναι απαραίτητος." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Επιβεβαιώσατε ότι δεν υπάρχουν παραπάνω από {max_digits} ψηφία." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Επιβεβαιώσατε ότι δεν υπάρχουν παραπάνω από {max_decimal_places} δεκαδικά ψηφία." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Επιβεβαιώσατε ότι δεν υπάρχουν παραπάνω από {max_whole_digits} ακέραια ψηφία." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Η ημερομηνία έχεi λάθος μορφή. Χρησιμοποιήστε μια από τις ακόλουθες μορφές: {format}" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Αναμένεται ημερομηνία και ώρα αλλά δόθηκε μόνο ημερομηνία." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Η ημερομηνία έχεi λάθος μορφή. Χρησιμοποιήστε μια από τις ακόλουθες μορφές: {format}" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Αναμένεται ημερομηνία αλλά δόθηκε ημερομηνία και ώρα." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Η ώρα έχει λάθος μορφή. Χρησιμοποιήστε μια από τις ακόλουθες μορφές: {format}" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Η διάρκεια έχει λάθος μορφή. Χρησιμοποιήστε μια από τις ακόλουθες μορφές: {format}" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "Το \"{input}\" δεν είναι έγκυρη επιλογή." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Περισσότερα από {count} αντικείμενα..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Αναμένεται μια λίστα αντικειμένον αλλά δόθηκε ο τύπος \"{input_type}\"" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Η επιλογή δε μπορεί να είναι κενή." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "Το \"{input}\" δεν είναι έγκυρη επιλογή διαδρομής." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Δεν υποβλήθηκε αρχείο." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Τα δεδομένα που υποβλήθηκαν δεν ήταν αρχείο. Ελέγξατε την κωδικοποίηση της φόρμας." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Δε βρέθηκε όνομα αρχείου." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Το αρχείο που υποβλήθηκε είναι κενό." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Επιβεβαιώσατε ότι το όνομα αρχείου έχει ως {max_length} χαρακτήρες (έχει {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Ανεβάστε μια έγκυρη εικόνα. Το αρχείο που ανεβάσατε είτε δεν είναι εικόνα είτε έχει καταστραφεί." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Η λίστα δε μπορεί να είναι κενή." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Αναμένεται ένα λεξικό αντικείμενων αλλά δόθηκε ο τύπος \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Η τιμή πρέπει να είναι μορφής JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Υποβολή" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Αναζήτηση" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ταξινόμηση" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Λάθος σελίδα." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Λάθος cursor." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Λάθος κλειδί \"{pk_value}\" - το αντικείμενο δεν υπάρχει." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Λάθος τύπος. Αναμένεται τιμή κλειδιού, δόθηκε {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Λάθος σύνδεση - δε ταιριάζει κάποιο URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Λάθος σύνδεση - δε ταιριάζει κάποιο URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Λάθος σύνδεση - το αντικείμενο δεν υπάρχει." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Λάθος τύπος. Αναμένεται URL, δόθηκε {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Το αντικείμενο {slug_name}={value} δεν υπάρχει." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Λάθος τιμή." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Λάθος δεδομένα. Αναμένεται λεξικό αλλά δόθηκε {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Φίλτρα" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Φίλτρα πεδίων" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ταξινόμηση" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Αναζήτηση" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "None" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Δεν υπάρχουν αντικείμενα προς επιλογή." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Το πεδίο πρέπει να είναι μοναδικό" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Τα πεδία {field_names} πρέπει να αποτελούν ένα μοναδικό σύνολο." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Το πεδίο πρέπει να είναι μοναδικό για την ημερομηνία \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Το πεδίο πρέπει να είναι μοναδικό για το μήνα \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Το πεδίο πρέπει να είναι μοναδικό για το έτος \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Λάθος έκδοση στην επικεφαλίδα \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Λάθος έκδοση στη διαδρομή URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Λάθος έκδοση στο hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Λάθος έκδοση στην παράμετρο" - -#: views.py:88 -msgid "Permission denied." -msgstr "Απόρριψη πρόσβασης" diff --git a/rest_framework/locale/en/LC_MESSAGES/django.mo b/rest_framework/locale/en/LC_MESSAGES/django.mo index 68e5600ae..0770a9d5e 100644 Binary files a/rest_framework/locale/en/LC_MESSAGES/django.mo and b/rest_framework/locale/en/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/en/LC_MESSAGES/django.po b/rest_framework/locale/en/LC_MESSAGES/django.po index fa420670a..99c57b40c 100644 --- a/rest_framework/locale/en/LC_MESSAGES/django.po +++ b/rest_framework/locale/en/LC_MESSAGES/django.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-09-21 21:11+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: English (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/en/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,40 +17,40 @@ msgstr "" "Language: en\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Invalid basic header. No credentials provided." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Invalid basic header. Credentials string should not contain spaces." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Invalid basic header. Credentials not correctly base64 encoded." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Invalid username/password." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "User inactive or deleted." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Invalid token header. No credentials provided." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Invalid token header. Token string should not contain spaces." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Invalid token header. Token string should not contain invalid characters." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Invalid token." @@ -58,382 +58,515 @@ msgstr "Invalid token." msgid "Auth Token" msgstr "Auth Token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Key" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "User" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Created" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Username" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Password" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "User account is disabled." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Unable to log in with provided credentials." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Must include \"username\" and \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "A server error occurred." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "Invalid input." + +#: exceptions.py:161 msgid "Malformed request." msgstr "Malformed request." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Incorrect authentication credentials." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Authentication credentials were not provided." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "You do not have permission to perform this action." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Not found." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Method \"{method}\" not allowed." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Could not satisfy the request Accept header." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Unsupported media type \"{media_type}\" in request." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Request was throttled." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "Expected available in {wait} second." + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "Expected available in {wait} seconds." + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "This field is required." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "This field may not be null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" is not a valid boolean." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "Must be a valid boolean." -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "Not a valid string." + +#: fields.py:767 msgid "This field may not be blank." msgstr "This field may not be blank." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Ensure this field has no more than {max_length} characters." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Ensure this field has at least {min_length} characters." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Enter a valid email address." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "This value does not match the required pattern." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Enter a valid \"slug\" consisting of letters, numbers, underscores or hyphens." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, or hyphens." + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Enter a valid URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" is not a valid UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "Must be a valid UUID." -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Enter a valid IPv4 or IPv6 address." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "A valid integer is required." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Ensure this value is less than or equal to {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Ensure this value is greater than or equal to {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "String value too large." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "A valid number is required." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Ensure that there are no more than {max_digits} digits in total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Ensure that there are no more than {max_decimal_places} decimal places." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Ensure that there are no more than {max_whole_digits} digits before the decimal point." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datetime has wrong format. Use one of these formats instead: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Expected a datetime but got a date." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "Invalid datetime for the timezone \"{timezone}\"." + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "Datetime value out of range." + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Date has wrong format. Use one of these formats instead: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Expected a date but got a datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Time has wrong format. Use one of these formats instead: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Duration has wrong format. Use one of these formats instead: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" is not a valid choice." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "More than {count} items..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Expected a list of items but got type \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "This selection may not be empty." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" is not a valid path choice." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "No file was submitted." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "The submitted data was not a file. Check the encoding type on the form." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "No filename could be determined." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "The submitted file is empty." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Ensure this filename has at most {max_length} characters (it has {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Upload a valid image. The file you uploaded was either not an image or a corrupted image." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "This list may not be empty." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "Ensure this field has at least {min_length} elements." + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "Ensure this field has no more than {max_length} elements." + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Expected a dictionary of items but got type \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "This dictionary may not be empty." + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Value must be valid JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Submit" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Search" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "A search term." + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordering" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "Which field to use when ordering the results." + +#: filters.py:287 msgid "ascending" msgstr "ascending" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "descending" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "A page number within the paginated result set." + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "Number of results to return per page." + +#: pagination.py:189 msgid "Invalid page." msgstr "Invalid page." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "The initial index from which to return the results." + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "The pagination cursor value." + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Invalid cursor" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Invalid pk \"{pk_value}\" - object does not exist." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Incorrect type. Expected pk value, received {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Invalid hyperlink - No URL match." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Invalid hyperlink - Incorrect URL match." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Invalid hyperlink - Object does not exist." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Incorrect type. Expected URL string, received {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Object with {slug_name}={value} does not exist." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Invalid value." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "unique integer value" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "UUID string" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "unique value" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "A {value_type} identifying this {name}." + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Invalid data. Expected a dictionary, but got {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "Extra Actions" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filters" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Field filters" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "navbar" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordering" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "content" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Search" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "request form" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "main content" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "request info" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "response info" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "None" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "No items to select." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "This field must be unique." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "The fields {field_names} must make a unique set." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "Surrogate characters are not allowed: U+{code_point:X}." + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "This field must be unique for the \"{date_field}\" date." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "This field must be unique for the \"{date_field}\" month." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "This field must be unique for the \"{date_field}\" year." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Invalid version in \"Accept\" header." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Invalid version in URL path." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Invalid version in URL path. Does not match any version namespace." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Invalid version in hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Invalid version in query parameter." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permission denied." diff --git a/rest_framework/locale/en_US/LC_MESSAGES/django.po b/rest_framework/locale/en_US/LC_MESSAGES/django.po index 3733a1e33..c9dd2d633 100644 --- a/rest_framework/locale/en_US/LC_MESSAGES/django.po +++ b/rest_framework/locale/en_US/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,40 +17,40 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "" -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "" @@ -58,380 +58,513 @@ msgstr "" msgid "Auth Token" msgstr "" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "" -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "" -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "" -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "" -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "" -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "" -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "" -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "" -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "" -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "" -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "" -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "" -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "" -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "" -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "" -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "" -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "" -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "" -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "" -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "" -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "" -#: fields.py:1359 +#: fields.py:1515 msgid "The submitted data was not a file. Check the encoding type on the form." msgstr "" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "" -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "" -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "" -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "" -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" msgstr "" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "" -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "" #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/es/LC_MESSAGES/django.mo b/rest_framework/locale/es/LC_MESSAGES/django.mo index 6efb9bdd1..16df627fc 100644 Binary files a/rest_framework/locale/es/LC_MESSAGES/django.mo and b/rest_framework/locale/es/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/es/LC_MESSAGES/django.po b/rest_framework/locale/es/LC_MESSAGES/django.po index c9b6e9455..a2f7f1a43 100644 --- a/rest_framework/locale/es/LC_MESSAGES/django.po +++ b/rest_framework/locale/es/LC_MESSAGES/django.po @@ -3,8 +3,9 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Ernesto Rico-Schmidt , 2015 +# Ernesto Rico Schmidt , 2015 # José Padilla , 2015 +# Leo Prada , 2019 # Miguel Gonzalez , 2015 # Miguel Gonzalez , 2016 # Miguel Gonzalez , 2015-2016 @@ -13,9 +14,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Miguel Gonzalez \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Spanish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,40 +24,40 @@ msgstr "" "Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Cabecera básica inválida. Las credenciales no fueron suministradas." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Cabecera básica inválida. La cadena con las credenciales no debe contener espacios." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "Cabecera básica inválida. Las credenciales incorrectamente codificadas en base64." +msgstr "Cabecera básica inválida. Las credenciales no fueron codificadas correctamente en base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Nombre de usuario/contraseña inválidos." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Usuario inactivo o borrado." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Cabecera token inválida. Las credenciales no fueron suministradas." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Cabecera token inválida. La cadena token no debe contener espacios." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Cabecera token inválida. La cadena token no debe contener caracteres inválidos." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Token inválido." @@ -64,382 +65,515 @@ msgstr "Token inválido." msgid "Auth Token" msgstr "Token de autenticación" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Clave" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Usuario" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Fecha de creación" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Nombre de usuario" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Contraseña" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Cuenta de usuario está deshabilitada." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "No puede iniciar sesión con las credenciales proporcionadas." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Debe incluir \"username\" y \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Se ha producido un error en el servidor." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Solicitud con formato incorrecto." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Credenciales de autenticación incorrectas." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Las credenciales de autenticación no se proveyeron." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Usted no tiene permiso para realizar esta acción." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "No encontrado." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Método \"{method}\" no permitido." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "No se ha podido satisfacer la solicitud de cabecera de Accept." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Tipo de medio \"{media_type}\" incompatible en la solicitud." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Solicitud fue regulada (throttled)." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Este campo es requerido." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Este campo no puede ser nulo." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" no es un booleano válido." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Este campo no puede estar en blanco." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Asegúrese de que este campo no tenga más de {max_length} caracteres." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Asegúrese de que este campo tenga al menos {min_length} caracteres." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Introduzca una dirección de correo electrónico válida." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Este valor no coincide con el patrón requerido." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Introduzca un \"slug\" válido consistente en letras, números, guiones o guiones bajos." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Introduzca una URL válida." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" no es un UUID válido." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Introduzca una dirección IPv4 o IPv6 válida." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Introduzca un número entero válido." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Asegúrese de que este valor es menor o igual a {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Asegúrese de que este valor es mayor o igual a {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Cadena demasiado larga." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Se requiere un número válido." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Asegúrese de que no haya más de {max_digits} dígitos en total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Asegúrese de que no haya más de {max_decimal_places} decimales." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Asegúrese de que no haya más de {max_whole_digits} dígitos en la parte entera." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Fecha/hora con formato erróneo. Use uno de los siguientes formatos en su lugar: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Se esperaba un fecha/hora en vez de una fecha." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Fecha con formato erróneo. Use uno de los siguientes formatos en su lugar: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Se esperaba una fecha en vez de una fecha/hora." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Hora con formato erróneo. Use uno de los siguientes formatos en su lugar: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Duración con formato erróneo. Use uno de los siguientes formatos en su lugar: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" no es una elección válida." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Más de {count} elementos..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Se esperaba una lista de elementos en vez del tipo \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Esta selección no puede estar vacía." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" no es una elección de ruta válida." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "No se envió ningún archivo." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "La información enviada no era un archivo. Compruebe el tipo de codificación del formulario." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "No se pudo determinar un nombre de archivo." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "El archivo enviado está vació." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Asegúrese de que el nombre de archivo no tenga más de {max_length} caracteres (tiene {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Adjunte una imagen válida. El archivo adjunto o bien no es una imagen o bien está dañado." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Esta lista no puede estar vacía." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Se esperaba un diccionario de elementos en vez del tipo \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "El valor debe ser JSON válido." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Enviar" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Buscar" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordenamiento" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "ascendiente" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "descendiente" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Página inválida." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Cursor inválido" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Clave primaria \"{pk_value}\" inválida - objeto no existe." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Tipo incorrecto. Se esperaba valor de clave primaria y se recibió {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Hiperenlace inválido - No hay URL coincidentes." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Hiperenlace inválido - Coincidencia incorrecta de la URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Hiperenlace inválido - Objeto no existe." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Tipo incorrecto. Se esperaba una URL y se recibió {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objeto con {slug_name}={value} no existe." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Valor inválido." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Datos inválidos. Se esperaba un diccionario pero es un {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtros" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Filtros de campo" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordenamiento" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Buscar" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Ninguno" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "No hay elementos para seleccionar." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Este campo debe ser único." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Los campos {field_names} deben formar un conjunto único." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Este campo debe ser único para el día \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Este campo debe ser único para el mes \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Este campo debe ser único para el año \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Versión inválida en la cabecera \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Versión inválida en la ruta de la URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "La versión especificada en la ruta de la URL no es válida. No coincide con ninguna del espacio de nombres de versiones." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Versión inválida en el nombre de host." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Versión inválida en el parámetro de consulta." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permiso denegado." diff --git a/rest_framework/locale/et/LC_MESSAGES/django.mo b/rest_framework/locale/et/LC_MESSAGES/django.mo index 8deba1eb0..e14ea9e27 100644 Binary files a/rest_framework/locale/et/LC_MESSAGES/django.mo and b/rest_framework/locale/et/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/et/LC_MESSAGES/django.po b/rest_framework/locale/et/LC_MESSAGES/django.po index cc2c2e3f0..d9c4b184f 100644 --- a/rest_framework/locale/et/LC_MESSAGES/django.po +++ b/rest_framework/locale/et/LC_MESSAGES/django.po @@ -3,14 +3,15 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Tõnis Kärdi , 2015 +# Erlend Eelmets , 2020 +# Tõnis Kärdi , 2015,2019 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Estonian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,423 +19,556 @@ msgstr "" "Language: et\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Sobimatu lihtpäis. Kasutajatunnus on esitamata." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Sobimatu lihtpäis. Kasutajatunnus ei tohi sisaldada tühikuid." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Sobimatu lihtpäis. Kasutajatunnus pole korrektselt base64-kodeeritud." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Sobimatu kasutajatunnus/salasõna." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Kasutaja on inaktiivne või kustutatud." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Sobimatu lubakaardi päis. Kasutajatunnus on esitamata." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Sobimatu lubakaardi päis. Loa sõne ei tohi sisaldada tühikuid." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "Sobimatu lubakaardi päis. Loa sõne ei tohi sisaldada sobimatuid märke." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Sobimatu lubakaart." #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "Autentimistähis" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "Võti" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Kasutaja" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "Loodud" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Tähis" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "Tähised" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Kasutajanimi" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Salasõna" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Kasutajakonto on suletud." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Sisselogimine antud tunnusega ebaõnnestus." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Peab sisaldama \"kasutajatunnust\" ja \"slasõna\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Viga serveril." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Väändunud päring." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Ebakorrektne autentimistunnus." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Autentimistunnus on esitamata." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Teil puuduvad piisavad õigused selle tegevuse teostamiseks." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Ei leidnud." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Meetod \"{method}\" pole lubatud." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Päringu Accept-päist ei suutnud täita." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Meedia tüüpi {media_type} päringus ei toetata." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Liiga palju päringuid." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Väli on kohustuslik." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Väli ei tohi olla tühi." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" pole kehtiv kahendarv." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "See väli ei tohi olla tühi." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Veendu, et see väli poleks pikem kui {max_length} tähemärki." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Veendu, et see väli oleks vähemalt {min_length} tähemärki pikk." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Sisestage kehtiv e-posti aadress." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Väärtus ei ühti etteantud mustriga." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Sisestage kehtiv \"slug\", mis koosneks tähtedest, numbritest, ala- või sidekriipsudest." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Sisestage korrektne URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" pole kehtiv UUID." - -#: fields.py:796 -msgid "Enter a valid IPv4 or IPv6 address." +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:821 +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Sisesta valiidne IPv4 või IPv6 aadress" + +#: fields.py:931 msgid "A valid integer is required." msgstr "Sisendiks peab olema täisarv." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Veenduge, et väärtus on väiksem kui või võrdne väärtusega {max_value}. " -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Veenduge, et väärtus on suurem kui või võrdne väärtusega {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Sõne on liiga pikk." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Sisendiks peab olema arv." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Veenduge, et kokku pole rohkem kui {max_digits} numbit." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Veenduge, et komakohti pole rohkem kui {max_decimal_places}. " -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Veenduge, et täiskohti poleks rohkem kui {max_whole_digits}." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Valesti formaaditud kuupäev-kellaaeg. Kasutage mõnda neist: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Ootasin kuupäev-kellaaeg andmetüüpi, kuid sain hoopis kuupäeva." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Valesti formaaditud kuupäev. Kasutage mõnda neist: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Ootasin kuupäeva andmetüüpi, kuid sain hoopis kuupäev-kellaaja." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Valesti formaaditud kellaaeg. Kasutage mõnda neist: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Valesti formaaditud kestvus. Kasutage mõnda neist: {format}" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" on sobimatu valik." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "Kirjeid on rohkem kui {count} ... " -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Ootasin kirjete järjendit, kuid sain \"{input_type}\" - tüübi." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "Valik ei tohi olla määramata." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "\"{input}\" on sobimatu valik." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Ühtegi faili ei esitatud." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Esitatud andmetes ei olnud faili. Kontrollige vormi kodeeringut." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Ei suutnud tuvastada failinime." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Esitatud fail oli tühi." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Veenduge, et failinimi oleks maksimaalselt {max_length} tähemärki pikk (praegu on {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Laadige üles kehtiv pildifail. Üles laetud fail ei olnud pilt või oli see katki." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "Loetelu ei tohi olla määramata." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Ootasin kirjete sõnastikku, kuid sain \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "Väärtus peab olema valiidne JSON." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Otsing" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Järjestus" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "kasvav" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "kahanev" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "Sobimatu lehekülg." + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 -msgid "Invalid cursor" -msgstr "Sobimatu kursor." +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" -#: relations.py:207 +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "Sobimatu kursor" + +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Sobimatu primaarvõti \"{pk_value}\" - objekti pole olemas." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Sobimatu andmetüüp. Ootasin primaarvõtit, sain {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Sobimatu hüperlink - ei leidnud URLi vastet." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Sobimatu hüperlink - vale URLi vaste." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Sobimatu hüperlink - objekti ei eksisteeri." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Sobimatu andmetüüp. Ootasin URLi sõne, sain {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekti {slug_name}={value} ei eksisteeri." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Sobimatu väärtus." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Sobimatud andmed. Ootasin sõnastikku, kuid sain {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "Filtrid" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "Puudub" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "Pole midagi valida." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Selle välja väärtus peab olema unikaalne." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Veerud {field_names} peavad moodustama unikaalse hulga." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Selle välja väärtus peab olema unikaalne veerus \"{date_field}\" märgitud kuupäeval." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Selle välja väärtus peab olema unikaalneveerus \"{date_field}\" märgitud kuul." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Selle välja väärtus peab olema unikaalneveerus \"{date_field}\" märgitud aastal." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Sobimatu versioon \"Accept\" päises." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Sobimatu versioon URLi rajas." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Sobimatu versioon URLis - see ei vasta ühelegi teadaolevale." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Sobimatu versioon hostinimes." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Sobimatu versioon päringu parameetris." - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/fa/LC_MESSAGES/django.mo b/rest_framework/locale/fa/LC_MESSAGES/django.mo index 0e73156d4..099318e69 100644 Binary files a/rest_framework/locale/fa/LC_MESSAGES/django.mo and b/rest_framework/locale/fa/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/fa/LC_MESSAGES/django.po b/rest_framework/locale/fa/LC_MESSAGES/django.po index 0aa9ae4c6..6a5b99acf 100644 --- a/rest_framework/locale/fa/LC_MESSAGES/django.po +++ b/rest_framework/locale/fa/LC_MESSAGES/django.po @@ -3,437 +3,574 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Ali Mahdiyar , 2020 +# Aryan Baghi , 2020 +# Omid Zarin , 2019 +# Xavier Ordoquy , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2016-07-12 15:14+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:58+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Persian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/fa/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: fa\n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "هدر اولیه نامعتبر است. اطلاعات هویتی ارائه نشده است." #: authentication.py:73 -msgid "Invalid basic header. No credentials provided." -msgstr "" - -#: authentication.py:76 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "" +msgstr "هدر اولیه نامعتبر است. رشته ی اطلاعات هویتی نباید شامل فاصله باشد." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "" +msgstr "هدر اولیه نامعتبر است. اطلاعات هویتی با متد base64 به درستی رمزنگاری نشده است." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." -msgstr "" +msgstr "نام کاربری/رمز‌عبور نامعتبر است." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." -msgstr "" +msgstr "کاربر غیر فعال یا حذف شده است." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "" +msgstr "توکن هدر نامعتبر است. اطلاعات هویتی ارائه نشده است. " -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "" +msgstr "توکن هدر نامعتبر است. توکن نباید شامل فضای خالی باشد." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "توکن هدر نامعتبر است. توکن شامل کاراکتر‌های نامعتبر است." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." -msgstr "" +msgstr "توکن هدر نامعتبر است. " #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "توکن اعتبار‌سنجی" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "کلید" + +#: authtoken/models.py:16 +msgid "User" +msgstr "کاربر" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "ایجاد‌شد" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "توکن" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "توکن‌ها" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "نام‌کاربری" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "رمز‌عبور" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "" +msgstr "با اطلاعات ارسال شده نمیتوان وارد شد." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "" +msgstr "باید شامل نام‌کاربری و رمز‌عبود باشد." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." +msgstr "خطای سمت سرور رخ داده است." + +#: exceptions.py:142 +msgid "Invalid input." msgstr "" -#: exceptions.py:84 +#: exceptions.py:161 msgid "Malformed request." -msgstr "" +msgstr "درخواست ناقص." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." -msgstr "" +msgstr "اطلاعات احراز هویت صحیح نیست." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." -msgstr "" +msgstr "اطلاعات برای اعتبارسنجی ارسال نشده است." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "" +msgstr "شما اجازه انجام این دستور را ندارید." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." -msgstr "" +msgstr "یافت نشد." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "" +msgstr "متد {method} مجاز نیست." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "نوع محتوای درخواستی در هدر قابل قبول نیست." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." -msgstr "" +msgstr "نوع رسانه {media_type} در درخواست پشتیبانی نمیشود." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." +msgstr "تعداد درخواست‌های شما محدود شده است." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." -msgstr "" +msgstr "این مقدار لازم است." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." +msgstr "این مقدار نباید توهی باشد." + +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:766 +msgid "Not a valid string." msgstr "" -#: fields.py:674 +#: fields.py:767 msgid "This field may not be blank." -msgstr "" +msgstr "این مقدار نباید خالی باشد." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "" +msgstr "مطمعن شوید طول این مقدار بیشتر از {max_length} نیست." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "" +msgstr "مطمعن شوید طول این مقدار حداقل {min_length} است." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "" +msgstr "پست الکترونیکی صحبح وارد کنید." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." -msgstr "" +msgstr "مقدار وارد شده با الگو مطابقت ندارد." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." +msgstr "یک \"slug\" معتبر شامل حروف، اعداد، آندرلاین یا خط فاصله وارد کنید" + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." msgstr "" -#: fields.py:747 +#: fields.py:854 msgid "Enter a valid URL." +msgstr "یک URL معتبر وارد کنید" + +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "" - -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "" +msgstr "یک آدرس IPv4 یا IPv6 معتبر وارد کنید." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." -msgstr "" +msgstr "یک مقدار عددی معتبر لازم است." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "" +msgstr "این مقدار باید کوچکتر یا مساوی با {max_value} باشد." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "" +msgstr "این مقدار باید بزرگتر یا مساوی با {min_value} باشد." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." -msgstr "" +msgstr "رشته بسیار طولانی است." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." -msgstr "" +msgstr "یک عدد معتبر نیاز است." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." -msgstr "" +msgstr "بیشتر از {max_digits} رقم نباید وجود داشته باشد." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "" +msgstr "بیشتر از {max_decimal_places} ممیز اعشار نباید وجود داشته باشد" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." -msgstr "" +msgstr "بیشتر از {max_whole_digits} رقم نباید قبل از ممیز اعشار باشد." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت Datetime اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." +msgstr "باید datetime باشد اما date دریافت شد." + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." msgstr "" -#: fields.py:1103 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت تاریخ اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." -msgstr "" +msgstr "باید date باشد اما datetime دریافت شد." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت Time اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت Duration اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "" +msgstr "\"{input}\" یک انتخاب معتبر نیست." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "بیشتر از {count} آیتم..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "" +msgstr "باید یک لیست از مقادیر ارسال شود اما یک «{input_type}» دریافت شد." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "این بخش نمی‌تواند خالی باشد." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "\"{input}\" یک مسیر انتخاب معتبر نیست." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." -msgstr "" +msgstr "فایلی ارسال نشده است." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." -msgstr "" +msgstr "دیتای ارسال شده فایل نیست. encoding type فرم را چک کنید." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." -msgstr "" +msgstr "اسم فایل مشخص نیست." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." -msgstr "" +msgstr "فایل ارسال شده خالی است." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "" +msgstr "نام این فایل باید حداکثر {max_length} کاراکتر باشد ({length} کاراکتر دارد)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." -msgstr "" +msgstr "یک عکس معتبر آپلود کنید. فایلی که ارسال کردید عکس یا عکس خراب شده نیست" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "این لیست نمی تواند خالی باشد" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "باید دیکشنری از آیتم ها ارسال می شد، اما \"{input_type}\" ارسال شده است." + +#: fields.py:1683 +msgid "This dictionary may not be empty." msgstr "" -#: fields.py:1549 +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "مقدار باید JSON معتبر باشد." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "جستجو" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "ترتیب" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "صعودی" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "نزولی" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "صفحه نامعتبر" + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" -msgstr "" +msgstr "مکان نمای نامعتبر" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "pk نامعتبر \"{pk_value}\" - این Object وجود ندارد" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "" +msgstr "تایپ نامعتبر. باید pk ارسال می شد اما {data_type} ارسال شده است." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." -msgstr "" +msgstr "هایپرلینک نامعتبر - URL مطابق وجود ندارد" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" +msgstr "هایپرلینک نامعتبر - خطا در تطابق URL" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." -msgstr "" +msgstr "هایپرلینک نامعبتر - Object وجود ندارد." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "" +msgstr "داده نامعتبر. باید رشته ی URL باشد، اما {data_type} دریافت شد." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." -msgstr "" +msgstr "Object با {slug_name}={value} وجود ندارد." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." +msgstr "مقدار نامعتبر." + +#: schemas/utils.py:32 +msgid "unique integer value" msgstr "" -#: serializers.py:326 -msgid "Invalid data. Expected a dictionary, but got {datatype}." +#: schemas/utils.py:34 +msgid "UUID string" msgstr "" +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "داده نامعتبر. باید دیکشنری ارسال می شد، اما {datatype} ارسال شده است." + #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "فیلترها" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "None" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "آیتمی برای انتخاب وجود ندارد" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." -msgstr "" +msgstr "این فیلد باید یکتا باشد" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." +msgstr "فیلدهای {field_names} باید یک مجموعه یکتا باشند." + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." msgstr "" -#: validators.py:245 +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." -msgstr "" +msgstr "این فیلد باید برای تاریخ \"{date_field}\" یکتا باشد." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." -msgstr "" +msgstr "این فیلد باید برای ماه \"{date_field}\" یکتا باشد." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." -msgstr "" +msgstr "این فیلد باید برای سال \"{date_field}\" یکتا باشد." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." -msgstr "" +msgstr "ورژن نامعتبر در هدر \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." -msgstr "" +msgstr "ورژن نامعتبر در مسیر URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "ورژن نامعتبر در مسیر URL. با هیچ نام گذاری ورژنی تطابق ندارد." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." -msgstr "" +msgstr "نسخه نامعتبر در نام هاست" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." -msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" +msgstr "ورژن نامعتبر در پارامتر کوئری." diff --git a/rest_framework/locale/fa_IR/LC_MESSAGES/django.mo b/rest_framework/locale/fa_IR/LC_MESSAGES/django.mo index 1f72e1090..52d3f3bf8 100644 Binary files a/rest_framework/locale/fa_IR/LC_MESSAGES/django.mo and b/rest_framework/locale/fa_IR/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/fa_IR/LC_MESSAGES/django.po b/rest_framework/locale/fa_IR/LC_MESSAGES/django.po index 75b6fd156..61361d50e 100644 --- a/rest_framework/locale/fa_IR/LC_MESSAGES/django.po +++ b/rest_framework/locale/fa_IR/LC_MESSAGES/django.po @@ -3,437 +3,574 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Ali Mahdiyar , 2020 +# Aryan Baghi , 2020 +# Omid Zarin , 2019 +# Xavier Ordoquy , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2016-07-12 15:14+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:59+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Persian (Iran) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/fa_IR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: fa_IR\n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "هدر اولیه نامعتبر است. اطلاعات هویتی ارائه نشده است." #: authentication.py:73 -msgid "Invalid basic header. No credentials provided." -msgstr "" - -#: authentication.py:76 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "" +msgstr "هدر اولیه نامعتبر است. رشته ی اطلاعات هویتی نباید شامل فاصله باشد." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "" +msgstr "هدر اولیه نامعتبر است. اطلاعات هویتی با متد base64 به درستی رمزنگاری نشده است." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." -msgstr "" +msgstr "نام کاربری/رمز‌عبور نامعتبر است." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." -msgstr "" +msgstr "کاربر غیر فعال یا حذف شده است." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "" +msgstr "توکن هدر نامعتبر است. اطلاعات هویتی ارائه نشده است. " -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "" +msgstr "توکن هدر نامعتبر است. توکن نباید شامل فضای خالی باشد." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "توکن هدر نامعتبر است. توکن شامل کاراکتر‌های نامعتبر است." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." -msgstr "" +msgstr "توکن هدر نامعتبر است. " #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "توکن اعتبار‌سنجی" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "کلید" + +#: authtoken/models.py:16 +msgid "User" +msgstr "کاربر" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "ایجاد‌شد" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "توکن" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "توکن‌ها" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "نام‌کاربری" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "رمز‌عبور" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "" +msgstr "با اطلاعات ارسال شده نمیتوان وارد شد." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "" +msgstr "باید شامل نام‌کاربری و رمز‌عبود باشد." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." +msgstr "خطای سمت سرور رخ داده است." + +#: exceptions.py:142 +msgid "Invalid input." msgstr "" -#: exceptions.py:84 +#: exceptions.py:161 msgid "Malformed request." -msgstr "" +msgstr "درخواست ناقص." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." -msgstr "" +msgstr "اطلاعات احراز هویت صحیح نیست." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." -msgstr "" +msgstr "اطلاعات برای اعتبارسنجی ارسال نشده است." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "" +msgstr "شما اجازه انجام این دستور را ندارید." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." -msgstr "" +msgstr "یافت نشد." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "" +msgstr "متد {method} مجاز نیست." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "نوع محتوای درخواستی در هدر قابل قبول نیست." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." -msgstr "" +msgstr "نوع رسانه {media_type} در درخواست پشتیبانی نمیشود." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." +msgstr "تعداد درخواست‌های شما محدود شده است." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." -msgstr "" +msgstr "این مقدار لازم است." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." +msgstr "این مقدار نباید توهی باشد." + +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:766 +msgid "Not a valid string." msgstr "" -#: fields.py:674 +#: fields.py:767 msgid "This field may not be blank." -msgstr "" +msgstr "این مقدار نباید خالی باشد." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "" +msgstr "مطمعن شوید طول این مقدار بیشتر از {max_length} نیست." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "" +msgstr "مطمعن شوید طول این مقدار حداقل {min_length} است." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "" +msgstr "پست الکترونیکی صحبح وارد کنید." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." -msgstr "" +msgstr "مقدار وارد شده با الگو مطابقت ندارد." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." +msgstr "یک \"slug\" معتبر شامل حروف، اعداد، آندرلاین یا خط فاصله وارد کنید" + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." msgstr "" -#: fields.py:747 +#: fields.py:854 msgid "Enter a valid URL." +msgstr "یک URL معتبر وارد کنید" + +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "" - -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "" +msgstr "یک آدرس IPv4 یا IPv6 معتبر وارد کنید." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." -msgstr "" +msgstr "یک مقدار عددی معتبر لازم است." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "" +msgstr "این مقدار باید کوچکتر یا مساوی با {max_value} باشد." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "" +msgstr "این مقدار باید بزرگتر یا مساوی با {min_value} باشد." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." -msgstr "" +msgstr "رشته بسیار طولانی است." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." -msgstr "" +msgstr "یک عدد معتبر نیاز است." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." -msgstr "" +msgstr "بیشتر از {max_digits} رقم نباید وجود داشته باشد." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "" +msgstr "بیشتر از {max_decimal_places} ممیز اعشار نباید وجود داشته باشد" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." -msgstr "" +msgstr "بیشتر از {max_whole_digits} رقم نباید قبل از ممیز اعشار باشد." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت Datetime اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." +msgstr "باید datetime باشد اما date دریافت شد." + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." msgstr "" -#: fields.py:1103 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت تاریخ اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." -msgstr "" +msgstr "باید date باشد اما datetime دریافت شد." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت Time اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "فرمت Duration اشتباه است. از یکی از این فرمت ها استفاده کنید: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "" +msgstr "\"{input}\" یک انتخاب معتبر نیست." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "بیشتر از {count} آیتم..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "" +msgstr "باید یک لیست از مقادیر ارسال شود اما یک «{input_type}» دریافت شد." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "این بخش نمی‌تواند خالی باشد." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "\"{input}\" یک مسیر انتخاب معتبر نیست." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." -msgstr "" +msgstr "فایلی ارسال نشده است." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." -msgstr "" +msgstr "دیتای ارسال شده فایل نیست. encoding type فرم را چک کنید." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." -msgstr "" +msgstr "اسم فایل مشخص نیست." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." -msgstr "" +msgstr "فایل ارسال شده خالی است." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "" +msgstr "نام این فایل باید حداکثر {max_length} کاراکتر باشد ({length} کاراکتر دارد)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." -msgstr "" +msgstr "یک عکس معتبر آپلود کنید. فایلی که ارسال کردید عکس یا عکس خراب شده نیست" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "این لیست نمی تواند خالی باشد" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "باید دیکشنری از آیتم ها ارسال می شد، اما \"{input_type}\" ارسال شده است." + +#: fields.py:1683 +msgid "This dictionary may not be empty." msgstr "" -#: fields.py:1549 +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "مقدار باید JSON معتبر باشد." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "جستجو" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "ترتیب" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "صعودی" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "نزولی" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "صفحه نامعتبر" + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" -msgstr "" +msgstr "مکان نمای نامعتبر" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "pk نامعتبر \"{pk_value}\" - این Object وجود ندارد" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "" +msgstr "تایپ نامعتبر. باید pk ارسال می شد اما {data_type} ارسال شده است." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." -msgstr "" +msgstr "هایپرلینک نامعتبر - URL مطابق وجود ندارد" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" +msgstr "هایپرلینک نامعتبر - خطا در تطابق URL" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." -msgstr "" +msgstr "هایپرلینک نامعبتر - Object وجود ندارد." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "" +msgstr "داده نامعتبر. باید رشته ی URL باشد، اما {data_type} دریافت شد." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." -msgstr "" +msgstr "Object با {slug_name}={value} وجود ندارد." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." +msgstr "مقدار نامعتبر." + +#: schemas/utils.py:32 +msgid "unique integer value" msgstr "" -#: serializers.py:326 -msgid "Invalid data. Expected a dictionary, but got {datatype}." +#: schemas/utils.py:34 +msgid "UUID string" msgstr "" +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "داده نامعتبر. باید دیکشنری ارسال می شد، اما {datatype} ارسال شده است." + #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "فیلترها" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "None" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "آیتمی برای انتخاب وجود ندارد" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." -msgstr "" +msgstr "این فیلد باید یکتا باشد" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." +msgstr "فیلدهای {field_names} باید یک مجموعه یکتا باشند." + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." msgstr "" -#: validators.py:245 +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." -msgstr "" +msgstr "این فیلد باید برای تاریخ \"{date_field}\" یکتا باشد." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." -msgstr "" +msgstr "این فیلد باید برای ماه \"{date_field}\" یکتا باشد." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." -msgstr "" +msgstr "این فیلد باید برای سال \"{date_field}\" یکتا باشد." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." -msgstr "" +msgstr "ورژن نامعتبر در هدر \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." -msgstr "" +msgstr "ورژن نامعتبر در مسیر URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "ورژن نامعتبر در مسیر URL. با هیچ نام گذاری ورژنی تطابق ندارد." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." -msgstr "" +msgstr "نسخه نامعتبر در نام هاست" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." -msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" +msgstr "ورژن نامعتبر در پارامتر کوئری." diff --git a/rest_framework/locale/fi/LC_MESSAGES/django.mo b/rest_framework/locale/fi/LC_MESSAGES/django.mo index 67dd26ef2..50a6d0f8a 100644 Binary files a/rest_framework/locale/fi/LC_MESSAGES/django.mo and b/rest_framework/locale/fi/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/fi/LC_MESSAGES/django.po b/rest_framework/locale/fi/LC_MESSAGES/django.po index 0791a3005..97e5c1394 100644 --- a/rest_framework/locale/fi/LC_MESSAGES/django.po +++ b/rest_framework/locale/fi/LC_MESSAGES/django.po @@ -5,13 +5,14 @@ # Translators: # Aarni Koskela, 2015 # Aarni Koskela, 2015-2016 +# Kimmo Huoman , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Aarni Koskela\n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Finnish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/fi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,423 +20,556 @@ msgstr "" "Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." -msgstr "Epäkelpo perusotsake. Ei annettuja tunnuksia." +msgstr "Epäkelpo \"basic\" -otsake. Ei annettuja tunnuksia." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "Epäkelpo perusotsake. Tunnusmerkkijono ei saa sisältää välilyöntejä." +msgstr "Epäkelpo \"basic\" -otsake. Tunnusmerkkijono ei saa sisältää välilyöntejä." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "Epäkelpo perusotsake. Tunnukset eivät ole base64-koodattu." +msgstr "Epäkelpo \"basic\" -otsake. Tunnukset eivät ole base64-koodattu." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Epäkelpo käyttäjänimi tai salasana." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Käyttäjä ei-aktiivinen tai poistettu." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "Epäkelpo Token-otsake. Ei annettuja tunnuksia." +msgstr "Epäkelpo \"token\" -otsake. Ei annettuja tunnuksia." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "Epäkelpo Token-otsake. Tunnusmerkkijono ei saa sisältää välilyöntejä." +msgstr "Epäkelpo \"token\" -otsake. Tunnusmerkkijono ei saa sisältää välilyöntejä." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "Epäkelpo Token-otsake. Tunnusmerkkijono ei saa sisältää epäkelpoja merkkejä." +msgstr "Epäkelpo \"token\" -otsake. Tunnusmerkkijono ei saa sisältää epäkelpoja merkkejä." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." -msgstr "Epäkelpo Token." +msgstr "Epäkelpo token." #: authtoken/apps.py:7 msgid "Auth Token" msgstr "Autentikaatiotunniste" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Avain" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Käyttäjä" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Luotu" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Tunniste" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tunnisteet" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Käyttäjänimi" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Salasana" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Käyttäjätili ei ole käytössä." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "Ei voitu kirjautua annetuilla tunnuksilla." +msgstr "Kirjautuminen epäonnistui annetuilla tunnuksilla." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Pitää sisältää \"username\" ja \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Sattui palvelinvirhe." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Pyyntö on virheellisen muotoinen." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Väärät autentikaatiotunnukset." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Autentikaatiotunnuksia ei annettu." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "Sinulla ei ole lupaa suorittaa tätä toimintoa." +msgstr "Sinulla ei ole oikeutta suorittaa tätä toimintoa." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Ei löydy." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metodi \"{method}\" ei ole sallittu." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Ei voitu vastata pyynnön Accept-otsakkeen mukaisesti." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Pyynnön mediatyyppiä \"{media_type}\" ei tueta." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Pyyntö hidastettu." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Tämä kenttä vaaditaan." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Tämän kentän arvo ei voi olla \"null\"." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" ei ole kelvollinen totuusarvo." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Tämä kenttä ei voi olla tyhjä." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Arvo saa olla enintään {max_length} merkkiä pitkä." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Arvo tulee olla vähintään {min_length} merkkiä pitkä." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Syötä kelvollinen sähköpostiosoite." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Arvo ei täsmää vaadittuun kuvioon." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Tässä voidaan käyttää vain kirjaimia (a-z), numeroita (0-9) sekä ala- ja tavuviivoja (_ -)." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Syötä oikea URL-osoite." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "{value} ei ole kelvollinen UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Syötä kelvollinen IPv4- tai IPv6-osoite." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Syötä kelvollinen kokonaisluku." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "Tämän arvon on oltava enintään {max_value}." +msgstr "Tämän arvon on oltava pienempi tai yhtä suuri kuin {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "Tämän luvun on oltava vähintään {min_value}." +msgstr "Tämän luvun on oltava suurempi tai yhtä suuri kuin {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Liian suuri merkkijonoarvo." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Kelvollinen luku vaaditaan." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Tässä luvussa voi olla yhteensä enintään {max_digits} numeroa." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "Tässä luvussa saa olla enintään {max_decimal_places} desimaalia." +msgstr "Tässä luvussa voi olla enintään {max_decimal_places} desimaalia." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." -msgstr "Tässä luvussa saa olla enintään {max_whole_digits} numeroa ennen desimaalipilkkua." +msgstr "Tässä luvussa voi olla enintään {max_whole_digits} numeroa ennen desimaalipilkkua." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Virheellinen päivämäärän/ajan muotoilu. Käytä jotain näistä muodoista: {format}" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Odotettiin päivämäärää ja aikaa, saatiin vain päivämäärä." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Virheellinen päivämäärän muotoilu. Käytä jotain näistä muodoista: {format}" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Odotettiin päivämäärää, saatiin päivämäärä ja aika." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Virheellinen kellonajan muotoilu. Käytä jotain näistä muodoista: {format}" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Virheellinen keston muotoilu. Käytä jotain näistä muodoista: {format}" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" ei ole kelvollinen valinta." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Enemmän kuin {count} kappaletta..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Odotettiin listaa, saatiin tyyppi {input_type}." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Valinta ei saa olla tyhjä." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" ei ole kelvollinen polku." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Yhtään tiedostoa ei ole lähetetty." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Tiedostoa ei lähetetty. Tarkista lomakkeen koodaus (encoding)." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Tiedostonimeä ei voitu päätellä." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Lähetetty tiedosto on tyhjä." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Varmista että tiedostonimi on enintään {max_length} merkkiä pitkä (nyt {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Kuva ei kelpaa. Lähettämäsi tiedosto ei ole kuva, tai tiedosto on vioittunut." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Lista ei saa olla tyhjä." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Odotettiin sanakirjaa, saatiin tyyppi {input_type}." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Arvon pitää olla kelvollista JSONia." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Lähetä" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Haku" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Järjestys" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "nouseva" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "laskeva" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Epäkelpo sivu." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Epäkelpo kursori" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Epäkelpo pääavain {pk_value} - objektia ei ole olemassa." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Väärä tyyppi. Odotettiin pääavainarvoa, saatiin {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Epäkelpo linkki - URL ei täsmää." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Epäkelpo linkki - epäkelpo URL-osuma." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Epäkelpo linkki - objektia ei ole." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Epäkelpo tyyppi. Odotettiin URL-merkkijonoa, saatiin {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objektia ({slug_name}={value}) ei ole." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Epäkelpo arvo." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Odotettiin sanakirjaa, saatiin tyyppi {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Suotimet" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Kenttäsuotimet" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Järjestys" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Haku" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Ei mitään" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Ei valittavia kohteita." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Arvon tulee olla uniikki." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Kenttien {field_names} tulee muodostaa uniikki joukko." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Kentän tulee olla uniikki päivämäärän {date_field} suhteen." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Kentän tulee olla uniikki kuukauden {date_field} suhteen." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Kentän tulee olla uniikki vuoden {date_field} suhteen." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Epäkelpo versio Accept-otsakkeessa." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Epäkelpo versio URL-polussa." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "URL-polun versio ei täsmää mihinkään versionimiavaruuteen." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Epäkelpo versio palvelinosoitteessa." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Epäkelpo versio kyselyparametrissa." - -#: views.py:88 -msgid "Permission denied." -msgstr "Pääsy evätty." diff --git a/rest_framework/locale/fr/LC_MESSAGES/django.mo b/rest_framework/locale/fr/LC_MESSAGES/django.mo index b462e08d7..a1c0b3c2d 100644 Binary files a/rest_framework/locale/fr/LC_MESSAGES/django.mo and b/rest_framework/locale/fr/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/fr/LC_MESSAGES/django.po b/rest_framework/locale/fr/LC_MESSAGES/django.po index 25b39e453..c2e08c80b 100644 --- a/rest_framework/locale/fr/LC_MESSAGES/django.po +++ b/rest_framework/locale/fr/LC_MESSAGES/django.po @@ -3,16 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Erwann Mest , 2019 # Etienne Desgagné , 2015 # Martin Maillard , 2015 # Martin Maillard , 2015 +# Stéphane Raimbault , 2019 # Xavier Ordoquy , 2015-2016 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" "Last-Translator: Xavier Ordoquy \n" "Language-Team: French (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/fr/)\n" "MIME-Version: 1.0\n" @@ -21,40 +23,40 @@ msgstr "" "Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "En-tête « basic » non valide. Informations d'identification non fournies." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "En-tête « basic » non valide. Les informations d'identification ne doivent pas contenir d'espaces." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "En-tête « basic » non valide. Encodage base64 des informations d'identification incorrect." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Nom d'utilisateur et/ou mot de passe non valide(s)." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Utilisateur inactif ou supprimé." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "En-tête « token » non valide. Informations d'identification non fournies." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "En-tête « token » non valide. Un token ne doit pas contenir d'espaces." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "En-tête « token » non valide. Un token ne doit pas contenir de caractères invalides." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Token non valide." @@ -62,382 +64,515 @@ msgstr "Token non valide." msgid "Auth Token" msgstr "Jeton d'authentification" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Clef" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Utilisateur" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Création" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Jeton" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Jetons" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Nom de l'utilisateur" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Mot de passe" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Ce compte est désactivé." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Impossible de se connecter avec les informations d'identification fournies." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "\"username\" et \"password\" doivent être inclus." +msgstr "« username » et « password » doivent être inclus." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Une erreur du serveur est survenue." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Requête malformée" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Informations d'authentification incorrectes." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Informations d'authentification non fournies." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Vous n'avez pas la permission d'effectuer cette action." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Pas trouvé." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "Méthode \"{method}\" non autorisée." +msgstr "Méthode « {method} » non autorisée." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "L'en-tête « Accept » n'a pas pu être satisfaite." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." -msgstr "Type de média \"{media_type}\" non supporté." +msgstr "Type de média « {media_type} » non supporté." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Requête ralentie." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Ce champ est obligatoire." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Ce champ ne peut être nul." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" n'est pas un booléen valide." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Ce champ ne peut être vide." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "Assurez-vous que ce champ comporte au plus {max_length} caractères." +msgstr "Assurez-vous que ce champ comporte au plus {max_length} caractères." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "Assurez-vous que ce champ comporte au moins {min_length} caractères." +msgstr "Assurez-vous que ce champ comporte au moins {min_length} caractères." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "Saisissez une adresse email valable." +msgstr "Saisissez une adresse e-mail valide." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Cette valeur ne satisfait pas le motif imposé." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Saisissez une URL valide." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" n'est pas un UUID valide." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Saisissez une adresse IPv4 ou IPv6 valide." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Un nombre entier valide est requis." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "Assurez-vous que cette valeur est inférieure ou égale à {max_value}." +msgstr "Assurez-vous que cette valeur est inférieure ou égale à {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "Assurez-vous que cette valeur est supérieure ou égale à {min_value}." +msgstr "Assurez-vous que cette valeur est supérieure ou égale à {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Chaîne de caractères trop longue." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Un nombre valide est requis." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." -msgstr "Assurez-vous qu'il n'y a pas plus de {max_digits} chiffres au total." +msgstr "Assurez-vous qu'il n'y a pas plus de {max_digits} chiffres au total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "Assurez-vous qu'il n'y a pas plus de {max_decimal_places} chiffres après la virgule." +msgstr "Assurez-vous qu'il n'y a pas plus de {max_decimal_places} chiffres après la virgule." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Assurez-vous qu'il n'y a pas plus de {max_whole_digits} chiffres avant la virgule." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "La date + heure n'a pas le bon format. Utilisez un des formats suivants : {format}." +msgstr "La date + heure n'a pas le bon format. Utilisez un des formats suivants : {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Attendait une date + heure mais a reçu une date." -#: fields.py:1103 -msgid "Date has wrong format. Use one of these formats instead: {format}." -msgstr "La date n'a pas le bon format. Utilisez un des formats suivants : {format}." +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" -#: fields.py:1104 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "La date n'a pas le bon format. Utilisez un des formats suivants : {format}." + +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Attendait une date mais a reçu une date + heure." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "L'heure n'a pas le bon format. Utilisez un des formats suivants : {format}." +msgstr "L'heure n'a pas le bon format. Utilisez un des formats suivants : {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "La durée n'a pas le bon format. Utilisez l'un des formats suivants: {format}." +msgstr "La durée n'a pas le bon format. Utilisez l'un des formats suivants : {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "\"{input}\" n'est pas un choix valide." +msgstr "« {input} » n'est pas un choix valide." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Plus de {count} éléments..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "Attendait une liste d'éléments mais a reçu \"{input_type}\"." +msgstr "Attendait une liste d'éléments mais a reçu « {input_type} »." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Cette sélection ne peut être vide." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "\"{input}\" n'est pas un choix de chemin valide." +msgstr "« {input} » n'est pas un choix de chemin valide." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Aucun fichier n'a été soumis." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "La donnée soumise n'est pas un fichier. Vérifiez le type d'encodage du formulaire." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Le nom de fichier n'a pu être déterminé." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Le fichier soumis est vide." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "Assurez-vous que le nom de fichier comporte au plus {max_length} caractères (il en comporte {length})." +msgstr "Assurez-vous que le nom de fichier comporte au plus {max_length} caractères (il en comporte {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Transférez une image valide. Le fichier que vous avez transféré n'est pas une image, ou il est corrompu." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Cette liste ne peut pas être vide." -#: fields.py:1502 -msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "Attendait un dictionnaire d'éléments mais a reçu \"{input_type}\"." +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" -#: fields.py:1549 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Attendait un dictionnaire d'éléments mais a reçu « {input_type} »." + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "La valeur doit être un JSON valide." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Envoyer" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Recherche" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordre" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "croissant" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "décroissant" -#: pagination.py:193 -msgid "Invalid page." -msgstr "Page invalide." +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" -#: pagination.py:427 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "Page non valide." + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Curseur non valide" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "Clé primaire \"{pk_value}\" non valide - l'objet n'existe pas." +msgstr "Clé primaire « {pk_value} » non valide - l'objet n'existe pas." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Type incorrect. Attendait une clé primaire, a reçu {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." -msgstr "Lien non valide : pas d'URL correspondante." +msgstr "Lien non valide : pas d'URL correspondante." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." -msgstr "Lien non valide : URL correspondante incorrecte." +msgstr "Lien non valide : URL correspondante incorrecte." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." -msgstr "Lien non valide : l'objet n'existe pas." +msgstr "Lien non valide : l'objet n'existe pas." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Type incorrect. Attendait une URL, a reçu {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "L'object avec {slug_name}={value} n'existe pas." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Valeur non valide." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Donnée non valide. Attendait un dictionnaire, a reçu {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtres" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Filtres de champ" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordre" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Recherche" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Aucune" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Aucun élément à sélectionner." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Ce champ doit être unique." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Les champs {field_names} doivent former un ensemble unique." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." -msgstr "Ce champ doit être unique pour la date \"{date_field}\"." +msgstr "Ce champ doit être unique pour la date « {date_field} »." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." -msgstr "Ce champ doit être unique pour le mois \"{date_field}\"." +msgstr "Ce champ doit être unique pour le mois « {date_field} »." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." -msgstr "Ce champ doit être unique pour l'année \"{date_field}\"." +msgstr "Ce champ doit être unique pour l'année « {date_field} »." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Version non valide dans l'en-tête « Accept »." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Version non valide dans l'URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Version invalide dans l'URL. Ne correspond à aucune version de l'espace de nommage." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Version non valide dans le nom d'hôte." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Version non valide dans le paramètre de requête." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permission refusée." diff --git a/rest_framework/locale/hu/LC_MESSAGES/django.mo b/rest_framework/locale/hu/LC_MESSAGES/django.mo index 8fadddcea..61f285299 100644 Binary files a/rest_framework/locale/hu/LC_MESSAGES/django.mo and b/rest_framework/locale/hu/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/hu/LC_MESSAGES/django.po b/rest_framework/locale/hu/LC_MESSAGES/django.po index 9002f8e61..a1d75b9f0 100644 --- a/rest_framework/locale/hu/LC_MESSAGES/django.po +++ b/rest_framework/locale/hu/LC_MESSAGES/django.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Zoltan Szalai , 2015 +# Zoltan Szalai , 2015,2018-2019 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Hungarian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,423 +18,556 @@ msgstr "" "Language: hu\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." -msgstr "Érvénytelen basic fejlécmező. Nem voltak megadva azonosítók." +msgstr "Érvénytelen basic fejléc. Nem voltak megadva azonosítók." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "Érvénytelen basic fejlécmező. Az azonosító karakterlánc nem tartalmazhat szóközöket." +msgstr "Érvénytelen basic fejléc. Az azonosító karakterlánc nem tartalmazhat szóközöket." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "Érvénytelen basic fejlécmező. Az azonosítók base64 kódolása nem megfelelő." +msgstr "Érvénytelen basic fejléc. Az azonosítók base64 kódolása nem megfelelő." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Érvénytelen felhasználónév/jelszó." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "A felhasználó nincs aktiválva vagy törölve lett." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "Érvénytelen token fejlécmező. Nem voltak megadva azonosítók." +msgstr "Érvénytelen token fejléc. Nem voltak megadva azonosítók." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "Érvénytelen token fejlécmező. A token karakterlánc nem tartalmazhat szóközöket." +msgstr "Érvénytelen token fejléc. A token karakterlánc nem tartalmazhat szóközöket." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "Érvénytelen token fejléc. A token karakterlánc nem tartalmazhat érvénytelen karaktereket." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Érvénytelen token." #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "Auth token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "Kulcs" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Felhasználó" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "Létrehozva" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "Tokenek" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Felhasználónév" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Jelszó" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "A felhasználó tiltva van." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "A megadott azonosítókkal nem lehet bejelentkezni." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Tartalmaznia kell a \"felhasználónevet\" és a \"jelszót\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Szerver oldali hiba történt." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Hibás kérés." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Hibás azonosítók." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Nem voltak megadva azonosítók." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Nincs jogosultsága a művelet végrehajtásához." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nem található." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "A \"{method}\" metódus nem megengedett." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "A kérés Accept fejlécmezőjét nem lehetett kiszolgálni." +msgstr "A kérés Accept fejlécét nem lehetett teljesíteni." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Nem támogatott média típus \"{media_type}\" a kérésben." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "A kérés korlátozva lett." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Ennek a mezőnek a megadása kötelező." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Ez a mező nem lehet null értékű." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "Az \"{input}\" nem egy érvényes logikai érték." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Ez a mező nem lehet üres." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Bizonyosodjon meg arról, hogy ez a mező legfeljebb {max_length} karakterből áll." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Bizonyosodjon meg arról, hogy ez a mező legalább {min_length} karakterből áll." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Adjon meg egy érvényes e-mail címet!" -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Ez az érték nem illeszkedik a szükséges mintázatra." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Az URL barát cím csak betűket, számokat, aláhúzásokat és kötőjeleket tartalmazhat." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Adjon meg egy érvényes URL-t!" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "" +msgstr "Adjon meg egy érvényes IPv4 vagy IPv6 címet!" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Egy érvényes egész szám megadása szükséges." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Bizonyosodjon meg arról, hogy ez az érték legfeljebb {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Bizonyosodjon meg arról, hogy ez az érték legalább {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "A karakterlánc túl hosszú." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Egy érvényes szám megadása szükséges." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Bizonyosodjon meg arról, hogy a számjegyek száma összesen legfeljebb {max_digits}." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Bizonyosodjon meg arról, hogy a tizedes tört törtrészében levő számjegyek száma összesen legfeljebb {max_decimal_places}." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Bizonyosodjon meg arról, hogy a tizedes tört egész részében levő számjegyek száma összesen legfeljebb {max_whole_digits}." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "A dátum formátuma hibás. Használja ezek valamelyikét helyette: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Időt is tartalmazó dátum helyett egy időt nem tartalmazó dátum lett elküldve." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "A dátum formátuma hibás. Használja ezek valamelyikét helyette: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Időt nem tartalmazó dátum helyett egy időt is tartalmazó dátum lett elküldve." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Az idő formátuma hibás. Használja ezek valamelyikét helyette: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Az időtartam formátuma hibás. Használja ezek valamelyikét helyette: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "Az \"{input}\" nem egy érvényes elem." +msgstr "Érvénytelen választási lehetőség: \"{input}\"" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "Több, mint {count} elem ..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Elemek listája helyett \"{input_type}\" lett elküldve." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "Választania kell egy elemet." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "Érvénytelen választási lehetőség: \"{input}\"" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Semmilyen fájl sem került feltöltésre." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Az elküldött adat nem egy fájl volt. Ellenőrizze a kódolás típusát az űrlapon!" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "A fájlnév nem megállapítható." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "A küldött fájl üres." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Bizonyosodjon meg arról, hogy a fájlnév legfeljebb {max_length} karakterből áll (jelenlegi hossza: {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Töltsön fel egy érvényes képfájlt! A feltöltött fájl nem kép volt, vagy megsérült." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "Nem lehet üres a lista." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Dictionary elemek helyett \"{input_type}\" lett megadva." + +#: fields.py:1683 +msgid "This dictionary may not be empty." msgstr "" -#: fields.py:1549 +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "Az értéknek érvényes JSON-nek lennie." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Keresés" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Rendezés" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "növekvő" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "csökkenő" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "Érvénytelen oldal." + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" -msgstr "" +msgstr "Érvénytelen kurzor" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Érvénytelen pk \"{pk_value}\" - az objektum nem létezik." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Helytelen típus. pk érték helyett {data_type} lett elküldve." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Érvénytelen link - Nem illeszkedő URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Érvénytelen link. - Eltérő URL illeszkedés." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Érvénytelen link - Az objektum nem létezik." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Helytelen típus. URL karakterlánc helyett {data_type} lett elküldve." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Nem létezik olyan objektum, amelynél {slug_name}={value}." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Érvénytelen érték." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Érvénytelen adat. Egy dictionary helyett {datatype} lett elküldve." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "Szűrők" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "Semmi" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "Nincsenek kiválasztható elemek." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Ennek a mezőnek egyedinek kell lennie." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "A {field_names} mezőnevek nem tartalmazhatnak duplikátumot." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "A mezőnek egyedinek kell lennie a \"{date_field}\" dátumra." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "A mezőnek egyedinek kell lennie a \"{date_field}\" hónapra." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "A mezőnek egyedinek kell lennie a \"{date_field}\" évre." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." -msgstr "Érvénytelen verzió az \"Accept\" fejlécmezőben." +msgstr "Érvénytelen verzió az \"Accept\" fejlécben." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Érvénytelen verzió az URL elérési útban." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Érvénytelen verzió az URL elérési útban. Nem illeszkedik egyetlen verzió névtérre sem." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Érvénytelen verzió a hosztnévben." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Érvénytelen verzió a lekérdezési paraméterben." - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/hy/LC_MESSAGES/django.mo b/rest_framework/locale/hy/LC_MESSAGES/django.mo new file mode 100644 index 000000000..c5f3ebcfa Binary files /dev/null and b/rest_framework/locale/hy/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/hy/LC_MESSAGES/django.po b/rest_framework/locale/hy/LC_MESSAGES/django.po new file mode 100644 index 000000000..7ccfd0642 --- /dev/null +++ b/rest_framework/locale/hy/LC_MESSAGES/django.po @@ -0,0 +1,573 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Arnak Melikyan , 2019 +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Armenian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/hy/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: hy\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "Անվավեր վերնագիր: Նույնականացման տվյալները տրամադրված չեն:" + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "Անվավեր վերնագիր: Նույնականացման տողը չպետք է պարունակի բացատներ:" + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "Անվավեր վերնագիր: Նույնականացման տվյալները սխալ են ձեւակերպված base64-ում:" + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "Անվավեր օգտանուն / գաղտնաբառ:" + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "Օգտատերը ջնջված է կամ ոչ ակտիվ:" + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "Անվավեր տոկենի վերնագիր: Նույնականացման տվյալները տրամադրված չեն:" + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "Անվավեր տոկենի վերնագիր: Տոկենի տողը չպետք է պարունակի բացատներ:" + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "Անվավեր տոկենի վերնագիր: Տոկենի տողը չպետք է պարունակի անթույլատրելի նիշեր:" + +#: authentication.py:203 +msgid "Invalid token." +msgstr "Անվավեր տոկեն։" + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "Վավերացման Տոկեն։" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "Բանալի" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Օգտատեր" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "Ստեղծված է" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "Տոկեն" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "Տոկեններ" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "Օգտանուն" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "Գաղտնաբառ" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "Անհնար է մուտք գործել տրամադրված նույնականացման տվյալներով:" + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "Պետք է ներառի «օգտանուն» եւ «գաղտնաբառ»:" + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "Տեղի ունեցել սերվերի սխալ:" + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "Սխալ հարցում:" + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "Սխալ նույնականացման տվյալներ։" + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "Նույնականացման տվյալները տրամադրված չեն:" + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "Այս գործողությունը կատարելու թույլտվություն չունեք:" + +#: exceptions.py:185 +msgid "Not found." +msgstr "Չի գտնվել։" + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "\"{method}\" մեթոդը թույլատրված չէ:" + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "Չհաջողվեց բավարարել հարցման Ընդունել վերնագիրը:" + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "Անհամապատասխան մեդիա տիպ \"{media_type}\":" + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "Հարցումն ընդհատվել է:" + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "Այս դաշտը պարտադիր է:" + +#: fields.py:317 +msgid "This field may not be null." +msgstr "Այս դաշտը չի կարող զրոյական լինել:" + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "Այս դաշտը չի կարող դատարկ լինել:" + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "Համոզվեք, որ այս դաշտը լինի ոչ ավել, քան {max_length} նիշ:" + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "Համոզվեք, որ այս դաշտը ունի առնվազն {min_length} նիշ:" + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "Մուտքագրեք վավեր էլ.փոստի հասցե:" + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "Այս արժեքը չի համապատասխանում պահանջվող օրինակին:" + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "Մուտքագրեք վավեր \"slug\", որը բաղկացած է տառերից, թվերից, ընդգծումից կամ դեֆիսից:" + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "Մուտքագրեք վավեր հղում:" + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Մուտքագրեք վավեր IPv4 կամ IPv6 հասցե:" + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "Պահանջվում է լիարժեք ամբողջական թիվ:" + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "Համոզվեք, որ արժեքը փոքր է կամ հավասար {max_value} -ին։" + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "Համոզվեք, որ արժեքը մեծ է կամ հավասար {min_value} -ին։" + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "Տողը ունի չափազանց մեծ արժեք:" + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "Պահանջվում է վավեր համար:" + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "Համոզվեք, որ {max_digits} -ից ավել թվանշան չկա:" + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "Համոզվեք, որ {max_decimal_places} -ից ավել տասնորդական նշան չկա:" + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "Համոզվեք, որ տասնորդական կետից առաջ չկա {max_whole_digits} -ից ավել թվանշան:" + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "Datetime -ը սխալ ձեւաչափ ունի: Փոխարենը օգտագործեք այս ձեւաչափերից մեկը. {format} ։" + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "Ակնկալվում է օրվա ժամը, սակայն ամսաթիվ է ստացել:" + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Ամսաթիվն ունի սխալ ձեւաչափ: Փոխարենը օգտագործեք այս ձեւաչափերից մեկը. {format} ։" + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "Ակնկալվում է ամսաթիվ, սակայն ստացել է օրվա ժամը:" + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "Ժամանակը սխալ ձեւաչափ ունի: Փոխարենը օգտագործեք այս ձեւաչափերից մեկը. {format} ։" + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "Տեւողությունը սխալ ձեւաչափ ունի: Փոխարենը օգտագործեք այս ձեւաչափերից մեկը. {format} ։" + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" -ը վավեր ընտրություն չէ:" + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "Ավելի քան {count} առարկա..." + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "Ակնկալվում է տարրերի ցանկ, բայց ստացել է \"{input_type}\" -ի տիպ:" + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "Այս ընտրությունը չի կարող դատարկ լինել:" + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "\"{input}\" -ը վավեր ճանապարհի ընտրություն չէ:" + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "Ոչ մի ֆայլ չի ուղարկվել:" + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "Ուղարկված տվյալը ֆայլ չէ: Ստուգեք կոդավորման տիպը:" + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "Ֆայլի անունը հնարավոր չէ որոշվել:" + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "Ուղարկված ֆայլը դատարկ է:" + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "Համոզվեք, որ այս ֆայլի անունը ունի առավելագույնը {max_length} նիշ, (այն ունի {length})։" + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "Վերբեռնեք վավեր նկար: Ձեր բեռնած ֆայլը կամ նկար չէ կամ վնասված նկար է:" + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "Այս ցանկը չի կարող դատարկ լինել:" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Ակնկալվում է տարրերի բառարան, բայց ստացել է \"{input_type}\" տիպ։" + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "Արժեքը պետք է լինի JSON:" + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Որոնում" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Պատվիրել" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "աճման կարգով" + +#: filters.py:288 +msgid "descending" +msgstr "նվազման կարգով" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "Անվավեր էջ:" + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "Սխալ կուրսոր" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "Անվավեր pk \"{pk_value}\" օբյեկտը գոյություն չունի:" + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "Անհայտ տիպ: Ակնկալվում է pk արժեք, ստացված է {data_type}։" + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "Անվավեր հղում - Ոչ մի հղման համընկնում:" + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "Անվավեր հղում - սխալ հղման համընկնում:" + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "Անվավեր հղում - տվյալ օբյեկտը գոյություն չունի:" + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "Անվավեր տիպ: Սպասվում է հղման տողը, ստացել է {data_type}։" + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "{slug_name}={value} տվյալ պարունակությամբ օբյեկտ գոյություն չունի:" + +#: relations.py:449 +msgid "Invalid value." +msgstr "Անվավեր արժեք:" + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "Անվավեր տվյալներ: Սպասվում է բառարան, բայց ստացվել է {datatype}։" + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "Ֆիլտրեր" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "Ոչ մեկը" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "Ոչ մի տարր ընտրված չէ։" + +#: validators.py:39 +msgid "This field must be unique." +msgstr "Այս դաշտը պետք է լինի եզակի:" + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "{field_names} դաշտերը պետք է կազմեն եզակի հավաքածու:" + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "Այս դաշտը պետք է եզակի լինի \"{date_field}\" ամսաթվի համար:" + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "Այս դաշտը պետք է եզակի լինի \"{date_field}\" ամսվա համար:" + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "Այս դաշտը պետք է եզակի լինի \"{date_field}\" տարվա համար:" + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "\"Accept\" վերնագրի անվավեր տարբերակ:" + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "Անվավեր տարբերակ հղման ճանապարհի մեջ:" + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "Անվավեր տարբերակ հղման ճանապարհի մեջ: Չի համապատասխանում որեւէ անվանման տարբերակի:" + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "Անվավեր տարբերակ անվանման մեջ:" + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr "Անվավեր տարբերակ `հարցման պարամետրում:" diff --git a/rest_framework/locale/id/LC_MESSAGES/django.mo b/rest_framework/locale/id/LC_MESSAGES/django.mo index 471d5a830..c67e2a1da 100644 Binary files a/rest_framework/locale/id/LC_MESSAGES/django.mo and b/rest_framework/locale/id/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/id/LC_MESSAGES/django.po b/rest_framework/locale/id/LC_MESSAGES/django.po index c84add0a4..b3d3c2e89 100644 --- a/rest_framework/locale/id/LC_MESSAGES/django.po +++ b/rest_framework/locale/id/LC_MESSAGES/django.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Aldiantoro Nugroho , 2017 +# aslam hadi , 2017 +# Joseph Aditya P G, 2019 +# Xavier Ordoquy , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2016-07-12 15:14+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 20:03+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Indonesian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,423 +21,556 @@ msgstr "" "Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." -msgstr "" +msgstr "Nama pengguna atau kata sandi salah." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." -msgstr "" +msgstr "Pengguna tidak akfif atau telah dihapus." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "" #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "Token Autentikasi" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" -msgstr "" +msgstr "Pengguna" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "Token" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Nama pengguna" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Kata sandi" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "" +msgstr "Tidak dapat masuk dengan data pengguna ini." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "" +msgstr "Nama pengguna dan password harus diisi." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." +msgstr "Terjadi galat di server." + +#: exceptions.py:142 +msgid "Invalid input." msgstr "" -#: exceptions.py:84 +#: exceptions.py:161 msgid "Malformed request." msgstr "" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." -msgstr "" +msgstr "Data autentikasi salah." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." -msgstr "" +msgstr "Data autentikasi tidak diberikan." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "" +msgstr "Anda tidak memiliki izin untuk melakukan tindakan ini." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." -msgstr "" +msgstr "Data tidak ditemukan." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "Permintaan dengan header Accept ini tidak dapat dipenuhi." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." -msgstr "" +msgstr "Jenis media \"{media_type}\" dalam permintaan ini tidak didukung." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." +msgstr "Permintaan ini telah dibatasi." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." -msgstr "" +msgstr "Bidang ini harus diisi." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." +msgstr "Bidang ini tidak boleh diisi dengan \"null\"." + +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:766 +msgid "Not a valid string." msgstr "" -#: fields.py:674 +#: fields.py:767 msgid "This field may not be blank." -msgstr "" +msgstr "Bidang ini tidak boleh kosong." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "" +msgstr "Isi bidang ini tidak boleh melebihi {max_length} karakter." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "" +msgstr "Isi bidang ini minimal {min_length} karakter." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "" +msgstr "Masukkan alamat email dengan format yang benar." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." +msgstr "Karakter \"slug\" hanya dapat terdiri dari huruf, angka, underscore dan tanda hubung." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." msgstr "" -#: fields.py:747 +#: fields.py:854 msgid "Enter a valid URL." +msgstr "Masukkan URL dengan format yang benar." + +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "" - -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "" +msgstr "Masukkan alamat IPv4 atau IPv6 dengan format yang benar." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." -msgstr "" +msgstr "Nilai bidang ini harus berupa bilangan bulat." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "" +msgstr "Isi bidang ini harus kurang atau sama dengan {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "" +msgstr "Isi bidang ini harus lebih atau sama dengan {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." -msgstr "" +msgstr "Panjang angka tidak boleh lebih dari {max_digits}." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "" +msgstr "Panjang angka di belakang koma tidak boleh lebih dari {max_decimal_places}." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." -msgstr "" +msgstr "Panjang angka bulat tidak boleh lebih dari {max_whole_digits}." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Format tanggal dan waktu salah. Gunakan salah satu format berikut: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "" -#: fields.py:1103 -msgid "Date has wrong format. Use one of these formats instead: {format}." +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." msgstr "" -#: fields.py:1104 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Format tanggal salah. Gunakan salah satu format berikut: {format}." + +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Format waktu salah. Gunakan salah satu format berikut: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Format durasi salah. Gunakan salah satu format berikut: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "" +msgstr "\"{input}\" tidak ada dalam daftar pilihan." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "Pilihan tidak boleh kosong." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." -msgstr "" +msgstr "Pilih berkas terlebih dahulu." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." -msgstr "" +msgstr "Berkas kosong." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "" +msgstr "Panjang nama berkas tidak boleh lebih dari {max_length}. Panjang nama berkas ini {length} karakter." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "" -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Isi bidang ini harus berupa dictionary, bukan \"{input_type}\"." + +#: fields.py:1683 +msgid "This dictionary may not be empty." msgstr "" -#: fields.py:1549 +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "Isi bidang ini harus berupa JSON." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:336 +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "Objek dengan primary key \"{pk_value}\" tidak ditemukan." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "" -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "" #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/it/LC_MESSAGES/django.mo b/rest_framework/locale/it/LC_MESSAGES/django.mo index 1d4fd34c3..6c84273a9 100644 Binary files a/rest_framework/locale/it/LC_MESSAGES/django.mo and b/rest_framework/locale/it/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/it/LC_MESSAGES/django.po b/rest_framework/locale/it/LC_MESSAGES/django.po index a48f8645d..c44c6f257 100644 --- a/rest_framework/locale/it/LC_MESSAGES/django.po +++ b/rest_framework/locale/it/LC_MESSAGES/django.po @@ -4,16 +4,18 @@ # # Translators: # Antonio Mancina , 2015 +# Marco Ventura, 2019 # Mattia Procopio , 2015 +# Riccardo Magliocchetti , 2019 # Sergio Morstabilini , 2015 # Xavier Ordoquy , 2015 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Italian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,423 +23,556 @@ msgstr "" "Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Header di base invalido. Credenziali non fornite." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Header di base invalido. Le credenziali non dovrebbero contenere spazi." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Credenziali non correttamente codificate in base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Nome utente/password non validi" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Utente inattivo o eliminato." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Header del token non valido. Credenziali non fornite." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Header del token non valido. Il contenuto del token non dovrebbe contenere spazi." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Header del token invalido. La stringa del token non dovrebbe contenere caratteri illegali." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Token invalido." #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "Auth Token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "Key" + +#: authtoken/models.py:16 +msgid "User" +msgstr "User" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "Creato" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "I Token" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Username" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Password" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "L'account dell'utente è disabilitato" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Impossibile eseguire il login con le credenziali immesse." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Deve includere \"nome utente\" e \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Errore del server." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Richiesta malformata." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Credenziali di autenticazione incorrette." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Non sono state immesse le credenziali di autenticazione." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Non hai l'autorizzazione per eseguire questa azione." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Non trovato." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metodo \"{method}\" non consentito" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Impossibile soddisfare l'header \"Accept\" presente nella richiesta." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Tipo di media \"{media_type}\"non supportato." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "La richiesta è stata limitata (throttled)." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Campo obbligatorio." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Il campo non può essere nullo." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" non è un valido valore booleano." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Questo campo non può essere omesso." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Assicurati che questo campo non abbia più di {max_length} caratteri." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Assicurati che questo campo abbia almeno {min_length} caratteri." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Inserisci un indirizzo email valido." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Questo valore non corrisponde alla sequenza richiesta." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Immetti uno \"slug\" valido che consista di lettere, numeri, underscore o trattini." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Inserisci un URL valido" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" non è un UUID valido." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Inserisci un indirizzo IPv4 o IPv6 valido." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "È richiesto un numero intero valido." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Assicurati che il valore sia minore o uguale a {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Assicurati che il valore sia maggiore o uguale a {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Stringa troppo lunga." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "È richiesto un numero valido." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Assicurati che non ci siano più di {max_digits} cifre in totale." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Assicurati che non ci siano più di {max_decimal_places} cifre decimali." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Assicurati che non ci siano più di {max_whole_digits} cifre prima del separatore decimale." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "L'oggetto di tipo datetime è in un formato errato. Usa uno dei seguenti formati: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Atteso un oggetto di tipo datetime ma l'oggetto ricevuto è di tipo date." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "La data è in un formato errato. Usa uno dei seguenti formati: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Atteso un oggetto di tipo date ma l'oggetto ricevuto è di tipo datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "L'orario ha un formato errato. Usa uno dei seguenti formati: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "La durata è in un formato errato. Usa uno dei seguenti formati: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" non è una scelta valida." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Più di {count} oggetti..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Attesa una lista di oggetti ma l'oggetto ricevuto è di tipo \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "Questa selezione potrebbe non essere vuota." +msgstr "Questa selezione non può essere vuota." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" non è un percorso valido." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Non è stato inviato alcun file." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "I dati inviati non corrispondono ad un file. Si prega di controllare il tipo di codifica nel form." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Il nome del file non può essere determinato." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Il file inviato è vuoto." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Assicurati che il nome del file abbia, al più, {max_length} caratteri (attualmente ne ha {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Invia un'immagine valida. Il file che hai inviato non era un'immagine o era corrotto." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." -msgstr "Questa lista potrebbe non essere vuota." +msgstr "Questa lista non può essere vuota." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Era atteso un dizionario di oggetti ma il dato ricevuto è di tipo \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Il valore deve essere un JSON valido." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Invia" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Cerca" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordinamento" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "ascendente" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "discendente" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "Pagina non valida." + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Cursore non valido" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Pk \"{pk_value}\" non valido - l'oggetto non esiste." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Tipo non corretto. Era atteso un valore pk, ma è stato ricevuto {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Collegamento non valido - Nessuna corrispondenza di URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Collegamento non valido - Corrispondenza di URL non corretta." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Collegamento non valido - L'oggetto non esiste." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Tipo non corretto. Era attesa una stringa URL, ma è stato ricevuto {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "L'oggetto con {slug_name}={value} non esiste." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Valore non valido." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Dati non validi. Era atteso un dizionario, ma si è ricevuto {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtri" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Filtri per il campo" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordinamento" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Cerca" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Nessuno" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Nessun elemento da selezionare." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Questo campo deve essere unico." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "I campi {field_names} devono costituire un insieme unico." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Questo campo deve essere unico per la data \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Questo campo deve essere unico per il mese \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Questo campo deve essere unico per l'anno \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Versione non valida nell'header \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Versione non valida nella sequenza URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Versione non valida nell'URL path. Non corrisponde con nessun namespace di versione." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Versione non valida nel nome dell'host." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Versione non valida nel parametro della query." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permesso negato." diff --git a/rest_framework/locale/ja/LC_MESSAGES/django.mo b/rest_framework/locale/ja/LC_MESSAGES/django.mo index 5b9dbd8da..e949a57f7 100644 Binary files a/rest_framework/locale/ja/LC_MESSAGES/django.mo and b/rest_framework/locale/ja/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ja/LC_MESSAGES/django.po b/rest_framework/locale/ja/LC_MESSAGES/django.po index a5e72d9a1..6b8d71429 100644 --- a/rest_framework/locale/ja/LC_MESSAGES/django.po +++ b/rest_framework/locale/ja/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Kouichi Nishizawa \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Japanese (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ja/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,40 +19,40 @@ msgstr "" "Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "不正な基本ヘッダです。認証情報が含まれていません。" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "不正な基本ヘッダです。認証情報文字列に空白を含めてはいけません。" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "不正な基本ヘッダです。認証情報がBASE64で正しくエンコードされていません。" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "ユーザ名かパスワードが違います。" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "ユーザが無効か削除されています。" -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "不正なトークンヘッダです。認証情報が含まれていません。" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "不正なトークンヘッダです。トークン文字列に空白を含めてはいけません。" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "不正なトークンヘッダです。トークン文字列に不正な文字を含めてはいけません。" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "不正なトークンです。" @@ -60,382 +60,515 @@ msgstr "不正なトークンです。" msgid "Auth Token" msgstr "認証トークン" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "キー" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "ユーザ" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "作成された" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "トークン" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "トークン" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "ユーザ名" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "パスワード" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "ユーザアカウントが無効化されています。" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "提供された認証情報でログインできません。" -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "\"username\"と\"password\"を含まなければなりません。" -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "サーバエラーが発生しました。" -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "不正な形式のリクエストです。" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "認証情報が正しくありません。" -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "認証情報が含まれていません。" -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "このアクションを実行する権限がありません。" -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "見つかりませんでした。" -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "メソッド \"{method}\" は許されていません。" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "リクエストのAcceptヘッダを満たすことができませんでした。" -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "リクエストのメディアタイプ \"{media_type}\" はサポートされていません。" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "リクエストの処理は絞られました。" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "この項目は必須です。" -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "この項目はnullにできません。" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" は有効なブーリアンではありません。" +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "この項目は空にできません。" -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "この項目が{max_length}文字より長くならないようにしてください。" -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "この項目は少なくとも{min_length}文字以上にしてください。" -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "有効なメールアドレスを入力してください。" -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "この値は所要のパターンにマッチしません。" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "文字、数字、アンダースコア、またはハイフンから成る有効な \"slug\" を入力してください。" -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "有効なURLを入力してください。" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" は有効なUUIDではありません。" +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "有効なIPv4またはIPv6アドレスを入力してください。" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "有効な整数を入力してください。" -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "この値は{max_value}以下にしてください。" -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "この値は{min_value}以上にしてください。" -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "文字列が長過ぎます。" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "有効な数値を入力してください。" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "合計で最大{max_digits}桁以下になるようにしてください。" -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "小数点以下の桁数を{max_decimal_places}を超えないようにしてください。" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "整数部の桁数を{max_whole_digits}を超えないようにしてください。" -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "日時の形式が違います。以下のどれかの形式にしてください: {format}。" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "日付ではなく日時を入力してください。" -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "日付の形式が違います。以下のどれかの形式にしてください: {format}。" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "日時ではなく日付を入力してください。" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "時刻の形式が違います。以下のどれかの形式にしてください: {format}。" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "機関の形式が違います。以下のどれかの形式にしてください: {format}。" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\"は有効な選択肢ではありません。" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr " {count} 個より多い..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "\"{input_type}\" 型のデータではなく項目のリストを入力してください。" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "空でない項目を選択してください。" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\"は有効なパスの選択肢ではありません。" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "ファイルが添付されていません。" -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "添付されたデータはファイルではありません。フォームのエンコーディングタイプを確認してください。" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "ファイル名が取得できませんでした。" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "添付ファイルの中身が空でした。" -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "ファイル名は最大{max_length}文字にしてください({length}文字でした)。" -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "有効な画像をアップロードしてください。アップロードされたファイルは画像でないか壊れた画像です。" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "リストは空ではいけません。" -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "\"{input_type}\" 型のデータではなく項目の辞書を入力してください。" -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "値は有効なJSONでなければなりません。" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "提出" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "検索" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "順序" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "昇順" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "降順" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "不正なページです。" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "カーソルが不正です。" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "主キー \"{pk_value}\" は不正です - データが存在しません。" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "不正な型です。{data_type} 型ではなく主キーの値を入力してください。" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "ハイパーリンクが不正です - URLにマッチしません。" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "ハイパーリンクが不正です - 不正なURLにマッチします。" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "ハイパーリンクが不正です - リンク先が存在しません。" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "不正なデータ型です。{data_type} 型ではなくURL文字列を入力してください。" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "{slug_name}={value} のデータが存在しません。" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "不正な値です。" -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "不正なデータです。{datatype} 型ではなく辞書を入力してください。" #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "フィルタ" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "フィールドフィルタ" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "順序" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "検索" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "なし" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "選択する項目がありません。" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "この項目は一意でなければなりません。" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "項目 {field_names} は一意な組でなければなりません。" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "この項目は \"{date_field}\" の日に対して一意でなければなりません。" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "この項目は \"{date_field}\" の月に対して一意でなければなりません。" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "この項目は \"{date_field}\" の年に対して一意でなければなりません。" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "\"Accept\" 内のバージョンが不正です。" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "URLパス内のバージョンが不正です。" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "不正なバージョンのURLのパスです。どのバージョンの名前空間にも一致しません。" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "ホスト名内のバージョンが不正です。" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "クエリパラメータ内のバージョンが不正です。" - -#: views.py:88 -msgid "Permission denied." -msgstr "権限がありません。" diff --git a/rest_framework/locale/ko_KR/LC_MESSAGES/django.mo b/rest_framework/locale/ko_KR/LC_MESSAGES/django.mo index 570ff6f53..c3aeb27a9 100644 Binary files a/rest_framework/locale/ko_KR/LC_MESSAGES/django.mo and b/rest_framework/locale/ko_KR/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ko_KR/LC_MESSAGES/django.po b/rest_framework/locale/ko_KR/LC_MESSAGES/django.po index 43dbe0cdd..722dc2c82 100644 --- a/rest_framework/locale/ko_KR/LC_MESSAGES/django.po +++ b/rest_framework/locale/ko_KR/LC_MESSAGES/django.po @@ -4,15 +4,16 @@ # # Translators: # GarakdongBigBoy , 2017 +# Hochul Kwak , 2018 # Joon Hwan 김준환 , 2017 # SUN CHOI , 2015 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-09-28 09:41+0000\n" -"Last-Translator: GarakdongBigBoy \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Korean (Korea) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ko_KR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,423 +21,556 @@ msgstr "" "Language: ko_KR\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "기본 헤더(basic header)가 유효하지 않습니다. 인증데이터(credentials)가 제공되지 않았습니다." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "기본 헤더(basic header)가 유효하지 않습니다. 인증데이터(credentials) 문자열은 빈칸(spaces)을 포함하지 않아야 합니다." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "기본 헤더(basic header)가 유효하지 않습니다. 인증데이터(credentials)가 base64로 적절히 부호화(encode)되지 않았습니다." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "아이디/비밀번호가 유효하지 않습니다." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "계정이 중지되었거나 삭제되었습니다." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "토큰 헤더가 유효하지 않습니다. 인증데이터(credentials)가 제공되지 않았습니다." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "토큰 헤더가 유효하지 않습니다. 토큰 문자열은 빈칸(spaces)을 포함하지 않아야 합니다." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "토큰 헤더가 유효하지 않습니다. 토큰 문자열은 유효하지 않은 문자를 포함하지 않아야 합니다." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "토큰이 유효하지 않습니다." #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "인증 토큰" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "키" + +#: authtoken/models.py:16 +msgid "User" +msgstr "유저" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "생성됨" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "토큰" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "" -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" - #: authtoken/serializers.py:9 +msgid "Username" +msgstr "유저이름" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "비밀번호" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "사용자 계정을 사용할 수 없습니다." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "제공된 인증데이터(credentials)로는 로그인할 수 없습니다." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "\"아이디\"와 \"비밀번호\"를 포함해야 합니다." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "서버 장애가 발생했습니다." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "잘못된 요청입니다." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "자격 인증데이터(authentication credentials)가 정확하지 않습니다." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "자격 인증데이터(authentication credentials)가 제공되지 않았습니다." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "이 작업을 수행할 권한(permission)이 없습니다." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "찾을 수 없습니다." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "메소드(Method) \"{method}\"는 허용되지 않습니다." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Accept header 요청을 만족할 수 없습니다." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "요청된 \"{media_type}\"가 지원되지 않는 미디어 형태입니다." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "요청이 지연(throttled)되었습니다." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "이 필드는 필수 항목입니다." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "이 필드는 null일 수 없습니다." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\"이 유효하지 않은 부울(boolean)입니다." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "이 필드는 blank일 수 없습니다." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "이 필드의 글자 수가 {max_length} 이하인지 확인하십시오." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "이 필드의 글자 수가 적어도 {min_length} 이상인지 확인하십시오." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "유효한 이메일 주소를 입력하십시오." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "형식에 맞지 않는 값입니다." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "문자, 숫자, 밑줄( _ ) 또는 하이픈( - )으로 이루어진 유효한 \"slug\"를 입력하십시오." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "유효한 URL을 입력하십시오." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\"가 유효하지 않은 UUID 입니다." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "유효한 IPv4 또는 IPv6 주소를 입력하십시오." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "유효한 정수(integer)를 넣어주세요." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "이 값이 {max_value}보다 작거나 같은지 확인하십시오." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "이 값이 {min_value}보다 크거나 같은지 확인하십시오." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "문자열 값이 너무 큽니다." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "유효한 숫자를 넣어주세요." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "전체 숫자(digits)가 {max_digits} 이하인지 확인하십시오." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "소수점 자릿수가 {max_decimal_places} 이하인지 확인하십시오." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "소수점 자리 앞에 숫자(digits)가 {max_whole_digits} 이하인지 확인하십시오." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datetime의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "예상된 datatime 대신 date를 받았습니다." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Date의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "예상된 date 대신 datetime을 받았습니다." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Time의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Duration의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\"이 유효하지 않은 선택(choice)입니다." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "아이템 리스트가 예상되었으나 \"{input_type}\"를 받았습니다." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "이 선택 항목은 비워 둘 수 없습니다." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\"이 유효하지 않은 경로 선택입니다." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "파일이 제출되지 않았습니다." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "제출된 데이터는 파일이 아닙니다. 제출된 서식의 인코딩 형식을 확인하세요." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "파일명을 알 수 없습니다." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "제출한 파일이 비어있습니다." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "이 파일명의 글자수가 최대 {max_length}를 넘지 않는지 확인하십시오. (이것은 {length}가 있습니다)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "유효한 이미지 파일을 업로드 하십시오. 업로드 하신 파일은 이미지 파일이 아니거나 손상된 이미지 파일입니다." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "이 리스트는 비워 둘 수 없습니다." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "아이템 딕셔너리가 예상되었으나 \"{input_type}\" 타입을 받았습니다." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Value 는 유효한 JSON형식이어야 합니다." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "검색" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:336 +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "순서" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "오름차순" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "내림차순" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "페이지가 유효하지 않습니다." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "커서(cursor)가 유효하지 않습니다." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "유효하지 않은 pk \"{pk_value}\" - 객체가 존재하지 않습니다." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "잘못된 형식입니다. pk 값 대신 {data_type}를 받았습니다." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "유효하지 않은 하이퍼링크 - 일치하는 URL이 없습니다." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "유효하지 않은 하이퍼링크 - URL이 일치하지 않습니다." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "유효하지 않은 하이퍼링크 - 객체가 존재하지 않습니다." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "잘못된 형식입니다. URL 문자열을 예상했으나 {data_type}을 받았습니다." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "{slug_name}={value} 객체가 존재하지 않습니다." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "값이 유효하지 않습니다." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "유효하지 않은 데이터. 딕셔너리(dictionary)대신 {datatype}를 받았습니다." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "필터" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "검색" +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "선택할 아이템이 없습니다." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "이 필드는 반드시 고유(unique)해야 합니다." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "필드 {field_names} 는 반드시 고유(unique)해야 합니다." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "이 필드는 고유(unique)한 \"{date_field}\" 날짜를 갖습니다." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "이 필드는 고유(unique)한 \"{date_field}\" 월을 갖습니다. " -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "이 필드는 고유(unique)한 \"{date_field}\" 년을 갖습니다. " -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "\"Accept\" 헤더(header)의 버전이 유효하지 않습니다." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "URL path의 버전이 유효하지 않습니다." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "URL 경로에 유효하지 않은 버전이 있습니다. 버전 네임 스페이스와 일치하지 않습니다." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "hostname내 버전이 유효하지 않습니다." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "쿼리 파라메터내 버전이 유효하지 않습니다." - -#: views.py:88 -msgid "Permission denied." -msgstr "사용 권한이 거부되었습니다." diff --git a/rest_framework/locale/lt/LC_MESSAGES/django.mo b/rest_framework/locale/lt/LC_MESSAGES/django.mo new file mode 100644 index 000000000..b43a6a8a4 Binary files /dev/null and b/rest_framework/locale/lt/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/lt/LC_MESSAGES/django.po b/rest_framework/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 000000000..1578e47b3 --- /dev/null +++ b/rest_framework/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,573 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# vytautas , 2019 +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Lithuanian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lt\n" +"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "" + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "" + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "" + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "" + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "Vartotojas neaktyvus arba pašalintas." + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "" + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "" + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "" + +#: authentication.py:203 +msgid "Invalid token." +msgstr "" + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "Raktas" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Vartotojas" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "Sukurta" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "Vartotojo vardas" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "Slaptažodis" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "" + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "" + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "Įvyko serverio klaida." + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "Netinkamai suformuota užklausa." + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "Neteisingi autentifikacijos duomenys." + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "Autentifikacijos duomenys nesuteikti." + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "" + +#: exceptions.py:185 +msgid "Not found." +msgstr "Nerasta." + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "Metodas \"{method}\" yra neleidžiamas." + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "Nepavyko patenkinti užklausos Accept antraštės." + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "Nepalaikomas duomenų formatas \"{media_type}\" užklausoje." + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "Užklausa pristabdyta." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "Šis laukas yra privalomas." + +#: fields.py:317 +msgid "This field may not be null." +msgstr "Šis laukas negali būti nustatytas kaip null." + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "Šis laukas negali būti tuščias." + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "Patikrinkite, ar šis laukas turi ne daugiau nei {max_length} simbolių." + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "Patikrinkite, ar šis laukas turi ne mažiau nei {min_length} simbolių." + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "Įveskite tinkamą el. pašto adresą." + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "Ši vertė neatitinka nustatyto šablono." + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "Įveskite tinkamą \"slug\" tekstą, turintį tik raidžių, skaičių, pabraukimų arba brūkšnelių." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "Įveskite tinkamą URL adresą." + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Įveskite tinkamą IPv4 arba IPv6 adresą." + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "Reikiama tinkama integer tipo reikšmė." + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "Patikrinkite, ar ši reikšmė yra mažesnė arba lygi {max_value}." + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "Patikrinkite, ar ši reikšmė yra didesnė arba lygi {min_value}." + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "String tipo reikšmė per ilga." + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "Reikiamas tinkamas skaičius." + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "Patikrinkite, ar nėra daugiau nei {max_digits} skaitmenų." + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "Patikrinkite, ar nėra daugiau nei {max_decimal_places} skaitmenų po kablelio." + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "Patikrinkite, ar nėra daugiau nei {max_whole_digits} skaitmenų priešais kablelį." + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "Datetime tipo reikšmė yra netinkamo formato. Naudokite vieną iš šių formatų: {format}." + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "Tikėtasi datetime, gauta date tipo reikšmė." + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Date tipo reikšmė yra netinkamo formato. Naudokite vieną iš šių formatų: {format}." + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "Tikėtasi date, gauta datetime tipo reikšmė." + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "Time tipo reikšmė yra netinkamo formato. Naudokite vieną iš šių formatų: {format}." + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "Duration tipo reikšmė yra netinkamo formato. Naudokite vieną iš šių formatų: {format}." + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" nėra tinkamas pasirinkimas." + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "" + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "" + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "Šis pasirinkimas negali būti tuščias." + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "" + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "" + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "" + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "" + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "" + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "" + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "" + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "" + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "" + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "" + +#: filters.py:288 +msgid "descending" +msgstr "" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "Netinkamas puslapis." + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "" + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "" + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "" + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "" + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "" + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "" + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "" + +#: relations.py:449 +msgid "Invalid value." +msgstr "" + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "" + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "" + +#: validators.py:39 +msgid "This field must be unique." +msgstr "" + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "" + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "" + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "" + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "" + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "" + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "" + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "" + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "" + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr "" diff --git a/rest_framework/locale/lv/LC_MESSAGES/django.mo b/rest_framework/locale/lv/LC_MESSAGES/django.mo index b4accc34e..7ee717240 100644 Binary files a/rest_framework/locale/lv/LC_MESSAGES/django.mo and b/rest_framework/locale/lv/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/lv/LC_MESSAGES/django.po b/rest_framework/locale/lv/LC_MESSAGES/django.po index 2bc978866..876f6f367 100644 --- a/rest_framework/locale/lv/LC_MESSAGES/django.po +++ b/rest_framework/locale/lv/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-05 12:13+0000\n" -"Last-Translator: peterisb \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Latvian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/lv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,40 +18,40 @@ msgstr "" "Language: lv\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Nederīgs pieprasījuma sākums. Akreditācijas parametri nav nodrošināti." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Nederīgs pieprasījuma sākums. Akreditācijas parametriem jābūt bez atstarpēm." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Nederīgs pieprasījuma sākums. Akreditācijas parametri nav korekti base64 kodēti." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Nederīgs lietotājvārds/parole." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Lietotājs neaktīvs vai dzēsts." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Nederīgs pilnvaras sākums. Akreditācijas parametri nav nodrošināti." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Nederīgs pilnvaras sākums. Pilnvaras parametros nevar būt tukšumi." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Nederīgs pilnvaras sākums. Pilnvaras parametros nevar būt nederīgas zīmes." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Nederīga pilnavara." @@ -59,382 +59,515 @@ msgstr "Nederīga pilnavara." msgid "Auth Token" msgstr "Autorizācijas pilnvara" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Atslēga" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Lietotājs" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Izveidots" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Pilnvara" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Pilnvaras" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Lietotājvārds" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Parole" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Lietotāja konts ir atslēgts." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Neiespējami pieteikties sistēmā ar nodrošinātajiem akreditācijas datiem." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Jābūt iekļautam \"username\" un \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Notikusi servera kļūda." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Nenoformēts pieprasījums." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Nekorekti autentifikācijas parametri." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Netika nodrošināti autorizācijas parametri." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Tev nav tiesību veikt šo darbību." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nav atrasts." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metode \"{method}\" nav atļauta." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Nevarēja apmierināt pieprasījuma Accept header." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Pieprasījumā neatbalstīts datu tips \"{media_type}\" ." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Pieprasījums tika apturēts." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Šis lauks ir obligāts." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Šis lauks nevar būt null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" ir nederīga loģiskā vērtība." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Šis lauks nevar būt tukšs." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Pārliecinies, ka laukā nav vairāk par {max_length} zīmēm." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Pārliecinies, ka laukā ir vismaz {min_length} zīmes." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Ievadi derīgu e-pasta adresi." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Šī vērtība neatbilst prasītajam pierakstam." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Ievadi derīgu \"slug\" vērtību, kura sastāv no burtiem, skaitļiem, apakš-svītras vai defises." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Ievadi derīgu URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" ir nedrīgs UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Ievadi derīgu IPv4 vai IPv6 adresi." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Prasīta ir derīga skaitliska vērtība." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Pārliecinies, ka šī vērtība ir mazāka vai vienāda ar {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Pārliecinies, ka šī vērtība ir lielāka vai vienāda ar {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Teksta vērtība pārāk liela." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Derīgs skaitlis ir prasīts." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Pārliecinies, ka nav vairāk par {max_digits} zīmēm kopā." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Pārliecinies, ka nav vairāk par {max_decimal_places} decimālajām zīmēm." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Pārliecinies, ka nav vairāk par {max_whole_digits} zīmēm pirms komata." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datuma un laika formāts ir nepareizs. Lieto vienu no norādītajiem formātiem: \"{format}.\"" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Tika gaidīts datums un laiks, saņemts datums.." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Datumam ir nepareizs formāts. Lieto vienu no norādītajiem formātiem: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Tika gaidīts datums, saņemts datums un laiks." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Laikam ir nepareizs formāts. Lieto vienu no norādītajiem formātiem: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Ilgumam ir nepreizs formāts. Lieto vienu no norādītajiem formātiem: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" ir nederīga izvēle." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Vairāk par {count} ierakstiem..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Tika gaidīts saraksts ar ierakstiem, bet tika saņemts \"{input_type}\" tips." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Šī daļa nevar būt tukša." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" ir nederīga ceļa izvēle." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Neviens fails netika pievienots." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Pievienotie dati nebija fails. Pārbaudi kodējuma tipu formā." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Faila nosaukums nevar tikt noteikts." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Pievienotais fails ir tukšs." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Pārliecinies, ka faila nosaukumā ir vismaz {max_length} zīmes (tajā ir {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Augšupielādē derīgu attēlu. Pievienotā datne nebija attēls vai bojāts attēls." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Šis saraksts nevar būt tukšs." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Tika gaidīta vārdnīca ar ierakstiem, bet tika saņemts \"{input_type}\" tips." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Vērtībai ir jābūt derīgam JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Iesniegt" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Meklēt" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Kārtošana" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "augoši" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "dilstoši" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Nederīga lapa." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Nederīgs kursors" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Nederīga pk \"{pk_value}\" - objekts neeksistē." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Nepareizs tips. Tika gaidīta pk vērtība, saņemts {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Nederīga hipersaite - Nav URL sakritība." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Nederīga hipersaite - Nederīga URL sakritība." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Nederīga hipersaite - Objekts neeksistē." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Nepareizs tips. Tika gaidīts URL teksts, saņemts {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekts ar {slug_name}={value} neeksistē." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Nedrīga vērtība." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Nederīgi dati. Tika gaidīta vārdnīca, saņemts {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtri" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Lauka filtri" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Kārtošana" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Meklēt" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Nekas" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Nav ierakstu, ko izvēlēties." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Šim laukam ir jābūt unikālam." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Laukiem {field_names} jāveido unikālas kombinācijas." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Šim laukam ir jābūt unikālam priekš \"{date_field}\" datuma." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Šim laukam ir jābūt unikālam priekš \"{date_field}\" mēneša." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Šim laukam ir jābūt unikālam priekš \"{date_field}\" gada." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Nederīga versija \"Accept\" galvenē." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Nederīga versija URL ceļā." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Nederīga versija URL ceļā. Nav atbilstības esošo versiju telpā." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Nederīga versija servera nosaukumā." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Nederīga versija pieprasījuma parametros." - -#: views.py:88 -msgid "Permission denied." -msgstr "Pieeja liegta." diff --git a/rest_framework/locale/mk/LC_MESSAGES/django.mo b/rest_framework/locale/mk/LC_MESSAGES/django.mo index 752263456..4c13e5a3d 100644 Binary files a/rest_framework/locale/mk/LC_MESSAGES/django.mo and b/rest_framework/locale/mk/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/mk/LC_MESSAGES/django.po b/rest_framework/locale/mk/LC_MESSAGES/django.po index 0e59663d0..03f313523 100644 --- a/rest_framework/locale/mk/LC_MESSAGES/django.po +++ b/rest_framework/locale/mk/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Filip Dimitrovski \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Macedonian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/mk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,40 +18,40 @@ msgstr "" "Language: mk\n" "Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Невалиден основен header. Не се внесени податоци за автентикација." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Невалиден основен header. Автентикационата низа не треба да содржи празни места." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Невалиден основен header. Податоците за автентикација не се енкодирани со base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Невалидно корисничко име/лозинка." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Корисникот е деактивиран или избришан." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Невалиден токен header. Не се внесени податоци за најава." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Невалиден токен во header. Токенот не треба да содржи празни места." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Невалиден токен." @@ -59,382 +59,515 @@ msgstr "Невалиден токен." msgid "Auth Token" msgstr "Автентикациски токен" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Корисник" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Токен" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Токени" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Корисничко име" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Лозинка" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Сметката на корисникот е деактивирана." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Не може да се најавите со податоците за најава." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Мора да се внесе „username“ и „password“." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Настана серверска грешка." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Неправилен request." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Неточни податоци за најава." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Не се внесени податоци за најава." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Немате дозвола да го сторите ова." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Не е пронајдено ништо." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Методата \"{method}\" не е дозволена." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Не може да се исполни барањето на Accept header-от." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Media типот „{media_type}“ не е поддржан." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Request-от е забранет заради ограничувања." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Ова поле е задолжително." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Ова поле не смее да биде недефинирано." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" не е валиден boolean." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Ова поле не смее да биде празно." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Ова поле не смее да има повеќе од {max_length} знаци." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Ова поле мора да има барем {min_length} знаци." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Внесете валидна email адреса." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Ова поле не е по правилната шема/барање." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Внесете валидно име што содржи букви, бројки, долни црти или црти." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Внесете валиден URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" не е валиден UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Внеси валидна IPv4 или IPv6 адреса." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Задолжителен е валиден цел број." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Вредноста треба да биде помала или еднаква на {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Вредноста треба да биде поголема или еднаква на {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Вредноста е преголема." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Задолжителен е валиден број." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Не смее да има повеќе од {max_digits} цифри вкупно." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Не смее да има повеќе од {max_decimal_places} децимални места." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Не смее да има повеќе од {max_whole_digits} цифри пред децималната точка." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Датата и времето се со погрешен формат. Користете го овој формат: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Очекувано беше дата и време, а внесено беше само дата." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Датата е со погрешен формат. Користете го овој формат: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Очекувана беше дата, а внесени беа и дата и време." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Времето е со погрешен формат. Користете го овој формат: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "„{input}“ не е валиден избор." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Повеќе од {count} ставки..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Очекувана беше листа од ставки, а внесено беше „{input_type}“." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Ниеден фајл не е качен (upload-иран)." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Испратените податоци не се фајл. Проверете го encoding-от на формата." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Не може да се открие име на фајлот." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Качениот (upload-иран) фајл е празен." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Името на фајлот треба да има највеќе {max_length} знаци (а има {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Качете (upload-ирајте) валидна слика. Фајлот што го качивте не е валидна слика или е расипан." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Оваа листа не смее да биде празна." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Очекуван беше dictionary од ставки, a внесен беше тип \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Вредноста мора да биде валиден JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Испрати" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Пребарај" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Подредување" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "растечки" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "опаѓачки" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Невалидна вредност за страна." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Невалиден покажувач (cursor)" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Невалиден pk „{pk_value}“ - објектот не постои." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Неточен тип. Очекувано беше pk, а внесено {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Невалиден хиперлинк - не е внесен URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Невалиден хиперлинк - внесен е неправилен URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Невалиден хиперлинк - Објектот не постои." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Неточен тип. Очекувано беше URL, a внесено {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Објектот со {slug_name}={value} не постои." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Невалидна вредност." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Невалидни податоци. Очекуван беше dictionary, а внесен {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Филтри" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Филтри на полиња" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Подредување" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Пребарај" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Ништо" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Нема ставки за избирање." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Ова поле мора да биде уникатно." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Полињата {field_names} заедно мора да формираат уникатен збир." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Ова поле мора да биде уникатно за „{date_field}“ датата." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Ова поле мора да биде уникатно за „{date_field}“ месецот." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Ова поле мора да биде уникатно за „{date_field}“ годината." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Невалидна верзија во „Accept“ header-от." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Невалидна верзија во URL патеката." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Верзијата во URL патеката не е валидна. Не се согласува со ниеден version namespace (именски простор за верзии)." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Невалидна верзија во hostname-от." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Невалидна верзија во query параметарот." - -#: views.py:88 -msgid "Permission denied." -msgstr "Барањето не е дозволено." diff --git a/rest_framework/locale/nb/LC_MESSAGES/django.mo b/rest_framework/locale/nb/LC_MESSAGES/django.mo index fc57ebb9f..bd983b292 100644 Binary files a/rest_framework/locale/nb/LC_MESSAGES/django.mo and b/rest_framework/locale/nb/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/nb/LC_MESSAGES/django.po b/rest_framework/locale/nb/LC_MESSAGES/django.po index f572f90be..9dbaf45de 100644 --- a/rest_framework/locale/nb/LC_MESSAGES/django.po +++ b/rest_framework/locale/nb/LC_MESSAGES/django.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-11-28 15:25+0000\n" -"Last-Translator: Håken Lid \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Norwegian Bokmål (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,40 +20,40 @@ msgstr "" "Language: nb\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Ugyldig basic header. Ingen legitimasjon gitt." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Ugyldig basic header. Legitimasjonsstreng bør ikke inneholde mellomrom." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Ugyldig basic header. Legitimasjonen ikke riktig Base64 kodet." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Ugyldig brukernavn eller passord." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Bruker inaktiv eller slettet." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Ugyldig token header. Ingen legitimasjon gitt." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Ugyldig token header. Token streng skal ikke inneholde mellomrom." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Ugyldig token header. Tokenstrengen skal ikke inneholde ugyldige tegn." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Ugyldig token." @@ -61,382 +61,515 @@ msgstr "Ugyldig token." msgid "Auth Token" msgstr "Auth Token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Nøkkel" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Bruker" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Opprettet" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokener" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Brukernavn" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Passord" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Brukerkonto er deaktivert." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Kan ikke logge inn med gitt legitimasjon." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Må inneholde \"username\" og \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "En serverfeil skjedde." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Misformet forespørsel." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Ugyldig autentiseringsinformasjon." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Manglende autentiseringsinformasjon." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Du har ikke tilgang til å utføre denne handlingen." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Ikke funnet." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metoden \"{method}\" ikke gyldig." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Kunne ikke tilfredsstille request Accept header." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Ugyldig media type \"{media_type}\" i request." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Forespørselen ble strupet." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Dette feltet er påkrevd." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Dette feltet må ikke være tomt." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" er ikke en gyldig bolsk verdi." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Dette feltet må ikke være blankt." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Forsikre deg om at dette feltet ikke har mer enn {max_length} tegn." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Forsikre deg at dette feltet har minst {min_length} tegn." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Oppgi en gyldig epost-adresse." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Denne verdien samsvarer ikke med de påkrevde mønsteret." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Skriv inn en gyldig \"slug\" som består av bokstaver, tall, understrek eller bindestrek." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Skriv inn en gyldig URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" er ikke en gyldig UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Skriv inn en gyldig IPv4 eller IPv6-adresse." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "En gyldig heltall er nødvendig." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Sikre denne verdien er mindre enn eller lik {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Sikre denne verdien er større enn eller lik {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Strengverdien for stor." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Et gyldig nummer er nødvendig." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Pass på at det ikke er flere enn {max_digits} siffer totalt." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Pass på at det ikke er flere enn {max_decimal_places} desimaler." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Pass på at det ikke er flere enn {max_whole_digits} siffer før komma." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datetime har feil format. Bruk et av disse formatene i stedet: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Forventet en datetime, men fikk en date." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Dato har feil format. Bruk et av disse formatene i stedet: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Forventet en date, men fikk en datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Tid har feil format. Bruk et av disse formatene i stedet: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Varighet har feil format. Bruk et av disse formatene i stedet: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" er ikke et gyldig valg." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Mer enn {count} elementer ..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Forventet en liste over elementer, men fikk type \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Dette valget kan ikke være tomt." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" er ikke en gyldig bane valg." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Ingen fil ble sendt." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "De innsendte data var ikke en fil. Kontroller kodingstypen på skjemaet." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Kunne ikke finne filnavn." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Den innsendte filen er tom." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Sikre dette filnavnet har på det meste {max_length} tegn (det har {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Last opp et gyldig bilde. Filen du lastet opp var enten ikke et bilde eller en ødelagt bilde." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Denne listen kan ikke være tom." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Forventet en dictionary av flere ting, men fikk typen \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Verdien må være gyldig JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Send inn" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Søk" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sortering" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "stigende" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "synkende" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Ugyldig side" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Ugyldig markør" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Ugyldig pk \"{pk_value}\" - objektet eksisterer ikke." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Feil type. Forventet pk verdi, fikk {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Ugyldig hyperkobling - No URL match." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Ugyldig hyperkobling - Incorrect URL match." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Ugyldig hyperkobling - Objektet eksisterer ikke." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Feil type. Forventet URL streng, fikk {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekt med {slug_name}={value} finnes ikke." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Ugyldig verdi." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Ugyldige data. Forventet en dictionary, men fikk {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtre" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Feltfiltre" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Sortering" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Søk" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Ingen" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Ingenting å velge." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Dette feltet må være unikt." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Feltene {field_names} må gjøre et unikt sett." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Dette feltet må være unikt for \"{date_field}\" dato." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Dette feltet må være unikt for \"{date_field}\" måned." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Dette feltet må være unikt for \"{date_field}\" år." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Ugyldig versjon på \"Accept\" header." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Ugyldig versjon i URL-banen." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Ugyldig versjon i URL. Passer ikke med noen eksisterende versjon." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Ugyldig versjon i vertsnavn." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Ugyldig versjon i søkeparameter." - -#: views.py:88 -msgid "Permission denied." -msgstr "Tillatelse avslått." diff --git a/rest_framework/locale/ne_NP/LC_MESSAGES/django.mo b/rest_framework/locale/ne_NP/LC_MESSAGES/django.mo new file mode 100644 index 000000000..a9071d09e Binary files /dev/null and b/rest_framework/locale/ne_NP/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ne_NP/LC_MESSAGES/django.po b/rest_framework/locale/ne_NP/LC_MESSAGES/django.po new file mode 100644 index 000000000..74b56e47e --- /dev/null +++ b/rest_framework/locale/ne_NP/LC_MESSAGES/django.po @@ -0,0 +1,574 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Shrawan Poudel , 2018 +# Xavier Ordoquy , 2020 +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:59+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Nepali (Nepal) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ne_NP/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ne_NP\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "अमान्य हेडरहरू, क्रेडेन्सियलहरू प्रदान गरिएको छैन |" + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "अमान्य हेडरहरू, क्रेडेन्सियलहरूमा स्पेस हुनु हुँदैन |" + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "अमान्य हेडरहरू, क्रेडेन्सियलहरूमा सही तरिकाले base64 एन्कोड गरिएको छैन |" + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "अमान्य प्रयोगकर्तानाम/पासवर्ड |" + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "प्रयोगकर्ता निष्क्रिय वा मेटायिएको छ |" + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "अमान्य टोकन हेडर । कुनै क्रेडेन्सियल प्रदान गरिएको छैन ।" + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "अमान्य टोकन हेडर | टोकनमा स्पेस हुनु हुँदैन |" + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "अमान्य टोकन हेडर | टोकनमा अवैध अक्षरहरू हुनु हुँदैन |" + +#: authentication.py:203 +msgid "Invalid token." +msgstr "अमान्य टोकन |" + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "प्रयोगकर्ता प्रमाणिकरण टोकन " + +#: authtoken/models.py:13 +msgid "Key" +msgstr "मूल" + +#: authtoken/models.py:16 +msgid "User" +msgstr "प्रयोगकर्ता" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "सिर्जना गरियो" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "टोकन" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "टोकेनहरु" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "प्रयोगकर्ताको नाम" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "पासवर्ड" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "प्रदान गरिएको क्रेडेन्सियलसँग लग इन गर्न सकिएन |" + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "\"प्रयोगकर्ताको नाम\" र \"पासवर्ड\" सामेल हुनु पर्छ |" + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "सर्भर त्रुटि देखापर्यो |" + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "विकृत अनुरोध |" + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "गलत प्रमाणीकरण क्रेडेन्सियलहरू |" + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "प्रमाणीकरण क्रेडेन्सियलहरू पयिएन | " + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "तपाइँसँग यो कार्य गर्न अनुमति छैन |" + +#: exceptions.py:185 +msgid "Not found." +msgstr "फेला परेन |" + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "\"{method}\" गर्ने अनुमती छैन |" + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "Accept Header अनुरोधलाई सन्तुष्ट गर्ने सकिएन |" + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "असमर्थित मिडिया टाईप \"{media_type}\" अनुरोधको | " + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "अनुरोध प्रतिबन्दित गरियो |" + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "यो फिल्ड आवश्यक छ |" + +#: fields.py:317 +msgid "This field may not be null." +msgstr "यो फिल्ड खाली हुनु हुँदैन |" + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "यो फिल्ड खाली हुन सक्दैन |" + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "यो फिल्डसँग {max_length} अक्षरहरू भन्दा बढी छ छैन सुनिश्चित गर्नुहोस् |" + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "यो फिल्डमा कम से कम {min_length} अक्षरहरू छ छैन सुनिश्चित गर्नुहोस् |" + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "मान्य इमेल ठेगाना प्रविष्ट गर्नुहोस् |" + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "यो परिमाण आवश्यक ढाँचा मेल खाँदैन ।" + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "अक्षरहरू, अङ्कहरू, अन्डरसेर्सहरू वा हाइफनहरू समावेश भएका एक मान्य \"slug\" प्रविष्टि गर्नुहोस् ।" + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "मान्य यूआरएल प्रविष्ट गर्नुहोस् ।" + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "मान्य IPv4 वा IPv6 ठेगाना प्रविष्टि गर्नुहोस् ।" + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "एक मान्य पूर्णांक आवश्यक छ ।" + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "यो परिमाण {max_value} को भन्दा कम वा बराबर छ सुनिश्चित गर्नुहोस् ।" + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "यो परिमाण {min_value} भन्दा बढी वा बराबर छ सुनिश्चित गर्नुहोस् ।" + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "स्ट्रिङ परिमाण धेरै ठूलो छ ।" + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "एउटा मान्य अङ्कहरू आवश्यक छ ।" + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "सुनिश्चित गर्नुहोस् कि {max_digits} अङ्कहरू भन्दा अधिक नहोस् ।" + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "सुनिश्चित गर्नुहोस् कि {max_decimal_places} दशमलव स्थानहरू भन्दा अधिक नहोस् ।" + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "सुनिश्चित गर्नुहोस् कि दशमलव बिन्दुभन्दा पहिले {max_whole_digits} अङ्कहरू भन्दा अधिक नहोस् ।" + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "डेटटाइममा गलत ढाँचा छ । यसको सट्टामा यी मध्ये एक ढाँचा प्रयोग गर्नुहोस्: {format} ।" + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "डेटटाइम अपेक्षित भए तर मिति प्राप्त भयो ।" + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "डेटमा गलत ढाँचा छ । यसको सट्टामा यी मध्ये एक ढाँचा प्रयोग गर्नुहोस्: {format} ।" + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "डेट अपेक्षित भए तर डेटाटाइम प्राप्त भयो ।" + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "समयमा गलत ढाँचा छ । यसको सट्टामा यी मध्ये एक ढाँचा प्रयोग गर्नुहोस्: {format} ।" + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "अवधिमा गलत ढाँचा छ । यसको सट्टामा यी मध्ये एक ढाँचा प्रयोग गर्नुहोस्: {format} ।" + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" मान्य छनौट छैन ।" + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "{count} वस्तुहरू भन्दा बढी ..." + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "वस्तुहरूको सूची अपेक्षित तर \"{input_type}\" टाइप प्राप्त भयो ।" + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "यो चयन रिक्त हुन सक्दैन ।" + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "\"{input}\" मान्य मार्गको विकल्प होइन ।" + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "कुनै फाइल पेश गरिएको छैन ।" + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "पेश गरिएको डेटा फाईल थिएन । एन्कोडिङ प्रकार फारममा जाँच्नुहोस् ।" + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "कुनै फाइल नाम निर्धारण गर्न सकिएन ।" + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "पेश गरिएको फाइल खाली छ ।" + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "यो फाइल नाममा अधिक {max_length} अक्षरहरू छ छैन (यसमा {length} छ) सुनिश्चित गर्नुहोस् ।" + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "मान्य चित्र अपलोड गर्नुहोस् । तपाईंले अपलोड गर्नुभएको फाइल होइन वा चित्र वा भ्रष्ट चित्र हो ।" + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "यो सूची खाली हुन सक्दैन ।" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "वस्तुहरूको शब्दकोशको अपेक्षित तर \"{input_type}\" टाइप प्राप्त भयो ।" + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "परिमाण मान्य JSON हुनु पर्छ ।" + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "खोजी गर्नुहोस्" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "क्रम" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "आरोहण" + +#: filters.py:288 +msgid "descending" +msgstr "अवरोहण" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "अमान्य पृष्ठ ।" + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "अमान्य कर्सर" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "अमान्य pk \"{pk_value}\" - वस्तुको अस्तित्व छैन ।" + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "गलत प्रकार। अपेक्षित pk परिमाण, {data_type} प्राप्त भयो ।" + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "अमान्य हाइपरलिंक - कुनै यूआरएलको मेल छैन ।" + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "अमान्य हाइपरलिंक - गलत यूआरएलको मेल छ ।" + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "अमान्य हाइपरलिंक - वस्तुको अस्तित्व छैन ।" + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "गलत प्रकार। अपेक्षित यूआरएल स्ट्रिङ, {data_type} प्राप्त भयो ।" + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "वस्तु {slug_name} = {value} सँग अस्तित्व छैन ।" + +#: relations.py:449 +msgid "Invalid value." +msgstr "अमान्य परिमाण ।" + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "अमान्य डेटा । एक शब्दकोश अपेक्षित, तर {datatype} प्राप्त भयो ।" + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "फिल्टरहरू" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "कुनै पनि होइन" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "चयन गर्न वस्तुहरू छैनन् ।" + +#: validators.py:39 +msgid "This field must be unique." +msgstr "यो फिल्ड अद्वितीय हुनुपर्छ ।" + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "फिल्ड {field_names} ले एक अद्वितीय सेट गर्नु पर्छ ।" + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "यो फिल्ड \"{date_field}\" मितिको लागि अद्वितीय हुनुपर्छ ।" + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "यो फिल्ड \"{date_field}\" महिनाको लागि अद्वितीय हुनुपर्छ ।" + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "यो फिल्ड \"{date_field}\" वर्षको लागि अद्वितीय हुनुपर्छ ।" + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "\"Accept\" हेडरमा अमान्य संस्करण ।" + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "यूआरएल मार्गमा अमान्य संस्करण ।" + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "यूआरएल मार्गमा अमान्य संस्करण । कुनै पनि संस्करणको नामसँग मेल खाँदैन ।" + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "होस्ट नाममा अमान्य संस्करण ।" + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr " क्वेरी परिमितिमा अमान्य संस्करण ।" diff --git a/rest_framework/locale/nl/LC_MESSAGES/django.mo b/rest_framework/locale/nl/LC_MESSAGES/django.mo index ed74bffa0..4691ca63f 100644 Binary files a/rest_framework/locale/nl/LC_MESSAGES/django.mo and b/rest_framework/locale/nl/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/nl/LC_MESSAGES/django.po b/rest_framework/locale/nl/LC_MESSAGES/django.po index 370f3aa41..5f7ff05b4 100644 --- a/rest_framework/locale/nl/LC_MESSAGES/django.po +++ b/rest_framework/locale/nl/LC_MESSAGES/django.po @@ -8,13 +8,14 @@ # Mike Dingjan , 2017 # Mike Dingjan , 2015 # Hans van Luttikhuizen , 2016 +# Tom Hendrikx , 2017 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Mike Dingjan \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Dutch (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,40 +23,40 @@ msgstr "" "Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Ongeldige basic header. Geen logingegevens opgegeven." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Ongeldige basic header. logingegevens kunnen geen spaties bevatten." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Ongeldige basic header. logingegevens zijn niet correct base64-versleuteld." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Ongeldige gebruikersnaam/wachtwoord." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Gebruiker inactief of verwijderd." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Ongeldige token header. Geen logingegevens opgegeven" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Ongeldige token header. Token kan geen spaties bevatten." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Ongeldige token header. Token kan geen ongeldige karakters bevatten." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Ongeldige token." @@ -63,382 +64,515 @@ msgstr "Ongeldige token." msgid "Auth Token" msgstr "Autorisatietoken" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Key" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Gebruiker" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Aangemaakt" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Gebruikersnaam" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Wachtwoord" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Gebruikersaccount is gedeactiveerd." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Kan niet inloggen met opgegeven gegevens." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Moet \"username\" en \"password\" bevatten." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Er is een serverfout opgetreden." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Ongeldig samengestelde request." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Ongeldige authenticatiegegevens." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Authenticatiegegevens zijn niet opgegeven." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Je hebt geen toestemming om deze actie uit te voeren." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Niet gevonden." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Methode \"{method}\" niet toegestaan." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Kan niet voldoen aan de opgegeven Accept header." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Ongeldige media type \"{media_type}\" in aanvraag." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Aanvraag was verstikt." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Dit veld is vereist." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Dit veld mag niet leeg zijn." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" is een ongeldige booleanwaarde." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Dit veld mag niet leeg zijn." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Zorg ervoor dat dit veld niet meer dan {max_length} karakters bevat." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Zorg ervoor dat dit veld minimaal {min_length} karakters bevat." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Voer een geldig e-mailadres in." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." -msgstr "Deze waarde voldoet niet aan het vereisde formaat." +msgstr "Deze waarde voldoet niet aan het vereiste formaat." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Voer een geldige \"slug\" in, bestaande uit letters, cijfers, lage streepjes of streepjes." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Voer een geldige URL in." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" is een ongeldige UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Voer een geldig IPv4- of IPv6-adres in." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Een geldig getal is vereist." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Zorg ervoor dat deze waarde kleiner is dan of gelijk is aan {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Zorg ervoor dat deze waarde groter is dan of gelijk is aan {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Tekstwaarde is te lang." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Een geldig nummer is vereist." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Zorg ervoor dat er in totaal niet meer dan {max_digits} cijfers zijn." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Zorg ervoor dat er niet meer dan {max_decimal_places} cijfers achter de komma zijn." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Zorg ervoor dat er niet meer dan {max_whole_digits} cijfers voor de komma zijn." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datetime heeft een ongeldig formaat, gebruik 1 van de volgende formaten: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Verwachtte een datetime, maar kreeg een date." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Date heeft het verkeerde formaat, gebruik 1 van deze formaten: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Verwachtte een date, maar kreeg een datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Time heeft het verkeerde formaat, gebruik 1 van onderstaande formaten: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Tijdsduur heeft een verkeerd formaat, gebruik 1 van onderstaande formaten: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" is een ongeldige keuze." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Meer dan {count} items..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Verwachtte een lijst met items, maar kreeg type \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Deze selectie mag niet leeg zijn." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" is niet een geldig pad." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Er is geen bestand opgestuurd." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "De verstuurde data was geen bestand. Controleer de encoding type op het formulier." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Bestandsnaam kon niet vastgesteld worden." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Het verstuurde bestand is leeg." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Zorg ervoor dat deze bestandsnaam hoogstens {max_length} karakters heeft (het heeft er {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Upload een geldige afbeelding, de geüploade afbeelding is geen afbeelding of is beschadigd geraakt," -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Deze lijst mag niet leeg zijn." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Verwachtte een dictionary van items, maar kreeg type \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Waarde moet valide JSON zijn." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Verzenden" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Zoek" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sorteer op" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "oplopend" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "aflopend" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Ongeldige pagina." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Ongeldige cursor." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Ongeldige pk \"{pk_value}\" - object bestaat niet." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Ongeldig type. Verwacht een pk-waarde, ontving {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Ongeldige hyperlink - Geen overeenkomende URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Ongeldige hyperlink - Ongeldige URL" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Ongeldige hyperlink - Object bestaat niet." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Ongeldig type. Verwacht een URL, ontving {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Object met {slug_name}={value} bestaat niet." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Ongeldige waarde." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Ongeldige data. Verwacht een dictionary, kreeg een {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filters" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Veldfilters" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Sorteer op" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Zoek" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Geen" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Geen items geselecteerd." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Dit veld moet uniek zijn." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "De velden {field_names} moeten een unieke set zijn." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Dit veld moet uniek zijn voor de \"{date_field}\" datum." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Dit veld moet uniek zijn voor de \"{date_field}\" maand." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Dit veld moet uniek zijn voor de \"{date_field}\" year." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Ongeldige versie in \"Accept\" header." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Ongeldige versie in URL-pad." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Ongeldige versie in het URL pad, komt niet overeen met een geldige versie namespace" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Ongeldige versie in hostnaam." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Ongeldige versie in query parameter." - -#: views.py:88 -msgid "Permission denied." -msgstr "Toestemming geweigerd." diff --git a/rest_framework/locale/pl/LC_MESSAGES/django.mo b/rest_framework/locale/pl/LC_MESSAGES/django.mo index 436580b35..f265186ae 100644 Binary files a/rest_framework/locale/pl/LC_MESSAGES/django.mo and b/rest_framework/locale/pl/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/pl/LC_MESSAGES/django.po b/rest_framework/locale/pl/LC_MESSAGES/django.po index 611426556..9e8d3eac3 100644 --- a/rest_framework/locale/pl/LC_MESSAGES/django.po +++ b/rest_framework/locale/pl/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Janusz Harkot , 2015 +# Janusz Harkot , 2015 # Piotr Jakimiak , 2015 # m_aciek , 2016 # m_aciek , 2015-2016 @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: m_aciek \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Polish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,40 +21,40 @@ msgstr "" "Language: pl\n" "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Niepoprawny podstawowy nagłówek. Brak danych uwierzytelniających." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Niepoprawny podstawowy nagłówek. Ciąg znaków danych uwierzytelniających nie powinien zawierać spacji." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Niepoprawny podstawowy nagłówek. Niewłaściwe kodowanie base64 danych uwierzytelniających." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Niepoprawna nazwa użytkownika lub hasło." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Użytkownik nieaktywny lub usunięty." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Niepoprawny nagłówek tokena. Brak danych uwierzytelniających." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Niepoprawny nagłówek tokena. Token nie może zawierać odstępów." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Błędny nagłówek z tokenem. Token nie może zawierać błędnych znaków." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Niepoprawny token." @@ -62,382 +62,515 @@ msgstr "Niepoprawny token." msgid "Auth Token" msgstr "Token uwierzytelniający" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Klucz" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Użytkownik" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Stworzono" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokeny" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Nazwa użytkownika" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Hasło" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Konto użytkownika jest nieaktywne." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Podane dane uwierzytelniające nie pozwalają na zalogowanie." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Musi zawierać \"username\" i \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Wystąpił błąd serwera." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Zniekształcone żądanie." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Błędne dane uwierzytelniające." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Nie podano danych uwierzytelniających." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Nie masz uprawnień, by wykonać tę czynność." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nie znaleziono." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Niedozwolona metoda \"{method}\"." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Nie można zaspokoić nagłówka Accept żądania." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Brak wsparcia dla żądanego typu danych \"{media_type}\"." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Żądanie zostało zdławione." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "To pole jest wymagane." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Pole nie może mieć wartości null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" nie jest poprawną wartością logiczną." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "To pole nie może być puste." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Upewnij się, że to pole ma nie więcej niż {max_length} znaków." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Upewnij się, że pole ma co najmniej {min_length} znaków." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Podaj poprawny adres e-mail." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Ta wartość nie pasuje do wymaganego wzorca." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Wprowadź poprawną wartość pola typu \"slug\", składającą się ze znaków łacińskich, cyfr, podkreślenia lub myślnika." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Wprowadź poprawny adres URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" nie jest poprawnym UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Wprowadź poprawny adres IPv4 lub IPv6." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Wymagana poprawna liczba całkowita." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Upewnij się, że ta wartość jest mniejsza lub równa {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Upewnij się, że ta wartość jest większa lub równa {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Za długi ciąg znaków." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Wymagana poprawna liczba." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Upewnij się, że liczba ma nie więcej niż {max_digits} cyfr." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Upewnij się, że liczba ma nie więcej niż {max_decimal_places} cyfr dziesiętnych." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Upewnij się, że liczba ma nie więcej niż {max_whole_digits} cyfr całkowitych." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Wartość daty z czasem ma zły format. Użyj jednego z dostępnych formatów: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Oczekiwano datę z czasem, otrzymano tylko datę." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Data ma zły format. Użyj jednego z tych formatów: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Oczekiwano daty a otrzymano datę z czasem." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Błędny format czasu. Użyj jednego z dostępnych formatów: {format}" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Czas trwania ma zły format. Użyj w zamian jednego z tych formatów: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" nie jest poprawnym wyborem." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Więcej niż {count} elementów..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Oczekiwano listy elementów, a otrzymano dane typu \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Zaznaczenie nie może być puste." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" nie jest poprawną ścieżką." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Nie przesłano pliku." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Przesłane dane nie były plikiem. Sprawdź typ kodowania formatki." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Nie można określić nazwy pliku." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Przesłany plik jest pusty." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Upewnij się, że nazwa pliku ma długość co najwyżej {max_length} znaków (aktualnie ma {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Prześlij poprawny plik graficzny. Przesłany plik albo nie jest grafiką lub jest uszkodzony." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Lista nie może być pusta." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Oczekiwano słownika, ale otrzymano \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Wartość musi być poprawnym ciągiem znaków JSON" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Wyślij" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Szukaj" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Kolejność" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "rosnąco" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "malejąco" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Niepoprawna strona." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Niepoprawny wskaźnik" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Błędny klucz główny \"{pk_value}\" - obiekt nie istnieje." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Błędny typ danych. Oczekiwano wartość klucza głównego, otrzymano {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Błędny hyperlink - nie znaleziono pasującego adresu URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Błędny hyperlink - błędne dopasowanie adresu URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Błędny hyperlink - obiekt nie istnieje." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Błędny typ danych. Oczekiwano adresu URL, otrzymano {data_type}" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Obiekt z polem {slug_name}={value} nie istnieje" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Niepoprawna wartość." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Niepoprawne dane. Oczekiwano słownika, otrzymano {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtry" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Pola filtrów" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Kolejność" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Szukaj" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "None" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Nie wybrano wartości." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Wartość dla tego pola musi być unikalna." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Pola {field_names} muszą tworzyć unikalny zestaw." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "To pole musi mieć unikalną wartość dla jednej daty z pola \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "To pole musi mieć unikalną wartość dla konkretnego miesiąca z pola \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "To pole musi mieć unikalną wartość dla konkretnego roku z pola \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Błędna wersja w nagłówku \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Błędna wersja w ścieżce URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Niepoprawna wersja w ścieżce URL. Nie pasuje do przestrzeni nazw żadnej wersji." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Błędna wersja w nazwie hosta." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Błędna wersja w parametrach zapytania." - -#: views.py:88 -msgid "Permission denied." -msgstr "Brak uprawnień." diff --git a/rest_framework/locale/pt/LC_MESSAGES/django.mo b/rest_framework/locale/pt/LC_MESSAGES/django.mo index c88991bfa..653cce97e 100644 Binary files a/rest_framework/locale/pt/LC_MESSAGES/django.mo and b/rest_framework/locale/pt/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/pt/LC_MESSAGES/django.po b/rest_framework/locale/pt/LC_MESSAGES/django.po index 9f1de1938..4cdf2bc4f 100644 --- a/rest_framework/locale/pt/LC_MESSAGES/django.po +++ b/rest_framework/locale/pt/LC_MESSAGES/django.po @@ -3,13 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Craig Blaszczyk , 2015 +# Ederson Mota Pereira , 2015 +# Filipe Rinaldi , 2015 +# Hugo Leonardo Chalhoub Mendonça , 2015 +# Jonatas Baldin , 2017 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2016-07-12 15:14+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Portuguese (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/pt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,423 +22,556 @@ msgstr "" "Language: pt\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." -msgstr "" +msgstr "Cabeçalho básico inválido. Credenciais não fornecidas." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "" +msgstr "Cabeçalho básico inválido. String de credenciais não deve incluir espaços." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "" +msgstr "Cabeçalho básico inválido. Credenciais codificadas em base64 incorretamente." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." -msgstr "" +msgstr "Usuário ou senha inválido." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." -msgstr "" +msgstr "Usuário inativo ou removido." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "" +msgstr "Cabeçalho de token inválido. Credenciais não fornecidas." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "" +msgstr "Cabeçalho de token inválido. String de token não deve incluir espaços." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "" +msgstr "Cabeçalho de token inválido. String de token não deve possuir caracteres inválidos." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." -msgstr "" +msgstr "Token inválido." #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "Token de autenticação" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "Chave" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Usuário" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "Criado" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "Tokens" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Nome do usuário" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Senha" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "" +msgstr "Impossível fazer login com as credenciais fornecidas." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "" +msgstr "Obrigatório incluir \"usuário\" e \"senha\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." +msgstr "Ocorreu um erro de servidor." + +#: exceptions.py:142 +msgid "Invalid input." msgstr "" -#: exceptions.py:84 +#: exceptions.py:161 msgid "Malformed request." -msgstr "" +msgstr "Pedido malformado." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." -msgstr "" +msgstr "Credenciais de autenticação incorretas." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." -msgstr "" +msgstr "As credenciais de autenticação não foram fornecidas." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "" +msgstr "Você não tem permissão para executar essa ação." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." -msgstr "" +msgstr "Não encontrado." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "" +msgstr "Método \"{method}\" não é permitido." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "Não foi possível satisfazer a requisição do cabeçalho Accept." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." -msgstr "" +msgstr "Tipo de mídia \"{media_type}\" no pedido não é suportado." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." +msgstr "Pedido foi limitado." + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." -msgstr "" +msgstr "Este campo é obrigatório." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." +msgstr "Este campo não pode ser nulo." + +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:766 +msgid "Not a valid string." msgstr "" -#: fields.py:674 +#: fields.py:767 msgid "This field may not be blank." -msgstr "" +msgstr "Este campo não pode ser em branco." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "" +msgstr "Certifique-se de que este campo não tenha mais de {max_length} caracteres." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "" +msgstr "Certifique-se de que este campo tenha mais de {min_length} caracteres." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "" +msgstr "Insira um endereço de email válido." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." -msgstr "" +msgstr "Este valor não corresponde ao padrão exigido." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." +msgstr "Entrar um \"slug\" válido que consista de letras, números, sublinhados ou hífens." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." msgstr "" -#: fields.py:747 +#: fields.py:854 msgid "Enter a valid URL." +msgstr "Entrar um URL válido." + +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "" - -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "" +msgstr "Informe um endereço IPv4 ou IPv6 válido." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." -msgstr "" +msgstr "Um número inteiro válido é exigido." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "" +msgstr "Certifique-se de que este valor seja inferior ou igual a {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "" +msgstr "Certifque-se de que este valor seja maior ou igual a {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." -msgstr "" +msgstr "Valor da string é muito grande." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." -msgstr "" +msgstr "Um número válido é necessário." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." -msgstr "" +msgstr "Certifique-se de que não haja mais de {max_digits} dígitos no total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "" +msgstr "Certifique-se de que não haja mais de {max_decimal_places} casas decimais." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." -msgstr "" +msgstr "Certifique-se de que não haja mais de {max_whole_digits} dígitos antes do ponto decimal." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Formato inválido para data e hora. Use um dos formatos a seguir: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." +msgstr "Necessário uma data e hora mas recebeu uma data." + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." msgstr "" -#: fields.py:1103 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Formato inválido para data. Use um dos formatos a seguir: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." -msgstr "" +msgstr "Necessário uma data mas recebeu uma data e hora." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Formato inválido para Tempo. Use um dos formatos a seguir: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Formato inválido para Duração. Use um dos formatos a seguir: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "" +msgstr "\"{input}\" não é um escolha válido." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "Mais de {count} itens..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "" +msgstr "Necessário uma lista de itens, mas recebeu tipo \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "Esta seleção não pode estar vazia." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "" +msgstr "\"{input}\" não é uma escolha válida para um caminho." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." -msgstr "" +msgstr "Nenhum arquivo foi submetido." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." -msgstr "" +msgstr "O dado submetido não é um arquivo. Certifique-se do tipo de codificação no formulário." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." -msgstr "" +msgstr "Nome do arquivo não pode ser determinado." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." -msgstr "" +msgstr "O arquivo submetido está vázio." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "" +msgstr "Certifique-se de que o nome do arquivo tem menos de {max_length} caracteres (tem {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." -msgstr "" +msgstr "Fazer upload de uma imagem válida. O arquivo enviado não é um arquivo de imagem ou está corrompido." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "Esta lista não pode estar vazia." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Esperado um dicionário de itens mas recebeu tipo \"{input_type}\"." + +#: fields.py:1683 +msgid "This dictionary may not be empty." msgstr "" -#: fields.py:1549 +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "Valor devo ser JSON válido." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Buscar" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordenando" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "ascendente" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "descendente" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "Página inválida." + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" -msgstr "" +msgstr "Cursor inválido" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "Pk inválido \"{pk_value}\" - objeto não existe." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "" +msgstr "Tipo incorreto. Esperado valor pk, recebeu {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." -msgstr "" +msgstr "Hyperlink inválido - Sem combinação para a URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" +msgstr "Hyperlink inválido - Combinação URL incorreta." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." -msgstr "" +msgstr "Hyperlink inválido - Objeto não existe." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "" +msgstr "Tipo incorreto. Necessário string URL, recebeu {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." -msgstr "" +msgstr "Objeto com {slug_name}={value} não existe." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." +msgstr "Valor inválido." + +#: schemas/utils.py:32 +msgid "unique integer value" msgstr "" -#: serializers.py:326 -msgid "Invalid data. Expected a dictionary, but got {datatype}." +#: schemas/utils.py:34 +msgid "UUID string" msgstr "" +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "Dado inválido. Necessário um dicionário mas recebeu {datatype}." + #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "Filtra" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "Nenhum(a/as)" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "Nenhum item para escholher." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." -msgstr "" +msgstr "Esse campo deve ser único." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." +msgstr "Os campos {field_names} devem criar um set único." + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." msgstr "" -#: validators.py:245 +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." -msgstr "" +msgstr "O campo \"{date_field}\" deve ser único para a data." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." -msgstr "" +msgstr "O campo \"{date_field}\" deve ser único para o mês." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." -msgstr "" +msgstr "O campo \"{date_field}\" deve ser único para o ano." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." -msgstr "" +msgstr "Versão inválida no cabeçalho \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." -msgstr "" +msgstr "Versão inválida no caminho de URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Versão inválida no caminho da URL. Não corresponde a nenhuma versão do namespace." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." -msgstr "" +msgstr "Versão inválida no hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." -msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" +msgstr "Versão inválida no parâmetro de query." diff --git a/rest_framework/locale/pt_BR/LC_MESSAGES/django.mo b/rest_framework/locale/pt_BR/LC_MESSAGES/django.mo index 008629823..5a6e3788e 100644 Binary files a/rest_framework/locale/pt_BR/LC_MESSAGES/django.mo and b/rest_framework/locale/pt_BR/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/pt_BR/LC_MESSAGES/django.po b/rest_framework/locale/pt_BR/LC_MESSAGES/django.po index 9489f20a0..40651552d 100644 --- a/rest_framework/locale/pt_BR/LC_MESSAGES/django.po +++ b/rest_framework/locale/pt_BR/LC_MESSAGES/django.po @@ -3,6 +3,7 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Cloves Oliveira , 2020 # Craig Blaszczyk , 2015 # Ederson Mota Pereira , 2015 # Filipe Rinaldi , 2015 @@ -12,9 +13,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-12-06 09:53+0000\n" -"Last-Translator: Jonatas Baldin \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,40 +23,40 @@ msgstr "" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Cabeçalho básico inválido. Credenciais não fornecidas." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Cabeçalho básico inválido. String de credenciais não deve incluir espaços." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Cabeçalho básico inválido. Credenciais codificadas em base64 incorretamente." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Usuário ou senha inválido." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Usuário inativo ou removido." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Cabeçalho de token inválido. Credenciais não fornecidas." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Cabeçalho de token inválido. String de token não deve incluir espaços." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Cabeçalho de token inválido. String de token não deve possuir caracteres inválidos." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Token inválido." @@ -63,382 +64,515 @@ msgstr "Token inválido." msgid "Auth Token" msgstr "Token de autenticação" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Chave" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Usuário" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Criado" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Nome do usuário" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Senha" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Conta de usuário desabilitada." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Impossível fazer login com as credenciais fornecidas." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Obrigatório incluir \"usuário\" e \"senha\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Ocorreu um erro de servidor." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Pedido malformado." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Credenciais de autenticação incorretas." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "As credenciais de autenticação não foram fornecidas." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Você não tem permissão para executar essa ação." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Não encontrado." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Método \"{method}\" não é permitido." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Não foi possível satisfazer a requisição do cabeçalho Accept." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Tipo de mídia \"{media_type}\" no pedido não é suportado." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Pedido foi limitado." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Este campo é obrigatório." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Este campo não pode ser nulo." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" não é um valor boleano válido." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Este campo não pode ser em branco." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Certifique-se de que este campo não tenha mais de {max_length} caracteres." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Certifique-se de que este campo tenha mais de {min_length} caracteres." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Insira um endereço de email válido." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Este valor não corresponde ao padrão exigido." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Entrar um \"slug\" válido que consista de letras, números, sublinhados ou hífens." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Entrar um URL válido." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" não é um UUID válido." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Informe um endereço IPv4 ou IPv6 válido." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Um número inteiro válido é exigido." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Certifique-se de que este valor seja inferior ou igual a {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Certifque-se de que este valor seja maior ou igual a {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Valor da string é muito grande." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Um número válido é necessário." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Certifique-se de que não haja mais de {max_digits} dígitos no total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Certifique-se de que não haja mais de {max_decimal_places} casas decimais." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Certifique-se de que não haja mais de {max_whole_digits} dígitos antes do ponto decimal." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Formato inválido para data e hora. Use um dos formatos a seguir: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Necessário uma data e hora mas recebeu uma data." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Formato inválido para data. Use um dos formatos a seguir: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Necessário uma data mas recebeu uma data e hora." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Formato inválido para Tempo. Use um dos formatos a seguir: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Formato inválido para Duração. Use um dos formatos a seguir: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" não é um escolha válido." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Mais de {count} itens..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Necessário uma lista de itens, mas recebeu tipo \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Esta seleção não pode estar vazia." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" não é uma escolha válida para um caminho." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Nenhum arquivo foi submetido." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "O dado submetido não é um arquivo. Certifique-se do tipo de codificação no formulário." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Nome do arquivo não pode ser determinado." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "O arquivo submetido está vázio." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Certifique-se de que o nome do arquivo tem menos de {max_length} caracteres (tem {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Fazer upload de uma imagem válida. O arquivo enviado não é um arquivo de imagem ou está corrompido." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Esta lista não pode estar vazia." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Esperado um dicionário de itens mas recebeu tipo \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Valor devo ser JSON válido." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Enviar" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Buscar" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordenando" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "ascendente" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "descendente" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Página inválida." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Cursor inválido" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Pk inválido \"{pk_value}\" - objeto não existe." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Tipo incorreto. Esperado valor pk, recebeu {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Hyperlink inválido - Sem combinação para a URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Hyperlink inválido - Combinação URL incorreta." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Hyperlink inválido - Objeto não existe." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Tipo incorreto. Necessário string URL, recebeu {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objeto com {slug_name}={value} não existe." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Valor inválido." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Dado inválido. Necessário um dicionário mas recebeu {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" -msgstr "Filtra" +msgstr "Filtros" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Filtra de campo" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordenando" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Buscar" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Nenhum(a/as)" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Nenhum item para escholher." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Esse campo deve ser único." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Os campos {field_names} devem criar um set único." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "O campo \"{date_field}\" deve ser único para a data." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "O campo \"{date_field}\" deve ser único para o mês." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "O campo \"{date_field}\" deve ser único para o ano." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Versão inválida no cabeçalho \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Versão inválida no caminho de URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Versão inválida no caminho da URL. Não corresponde a nenhuma versão do namespace." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Versão inválida no hostname." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Versão inválida no parâmetro de query." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permissão negada." diff --git a/rest_framework/locale/ro/LC_MESSAGES/django.mo b/rest_framework/locale/ro/LC_MESSAGES/django.mo index 0d6f6f942..0c9fb9c56 100644 Binary files a/rest_framework/locale/ro/LC_MESSAGES/django.mo and b/rest_framework/locale/ro/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ro/LC_MESSAGES/django.po b/rest_framework/locale/ro/LC_MESSAGES/django.po index d144d847e..0c9e900e3 100644 --- a/rest_framework/locale/ro/LC_MESSAGES/django.po +++ b/rest_framework/locale/ro/LC_MESSAGES/django.po @@ -3,14 +3,15 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Bogdan Mateescu, 2019 # Elena-Adela Neacsu , 2016 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Romanian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,40 +19,40 @@ msgstr "" "Language: ro\n" "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Antet de bază invalid. Datele de autentificare nu au fost furnizate." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Antet de bază invalid. Şirul de caractere cu datele de autentificare nu trebuie să conțină spații." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Antet de bază invalid. Datele de autentificare nu au fost corect codificate în base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Nume utilizator / Parolă invalid(ă)." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Utilizator inactiv sau șters." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Antet token invalid. Datele de autentificare nu au fost furnizate." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Antet token invalid. Şirul de caractere pentru token nu trebuie să conțină spații." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Antet token invalid. Şirul de caractere pentru token nu trebuie să conțină caractere nevalide." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Token nevalid." @@ -59,382 +60,515 @@ msgstr "Token nevalid." msgid "Auth Token" msgstr "Token de autentificare" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Cheie" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Utilizator" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Creat" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokenuri" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Nume de utilizator" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Parola" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Contul de utilizator este dezactivat." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Nu se poate conecta cu datele de conectare furnizate." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Trebuie să includă \"numele de utilizator\" și \"parola\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "A apărut o eroare pe server." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Cerere incorectă." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Date de autentificare incorecte." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Datele de autentificare nu au fost furnizate." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Nu aveți permisiunea de a efectua această acțiune." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nu a fost găsit(ă)." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metoda \"{method}\" nu este permisa." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Antetul Accept al cererii nu a putut fi îndeplinit." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Cererea conține tipul media neacceptat \"{media_type}\"" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Cererea a fost gâtuită." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Acest câmp este obligatoriu." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Acest câmp nu poate fi nul." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" nu este un boolean valid." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Acest câmp nu poate fi gol." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Asigurați-vă că acest câmp nu are mai mult de {max_length} caractere." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Asigurați-vă că acest câmp are cel puțin{min_length} caractere." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Introduceți o adresă de email validă." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Această valoare nu se potrivește cu şablonul cerut." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Introduceți un \"slug\" valid format din litere, numere, caractere de subliniere sau cratime." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Introduceți un URL valid." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" nu este un UUID valid." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Introduceți o adresă IPv4 sau IPv6 validă." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Este necesar un întreg valid." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Asigurați-vă că această valoare este mai mică sau egală cu {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Asigurați-vă că această valoare este mai mare sau egală cu {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Valoare șir de caractere prea mare." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Este necesar un număr valid." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Asigurați-vă că nu există mai mult de {max_digits} cifre în total." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Asigurați-vă că nu există mai mult de {max_decimal_places} zecimale." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Asigurați-vă că nu există mai mult de {max_whole_digits} cifre înainte de punctul zecimal." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Câmpul datetime are format greșit. Utilizați unul dintre aceste formate în loc: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Se aștepta un câmp datetime, dar s-a primit o dată." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Data are formatul greșit. Utilizați unul dintre aceste formate în loc: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Se aștepta o dată, dar s-a primit un câmp datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Timpul are formatul greșit. Utilizați unul dintre aceste formate în loc: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Durata are formatul greșit. Utilizați unul dintre aceste formate în loc: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" nu este o opțiune validă." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Mai mult de {count} articole ..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Se aștepta o listă de elemente, dar s-a primit tip \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Această selecție nu poate fi goală." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" nu este o cale validă." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." -msgstr "Nici un fișier nu a fost sumis." +msgstr "Nu a fost trimis nici un fișier." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Datele prezentate nu sunt un fișier. Verificați tipul de codificare de pe formular." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Numele fișierului nu a putut fi determinat." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." -msgstr "Fișierul sumis este gol." +msgstr "Fișierul trimis este gol." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Asigurați-vă că acest nume de fișier are cel mult {max_length} caractere (momentan are {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Încărcați o imagine validă. Fișierul încărcat a fost fie nu o imagine sau o imagine coruptă." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Această listă nu poate fi goală." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Se aștepta un dicționar de obiecte, dar s-a primit tipul \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Valoarea trebuie să fie JSON valid." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Sumiteţi" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Căutare" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordonare" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "ascendent" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "descendent" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Pagină nevalidă." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Cursor nevalid" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Pk \"{pk_value}\" nevalid - obiectul nu există." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Tip incorect. Se aștepta un pk, dar s-a primit \"{data_type}\"." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Hyperlink nevalid - Nici un URL nu se potrivește." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Hyperlink nevalid - Potrivire URL incorectă." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Hyperlink nevalid - Obiectul nu există." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Tip incorect. Se aștepta un URL, dar s-a primit \"{data_type}\"." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Obiectul cu {slug_name}={value} nu există." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Valoare nevalidă." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Date nevalide. Se aștepta un dicționar de obiecte, dar s-a primit \"{datatype}\"." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtre" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Filtre câmpuri" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordonare" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Căutare" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Nici unul/una" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Nu există elemente pentru a fi selectate." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Acest câmp trebuie să fie unic." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Câmpurile {field_names} trebuie să formeze un set unic." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Acest câmp trebuie să fie unic pentru data \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Acest câmp trebuie să fie unic pentru luna \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Acest câmp trebuie să fie unic pentru anul \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Versiune nevalidă în antetul \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Versiune nevalidă în calea URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Versiune nevalidă în calea URL. Nu se potrivește cu niciun spațiu de nume al versiunii." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Versiune nevalidă în numele de gazdă." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." -msgstr "Versiune nevalid în parametrul de interogare." - -#: views.py:88 -msgid "Permission denied." -msgstr "Permisiune refuzată." +msgstr "Versiune nevalidă în parametrul de interogare." diff --git a/rest_framework/locale/ru/LC_MESSAGES/django.mo b/rest_framework/locale/ru/LC_MESSAGES/django.mo index 85918d65a..82688a412 100644 Binary files a/rest_framework/locale/ru/LC_MESSAGES/django.mo and b/rest_framework/locale/ru/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ru/LC_MESSAGES/django.po b/rest_framework/locale/ru/LC_MESSAGES/django.po index 7e09b227e..30df5d496 100644 --- a/rest_framework/locale/ru/LC_MESSAGES/django.po +++ b/rest_framework/locale/ru/LC_MESSAGES/django.po @@ -3,18 +3,20 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Anton Bazhanov , 2018 # Grigory Mishchenko , 2017 # Kirill Tarasenko, 2015 # koodjo , 2015 # Mike TUMS , 2015 # Sergei Sinitsyn , 2016 +# Val Grom , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Grigory Mishchenko \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Russian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,40 +24,40 @@ msgstr "" "Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Недопустимый заголовок. Не предоставлены учетные данные." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Недопустимый заголовок. Учетные данные не должны содержать пробелов." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Недопустимый заголовок. Учетные данные некорректно закодированны в base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Недопустимые имя пользователя или пароль." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Пользователь неактивен или удален." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Недопустимый заголовок токена. Не предоставлены учетные данные." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Недопустимый заголовок токена. Токен не должен содержать пробелов." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Недопустимый заголовок токена. Токен не должен содержать недопустимые символы." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Недопустимый токен." @@ -63,382 +65,515 @@ msgstr "Недопустимый токен." msgid "Auth Token" msgstr "Токен аутентификации" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Ключ" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Пользователь" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Создан" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Токен" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Токены" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Имя пользователя" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Пароль" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Учетная запись пользователя отключена." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Невозможно войти с предоставленными учетными данными." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Должен включать \"username\" и \"password\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Произошла ошибка сервера." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Искаженный запрос." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Некорректные учетные данные." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Учетные данные не были предоставлены." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "У вас нет прав для выполнения этой операции." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Не найдено." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Метод \"{method}\" не разрешен." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Невозможно удовлетворить \"Accept\" заголовок запроса." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Неподдерживаемый тип данных \"{media_type}\" в запросе." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Запрос был проигнорирован." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Это поле обязательно." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Это поле не может быть null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" не является корректным булевым значением." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Это поле не может быть пустым." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Убедитесь, что в этом поле не больше {max_length} символов." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Убедитесь, что в этом поле как минимум {min_length} символов." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Введите корректный адрес электронной почты." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Значение не соответствует требуемому паттерну." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Введите корректный \"slug\", состоящий из букв, цифр, знаков подчеркивания или дефисов." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Введите корректный URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" не является корректным UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Введите действительный адрес IPv4 или IPv6." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Требуется целочисленное значение." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Убедитесь, что значение меньше или равно {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Убедитесь, что значение больше или равно {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Слишком длинное значение." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Требуется численное значение." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Убедитесь, что в числе не больше {max_digits} знаков." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Убедитесь, что в числе не больше {max_decimal_places} знаков в дробной части." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Убедитесь, что в числе не больше {max_whole_digits} знаков в целой части." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Неправильный формат datetime. Используйте один из этих форматов: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Ожидался datetime, но был получен date." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Неправильный формат date. Используйте один из этих форматов: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Ожидался date, но был получен datetime." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Неправильный формат времени. Используйте один из этих форматов: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Неправильный формат. Используйте один из этих форматов: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" не является корректным значением." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Элементов больше чем {count}" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Ожидался list со значениями, но был получен \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Выбор не может быть пустым." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" не является корректным путем до файла" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Не был загружен файл." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Загруженный файл не является корректным файлом." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Невозможно определить имя файла." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Загруженный файл пуст." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Убедитесь, что имя файла меньше {max_length} символов (сейчас {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Загрузите корректное изображение. Загруженный файл не является изображением, либо является испорченным." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Этот список не может быть пустым." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Ожидался словарь со значениями, но был получен \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Значение должно быть правильным JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Отправить" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Поиск" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Порядок сортировки" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "по возрастанию" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "по убыванию" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Неправильная страница" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Не корректный курсор" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Недопустимый первичный ключ \"{pk_value}\" - объект не существует." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Некорректный тип. Ожидалось значение первичного ключа, получен {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Недопустимая ссылка - нет совпадения по URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Недопустимая ссылка - некорректное совпадение по URL," -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Недопустимая ссылка - объект не существует." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Некорректный тип. Ожидался URL, получен {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Объект с {slug_name}={value} не существует." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Недопустимое значение." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Недопустимые данные. Ожидался dictionary, но был получен {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Фильтры" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Фильтры полей" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Порядок сортировки" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Поиск" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Ничего" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Нет элементов для выбора" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Это поле должно быть уникально." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Поля {field_names} должны производить массив с уникальными значениями." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Это поле должно быть уникально для даты \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Это поле должно быть уникально для месяца \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Это поле должно быть уникально для года \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Недопустимая версия в заголовке \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Недопустимая версия в пути URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Недопустимая версия в пути URL. Не соответствует ни одному version namespace." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Недопустимая версия в имени хоста." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Недопустимая версия в параметре запроса." - -#: views.py:88 -msgid "Permission denied." -msgstr "Доступ запрещен" diff --git a/rest_framework/locale/ru_RU/LC_MESSAGES/django.mo b/rest_framework/locale/ru_RU/LC_MESSAGES/django.mo new file mode 100644 index 000000000..d6da8f432 Binary files /dev/null and b/rest_framework/locale/ru_RU/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/ru_RU/LC_MESSAGES/django.po b/rest_framework/locale/ru_RU/LC_MESSAGES/django.po new file mode 100644 index 000000000..9fb926a85 --- /dev/null +++ b/rest_framework/locale/ru_RU/LC_MESSAGES/django.po @@ -0,0 +1,573 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Anton Bazhanov , 2018-2019 +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Russian (Russia) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ru_RU/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru_RU\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "" + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "" + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "" + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "Пожалуйста, введите корректные имя пользователя и пароль учётной записи. Оба поля могут быть чувствительны к регистру." + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "Пользователь неактивен или удален." + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "" + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "" + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "" + +#: authentication.py:203 +msgid "Invalid token." +msgstr "" + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "Ключ" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Пользователь" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "Имя пользователя" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "Пароль" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "" + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "" + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "Ошибка сервера." + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "" + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "" + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "" + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "У вас недостаточно прав для выполнения данного действия." + +#: exceptions.py:185 +msgid "Not found." +msgstr "Страница не найдена." + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "" + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "" + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "" + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "" + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "Обязательное поле." + +#: fields.py:317 +msgid "This field may not be null." +msgstr "Это поле не может быть пустым." + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "Это поле не может быть пустым." + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "Убедитесь, что это значение содержит не более {max_length} символов." + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "Убедитесь, что это значение содержит не менее {min_length} символов." + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "Введите правильный адрес электронной почты." + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "" + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "Значение должно состоять только из букв, цифр, символов подчёркивания или дефисов, входящих в стандарт Юникод." + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "Введите правильный URL." + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Введите действительный IPv4 или IPv6 адрес." + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "Введите правильное число." + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "Убедитесь, что это значение меньше либо равно {max_value}." + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "Убедитесь, что это значение больше либо равно {min_value}." + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "" + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "" + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "Убедитесь, что вы ввели не более {max_digits} цифры." + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "Убедитесь, что вы ввели не более {max_decimal_places} цифры после запятой." + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "Убедитесь, что вы ввели не более {max_whole_digits} цифры перед запятой." + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "" + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "" + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "" + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "" + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "" + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "" + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "Значения {input} нет среди допустимых вариантов." + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "" + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "" + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "" + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "" + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "Ни одного файла не было отправлено." + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "" + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "" + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "Отправленный файл пуст." + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "Убедитесь, что это имя файла содержит не более {max_length} символов (сейчас {length})." + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "Загрузите правильное изображение. Файл, который вы загрузили, поврежден или не является изображением." + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "" + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "" + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Сортировка" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "по возрастанию" + +#: filters.py:288 +msgid "descending" +msgstr "по убыванию" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "" + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "" + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "" + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "" + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "" + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "" + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "" + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "" + +#: relations.py:449 +msgid "Invalid value." +msgstr "Введите правильное значение." + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "" + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "Фильтры" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "" + +#: validators.py:39 +msgid "This field must be unique." +msgstr "Значения поля должны быть уникальны." + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "" + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "" + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "" + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "" + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "" + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "" + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "" + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "" + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr "" diff --git a/rest_framework/locale/sk/LC_MESSAGES/django.mo b/rest_framework/locale/sk/LC_MESSAGES/django.mo index c82ae3e09..561c98e98 100644 Binary files a/rest_framework/locale/sk/LC_MESSAGES/django.mo and b/rest_framework/locale/sk/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/sk/LC_MESSAGES/django.po b/rest_framework/locale/sk/LC_MESSAGES/django.po index 119430e90..d44e936d6 100644 --- a/rest_framework/locale/sk/LC_MESSAGES/django.po +++ b/rest_framework/locale/sk/LC_MESSAGES/django.po @@ -8,50 +8,50 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Slovak (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: sk\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Nesprávna hlavička. Neboli poskytnuté prihlasovacie údaje." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Nesprávna hlavička. Prihlasovacie údaje nesmú obsahovať medzery." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Nesprávna hlavička. Prihlasovacie údaje nie sú správne zakódované pomocou metódy base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Nesprávne prihlasovacie údaje." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Daný používateľ je neaktívny, alebo zmazaný." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Nesprávna token hlavička. Neboli poskytnuté prihlasovacie údaje." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Nesprávna token hlavička. Token hlavička nesmie obsahovať medzery." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Nesprávny token." @@ -59,382 +59,515 @@ msgstr "Nesprávny token." msgid "Auth Token" msgstr "" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Daný používateľ je zablokovaný." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "S danými prihlasovacími údajmi nebolo možné sa prihlásiť." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Musí obsahovať parametre \"používateľské meno\" a \"heslo\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Vyskytla sa chyba na strane servera." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Požiadavok má nesprávny formát, alebo je poškodený." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Nesprávne prihlasovacie údaje." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Prihlasovacie údaje neboli zadané." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "K danej akcii nemáte oprávnenie." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Nebolo nájdené." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metóda \"{method}\" nie je povolená." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Nie je možné vyhovieť požiadavku v hlavičke \"Accept\"." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Požiadavok obsahuje nepodporovaný media type: \"{media_type}\"." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Požiadavok bol obmedzený, z dôvodu prekročenia limitu." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Toto pole je povinné." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Toto pole nemôže byť nulové." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" je validný boolean." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Toto pole nemože byť prázdne." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Uistite sa, že toto pole nemá viac ako {max_length} znakov." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Uistite sa, že toto pole má viac ako {min_length} znakov." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Vložte správnu emailovú adresu." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Toto pole nezodpovedá požadovanému formátu." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Zadajte platný \"slug\", ktorý obsahuje len malé písmená, čísla, spojovník alebopodtržítko." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Zadajte platnú URL adresu." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" nie je platné UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Je vyžadované celé číslo." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Uistite sa, že hodnota je menšia alebo rovná {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Uistite sa, že hodnota je väčšia alebo rovná {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Zadaný textový reťazec je príliš dlhý." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Je vyžadované číslo." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Uistite sa, že hodnota neobsahuje viac ako {max_digits} cifier." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Uistite sa, že hodnota neobsahuje viac ako {max_decimal_places} desatinných miest." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Uistite sa, že hodnota neobsahuje viac ako {max_whole_digits} cifier pred desatinnou čiarkou." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Nesprávny formát dátumu a času. Prosím použite jeden z nasledujúcich formátov: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Vložený len dátum - date namiesto dátumu a času - datetime." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Nesprávny formát dátumu. Prosím použite jeden z nasledujúcich formátov: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Vložený dátum a čas - datetime namiesto jednoduchého dátumu - date." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Nesprávny formát času. Prosím použite jeden z nasledujúcich formátov: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" je nesprávny výber z daných možností." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Bol očakávaný zoznam položiek, no namiesto toho bol nájdený \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Nebol odoslaný žiadny súbor." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Odoslané dáta neobsahujú súbor. Prosím skontrolujte kódovanie - encoding type daného formuláru." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Nebolo možné určiť meno súboru." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Odoslaný súbor je prázdny." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Uistite sa, že meno súboru neobsahuje viac ako {max_length} znakov. (V skutočnosti ich má {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Uploadujte prosím obrázok. Súbor, ktorý ste uploadovali buď nie je obrázok, alebo daný obrázok je poškodený." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "" -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Bol očakávaný slovník položiek, no namiesto toho bol nájdený \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" msgstr "" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Nesprávny kurzor." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Nesprávny primárny kľúč \"{pk_value}\" - objekt s daným primárnym kľúčom neexistuje." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Nesprávny typ. Bol prijatý {data_type} namiesto primárneho kľúča." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Nesprávny hypertextový odkaz - žiadna zhoda." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Nesprávny hypertextový odkaz - chybná URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Nesprávny hypertextový odkaz - požadovný objekt neexistuje." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Nesprávny typ {data_type}. Požadovaný typ: hypertextový odkaz." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekt, ktorého atribút \"{slug_name}\" je \"{value}\" neexistuje." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Nesprávna hodnota." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Bol očakávaný slovník položiek, no namiesto toho bol nájdený \"{datatype}\"." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Táto položka musí byť unikátna." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Dané položky: {field_names} musia tvoriť musia spolu tvoriť unikátnu množinu." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Položka musí byť pre špecifický deň \"{date_field}\" unikátna." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Položka musí byť pre mesiac \"{date_field}\" unikátna." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Položka musí byť pre rok \"{date_field}\" unikátna." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Nesprávna verzia v \"Accept\" hlavičke." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Nesprávna verzia v URL adrese." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Nesprávna verzia v \"hostname\"." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Nesprávna verzia v parametri požiadavku." - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/sl/LC_MESSAGES/django.mo b/rest_framework/locale/sl/LC_MESSAGES/django.mo index 33aba7cf4..7ec83f821 100644 Binary files a/rest_framework/locale/sl/LC_MESSAGES/django.mo and b/rest_framework/locale/sl/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/sl/LC_MESSAGES/django.po b/rest_framework/locale/sl/LC_MESSAGES/django.po index 9af0fc8fc..205190383 100644 --- a/rest_framework/locale/sl/LC_MESSAGES/django.po +++ b/rest_framework/locale/sl/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Gregor Cimerman\n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Slovenian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,40 +18,40 @@ msgstr "" "Language: sl\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Napačno enostavno zagalvje. Ni podanih poverilnic." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Napačno enostavno zaglavje. Poverilniški niz ne sme vsebovati presledkov." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Napačno enostavno zaglavje. Poverilnice niso pravilno base64 kodirane." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Napačno uporabniško ime ali geslo." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Uporabnik neaktiven ali izbrisan." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Neveljaven žeton v zaglavju. Ni vsebovanih poverilnic." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Neveljaven žeton v zaglavju. Žeton ne sme vsebovati presledkov." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Neveljaven žeton v zaglavju. Žeton ne sme vsebovati napačnih znakov." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Neveljaven žeton." @@ -59,382 +59,515 @@ msgstr "Neveljaven žeton." msgid "Auth Token" msgstr "Prijavni žeton" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Ključ" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Uporabnik" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Ustvarjen" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Žeton" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Žetoni" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Uporabniško ime" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Geslo" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Uporabniški račun je onemogočen." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Neuspešna prijava s podanimi poverilnicami." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Mora vsebovati \"uporabniško ime\" in \"geslo\"." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Napaka na strežniku." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Okvarjen zahtevek." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Napačni avtentikacijski podatki." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Avtentikacijski podatki niso bili podani." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Nimate dovoljenj za izvedbo te akcije." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Ni najdeno" -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metoda \"{method}\" ni dovoljena" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Ni bilo mogoče zagotoviti zaglavja Accept zahtevka." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Nepodprt medijski tip \"{media_type}\" v zahtevku." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Zahtevek je bil pridržan." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "To polje je obvezno." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "To polje ne sme biti null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" ni veljaven boolean." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "To polje ne sme biti prazno." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "To polje ne sme biti daljše od {max_length} znakov." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "To polje mora vsebovati vsaj {min_length} znakov." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Vnesite veljaven elektronski naslov." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Ta vrednost ne ustreza zahtevanemu vzorcu." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Vnesite veljaven \"slug\", ki vsebuje črke, številke, podčrtaje ali vezaje." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Vnesite veljaven URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" ni veljaven UUID" +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Vnesite veljaven IPv4 ali IPv6 naslov." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Zahtevano je veljavno celo število." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Vrednost mora biti manjša ali enaka {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Vrednost mora biti večija ali enaka {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Niz je prevelik." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Zahtevano je veljavno število." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Vnesete lahko največ {max_digits} števk." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Vnesete lahko največ {max_decimal_places} decimalnih mest." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Vnesete lahko največ {max_whole_digits} števk pred decimalno piko." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datim in čas v napačnem formatu. Uporabite eno izmed naslednjih formatov: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Pričakovan datum in čas, prejet le datum." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Datum je v napačnem formatu. Uporabnite enega izmed naslednjih: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Pričakovan datum vendar prejet datum in čas." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Čas je v napačnem formatu. Uporabite enega izmed naslednjih: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Trajanje je v napačnem formatu. Uporabite enega izmed naslednjih: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" ni veljavna izbira." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Več kot {count} elementov..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Pričakovan seznam elementov vendar prejet tip \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Ta izbria ne sme ostati prazna." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" ni veljavna izbira poti." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Datoteka ni bila oddana." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Oddani podatki niso datoteka. Preverite vrsto kodiranja na formi." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Imena datoteke ni bilo mogoče določiti." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Oddana datoteka je prazna." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Ime datoteke lahko vsebuje največ {max_length} znakov (ta jih ima {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Naložite veljavno sliko. Naložena datoteka ni bila slika ali pa je okvarjena." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Seznam ne sme biti prazen." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Pričakovan je slovar elementov, prejet element je tipa \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Vrednost mora biti veljaven JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Potrdi" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Iskanje" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Razvrščanje" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "naraščujoče" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "padajoče" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Neveljavna stran." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Neveljaven kazalec" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Neveljaven pk \"{pk_value}\" - objekt ne obstaja." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Neveljaven tip. Pričakovana vrednost pk, prejet {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Neveljavna povezava - Ni URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Ni veljavna povezava - Napačen URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Ni veljavna povezava - Objekt ne obstaja." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Napačen tip. Pričakovan URL niz, prejet {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekt z {slug_name}={value} ne obstaja." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Neveljavna vrednost." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Napačni podatki. Pričakovan slovar, prejet {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtri" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Filter polj" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Razvrščanje" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Iskanje" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "None" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Ni elementov za izbiro." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "To polje mora biti unikatno." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Polja {field_names} morajo skupaj sestavljati unikaten niz." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Polje mora biti unikatno za \"{date_field}\" dan." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Polje mora biti unikatno za \"{date_field} mesec.\"" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Polje mora biti unikatno za \"{date_field}\" leto." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Neveljavna verzija v \"Accept\" zaglavju." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Neveljavna različca v poti URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Neveljavna različica v poti URL. Se ne ujema z nobeno različico imenskega prostora." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Neveljavna različica v imenu gostitelja." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Neveljavna verzija v poizvedbenem parametru." - -#: views.py:88 -msgid "Permission denied." -msgstr "Dovoljenje zavrnjeno." diff --git a/rest_framework/locale/sv/LC_MESSAGES/django.mo b/rest_framework/locale/sv/LC_MESSAGES/django.mo index 7abf311b9..fb1a9f6f9 100644 Binary files a/rest_framework/locale/sv/LC_MESSAGES/django.mo and b/rest_framework/locale/sv/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/sv/LC_MESSAGES/django.po b/rest_framework/locale/sv/LC_MESSAGES/django.po index 00acf5644..d2373618e 100644 --- a/rest_framework/locale/sv/LC_MESSAGES/django.po +++ b/rest_framework/locale/sv/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Joakim Soderlund\n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Swedish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,40 +19,40 @@ msgstr "" "Language: sv\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Ogiltig \"basic\"-header. Inga användaruppgifter tillhandahölls." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Ogiltig \"basic\"-header. Strängen för användaruppgifterna ska inte innehålla mellanslag." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Ogiltig \"basic\"-header. Användaruppgifterna är inte korrekt base64-kodade." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Ogiltigt användarnamn/lösenord." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Användaren borttagen eller inaktiv." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Ogiltig \"token\"-header. Inga användaruppgifter tillhandahölls." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Ogiltig \"token\"-header. Strängen ska inte innehålla mellanslag." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Ogiltig \"token\"-header. Strängen ska inte innehålla ogiltiga tecken." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Ogiltig \"token\"." @@ -60,382 +60,515 @@ msgstr "Ogiltig \"token\"." msgid "Auth Token" msgstr "Autentiseringstoken" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Nyckel" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Användare" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Skapad" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Tokens" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Användarnamn" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Lösenord" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Användarkontot är borttaget." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Kunde inte logga in med de angivna inloggningsuppgifterna." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Användarnamn och lösenord måste anges." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Ett serverfel inträffade." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Ogiltig förfrågan." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Ogiltiga inloggningsuppgifter. " -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Autentiseringsuppgifter ej tillhandahållna." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Du har inte tillåtelse att utföra denna förfrågan." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Hittades inte." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Metoden \"{method}\" tillåts inte." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "Kunde inte tillfredsställa förfrågans \"Accept\"-header." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Medietypen \"{media_type}\" stöds inte." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Förfrågan stoppades eftersom du har skickat för många." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Det här fältet är obligatoriskt." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Det här fältet får inte vara null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" är inte ett giltigt booleskt värde." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Det här fältet får inte vara blankt." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Se till att detta fält inte har fler än {max_length} tecken." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Se till att detta fält har minst {min_length} tecken." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Ange en giltig mejladress." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Det här värdet matchar inte mallen." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Ange en giltig \"slug\" bestående av bokstäver, nummer, understreck eller bindestreck." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Ange en giltig URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value} är inte ett giltigt UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Ange en giltig IPv4- eller IPv6-adress." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Ett giltigt heltal krävs." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Se till att detta värde är mindre än eller lika med {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Se till att detta värde är större än eller lika med {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Textvärdet är för långt." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Ett giltigt nummer krävs." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Se till att det inte finns fler än totalt {max_digits} siffror." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Se till att det inte finns fler än {max_decimal_places} decimaler." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Se till att det inte finns fler än {max_whole_digits} siffror före decimalpunkten." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datumtiden har fel format. Använd ett av dessa format istället: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Förväntade en datumtid men fick ett datum." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Datumet har fel format. Använde ett av dessa format istället: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Förväntade ett datum men fick en datumtid." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Tiden har fel format. Använd ett av dessa format istället: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Perioden har fel format. Använd ett av dessa format istället: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" är inte ett giltigt val." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Fler än {count} objekt..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Förväntade en lista med element men fick typen \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Det här valet får inte vara tomt." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" är inte ett giltigt val för en sökväg." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Ingen fil skickades." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Den skickade informationen var inte en fil. Kontrollera formulärets kodningstyp." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Inget filnamn kunde bestämmas." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Den skickade filen var tom." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Se till att det här filnamnet har högst {max_length} tecken (det har {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Ladda upp en giltig bild. Filen du laddade upp var antingen inte en bild eller en skadad bild." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Den här listan får inte vara tom." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Förväntade en \"dictionary\" med element men fick typen \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Värdet måste vara giltig JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Skicka" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Sök" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Ordning" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "stigande" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "fallande" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Ogiltig sida." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Ogiltig cursor." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Ogiltigt pk \"{pk_value}\" - Objektet finns inte." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Felaktig typ. Förväntade pk-värde, fick {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Ogiltig hyperlänk - Ingen URL matchade." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Ogiltig hyperlänk - Felaktig URL-matching." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Ogiltig hyperlänk - Objektet finns inte." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Felaktig typ. Förväntade URL-sträng, fick {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Objekt med {slug_name}={value} finns inte." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Ogiltigt värde." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Ogiltig data. Förväntade en dictionary, men fick {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filter" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Fältfilter" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Ordning" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Sök" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Inget" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Inga valbara objekt." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Det här fältet måste vara unikt." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Fälten {field_names} måste skapa ett unikt set." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Det här fältet måste vara unikt för datumet \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Det här fältet måste vara unikt för månaden \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Det här fältet måste vara unikt för året \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Ogiltig version i \"Accept\"-headern." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Ogiltig version i URL-resursen." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "Ogiltig version i URL-resursen. Matchar inget versions-namespace." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Ogiltig version i värdnamnet." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Ogiltig version i förfrågningsparametern." - -#: views.py:88 -msgid "Permission denied." -msgstr "Åtkomst nekad." diff --git a/rest_framework/locale/th/LC_MESSAGES/django.mo b/rest_framework/locale/th/LC_MESSAGES/django.mo new file mode 100644 index 000000000..4a2b85a9b Binary files /dev/null and b/rest_framework/locale/th/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/th/LC_MESSAGES/django.po b/rest_framework/locale/th/LC_MESSAGES/django.po new file mode 100644 index 000000000..353244db9 --- /dev/null +++ b/rest_framework/locale/th/LC_MESSAGES/django.po @@ -0,0 +1,573 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Preeti Yuankrathok , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" +"Language-Team: Thai (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/th/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: th\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "" + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "" + +#: authentication.py:83 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "" + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "ชื่อผู้ใช้งานหรือรหัสผ่านไม่ถูกต้อง" + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "ผู้ใช้ไม่ได้เปิดใช้งานหรือถูกลบ" + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "" + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "" + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "" + +#: authentication.py:203 +msgid "Invalid token." +msgstr "Token ไม่ถูกต้อง" + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "Auth Token" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "คีย์" + +#: authtoken/models.py:16 +msgid "User" +msgstr "ผู้ใช้" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "" + +#: authtoken/models.py:27 authtoken/serializers.py:19 +msgid "Token" +msgstr "Token" + +#: authtoken/models.py:28 +msgid "Tokens" +msgstr "Token" + +#: authtoken/serializers.py:9 +msgid "Username" +msgstr "ชื่อผู้ใช้งาน" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "รหัสผ่าน" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "ไม่สามารถเข้าสู่ระบบได้" + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "จำเป็นต้องใส่ชื่อผู้ใช้งานและรหัสผ่าน" + +#: exceptions.py:102 +msgid "A server error occurred." +msgstr "เซิร์ฟเวอร์เกิดข้อผิดพลาด" + +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 +msgid "Malformed request." +msgstr "" + +#: exceptions.py:167 +msgid "Incorrect authentication credentials." +msgstr "ข้อมูลการเข้าสู่ระบบไม่ถูกต้อง" + +#: exceptions.py:173 +msgid "Authentication credentials were not provided." +msgstr "ไม่พบข้อมูลการเข้าสู่ระบบ" + +#: exceptions.py:179 +msgid "You do not have permission to perform this action." +msgstr "คุณไม่มีสิทธิ์ที่จะดำเนินการ" + +#: exceptions.py:185 +msgid "Not found." +msgstr "ไม่พบ" + +#: exceptions.py:191 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "ไม่ใช่อนุญาติให้ใช้ Method \"{method}\"" + +#: exceptions.py:202 +msgid "Could not satisfy the request Accept header." +msgstr "" + +#: exceptions.py:212 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "ไม่รองรับมีเดียประเภท \"{media_type}\" ใน Request" + +#: exceptions.py:223 +msgid "Request was throttled." +msgstr "" + +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 +msgid "This field is required." +msgstr "ฟิลด์นี้จำเป็น" + +#: fields.py:317 +msgid "This field may not be null." +msgstr "ฟิลด์นี้จำเป็นต้องมีค่า" + +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" + +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 +msgid "This field may not be blank." +msgstr "ฟิลด์นี้ไม่สามารถเว้นว่างได้" + +#: fields.py:768 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "ตรวจสอบฟิลด์ว่ามีความยาวไม่เกิน {max_length} ตัวอักษร" + +#: fields.py:769 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "ตรวตสอบฟิลด์ว่ามีความยาวอย่างน้อย {min_length} ตัวอักษร" + +#: fields.py:816 +msgid "Enter a valid email address." +msgstr "กรอกอีเมลให้ถูกต้อง" + +#: fields.py:827 +msgid "This value does not match the required pattern." +msgstr "ค่านี้ไม่ตรงกับรูปแบบที่ต้องการ" + +#: fields.py:838 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "กรอกข้อมูลที่ประกอบด้วยตัวอักษร ตัวเลข สัญประกาศ และยัติภังค์เท่านั้น" + +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 +msgid "Enter a valid URL." +msgstr "กรอก URL ให้ถูกต้อง" + +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" + +#: fields.py:903 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "กรอก IPv4 หรือ IPv6 ให้ถูกต้อง" + +#: fields.py:931 +msgid "A valid integer is required." +msgstr "ต้องการค่าจำนวนเต็มที่ถูกต้อง" + +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "ตรวจสอบว่าค่านี้น้อยกว่าหรือเท่ากับ {max_value}" + +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "ตรวจสอบว่าค่านี้มากกว่าหรือเท่ากับ {min_value}" + +#: fields.py:934 fields.py:971 fields.py:1010 +msgid "String value too large." +msgstr "ข้อความยาวเกินไป" + +#: fields.py:968 fields.py:1004 +msgid "A valid number is required." +msgstr "ต้องการตัวเลขที่ถูกต้อง" + +#: fields.py:1007 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "ตรวจสอบตัวเลขว่ามีไม่เกิน {max_digits} ตัว" + +#: fields.py:1008 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "ตรวจสอบทศนิยมว่ามีไม่เกิน {max_decimal_places} หลัก" + +#: fields.py:1009 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "ตรวจสอบตัวเลขและทศนิยมรวมกันว่ามีไม่เกิน {max_whole_digits} ตัว" + +#: fields.py:1148 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "รูปแบบวันที่และเวลาไม่ถูกต้อง โปรดใช้รูปแบบใดรูปแบบหนึ่งจาก: {format}" + +#: fields.py:1149 +msgid "Expected a datetime but got a date." +msgstr "ต้องการวันที่และเวลา แต่ได้รับเพียงวันที่" + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "รูปแบบวันที่ไม่ถูกต้อง โปรดใช้รูปแบบใดรูปแบบหนึ่งจาก: {format}" + +#: fields.py:1237 +msgid "Expected a date but got a datetime." +msgstr "ต้องการวันที่ แต่ได้รับวันที่และเวลา" + +#: fields.py:1303 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "รูปแบบเวลาไม่ถูกต้อง โปรดใช้รูปแบบใดรูปแบบหนึ่งจาก: {format}" + +#: fields.py:1365 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "รูปแบบระยะเวลาไม่ถูกต้อง โปรดใช้รูปแบบใดรูปแบบหนึ่งจาก: {format}" + +#: fields.py:1399 fields.py:1456 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" ไม่ใช่ตัวเลือกที่ถูกต้อง" + +#: fields.py:1402 +#, python-brace-format +msgid "More than {count} items..." +msgstr "มีมากกว่า {count} ไอเทม..." + +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "ต้องการ List ของข้อมูล แต่ได้รับ \"{input_type}\"" + +#: fields.py:1458 +msgid "This selection may not be empty." +msgstr "" + +#: fields.py:1495 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "" + +#: fields.py:1514 +msgid "No file was submitted." +msgstr "ไม่พบไฟล์" + +#: fields.py:1515 +msgid "" +"The submitted data was not a file. Check the encoding type on the form." +msgstr "ข้อมูลที่ส่งไม่ใช่ไฟล์ โปรดตรวจสอบการเข้ารหัสของฟอร์ม" + +#: fields.py:1516 +msgid "No filename could be determined." +msgstr "ไม่สามารถระบุชื่อไฟล์ได้" + +#: fields.py:1517 +msgid "The submitted file is empty." +msgstr "ไฟล์ที่ส่งว่างเปล่า" + +#: fields.py:1518 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "" + +#: fields.py:1566 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "" + +#: fields.py:1604 relations.py:486 serializers.py:571 +msgid "This list may not be empty." +msgstr "List นี้ไม่สามารถว่างได้" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "ต้องการ Dictionary แต่ได้รับ \"{input_type}\"" + +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 +msgid "Value must be valid JSON." +msgstr "ค่าจะต้องเป็น JSON ที่ถูกต้อง" + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "ค้นหา" + +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "การเรียงลำดับ" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 +msgid "ascending" +msgstr "น้อยไปมาก" + +#: filters.py:288 +msgid "descending" +msgstr "มากไปน้อย" + +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 +msgid "Invalid page." +msgstr "หน้าไม่ถูกต้อง" + +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 +msgid "Invalid cursor" +msgstr "เคอร์เซอร์ไม่ถูกต้อง" + +#: relations.py:246 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "" + +#: relations.py:247 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "" + +#: relations.py:280 +msgid "Invalid hyperlink - No URL match." +msgstr "" + +#: relations.py:281 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "" + +#: relations.py:282 +msgid "Invalid hyperlink - Object does not exist." +msgstr "" + +#: relations.py:283 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "" + +#: relations.py:448 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "" + +#: relations.py:449 +msgid "Invalid value." +msgstr "ค่าไม่ถูกต้อง" + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "ข้อมูลไม่ถูกต้อง ต้องการ Dictionary แต่ได้รับ {datatype}" + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "การกรองข้อมูล" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "ไม่มี" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "" + +#: validators.py:39 +msgid "This field must be unique." +msgstr "" + +#: validators.py:89 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "" + +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "" + +#: validators.py:258 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "" + +#: validators.py:271 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "" + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "" + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "" + +#: versioning.py:116 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "" + +#: versioning.py:148 +msgid "Invalid version in hostname." +msgstr "" + +#: versioning.py:170 +msgid "Invalid version in query parameter." +msgstr "" diff --git a/rest_framework/locale/tr/LC_MESSAGES/django.mo b/rest_framework/locale/tr/LC_MESSAGES/django.mo index fcdff0a98..6386aab52 100644 Binary files a/rest_framework/locale/tr/LC_MESSAGES/django.mo and b/rest_framework/locale/tr/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/tr/LC_MESSAGES/django.po b/rest_framework/locale/tr/LC_MESSAGES/django.po index d327ab9e2..106fe7177 100644 --- a/rest_framework/locale/tr/LC_MESSAGES/django.po +++ b/rest_framework/locale/tr/LC_MESSAGES/django.po @@ -8,16 +8,16 @@ # Ertaç Paprat , 2015 # José Luis , 2016 # Mesut Can Gürle , 2015 -# Murat Çorlu , 2015 +# Murat Çorlu , 2015 # Recep KIRMIZI , 2015 # Ülgen Sarıkavak , 2015 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Turkish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,40 +25,40 @@ msgstr "" "Language: tr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Geçersiz yetkilendirme başlığı. Gerekli uygunluk kriterleri sağlanmamış." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Geçersiz yetkilendirme başlığı. Uygunluk kriterine ait veri boşluk karakteri içermemeli." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Geçersiz yetkilendirme başlığı. Uygunluk kriterleri base64 formatına uygun olarak kodlanmamış." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Geçersiz kullanıcı adı/parola" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Kullanıcı aktif değil ya da silinmiş." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Geçersiz token başlığı. Kimlik bilgileri eksik." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Geçersiz token başlığı. Token'da boşluk olmamalı." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Geçersiz token başlığı. Token geçersiz karakter içermemeli." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Geçersiz token." @@ -66,382 +66,515 @@ msgstr "Geçersiz token." msgid "Auth Token" msgstr "Kimlik doğrulama belirteci" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Anahtar" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Kullanan" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Oluşturulan" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "İşaret" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "İşaretler" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Kullanıcı adı" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Şifre" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Kullanıcı hesabı devre dışı bırakılmış." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Verilen bilgiler ile giriş sağlanamadı." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "\"Kullanıcı Adı\" ve \"Parola\" eklenmeli." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Sunucu hatası oluştu." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Bozuk istek." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Giriş bilgileri hatalı." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Giriş bilgileri verilmedi." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Bu işlemi yapmak için izniniz bulunmuyor." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Bulunamadı." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "\"{method}\" metoduna izin verilmiyor." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "İsteğe ait Accept başlık bilgisi yanıt verilecek başlık bilgileri arasında değil." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "İstekte desteklenmeyen medya tipi: \"{media_type}\"." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Üst üste çok fazla istek yapıldı." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Bu alan zorunlu." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Bu alan boş bırakılmamalı." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" geçerli bir boolean değil." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Bu alan boş bırakılmamalı." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Bu alanın {max_length} karakterden fazla karakter barındırmadığından emin olun." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Bu alanın en az {min_length} karakter barındırdığından emin olun." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Geçerli bir e-posta adresi girin." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Bu değer gereken düzenli ifade deseni ile uyuşmuyor." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Harf, rakam, altçizgi veya tireden oluşan geçerli bir \"slug\" giriniz." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Geçerli bir URL girin." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" geçerli bir UUID değil." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Geçerli bir IPv4 ya da IPv6 adresi girin." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Geçerli bir tam sayı girin." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Değerin {max_value} değerinden küçük ya da eşit olduğundan emin olun." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Değerin {min_value} değerinden büyük ya da eşit olduğundan emin olun." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "String değeri çok uzun." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Geçerli bir numara gerekiyor." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Toplamda {max_digits} haneden fazla hane olmadığından emin olun." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Ondalık basamak değerinin {max_decimal_places} haneden fazla olmadığından emin olun." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Ondalık ayracından önce {max_whole_digits} basamaktan fazla olmadığından emin olun." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datetime alanı yanlış biçimde. {format} biçimlerinden birini kullanın." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Datetime değeri bekleniyor, ama date değeri geldi." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Tarih biçimi yanlış. {format} biçimlerinden birini kullanın." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Date tipi beklenmekteydi, fakat datetime tipi geldi." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Time biçimi yanlış. {format} biçimlerinden birini kullanın." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Duration biçimi yanlış. {format} biçimlerinden birini kullanın." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" geçerli bir seçim değil." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "{count} elemandan daha fazla..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Elemanların listesi beklenirken \"{input_type}\" alındı." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Bu seçim boş bırakılmamalı." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" geçerli bir yol seçimi değil." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Hiçbir dosya verilmedi." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Gönderilen veri dosya değil. Formdaki kodlama tipini kontrol edin." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Hiçbir dosya adı belirlenemedi." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Gönderilen dosya boş." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Bu dosya adının en fazla {max_length} karakter uzunluğunda olduğundan emin olun. (şu anda {length} karakter)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Geçerli bir resim yükleyin. Yüklediğiniz dosya resim değil ya da bozuk." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Bu liste boş olmamalı." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Sözlük tipi bir değişken beklenirken \"{input_type}\" tipi bir değişken alındı." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Değer geçerli bir JSON olmalı." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Gönder" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Arama" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sıralama" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Geçersiz sayfa." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Sayfalandırma imleci geçersiz" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Geçersiz pk \"{pk_value}\" - obje bulunamadı." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Hatalı tip. Pk değeri beklenirken, alınan {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Geçersiz bağlantı - Hiçbir URL eşleşmedi." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Geçersiz bağlantı - Yanlış URL eşleşmesi." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Geçersiz bağlantı - Obje bulunamadı." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Hatalı tip. URL metni bekleniyor, {data_type} alındı." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "{slug_name}={value} değerini taşıyan obje bulunamadı." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Geçersiz değer." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Geçersiz veri. Sözlük bekleniyordu fakat {datatype} geldi. " #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtreler" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Alan filtreleri" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Sıralama" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Arama" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Hiçbiri" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Seçenek yok." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Bu alan eşsiz olmalı." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "{field_names} hep birlikte eşsiz bir küme oluşturmalılar." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Bu alan \"{date_field}\" tarihine göre eşsiz olmalı." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Bu alan \"{date_field}\" ayına göre eşsiz olmalı." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Bu alan \"{date_field}\" yılına göre eşsiz olmalı." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "\"Accept\" başlığındaki sürüm geçersiz." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "URL dizininde geçersiz versiyon." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Host adında geçersiz versiyon." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Sorgu parametresinde geçersiz versiyon." - -#: views.py:88 -msgid "Permission denied." -msgstr "Erişim engellendi." diff --git a/rest_framework/locale/tr_TR/LC_MESSAGES/django.mo b/rest_framework/locale/tr_TR/LC_MESSAGES/django.mo index 2999352a2..3751732be 100644 Binary files a/rest_framework/locale/tr_TR/LC_MESSAGES/django.mo and b/rest_framework/locale/tr_TR/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/tr_TR/LC_MESSAGES/django.po b/rest_framework/locale/tr_TR/LC_MESSAGES/django.po index 94856c70f..b0c96ddd1 100644 --- a/rest_framework/locale/tr_TR/LC_MESSAGES/django.po +++ b/rest_framework/locale/tr_TR/LC_MESSAGES/django.po @@ -3,55 +3,56 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Deniz , 2019 # José Luis , 2015-2016 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Turkish (Turkey) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/tr_TR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: tr_TR\n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Geçersiz yetkilendirme başlığı. Gerekli uygunluk kriterleri sağlanmamış." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "Geçersiz yetkilendirme başlığı. Uygunluk kriterine ait veri boşluk karakteri içermemeli." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "Geçersiz yetkilendirme başlığı. Uygunluk kriterleri base64 formatına uygun olarak kodlanmamış." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Geçersiz kullanıcı adı / şifre." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Kullanıcı aktif değil ya da silinmiş" -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "Geçersiz token başlığı. Kimlik bilgileri eksik." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "Geçersiz token başlığı. Token'da boşluk olmamalı." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "Geçersiz token başlığı. Token geçersiz karakter içermemeli." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Geçersiz simge." @@ -59,382 +60,515 @@ msgstr "Geçersiz simge." msgid "Auth Token" msgstr "Kimlik doğrulama belirteci" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Anahtar" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Kullanan" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Oluşturulan" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "İşaret" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "İşaretler" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Kullanıcı adı" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Şifre" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Kullanıcı hesabı devre dışı bırakılmış." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Verilen bilgiler ile giriş sağlanamadı." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "\"Kullanıcı Adı\" ve \"Parola\" eklenmeli." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Sunucu hatası oluştu." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Bozuk istek." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Giriş bilgileri hatalı." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Giriş bilgileri verilmedi." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "Bu işlemi yapmak için izniniz bulunmuyor." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Bulunamadı." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "\"{method}\" metoduna izin verilmiyor." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "İsteğe ait Accept başlık bilgisi yanıt verilecek başlık bilgileri arasında değil." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "İstekte desteklenmeyen medya tipi: \"{media_type}\"." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Üst üste çok fazla istek yapıldı." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Bu alan zorunlu." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Bu alan boş bırakılmamalı." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" geçerli bir boolean değil." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Bu alan boş bırakılmamalı." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Bu alanın {max_length} karakterden fazla karakter barındırmadığından emin olun." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Bu alanın en az {min_length} karakter barındırdığından emin olun." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Geçerli bir e-posta adresi girin." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Bu değer gereken düzenli ifade deseni ile uyuşmuyor." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Harf, rakam, altçizgi veya tireden oluşan geçerli bir \"slug\" giriniz." -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Geçerli bir URL girin." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" geçerli bir UUID değil." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "Geçerli bir IPv4 ya da IPv6 adresi girin." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Geçerli bir tam sayı girin." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Değerin {max_value} değerinden küçük ya da eşit olduğundan emin olun." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Değerin {min_value} değerinden büyük ya da eşit olduğundan emin olun." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "String değeri çok uzun." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Geçerli bir numara gerekiyor." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Toplamda {max_digits} haneden fazla hane olmadığından emin olun." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Ondalık basamak değerinin {max_decimal_places} haneden fazla olmadığından emin olun." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Ondalık ayracından önce {max_whole_digits} basamaktan fazla olmadığından emin olun." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Datetime alanı yanlış biçimde. {format} biçimlerinden birini kullanın." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Datetime değeri bekleniyor, ama date değeri geldi." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Tarih biçimi yanlış. {format} biçimlerinden birini kullanın." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Date tipi beklenmekteydi, fakat datetime tipi geldi." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Time biçimi yanlış. {format} biçimlerinden birini kullanın." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Duration biçimi yanlış. {format} biçimlerinden birini kullanın." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" geçerli bir seçim değil." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "{count} elemandan daha fazla..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Elemanların listesi beklenirken \"{input_type}\" alındı." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Bu seçim boş bırakılmamalı." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" geçerli bir yol seçimi değil." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Hiçbir dosya verilmedi." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Gönderilen veri dosya değil. Formdaki kodlama tipini kontrol edin." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Hiçbir dosya adı belirlenemedi." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Gönderilen dosya boş." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Bu dosya adının en fazla {max_length} karakter uzunluğunda olduğundan emin olun. (şu anda {length} karakter)." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Geçerli bir resim yükleyin. Yüklediğiniz dosya resim değil ya da bozuk." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Bu liste boş olmamalı." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Sözlük tipi bir değişken beklenirken \"{input_type}\" tipi bir değişken alındı." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Değer geçerli bir JSON olmalı." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Gönder" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Arama" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sıralama" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "artan" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "azalan" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Geçersiz sayfa." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Geçersiz imleç." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Geçersiz pk \"{pk_value}\" - obje bulunamadı." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Hatalı tip. Pk değeri beklenirken, alınan {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Geçersiz hyper link - URL maçı yok." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Geçersiz hyper link - Yanlış URL maçı." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Geçersiz hyper link - Nesne yok.." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Hatalı tip. URL metni bekleniyor, {data_type} alındı." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "{slug_name}={value} değerini taşıyan obje bulunamadı." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Geçersiz değer." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Geçersiz veri. Bir sözlük bekleniyor, ama var {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Filtreler" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Alan filtreleri" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Sıralama" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Arama" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Hiç kimse" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Seçenek yok." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Bu alan benzersiz olmalıdır." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "{field_names} alanları benzersiz bir set yapmak gerekir." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Bu alan \"{date_field}\" tarihine göre eşsiz olmalı." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Bu alan \"{date_field}\" ayına göre eşsiz olmalı." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Bu alan \"{date_field}\" yılına göre eşsiz olmalı." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "\"Kabul et\" başlığında geçersiz sürümü." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." -msgstr "URL yolu geçersiz sürümü." +msgstr "URL yolunda geçersiz sürüm." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "URL yolunda geçersiz sürüm. Sürüm adlarında eşleşen bulunamadı." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Hostname geçersiz sürümü." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Sorgu parametresi geçersiz sürümü." - -#: views.py:88 -msgid "Permission denied." -msgstr "İzin reddedildi." diff --git a/rest_framework/locale/uk/LC_MESSAGES/django.mo b/rest_framework/locale/uk/LC_MESSAGES/django.mo index 9772bedc5..18c3242bb 100644 Binary files a/rest_framework/locale/uk/LC_MESSAGES/django.mo and b/rest_framework/locale/uk/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/uk/LC_MESSAGES/django.po b/rest_framework/locale/uk/LC_MESSAGES/django.po index 2bd4369f8..0106cc051 100644 --- a/rest_framework/locale/uk/LC_MESSAGES/django.po +++ b/rest_framework/locale/uk/LC_MESSAGES/django.po @@ -3,58 +3,58 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Денис Подлесный , 2016 +# Denis Podlesniy , 2016 # Illarion , 2016 -# Kirill Tarasenko, 2016 +# Kirill Tarasenko, 2016,2018 # Victor Mireyev , 2017 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Victor Mireyev \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Ukrainian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: uk\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "Недійсний основний заголовок. Облікові дані відсутні." -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "Недійсний основний заголовок. Облікові дані мають бути без пробілів." +msgstr "Недійсний основний заголовок. Строка з обліковими даними має бути без пробілів." -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "Недійсний основний заголовок. Облікові дані невірно закодовані у Base64." +msgstr "Недійсний основний заголовок. Облікові дані невірно закодовані у base64." -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "Недійсне iм'я користувача/пароль." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "Користувач неактивний або видалений." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." -msgstr "Недійсний заголовок токена. Облікові дані відсутні." +msgstr "Недійсний токен. Облікові дані відсутні." -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." -msgstr "Недійсний заголовок токена. Значення токена не повинне містити пробіли." +msgstr "Недійсний токен. Значення токена не повинне містити пробіли." -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." -msgstr "Недійсний заголовок токена. Значення токена не повинне містити некоректні символи." +msgstr "Недійсний токен. Значення токена не повинне містити некоректні символи." -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "Недійсний токен." @@ -62,382 +62,515 @@ msgstr "Недійсний токен." msgid "Auth Token" msgstr "Авторизаційний токен" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "Ключ" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "Користувач" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "Створено" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "Токен" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "Токени" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "Ім'я користувача" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "Пароль" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "Обліковий запис деактивований." - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "Неможливо зайти з введеними даними." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "Має включати iм'я користувача та пароль" -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "Помилка сервера." -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "Некоректний запит." -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "Некоректні реквізити перевірки достовірності." -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "Реквізити перевірки достовірності не надані." -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "У вас нема дозволу робити цю дію." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "Не знайдено." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "Метод \"{method}\" не дозволений." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "Неможливо виконати запит прийняття заголовку." +msgstr "Неможливо виконати запит заголовку Accept." -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "Непідтримуваний тип даних \"{media_type}\" в запиті." -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "Запит було проігноровано." -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "Це поле обов'язкове." -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "Це поле не може бути null." -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" не є коректним бульовим значенням." +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "Це поле не може бути порожнім." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "Переконайтесь, що кількість символів в цьому полі не перевищує {max_length}." -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "Переконайтесь, що в цьому полі мінімум {min_length} символів." -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "Введіть коректну адресу електронної пошти." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "Значення не відповідає необхідному патерну." -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "Введіть коректний \"slug\", що складається із букв, цифр, нижніх підкреслень або дефісів. " -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "Введіть коректний URL." -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "\"{value}\" не є коректним UUID." +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "Введіть дійсну IPv4 або IPv6 адресу." +msgstr "Введіть коректну IPv4 або IPv6 адресу." -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "Необхідне цілочисельне значення." -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "Переконайтесь, що значення менше або дорівнює {max_value}." -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "Переконайтесь, що значення більше або дорівнює {min_value}." -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "Строкове значення занадто велике." -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "Необхідне чисельне значення." -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "Переконайтесь, що в числі не більше {max_digits} знаків." -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "Переконайтесь, що в числі не більше {max_decimal_places} знаків у дробовій частині." -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "Переконайтесь, що в числі не більше {max_whole_digits} знаків у цілій частині." -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "Невірний формат дата з часом. Використайте один з цих форматів: {format}." -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "Очікувалась дата з часом, але було отримано дату." -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "Невірний формат дати. Використайте один з цих форматів: {format}." -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "Очікувалась дата, але було отримано дату з часом." -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "Неправильний формат часу. Використайте один з цих форматів: {format}." -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "Невірний формат тривалості. Використайте один з цих форматів: {format}." -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "\"{input}\" не є коректним вибором." -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "Елементів більше, ніж {count}..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "Очікувався список елементів, але було отримано \"{input_type}\"." -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "Вибір не може бути порожнім." -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\" вибраний шлях не є коректним." -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "Файл не було відправленно." -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "Відправленні дані не є файл. Перевірте тип кодування у формі." -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "Неможливо визначити ім'я файлу." -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "Відправленний файл порожній." -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "Переконайтесь, що ім'я файлу становить менше {max_length} символів (зараз {length})." -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "Завантажте коректне зображення. Завантажений файл або не є зображенням, або пошкоджений." -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "Цей список не може бути порожнім." -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "Очікувався словник зі елементами, але було отримано \"{input_type}\"." -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "Значення повинно бути коректним JSON." -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "Відправити" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Пошук" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Впорядкування" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" -msgstr "в порядку зростання" +msgstr "у порядку зростання" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "у порядку зменшення" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "Недійсна сторінка." -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "Недійсний курсор." -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "Недопустимий первинний ключ \"{pk_value}\" - об'єкт не існує." -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "Некоректний тип. Очікувалось значення первинного ключа, отримано {data_type}." -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "Недійсне посилання - немає збігу за URL." -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "Недійсне посилання - некоректний збіг за URL." -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "Недійсне посилання - об'єкт не існує." -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "Некоректний тип. Очікувався URL, отримано {data_type}." -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "Об'єкт із {slug_name}={value} не існує." -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "Недійсне значення." -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "Недопустимі дані. Очікувався словник, але було отримано {datatype}." #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "Фільтри" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "Фільтри поля" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "Впорядкування" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "Пошук" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "Нічого" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "Немає елементів для вибору." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "Це поле повинне бути унікальним." -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "Поля {field_names} повинні створювати унікальний масив значень." -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "Це поле повинне бути унікальним для дати \"{date_field}\"." -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "Це поле повинне бути унікальним для місяця \"{date_field}\"." -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "Це поле повинне бути унікальним для року \"{date_field}\"." -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "Недопустима версія в загаловку \"Accept\"." -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "Недопустима версія в шляху URL." -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Недопустима версія в шляху URL. Не співпадає з будь-яким простором версій." -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "Недопустима версія в імені хоста." -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "Недопустима версія в параметрі запиту." - -#: views.py:88 -msgid "Permission denied." -msgstr "Доступ заборонено." diff --git a/rest_framework/locale/vi/LC_MESSAGES/django.mo b/rest_framework/locale/vi/LC_MESSAGES/django.mo index c76cfe595..6809b650c 100644 Binary files a/rest_framework/locale/vi/LC_MESSAGES/django.mo and b/rest_framework/locale/vi/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/vi/LC_MESSAGES/django.po b/rest_framework/locale/vi/LC_MESSAGES/django.po index ea43efb95..8054fb880 100644 --- a/rest_framework/locale/vi/LC_MESSAGES/django.po +++ b/rest_framework/locale/vi/LC_MESSAGES/django.po @@ -3,13 +3,15 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Nguyen Tuan Anh , 2019 +# Xavier Ordoquy , 2020 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2016-07-12 15:14+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 20:02+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Vietnamese (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/vi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,40 +19,40 @@ msgstr "" "Language: vi\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." -msgstr "" +msgstr "Sai tên đăng nhập hoặc mật khẩu." -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." -msgstr "" +msgstr "Người dùng không còn hoạt động, hoặc đã bị xoá." -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "" @@ -58,382 +60,515 @@ msgstr "" msgid "Auth Token" msgstr "" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "Khoá" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Người dùng" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "Đã tạo" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "" -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" - #: authtoken/serializers.py:9 +msgid "Username" +msgstr "Tên người dùng" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "Mật khẩu" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "" +msgstr "Không thể đăng nhập với thông tin đã nhập." -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "" +msgstr "Bắt buộc phải có “tên người dùng” và “mật khẩu”." -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "" -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "" -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "" -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "" +msgstr "Bạn không được cấp quyền để thực hiện hành động này." -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." -msgstr "" +msgstr "Không tìm thấy." -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "" +msgstr "Phương thức “{method}” không được chấp nhận." -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "" -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "" -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." -msgstr "" +msgstr "Trường này không được bỏ trống." -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "" -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "" -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "" +msgstr "Nhập một địa chỉ email hợp lệ." -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "" -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "" -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "" -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "" -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "" -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "" -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "" -#: fields.py:1103 -msgid "Date has wrong format. Use one of these formats instead: {format}." +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." msgstr "" -#: fields.py:1104 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Ngày sai định dạng. Dùng một trong những định dạng sau để thay thế: {format}." + +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "" -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "" -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "" -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr " Danh sách này không thể để trống." + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "" -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "Giá trị bắt buộc phải là định dạng JSON." + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "Tìm kiếm" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Sắp xếp" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" msgstr "" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "" -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "" #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "" +msgstr "Không có gì để chọn." -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/locale/zh_CN/LC_MESSAGES/django.mo b/rest_framework/locale/zh_CN/LC_MESSAGES/django.mo index f30b04ea1..3bd1fd3ef 100644 Binary files a/rest_framework/locale/zh_CN/LC_MESSAGES/django.mo and b/rest_framework/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/zh_CN/LC_MESSAGES/django.po b/rest_framework/locale/zh_CN/LC_MESSAGES/django.po index 345bcfac8..7e131db42 100644 --- a/rest_framework/locale/zh_CN/LC_MESSAGES/django.po +++ b/rest_framework/locale/zh_CN/LC_MESSAGES/django.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: Lele Long \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Chinese (China) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,40 +20,40 @@ msgstr "" "Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "无效的Basic认证头,没有提供认证信息。" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "认证字符串不应该包含空格(基本认证HTTP头无效)。" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "认证字符串base64编码错误(基本认证HTTP头无效)。" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "用户名或者密码错误。" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "用户未激活或者已删除。" -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "没有提供认证信息(认证令牌HTTP头无效)。" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "认证令牌字符串不应该包含空格(无效的认证令牌HTTP头)。" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "无效的Token。Token字符串不能包含非法的字符。" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "认证令牌无效。" @@ -61,382 +61,515 @@ msgstr "认证令牌无效。" msgid "Auth Token" msgstr "认证令牌" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "键" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "用户" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "已创建" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "令牌" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "令牌" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "用户名" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "密码" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "用户账户已禁用。" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "无法使用提供的认证信息登录。" -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "必须包含 “用户名” 和 “密码”。" -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "服务器出现了错误。" -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "错误的请求。" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "不正确的身份认证信息。" -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "身份认证信息未提供。" -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "您没有执行该操作的权限。" -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "未找到。" -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "方法 “{method}” 不被允许。" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "无法满足Accept HTTP头的请求。" -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "不支持请求中的媒体类型 “{media_type}”。" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "请求超过了限速。" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "该字段是必填项。" -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "该字段不能为 null。" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "“{input}” 不是合法的布尔值。" +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "该字段不能为空。" -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "请确保这个字段不能超过 {max_length} 个字符。" -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "请确保这个字段至少包含 {min_length} 个字符。" -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "请输入合法的邮件地址。" -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "输入值不匹配要求的模式。" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "请输入合法的“短语“,只能包含字母,数字,下划线或者中划线。" -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "请输入合法的URL。" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "“{value}”不是合法的UUID。" +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "请输入一个有效的IPv4或IPv6地址。" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "请填写合法的整数值。" -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "请确保该值小于或者等于 {max_value}。" -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "请确保该值大于或者等于 {min_value}。" -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "字符串值太长。" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "请填写合法的数字。" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "请确保总计不超过 {max_digits} 个数字。" -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "请确保总计不超过 {max_decimal_places} 个小数位。" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "请确保小数点前不超过 {max_whole_digits} 个数字。" -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "日期时间格式错误。请从这些格式中选择:{format}。" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "期望为日期时间,得到的是日期。" -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "日期格式错误。请从这些格式中选择:{format}。" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "期望为日期,得到的是日期时间。" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "时间格式错误。请从这些格式中选择:{format}。" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "持续时间的格式错误。使用这些格式中的一个:{format}。" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "“{input}” 不是合法选项。" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "多于{count}条记录。" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "期望为一个包含物件的列表,得到的类型是“{input_type}”。" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "这项选择不能为空。" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "“{input}” 不是有效路径选项。" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "没有提交任何文件。" -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "提交的数据不是一个文件。请检查表单的编码类型。" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "无法检测到文件名。" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "提交的是空文件。" -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "确保该文件名最多包含 {max_length} 个字符 ( 当前长度为{length} ) 。" -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "请上传有效图片。您上传的该文件不是图片或者图片已经损坏。" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "列表字段不能为空值。" -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "期望是包含类目的字典,得到类型为 “{input_type}”。" -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "值必须是有效的 JSON 数据。" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "保存" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "查找" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "排序" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "升序" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "降序" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "无效页。" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "无效游标" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "无效主键 “{pk_value}” - 对象不存在。" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "类型错误。期望为主键,得到的类型为 {data_type}。" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "无效超链接 -没有匹配的URL。" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "无效超链接 -错误的URL匹配。" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "无效超链接 -对象不存在。" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "类型错误。期望为URL字符串,实际的类型是 {data_type}。" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "属性 {slug_name} 为 {value} 的对象不存在。" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "无效值。" -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "无效数据。期待为字典类型,得到的是 {datatype} 。" #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "过滤器" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "过滤器字段" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "排序" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr "查找" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "无" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "没有可选项。" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "该字段必须唯一。" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "字段 {field_names} 必须能构成唯一集合。" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "该字段必须在日期 “{date_field}” 唯一。" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "该字段必须在月份 “{date_field}” 唯一。" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "该字段必须在年 “{date_field}” 唯一。" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "“Accept” HTTP头包含无效版本。" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "URL路径包含无效版本。" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "URL路径中存在无效版本。版本空间中无法匹配上。" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "主机名包含无效版本。" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "请求参数里包含无效版本。" - -#: views.py:88 -msgid "Permission denied." -msgstr "没有权限。" diff --git a/rest_framework/locale/zh_Hans/LC_MESSAGES/django.mo b/rest_framework/locale/zh_Hans/LC_MESSAGES/django.mo index d85317ebc..670228a83 100644 Binary files a/rest_framework/locale/zh_Hans/LC_MESSAGES/django.mo and b/rest_framework/locale/zh_Hans/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/zh_Hans/LC_MESSAGES/django.po b/rest_framework/locale/zh_Hans/LC_MESSAGES/django.po index aa56ccc45..ce85b52c7 100644 --- a/rest_framework/locale/zh_Hans/LC_MESSAGES/django.po +++ b/rest_framework/locale/zh_Hans/LC_MESSAGES/django.po @@ -5,15 +5,15 @@ # Translators: # cokky , 2015 # hunter007 , 2015 -# nypisces , 2015 +# 3eb8e7e672c2428f1223e00920bfd2b3, 2015 # ppppfly , 2017 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2017-08-03 14:58+0000\n" -"Last-Translator: ppppfly \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Chinese Simplified (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/zh-Hans/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,40 +21,40 @@ msgstr "" "Language: zh-Hans\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "无效的Basic认证头,没有提供认证信息。" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "认证字符串不应该包含空格(基本认证HTTP头无效)。" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "认证字符串base64编码错误(基本认证HTTP头无效)。" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." msgstr "用户名或者密码错误。" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." msgstr "用户未激活或者已删除。" -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "没有提供认证信息(认证令牌HTTP头无效)。" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "认证令牌字符串不应该包含空格(无效的认证令牌HTTP头)。" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "无效的Token。Token字符串不能包含非法的字符。" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." msgstr "认证令牌无效。" @@ -62,382 +62,515 @@ msgstr "认证令牌无效。" msgid "Auth Token" msgstr "认证令牌" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" msgstr "键" -#: authtoken/models.py:18 +#: authtoken/models.py:16 msgid "User" msgstr "用户" -#: authtoken/models.py:20 +#: authtoken/models.py:18 msgid "Created" msgstr "已创建" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" msgstr "令牌" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" msgstr "令牌" -#: authtoken/serializers.py:8 +#: authtoken/serializers.py:9 msgid "Username" msgstr "用户名" -#: authtoken/serializers.py:9 +#: authtoken/serializers.py:13 msgid "Password" msgstr "密码" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "用户账户已禁用。" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "无法使用提供的认证信息登录。" -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." msgstr "必须包含 “用户名” 和 “密码”。" -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "服务器出现了错误。" -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "错误的请求。" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "不正确的身份认证信息。" -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "身份认证信息未提供。" -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." msgstr "您没有执行该操作的权限。" -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." msgstr "未找到。" -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." msgstr "方法 “{method}” 不被允许。" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "无法满足Accept HTTP头的请求。" -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "不支持请求中的媒体类型 “{media_type}”。" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "请求超过了限速。" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." msgstr "该字段是必填项。" -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." msgstr "该字段不能为 null。" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." -msgstr "“{input}” 不是合法的布尔值。" +#: fields.py:701 +msgid "Must be a valid boolean." +msgstr "" -#: fields.py:674 +#: fields.py:766 +msgid "Not a valid string." +msgstr "" + +#: fields.py:767 msgid "This field may not be blank." msgstr "该字段不能为空。" -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." msgstr "请确保这个字段不能超过 {max_length} 个字符。" -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." msgstr "请确保这个字段至少包含 {min_length} 个字符。" -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." msgstr "请输入合法的邮件地址。" -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "输入值不匹配要求的模式。" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "请输入合法的“短语“,只能包含字母,数字,下划线或者中划线。" -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." msgstr "请输入合法的URL。" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "“{value}”不是合法的UUID。" +#: fields.py:867 +msgid "Must be a valid UUID." +msgstr "" -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." msgstr "请输入一个有效的IPv4或IPv6地址。" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." msgstr "请填写合法的整数值。" -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." msgstr "请确保该值小于或者等于 {max_value}。" -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." msgstr "请确保该值大于或者等于 {min_value}。" -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." msgstr "字符串值太长。" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." msgstr "请填写合法的数字。" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "请确保总计不超过 {max_digits} 个数字。" -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "请确保总计不超过 {max_decimal_places} 个小数位。" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "请确保小数点前不超过 {max_whole_digits} 个数字。" -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "日期时间格式错误。请从这些格式中选择:{format}。" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." msgstr "期望为日期时间,获得的是日期。" -#: fields.py:1103 +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "" + +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "日期格式错误。请从这些格式中选择:{format}。" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." msgstr "期望为日期,获得的是日期时间。" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "时间格式错误。请从这些格式中选择:{format}。" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "持续时间的格式错误。使用这些格式中的一个:{format}。" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." msgstr "“{input}” 不是合法选项。" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." msgstr "多于{count}条记录。" -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." msgstr "期望为一个包含物件的列表,得到的类型是“{input_type}”。" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." msgstr "这项选择不能为空。" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "\"{input}\"不是一个有效路径选项。" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." msgstr "没有提交任何文件。" -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." msgstr "提交的数据不是一个文件。请检查表单的编码类型。" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "无法检测到文件名。" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." msgstr "提交的是空文件。" -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "确保该文件名最多包含 {max_length} 个字符 ( 当前长度为{length} ) 。" -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "请上传有效图片。您上传的该文件不是图片或者图片已经损坏。" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." msgstr "列表不能为空。" -#: fields.py:1502 +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "" + +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "期望是包含类目的字典,得到类型为 “{input_type}”。" -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." msgstr "值必须是有效的 JSON 数据。" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" -msgstr "提交" +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr " 搜索" -#: filters.py:336 +#: filters.py:50 +msgid "A search term." +msgstr "" + +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "排序" + +#: filters.py:181 +msgid "Which field to use when ordering the results." +msgstr "" + +#: filters.py:287 msgid "ascending" msgstr "正排序" -#: filters.py:337 +#: filters.py:288 msgid "descending" msgstr "倒排序" -#: pagination.py:193 +#: pagination.py:174 +msgid "A page number within the paginated result set." +msgstr "" + +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." msgstr "无效页面。" -#: pagination.py:427 +#: pagination.py:374 +msgid "The initial index from which to return the results." +msgstr "" + +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "无效游标" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "无效主键 “{pk_value}” - 对象不存在。" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "类型错误。期望为主键,获得的类型为 {data_type}。" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." msgstr "无效超链接 -没有匹配的URL。" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." msgstr "无效超链接 -错误的URL匹配。" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." msgstr "无效超链接 -对象不存在。" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "类型错误。期望为URL字符串,实际的类型是 {data_type}。" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "属性 {slug_name} 为 {value} 的对象不存在。" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." msgstr "无效值。" -#: serializers.py:326 +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format msgid "Invalid data. Expected a dictionary, but got {datatype}." msgstr "无效数据。期待为字典类型,得到的是 {datatype} 。" #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" msgstr "过滤器" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" -msgstr "过滤器字段" +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" -msgstr "排序" +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" -msgstr " 搜索" +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" msgstr "无" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "没有可选项。" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." msgstr "该字段必须唯一。" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "字段 {field_names} 必须能构成唯一集合。" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "该字段必须在日期 “{date_field}” 唯一。" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "该字段必须在月份 “{date_field}” 唯一。" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "该字段必须在年 “{date_field}” 唯一。" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "“Accept” HTTP头包含无效版本。" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "URL路径包含无效版本。" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "在URL路径中发现无效的版本。无法匹配任何的版本命名空间。" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "主机名包含无效版本。" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "请求参数里包含无效版本。" - -#: views.py:88 -msgid "Permission denied." -msgstr "没有权限。" diff --git a/rest_framework/locale/zh_Hant/LC_MESSAGES/django.mo b/rest_framework/locale/zh_Hant/LC_MESSAGES/django.mo index 0d8ccaa55..26ea0cee9 100644 Binary files a/rest_framework/locale/zh_Hant/LC_MESSAGES/django.mo and b/rest_framework/locale/zh_Hant/LC_MESSAGES/django.mo differ diff --git a/rest_framework/locale/zh_Hant/LC_MESSAGES/django.po b/rest_framework/locale/zh_Hant/LC_MESSAGES/django.po index 1960f1f5d..6d2630f31 100644 --- a/rest_framework/locale/zh_Hant/LC_MESSAGES/django.po +++ b/rest_framework/locale/zh_Hant/LC_MESSAGES/django.po @@ -3,13 +3,14 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Matsui Lin , 2019 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-12 16:13+0100\n" -"PO-Revision-Date: 2016-07-12 15:14+0000\n" -"Last-Translator: Thomas Christie \n" +"POT-Creation-Date: 2020-10-13 21:45+0200\n" +"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"Last-Translator: Xavier Ordoquy \n" "Language-Team: Chinese Traditional (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/zh-Hant/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,423 +18,556 @@ msgstr "" "Language: zh-Hant\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: authentication.py:73 +#: authentication.py:70 msgid "Invalid basic header. No credentials provided." msgstr "" -#: authentication.py:76 +#: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." msgstr "" -#: authentication.py:82 +#: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." msgstr "" -#: authentication.py:99 +#: authentication.py:101 msgid "Invalid username/password." -msgstr "" +msgstr "無效的使用者名稱及密碼。" -#: authentication.py:102 authentication.py:198 +#: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." -msgstr "" +msgstr "帳號未啟用或已被刪除。" -#: authentication.py:176 +#: authentication.py:184 msgid "Invalid token header. No credentials provided." msgstr "" -#: authentication.py:179 +#: authentication.py:187 msgid "Invalid token header. Token string should not contain spaces." msgstr "" -#: authentication.py:185 +#: authentication.py:193 msgid "" "Invalid token header. Token string should not contain invalid characters." msgstr "" -#: authentication.py:195 +#: authentication.py:203 msgid "Invalid token." -msgstr "" +msgstr "無效的token。" #: authtoken/apps.py:7 msgid "Auth Token" -msgstr "" +msgstr "驗證 Token" -#: authtoken/models.py:15 +#: authtoken/models.py:13 msgid "Key" -msgstr "" +msgstr "金鑰" + +#: authtoken/models.py:16 +msgid "User" +msgstr "使用者" #: authtoken/models.py:18 -msgid "User" -msgstr "" - -#: authtoken/models.py:20 msgid "Created" -msgstr "" +msgstr "建立者" -#: authtoken/models.py:29 +#: authtoken/models.py:27 authtoken/serializers.py:19 msgid "Token" -msgstr "" +msgstr "Token" -#: authtoken/models.py:30 +#: authtoken/models.py:28 msgid "Tokens" -msgstr "" - -#: authtoken/serializers.py:8 -msgid "Username" -msgstr "" +msgstr "Tokens" #: authtoken/serializers.py:9 +msgid "Username" +msgstr "使用者名稱" + +#: authtoken/serializers.py:13 msgid "Password" -msgstr "" +msgstr "密碼" -#: authtoken/serializers.py:20 -msgid "User account is disabled." -msgstr "" - -#: authtoken/serializers.py:23 +#: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." msgstr "" -#: authtoken/serializers.py:26 +#: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." -msgstr "" +msgstr "必須包含使用者名稱及密碼。" -#: exceptions.py:49 +#: exceptions.py:102 msgid "A server error occurred." msgstr "" -#: exceptions.py:84 +#: exceptions.py:142 +msgid "Invalid input." +msgstr "" + +#: exceptions.py:161 msgid "Malformed request." msgstr "" -#: exceptions.py:89 +#: exceptions.py:167 msgid "Incorrect authentication credentials." msgstr "" -#: exceptions.py:94 +#: exceptions.py:173 msgid "Authentication credentials were not provided." msgstr "" -#: exceptions.py:99 +#: exceptions.py:179 msgid "You do not have permission to perform this action." -msgstr "" +msgstr "你沒有執行此操作的權限。" -#: exceptions.py:104 views.py:81 +#: exceptions.py:185 msgid "Not found." -msgstr "" +msgstr "找不到資源。" -#: exceptions.py:109 +#: exceptions.py:191 +#, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "" +msgstr "不被允許的方法 \"{method}\"。" -#: exceptions.py:120 +#: exceptions.py:202 msgid "Could not satisfy the request Accept header." msgstr "" -#: exceptions.py:132 +#: exceptions.py:212 +#, python-brace-format msgid "Unsupported media type \"{media_type}\" in request." msgstr "" -#: exceptions.py:145 +#: exceptions.py:223 msgid "Request was throttled." msgstr "" -#: fields.py:269 relations.py:206 relations.py:239 validators.py:98 -#: validators.py:181 +#: exceptions.py:224 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "" + +#: exceptions.py:225 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "" + +#: fields.py:316 relations.py:245 relations.py:279 validators.py:90 +#: validators.py:183 msgid "This field is required." -msgstr "" +msgstr "此為必需欄位。" -#: fields.py:270 +#: fields.py:317 msgid "This field may not be null." +msgstr "此欄位不可為null。" + +#: fields.py:701 +msgid "Must be a valid boolean." msgstr "" -#: fields.py:608 fields.py:639 -msgid "\"{input}\" is not a valid boolean." +#: fields.py:766 +msgid "Not a valid string." msgstr "" -#: fields.py:674 +#: fields.py:767 msgid "This field may not be blank." -msgstr "" +msgstr "此欄位不可為空白。" -#: fields.py:675 fields.py:1675 +#: fields.py:768 fields.py:1881 +#, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "" +msgstr "請確認此欄位字元長度不超過 {max_length}。" -#: fields.py:676 +#: fields.py:769 +#, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "" +msgstr "請確認此欄位字元長度最少超過 {min_length}。" -#: fields.py:713 +#: fields.py:816 msgid "Enter a valid email address." -msgstr "" +msgstr "請輸入有效的電子郵件地址。" -#: fields.py:724 +#: fields.py:827 msgid "This value does not match the required pattern." msgstr "" -#: fields.py:735 +#: fields.py:838 msgid "" "Enter a valid \"slug\" consisting of letters, numbers, underscores or " "hyphens." msgstr "" -#: fields.py:747 +#: fields.py:839 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "" + +#: fields.py:854 msgid "Enter a valid URL." +msgstr "請輸入有效的URL。" + +#: fields.py:867 +msgid "Must be a valid UUID." msgstr "" -#: fields.py:760 -msgid "\"{value}\" is not a valid UUID." -msgstr "" - -#: fields.py:796 +#: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." -msgstr "" +msgstr "請輸入有效的 IPv4 或 IPv6 地址。" -#: fields.py:821 +#: fields.py:931 msgid "A valid integer is required." -msgstr "" +msgstr "請輸入有效的整數值。" -#: fields.py:822 fields.py:857 fields.py:891 +#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 +#, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "" +msgstr "請確認輸入值小於或等於 {max_value}。" -#: fields.py:823 fields.py:858 fields.py:892 +#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 +#, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "" +msgstr "請確認輸入值大於或等於 {min_value}。" -#: fields.py:824 fields.py:859 fields.py:896 +#: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." -msgstr "" +msgstr "字串長度太長。" -#: fields.py:856 fields.py:890 +#: fields.py:968 fields.py:1004 msgid "A valid number is required." -msgstr "" +msgstr "請輸入有效的數字。" -#: fields.py:893 +#: fields.py:1007 +#, python-brace-format msgid "Ensure that there are no more than {max_digits} digits in total." msgstr "" -#: fields.py:894 +#: fields.py:1008 +#, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." msgstr "" -#: fields.py:895 +#: fields.py:1009 +#, python-brace-format msgid "" "Ensure that there are no more than {max_whole_digits} digits before the " "decimal point." msgstr "" -#: fields.py:1025 +#: fields.py:1148 +#, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1026 +#: fields.py:1149 msgid "Expected a datetime but got a date." +msgstr "應該為日期時間格式,並非日期格式。" + +#: fields.py:1150 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." msgstr "" -#: fields.py:1103 +#: fields.py:1151 +msgid "Datetime value out of range." +msgstr "" + +#: fields.py:1236 +#, python-brace-format msgid "Date has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1104 +#: fields.py:1237 msgid "Expected a date but got a datetime." -msgstr "" +msgstr "應該為日期格式,並非日期時間格式。" -#: fields.py:1170 +#: fields.py:1303 +#, python-brace-format msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "時間格式錯誤,請在下列格式中擇一取代:{format}。" -#: fields.py:1232 +#: fields.py:1365 +#, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." msgstr "" -#: fields.py:1251 fields.py:1300 +#: fields.py:1399 fields.py:1456 +#, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "" +msgstr "\"{input}\" 不是有效的選擇。" -#: fields.py:1254 relations.py:71 relations.py:441 +#: fields.py:1402 +#, python-brace-format msgid "More than {count} items..." -msgstr "" +msgstr "超過 {count} 個項目..." -#: fields.py:1301 fields.py:1448 relations.py:437 serializers.py:524 +#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570 +#, python-brace-format msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "" +msgstr "應該為項目組成的列表,並非 \"{input_type}\" 類型。" -#: fields.py:1302 +#: fields.py:1458 msgid "This selection may not be empty." -msgstr "" +msgstr "此選項不可為空。" -#: fields.py:1339 +#: fields.py:1495 +#, python-brace-format msgid "\"{input}\" is not a valid path choice." msgstr "" -#: fields.py:1358 +#: fields.py:1514 msgid "No file was submitted." -msgstr "" +msgstr "沒有任何檔案被提交。" -#: fields.py:1359 +#: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." -msgstr "" +msgstr "提交的資料並不是檔案格式,請確認表單的編碼類型。" -#: fields.py:1360 +#: fields.py:1516 msgid "No filename could be determined." msgstr "" -#: fields.py:1361 +#: fields.py:1517 msgid "The submitted file is empty." -msgstr "" +msgstr "沒有任何檔案被提交。" -#: fields.py:1362 +#: fields.py:1518 +#, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." msgstr "" -#: fields.py:1410 +#: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." msgstr "" -#: fields.py:1449 relations.py:438 serializers.py:525 +#: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." +msgstr "此列表不可為空。" + +#: fields.py:1605 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." msgstr "" -#: fields.py:1502 +#: fields.py:1606 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "" + +#: fields.py:1682 +#, python-brace-format msgid "Expected a dictionary of items but got type \"{input_type}\"." msgstr "" -#: fields.py:1549 +#: fields.py:1683 +msgid "This dictionary may not be empty." +msgstr "" + +#: fields.py:1755 msgid "Value must be valid JSON." +msgstr "輸入值必須為有效的JSON。" + +#: filters.py:49 templates/rest_framework/filters/search.html:2 +msgid "Search" +msgstr "搜尋" + +#: filters.py:50 +msgid "A search term." msgstr "" -#: filters.py:36 templates/rest_framework/filters/django_filter.html:5 -msgid "Submit" +#: filters.py:180 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "排序" + +#: filters.py:181 +msgid "Which field to use when ordering the results." msgstr "" -#: filters.py:336 +#: filters.py:287 msgid "ascending" -msgstr "" +msgstr "升序排列" -#: filters.py:337 +#: filters.py:288 msgid "descending" +msgstr "降序排列" + +#: pagination.py:174 +msgid "A page number within the paginated result set." msgstr "" -#: pagination.py:193 +#: pagination.py:179 pagination.py:372 pagination.py:590 +msgid "Number of results to return per page." +msgstr "" + +#: pagination.py:189 msgid "Invalid page." +msgstr "無效的頁面。" + +#: pagination.py:374 +msgid "The initial index from which to return the results." msgstr "" -#: pagination.py:427 +#: pagination.py:581 +msgid "The pagination cursor value." +msgstr "" + +#: pagination.py:583 msgid "Invalid cursor" msgstr "" -#: relations.py:207 +#: relations.py:246 +#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "無效的主鍵 \"{pk_value}\" - 物件不存在。" -#: relations.py:208 +#: relations.py:247 +#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "" -#: relations.py:240 +#: relations.py:280 msgid "Invalid hyperlink - No URL match." -msgstr "" +msgstr "無效的超連結 - 沒有匹配的URL。" -#: relations.py:241 +#: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" +msgstr "無效的超連結 - 匹配的URL不正確。" -#: relations.py:242 +#: relations.py:282 msgid "Invalid hyperlink - Object does not exist." -msgstr "" +msgstr "無效的超連結 - 物件不存在。" -#: relations.py:243 +#: relations.py:283 +#, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." msgstr "" -#: relations.py:401 +#: relations.py:448 +#, python-brace-format msgid "Object with {slug_name}={value} does not exist." msgstr "" -#: relations.py:402 +#: relations.py:449 msgid "Invalid value." +msgstr "無效值。" + +#: schemas/utils.py:32 +msgid "unique integer value" msgstr "" -#: serializers.py:326 -msgid "Invalid data. Expected a dictionary, but got {datatype}." +#: schemas/utils.py:34 +msgid "UUID string" msgstr "" +#: schemas/utils.py:36 +msgid "unique value" +msgstr "" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "" + +#: serializers.py:337 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "無效的資料,應該為字典類型,並非 {datatype}。" + #: templates/rest_framework/admin.html:116 -#: templates/rest_framework/base.html:128 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 msgid "Filters" +msgstr "篩選" + +#: templates/rest_framework/base.html:37 +msgid "navbar" msgstr "" -#: templates/rest_framework/filters/django_filter.html:2 -#: templates/rest_framework/filters/django_filter_crispyforms.html:4 -msgid "Field filters" +#: templates/rest_framework/base.html:75 +msgid "content" msgstr "" -#: templates/rest_framework/filters/ordering.html:3 -msgid "Ordering" +#: templates/rest_framework/base.html:78 +msgid "request form" msgstr "" -#: templates/rest_framework/filters/search.html:2 -msgid "Search" +#: templates/rest_framework/base.html:157 +msgid "main content" msgstr "" -#: templates/rest_framework/horizontal/radio.html:2 -#: templates/rest_framework/inline/radio.html:2 -#: templates/rest_framework/vertical/radio.html:2 +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 msgid "None" -msgstr "" +msgstr "無" -#: templates/rest_framework/horizontal/select_multiple.html:2 -#: templates/rest_framework/inline/select_multiple.html:2 -#: templates/rest_framework/vertical/select_multiple.html:2 +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." msgstr "" -#: validators.py:43 +#: validators.py:39 msgid "This field must be unique." -msgstr "" +msgstr "此欄位必須唯一。" -#: validators.py:97 +#: validators.py:89 +#, python-brace-format msgid "The fields {field_names} must make a unique set." msgstr "" -#: validators.py:245 +#: validators.py:171 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "" + +#: validators.py:243 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" date." msgstr "" -#: validators.py:260 +#: validators.py:258 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" month." msgstr "" -#: validators.py:273 +#: validators.py:271 +#, python-brace-format msgid "This field must be unique for the \"{date_field}\" year." msgstr "" -#: versioning.py:42 +#: versioning.py:40 msgid "Invalid version in \"Accept\" header." msgstr "" -#: versioning.py:73 +#: versioning.py:71 msgid "Invalid version in URL path." msgstr "" -#: versioning.py:115 +#: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." msgstr "" -#: versioning.py:147 +#: versioning.py:148 msgid "Invalid version in hostname." msgstr "" -#: versioning.py:169 +#: versioning.py:170 msgid "Invalid version in query parameter." msgstr "" - -#: views.py:88 -msgid "Permission denied." -msgstr "" diff --git a/rest_framework/management/commands/generateschema.py b/rest_framework/management/commands/generateschema.py index a7763492c..024306b65 100644 --- a/rest_framework/management/commands/generateschema.py +++ b/rest_framework/management/commands/generateschema.py @@ -25,6 +25,7 @@ class Command(BaseCommand): parser.add_argument('--format', dest="format", choices=['openapi', 'openapi-json'], default='openapi', type=str) parser.add_argument('--urlconf', dest="urlconf", default=None, type=str) parser.add_argument('--generator_class', dest="generator_class", default=None, type=str) + parser.add_argument('--file', dest="file", default=None, type=str) def handle(self, *args, **options): if options['generator_class']: @@ -40,7 +41,12 @@ class Command(BaseCommand): schema = generator.get_schema(request=None, public=True) renderer = self.get_renderer(options['format']) output = renderer.render(schema, renderer_context={}) - self.stdout.write(output.decode()) + + if options['file']: + with open(options['file'], 'wb') as f: + f.write(output) + else: + self.stdout.write(output.decode()) def get_renderer(self, format): if self.get_mode() == COREAPI_MODE: diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index a68e8ab12..60a57c8e4 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -80,7 +80,7 @@ def _get_displayed_page_numbers(current, final): # Now sort the page numbers and drop anything outside the limits. included = [ - idx for idx in sorted(list(included)) + idx for idx in sorted(included) if 0 < idx <= final ] @@ -138,6 +138,9 @@ class BasePagination: def get_paginated_response(self, data): # pragma: no cover raise NotImplementedError('get_paginated_response() must be implemented.') + def get_paginated_response_schema(self, schema): + return schema + def to_html(self): # pragma: no cover raise NotImplementedError('to_html() must be implemented to display page controls.') @@ -222,6 +225,32 @@ class PageNumberPagination(BasePagination): ('results', data) ])) + def get_paginated_response_schema(self, schema): + return { + 'type': 'object', + 'properties': { + 'count': { + 'type': 'integer', + 'example': 123, + }, + 'next': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?{page_query_param}=4'.format( + page_query_param=self.page_query_param) + }, + 'previous': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?{page_query_param}=2'.format( + page_query_param=self.page_query_param) + }, + 'results': schema, + }, + } + def get_page_size(self, request): if self.page_size_query_param: try: @@ -369,6 +398,32 @@ class LimitOffsetPagination(BasePagination): ('results', data) ])) + def get_paginated_response_schema(self, schema): + return { + 'type': 'object', + 'properties': { + 'count': { + 'type': 'integer', + 'example': 123, + }, + 'next': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?{offset_param}=400&{limit_param}=100'.format( + offset_param=self.offset_query_param, limit_param=self.limit_query_param), + }, + 'previous': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?{offset_param}=200&{limit_param}=100'.format( + offset_param=self.offset_query_param, limit_param=self.limit_query_param), + }, + 'results': schema, + }, + } + def get_limit(self, request): if self.limit_query_param: try: @@ -840,6 +895,22 @@ class CursorPagination(BasePagination): ('results', data) ])) + def get_paginated_response_schema(self, schema): + return { + 'type': 'object', + 'properties': { + 'next': { + 'type': 'string', + 'nullable': True, + }, + 'previous': { + 'type': 'string', + 'nullable': True, + }, + 'results': schema, + }, + } + def get_html_context(self): return { 'previous_url': self.get_previous_link(), diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 3c2132c5b..eaf27e1d9 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -6,7 +6,7 @@ from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.db.models import Manager from django.db.models.query import QuerySet from django.urls import NoReverseMatch, Resolver404, get_script_prefix, resolve -from django.utils.encoding import smart_text, uri_to_iri +from django.utils.encoding import smart_str, uri_to_iri from django.utils.translation import gettext_lazy as _ from rest_framework.fields import ( @@ -46,13 +46,13 @@ class Hyperlink(str): We use this for hyperlinked URLs that may render as a named link in some contexts, or render as a plain URL in others. """ - def __new__(self, url, obj): - ret = str.__new__(self, url) + def __new__(cls, url, obj): + ret = super().__new__(cls, url) ret.obj = obj return ret def __getnewargs__(self): - return(str(self), self.name,) + return (str(self), self.name) @property def name(self): @@ -175,8 +175,13 @@ class RelatedField(Field): value = attribute_instance.serializable_value(self.source_attrs[-1]) if is_simple_callable(value): # Handle edge case where the relationship `source` argument - # points to a `get_relationship()` method on the model - value = value().pk + # points to a `get_relationship()` method on the model. + value = value() + + # Handle edge case where relationship `source` argument points + # to an instance instead of a pk (e.g., a `@property`). + value = getattr(value, 'pk', value) + return PKOnlyObject(pk=value) except AttributeError: pass @@ -252,8 +257,9 @@ class PrimaryKeyRelatedField(RelatedField): def to_internal_value(self, data): if self.pk_field is not None: data = self.pk_field.to_internal_value(data) + queryset = self.get_queryset() try: - return self.get_queryset().get(pk=data) + return queryset.get(pk=data) except ObjectDoesNotExist: self.fail('does_not_exist', pk_value=data) except (TypeError, ValueError): @@ -344,7 +350,7 @@ class HyperlinkedRelatedField(RelatedField): if data.startswith(prefix): data = '/' + data[len(prefix):] - data = uri_to_iri(data) + data = uri_to_iri(parse.unquote(data)) try: match = resolve(data) @@ -449,10 +455,11 @@ class SlugRelatedField(RelatedField): super().__init__(**kwargs) def to_internal_value(self, data): + queryset = self.get_queryset() try: - return self.get_queryset().get(**{self.slug_field: data}) + return queryset.get(**{self.slug_field: data}) except ObjectDoesNotExist: - self.fail('does_not_exist', slug_name=self.slug_field, value=smart_text(data)) + self.fail('does_not_exist', slug_name=self.slug_field, value=smart_str(data)) except (TypeError, ValueError): self.fail('invalid') diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py index 9a6f3c3c5..3c4be8aeb 100644 --- a/rest_framework/renderers.py +++ b/rest_framework/renderers.py @@ -16,7 +16,6 @@ from django.core.exceptions import ImproperlyConfigured from django.core.paginator import Page from django.http.multipartparser import parse_header from django.template import engines, loader -from django.test.client import encode_multipart from django.urls import NoReverseMatch from django.utils.html import mark_safe @@ -330,7 +329,7 @@ class HTMLFormRenderer(BaseRenderer): if isinstance(field._field, serializers.HiddenField): return '' - style = dict(self.default_style[field]) + style = self.default_style[field].copy() style.update(field.style) if 'template_pack' not in style: style['template_pack'] = parent_style.get('template_pack', self.template_pack) @@ -419,7 +418,7 @@ class BrowsableAPIRenderer(BaseRenderer): if render_style == 'binary': return '[%d bytes of binary content]' % len(content) - return content + return content.decode('utf-8') if isinstance(content, bytes) else content def show_form_for_method(self, view, method, request, obj): """ @@ -857,8 +856,8 @@ class DocumentationRenderer(BaseRenderer): return { 'document': data, 'langs': self.languages, - 'lang_htmls': ["rest_framework/docs/langs/%s.html" % l for l in self.languages], - 'lang_intro_htmls': ["rest_framework/docs/langs/%s-intro.html" % l for l in self.languages], + 'lang_htmls': ["rest_framework/docs/langs/%s.html" % language for language in self.languages], + 'lang_intro_htmls': ["rest_framework/docs/langs/%s-intro.html" % language for language in self.languages], 'code_style': pygments_css(self.code_style), 'request': request } @@ -902,6 +901,8 @@ class MultiPartRenderer(BaseRenderer): BOUNDARY = 'BoUnDaRyStRiNg' def render(self, data, accepted_media_type=None, renderer_context=None): + from django.test.client import encode_multipart + if hasattr(data, 'items'): for key, value in data.items(): assert not isinstance(value, dict), ( @@ -1052,7 +1053,11 @@ class OpenAPIRenderer(BaseRenderer): assert yaml, 'Using OpenAPIRenderer, but `pyyaml` is not installed.' def render(self, data, media_type=None, renderer_context=None): - return yaml.dump(data, default_flow_style=False, sort_keys=False).encode('utf-8') + # disable yaml advanced feature 'alias' for clean, portable, and readable output + class Dumper(yaml.Dumper): + def ignore_aliases(self, data): + return True + return yaml.dump(data, default_flow_style=False, sort_keys=False, Dumper=Dumper).encode('utf-8') class JSONOpenAPIRenderer(BaseRenderer): diff --git a/rest_framework/request.py b/rest_framework/request.py index ec4b749c2..2a007cd2b 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -143,9 +143,9 @@ class Request: Kwargs: - request(HttpRequest). The original request instance. - - parsers_classes(list/tuple). The parsers to use for parsing the + - parsers(list/tuple). The parsers to use for parsing the request content. - - authentication_classes(list/tuple). The authentications used to try + - authenticators(list/tuple). The authenticators used to try authenticating the request's user. """ @@ -179,6 +179,13 @@ class Request: forced_auth = ForcedAuthentication(force_user, force_token) self.authenticators = (forced_auth,) + def __repr__(self): + return '<%s.%s: %s %r>' % ( + self.__class__.__module__, + self.__class__.__name__, + self.method, + self.get_full_path()) + def _default_negotiator(self): return api_settings.DEFAULT_CONTENT_NEGOTIATION_CLASS() diff --git a/rest_framework/routers.py b/rest_framework/routers.py index ee5760e81..e2afa573f 100644 --- a/rest_framework/routers.py +++ b/rest_framework/routers.py @@ -14,15 +14,12 @@ For example, you might have a `urls.py` that looks something like this: urlpatterns = router.urls """ import itertools -import warnings from collections import OrderedDict, namedtuple -from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured -from django.urls import NoReverseMatch -from django.utils.deprecation import RenameMethodsBase +from django.urls import NoReverseMatch, re_path -from rest_framework import RemovedInDRF311Warning, views +from rest_framework import views from rest_framework.response import Response from rest_framework.reverse import reverse from rest_framework.schemas import SchemaGenerator @@ -38,9 +35,7 @@ def escape_curly_brackets(url_path): """ Double brackets in regex of url_path for escape string formatting """ - if ('{' and '}') in url_path: - url_path = url_path.replace('{', '{{').replace('}', '}}') - return url_path + return url_path.replace('{', '{{').replace('}', '}}') def flatten(list_of_lists): @@ -50,27 +45,11 @@ def flatten(list_of_lists): return itertools.chain(*list_of_lists) -class RenameRouterMethods(RenameMethodsBase): - renamed_methods = ( - ('get_default_base_name', 'get_default_basename', RemovedInDRF311Warning), - ) - - -class BaseRouter(metaclass=RenameRouterMethods): +class BaseRouter: def __init__(self): self.registry = [] - def register(self, prefix, viewset, basename=None, base_name=None): - if base_name is not None: - msg = "The `base_name` argument is pending deprecation in favor of `basename`." - warnings.warn(msg, RemovedInDRF311Warning, 2) - - assert not (basename and base_name), ( - "Do not provide both the `basename` and `base_name` arguments.") - - if basename is None: - basename = base_name - + def register(self, prefix, viewset, basename=None): if basename is None: basename = self.get_default_basename(viewset) self.registry.append((prefix, viewset, basename)) @@ -285,7 +264,7 @@ class SimpleRouter(BaseRouter): view = viewset.as_view(mapping, **initkwargs) name = route.name.format(basename=basename) - ret.append(url(regex, view, name=name)) + ret.append(re_path(regex, view, name=name)) return ret @@ -360,7 +339,7 @@ class DefaultRouter(SimpleRouter): if self.include_root_view: view = self.get_api_root_view(api_urls=urls) - root_url = url(r'^$', view, name=self.root_view_name) + root_url = re_path(r'^$', view, name=self.root_view_name) urls.append(root_url) if self.include_format_suffixes: diff --git a/rest_framework/schemas/__init__.py b/rest_framework/schemas/__init__.py index 8fdb2d86a..b63cb2353 100644 --- a/rest_framework/schemas/__init__.py +++ b/rest_framework/schemas/__init__.py @@ -23,15 +23,16 @@ Other access should target the submodules directly from rest_framework.settings import api_settings from . import coreapi, openapi -from .inspectors import DefaultSchema # noqa from .coreapi import AutoSchema, ManualSchema, SchemaGenerator # noqa +from .inspectors import DefaultSchema # noqa def get_schema_view( title=None, url=None, description=None, urlconf=None, renderer_classes=None, public=False, patterns=None, generator_class=None, authentication_classes=api_settings.DEFAULT_AUTHENTICATION_CLASSES, - permission_classes=api_settings.DEFAULT_PERMISSION_CLASSES): + permission_classes=api_settings.DEFAULT_PERMISSION_CLASSES, + version=None): """ Return a schema view. """ @@ -43,7 +44,7 @@ def get_schema_view( generator = generator_class( title=title, url=url, description=description, - urlconf=urlconf, patterns=patterns, + urlconf=urlconf, patterns=patterns, version=version ) # Avoid import cycle on APIView diff --git a/rest_framework/schemas/coreapi.py b/rest_framework/schemas/coreapi.py index 8d9099f2a..75ed5671a 100644 --- a/rest_framework/schemas/coreapi.py +++ b/rest_framework/schemas/coreapi.py @@ -1,26 +1,18 @@ -import re import warnings from collections import Counter, OrderedDict from urllib import parse from django.db import models -from django.utils.encoding import force_str, smart_text +from django.utils.encoding import force_str from rest_framework import exceptions, serializers from rest_framework.compat import coreapi, coreschema, uritemplate from rest_framework.settings import api_settings -from rest_framework.utils import formatting from .generators import BaseSchemaGenerator from .inspectors import ViewInspector from .utils import get_pk_description, is_list_view -# Used in _get_description_section() -# TODO: ???: move up to base. -header_regex = re.compile('^[a-zA-Z][0-9A-Za-z_]*:') - -# Generator # - def common_path(paths): split_paths = [path.strip('/').split('/') for path in paths] @@ -124,7 +116,7 @@ class SchemaGenerator(BaseSchemaGenerator): # Set by 'SCHEMA_COERCE_METHOD_NAMES'. coerce_method_names = None - def __init__(self, title=None, url=None, description=None, patterns=None, urlconf=None): + def __init__(self, title=None, url=None, description=None, patterns=None, urlconf=None, version=None): assert coreapi, '`coreapi` must be installed for schema support.' assert coreschema, '`coreschema` must be installed for schema support.' @@ -397,44 +389,6 @@ class AutoSchema(ViewInspector): description=description ) - def get_description(self, path, method): - """ - Determine a link description. - - This will be based on the method docstring if one exists, - or else the class docstring. - """ - view = self.view - - method_name = getattr(view, 'action', method.lower()) - method_docstring = getattr(view, method_name, None).__doc__ - if method_docstring: - # An explicit docstring on the method or action. - return self._get_description_section(view, method.lower(), formatting.dedent(smart_text(method_docstring))) - else: - return self._get_description_section(view, getattr(view, 'action', method.lower()), view.get_view_description()) - - def _get_description_section(self, view, header, description): - lines = [line for line in description.splitlines()] - current_section = '' - sections = {'': ''} - - for line in lines: - if header_regex.match(line): - current_section, seperator, lead = line.partition(':') - sections[current_section] = lead.strip() - else: - sections[current_section] += '\n' + line - - # TODO: SCHEMA_COERCE_METHOD_NAMES appears here and in `SchemaGenerator.get_keys` - coerce_method_names = api_settings.SCHEMA_COERCE_METHOD_NAMES - if header in sections: - return sections[header].strip() - if header in coerce_method_names: - if coerce_method_names[header] in sections: - return sections[coerce_method_names[header]].strip() - return sections[''].strip() - def get_path_fields(self, path, method): """ Return a list of `coreapi.Field` instances corresponding to any diff --git a/rest_framework/schemas/generators.py b/rest_framework/schemas/generators.py index a656c3ba5..d3c6446aa 100644 --- a/rest_framework/schemas/generators.py +++ b/rest_framework/schemas/generators.py @@ -10,9 +10,9 @@ from django.conf import settings from django.contrib.admindocs.views import simplify_regex from django.core.exceptions import PermissionDenied from django.http import Http404 +from django.urls import URLPattern, URLResolver from rest_framework import exceptions -from rest_framework.compat import URLPattern, URLResolver, get_original_route from rest_framework.request import clone_request from rest_framework.settings import api_settings from rest_framework.utils.model_meta import _get_pk @@ -79,7 +79,7 @@ class EndpointEnumerator: api_endpoints = [] for pattern in patterns: - path_regex = prefix + get_original_route(pattern) + path_regex = prefix + str(pattern.pattern) if isinstance(pattern, URLPattern): path = self.get_path_from_regex(path_regex) callback = pattern.callback @@ -143,7 +143,7 @@ class EndpointEnumerator: return [method for method in methods if method not in ('OPTIONS', 'HEAD')] -class BaseSchemaGenerator(object): +class BaseSchemaGenerator: endpoint_inspector_cls = EndpointEnumerator # 'pk' isn't great as an externally exposed name for an identifier, @@ -151,7 +151,7 @@ class BaseSchemaGenerator(object): # Set by 'SCHEMA_COERCE_PATH_PK'. coerce_path_pk = None - def __init__(self, title=None, url=None, description=None, patterns=None, urlconf=None): + def __init__(self, title=None, url=None, description=None, patterns=None, urlconf=None, version=None): if url and not url.endswith('/'): url += '/' @@ -161,6 +161,7 @@ class BaseSchemaGenerator(object): self.urlconf = urlconf self.title = title self.description = description + self.version = version self.url = url self.endpoints = None diff --git a/rest_framework/schemas/inspectors.py b/rest_framework/schemas/inspectors.py index 86fcdc435..027472db1 100644 --- a/rest_framework/schemas/inspectors.py +++ b/rest_framework/schemas/inspectors.py @@ -3,9 +3,13 @@ inspectors.py # Per-endpoint view introspection See schemas.__init__.py for package overview. """ +import re from weakref import WeakKeyDictionary +from django.utils.encoding import smart_str + from rest_framework.settings import api_settings +from rest_framework.utils import formatting class ViewInspector: @@ -15,6 +19,9 @@ class ViewInspector: Provide subclass for per-view schema generation """ + # Used in _get_description_section() + header_regex = re.compile('^[a-zA-Z][0-9A-Za-z_]*:') + def __init__(self): self.instance_schemas = WeakKeyDictionary() @@ -62,6 +69,45 @@ class ViewInspector: def view(self): self._view = None + def get_description(self, path, method): + """ + Determine a path description. + + This will be based on the method docstring if one exists, + or else the class docstring. + """ + view = self.view + + method_name = getattr(view, 'action', method.lower()) + method_docstring = getattr(view, method_name, None).__doc__ + if method_docstring: + # An explicit docstring on the method or action. + return self._get_description_section(view, method.lower(), formatting.dedent(smart_str(method_docstring))) + else: + return self._get_description_section(view, getattr(view, 'action', method.lower()), + view.get_view_description()) + + def _get_description_section(self, view, header, description): + lines = [line for line in description.splitlines()] + current_section = '' + sections = {'': ''} + + for line in lines: + if self.header_regex.match(line): + current_section, separator, lead = line.partition(':') + sections[current_section] = lead.strip() + else: + sections[current_section] += '\n' + line + + # TODO: SCHEMA_COERCE_METHOD_NAMES appears here and in `SchemaGenerator.get_keys` + coerce_method_names = api_settings.SCHEMA_COERCE_METHOD_NAMES + if header in sections: + return sections[header].strip() + if header in coerce_method_names: + if coerce_method_names[header] in sections: + return sections[coerce_method_names[header]].strip() + return sections[''].strip() + class DefaultSchema(ViewInspector): """Allows overriding AutoSchema using DEFAULT_SCHEMA_CLASS setting""" diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index 0af7510cd..4ecb7a65f 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -1,4 +1,8 @@ +import re import warnings +from collections import OrderedDict +from decimal import Decimal +from operator import attrgetter from urllib.parse import urljoin from django.core.validators import ( @@ -8,23 +12,25 @@ from django.core.validators import ( from django.db import models from django.utils.encoding import force_str -from rest_framework import exceptions, serializers +from rest_framework import ( + RemovedInDRF314Warning, exceptions, renderers, serializers +) from rest_framework.compat import uritemplate from rest_framework.fields import _UnvalidatedField, empty +from rest_framework.settings import api_settings from .generators import BaseSchemaGenerator from .inspectors import ViewInspector from .utils import get_pk_description, is_list_view -# Generator - class SchemaGenerator(BaseSchemaGenerator): def get_info(self): + # Title and version are required by openapi specification 3.x info = { - 'title': self.title, - 'version': 'TODO', + 'title': self.title or '', + 'version': self.version or '' } if self.description is not None: @@ -32,45 +38,79 @@ class SchemaGenerator(BaseSchemaGenerator): return info - def get_paths(self, request=None): - result = {} - - paths, view_endpoints = self._get_paths_and_endpoints(request) - - # Only generate the path prefix for paths that will be included - if not paths: - return None - - for path, method, view in view_endpoints: - if not self.has_view_permissions(path, method, view): - continue - operation = view.schema.get_operation(path, method) - # Normalise path for any provided mount url. - if path.startswith('/'): - path = path[1:] - path = urljoin(self.url or '/', path) - - result.setdefault(path, {}) - result[path][method.lower()] = operation - - return result + def check_duplicate_operation_id(self, paths): + ids = {} + for route in paths: + for method in paths[route]: + if 'operationId' not in paths[route][method]: + continue + operation_id = paths[route][method]['operationId'] + if operation_id in ids: + warnings.warn( + 'You have a duplicated operationId in your OpenAPI schema: {operation_id}\n' + '\tRoute: {route1}, Method: {method1}\n' + '\tRoute: {route2}, Method: {method2}\n' + '\tAn operationId has to be unique across your schema. Your schema may not work in other tools.' + .format( + route1=ids[operation_id]['route'], + method1=ids[operation_id]['method'], + route2=route, + method2=method, + operation_id=operation_id + ) + ) + ids[operation_id] = { + 'route': route, + 'method': method + } def get_schema(self, request=None, public=False): """ Generate a OpenAPI schema. """ self._initialise_endpoints() + components_schemas = {} - paths = self.get_paths(None if public else request) - if not paths: - return None + # Iterate endpoints generating per method path operations. + paths = {} + _, view_endpoints = self._get_paths_and_endpoints(None if public else request) + for path, method, view in view_endpoints: + if not self.has_view_permissions(path, method, view): + continue + operation = view.schema.get_operation(path, method) + components = view.schema.get_components(path, method) + for k in components.keys(): + if k not in components_schemas: + continue + if components_schemas[k] == components[k]: + continue + warnings.warn('Schema component "{}" has been overriden with a different value.'.format(k)) + + components_schemas.update(components) + + # Normalise path for any provided mount url. + if path.startswith('/'): + path = path[1:] + path = urljoin(self.url or '/', path) + + paths.setdefault(path, {}) + paths[path][method.lower()] = operation + + self.check_duplicate_operation_id(paths) + + # Compile final schema. schema = { 'openapi': '3.0.2', 'info': self.get_info(), 'paths': paths, } + if len(components_schemas) > 0: + schema['components'] = { + 'schemas': components_schemas + } + return schema # View Inspectors @@ -78,53 +118,112 @@ class SchemaGenerator(BaseSchemaGenerator): class AutoSchema(ViewInspector): - content_types = ['application/json'] + def __init__(self, tags=None, operation_id_base=None, component_name=None): + """ + :param operation_id_base: user-defined name in operationId. If empty, it will be deducted from the Model/Serializer/View name. + :param component_name: user-defined component's name. If empty, it will be deducted from the Serializer's class name. + """ + if tags and not all(isinstance(tag, str) for tag in tags): + raise ValueError('tags must be a list or tuple of string.') + self._tags = tags + self.operation_id_base = operation_id_base + self.component_name = component_name + super().__init__() + + request_media_types = [] + response_media_types = [] + method_mapping = { - 'get': 'Retrieve', - 'post': 'Create', - 'put': 'Update', - 'patch': 'PartialUpdate', - 'delete': 'Destroy', + 'get': 'retrieve', + 'post': 'create', + 'put': 'update', + 'patch': 'partialUpdate', + 'delete': 'destroy', } def get_operation(self, path, method): operation = {} - operation['operationId'] = self._get_operation_id(path, method) + operation['operationId'] = self.get_operation_id(path, method) + operation['description'] = self.get_description(path, method) parameters = [] - parameters += self._get_path_parameters(path, method) - parameters += self._get_pagination_parameters(path, method) - parameters += self._get_filter_parameters(path, method) + parameters += self.get_path_parameters(path, method) + parameters += self.get_pagination_parameters(path, method) + parameters += self.get_filter_parameters(path, method) operation['parameters'] = parameters - request_body = self._get_request_body(path, method) + request_body = self.get_request_body(path, method) if request_body: operation['requestBody'] = request_body - operation['responses'] = self._get_responses(path, method) + operation['responses'] = self.get_responses(path, method) + operation['tags'] = self.get_tags(path, method) return operation - def _get_operation_id(self, path, method): + def get_component_name(self, serializer): """ - Compute an operation ID from the model, serializer or view name. + Compute the component's name from the serializer. + Raise an exception if the serializer's class name is "Serializer" (case-insensitive). """ - method_name = getattr(self.view, 'action', method.lower()) - if is_list_view(path, method, self.view): - action = 'List' - elif method_name not in self.method_mapping: - action = method_name - else: - action = self.method_mapping[method.lower()] + if self.component_name is not None: + return self.component_name + + # use the serializer's class name as the component name. + component_name = serializer.__class__.__name__ + # We remove the "serializer" string from the class name. + pattern = re.compile("serializer", re.IGNORECASE) + component_name = pattern.sub("", component_name) + + if component_name == "": + raise Exception( + '"{}" is an invalid class name for schema generation. ' + 'Serializer\'s class name should be unique and explicit. e.g. "ItemSerializer"' + .format(serializer.__class__.__name__) + ) + + return component_name + + def get_components(self, path, method): + """ + Return components with their properties from the serializer. + """ + + if method.lower() == 'delete': + return {} + + serializer = self.get_serializer(path, method) + + if not isinstance(serializer, serializers.Serializer): + return {} + + component_name = self.get_component_name(serializer) + + content = self.map_serializer(serializer) + return {component_name: content} + + def _to_camel_case(self, snake_str): + components = snake_str.split('_') + # We capitalize the first letter of each component except the first one + # with the 'title' method and join them together. + return components[0] + ''.join(x.title() for x in components[1:]) + + def get_operation_id_base(self, path, method, action): + """ + Compute the base part for operation ID from the model, serializer or view name. + """ + model = getattr(getattr(self.view, 'queryset', None), 'model', None) + + if self.operation_id_base is not None: + name = self.operation_id_base # Try to deduce the ID from the view's model - model = getattr(getattr(self.view, 'queryset', None), 'model', None) - if model is not None: + elif model is not None: name = model.__name__ # Try with the serializer class name - elif hasattr(self.view, 'get_serializer_class'): - name = self.view.get_serializer_class().__name__ + elif self.get_serializer(path, method) is not None: + name = self.get_serializer(path, method).__class__.__name__ if name.endswith('Serializer'): name = name[:-10] @@ -135,15 +234,34 @@ class AutoSchema(ViewInspector): name = name[:-7] elif name.endswith('View'): name = name[:-4] - if name.endswith(action): # ListView, UpdateAPIView, ThingDelete ... + + # Due to camel-casing of classes and `action` being lowercase, apply title in order to find if action truly + # comes at the end of the name + if name.endswith(action.title()): # ListView, UpdateAPIView, ThingDelete ... name = name[:-len(action)] - if action == 'List' and not name.endswith('s'): # ListThings instead of ListThing + if action == 'list' and not name.endswith('s'): # listThings instead of listThing name += 's' + return name + + def get_operation_id(self, path, method): + """ + Compute an operation ID from the view type and get_operation_id_base method. + """ + method_name = getattr(self.view, 'action', method.lower()) + if is_list_view(path, method, self.view): + action = 'list' + elif method_name not in self.method_mapping: + action = self._to_camel_case(method_name) + else: + action = self.method_mapping[method.lower()] + + name = self.get_operation_id_base(path, method, action) + return action + name - def _get_path_parameters(self, path, method): + def get_path_parameters(self, path, method): """ Return a list of parameters from templated path variables. """ @@ -179,15 +297,15 @@ class AutoSchema(ViewInspector): return parameters - def _get_filter_parameters(self, path, method): - if not self._allows_filters(path, method): + def get_filter_parameters(self, path, method): + if not self.allows_filters(path, method): return [] parameters = [] for filter_backend in self.view.filter_backends: parameters += filter_backend().get_schema_operation_parameters(self.view) return parameters - def _allows_filters(self, path, method): + def allows_filters(self, path, method): """ Determine whether to include filter Fields in schema. @@ -200,29 +318,56 @@ class AutoSchema(ViewInspector): return self.view.action in ["list", "retrieve", "update", "partial_update", "destroy"] return method.lower() in ["get", "put", "patch", "delete"] - def _get_pagination_parameters(self, path, method): + def get_pagination_parameters(self, path, method): view = self.view if not is_list_view(path, method, view): return [] - pagination = getattr(view, 'pagination_class', None) - if not pagination: + paginator = self.get_paginator() + if not paginator: return [] - paginator = view.pagination_class() return paginator.get_schema_operation_parameters(view) - def _map_field(self, field): + def map_choicefield(self, field): + choices = list(OrderedDict.fromkeys(field.choices)) # preserve order and remove duplicates + if all(isinstance(choice, bool) for choice in choices): + type = 'boolean' + elif all(isinstance(choice, int) for choice in choices): + type = 'integer' + elif all(isinstance(choice, (int, float, Decimal)) for choice in choices): # `number` includes `integer` + # Ref: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.21 + type = 'number' + elif all(isinstance(choice, str) for choice in choices): + type = 'string' + else: + type = None + + mapping = { + # The value of `enum` keyword MUST be an array and SHOULD be unique. + # Ref: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.20 + 'enum': choices + } + + # If We figured out `type` then and only then we should set it. It must be a string. + # Ref: https://swagger.io/docs/specification/data-models/data-types/#mixed-type + # It is optional but it can not be null. + # Ref: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.21 + if type: + mapping['type'] = type + return mapping + + def map_field(self, field): # Nested Serializers, `many` or not. if isinstance(field, serializers.ListSerializer): return { 'type': 'array', - 'items': self._map_serializer(field.child) + 'items': self.map_serializer(field.child) } if isinstance(field, serializers.Serializer): - data = self._map_serializer(field) + data = self.map_serializer(field) data['type'] = 'object' return data @@ -230,7 +375,7 @@ class AutoSchema(ViewInspector): if isinstance(field, serializers.ManyRelatedField): return { 'type': 'array', - 'items': self._map_field(field.child_relation) + 'items': self.map_field(field.child_relation) } if isinstance(field, serializers.PrimaryKeyRelatedField): model = getattr(field.queryset, 'model', None) @@ -246,15 +391,11 @@ class AutoSchema(ViewInspector): if isinstance(field, serializers.MultipleChoiceField): return { 'type': 'array', - 'items': { - 'enum': list(field.choices) - }, + 'items': self.map_choicefield(field) } if isinstance(field, serializers.ChoiceField): - return { - 'enum': list(field.choices), - } + return self.map_choicefield(field) # ListField. if isinstance(field, serializers.ListField): @@ -263,9 +404,7 @@ class AutoSchema(ViewInspector): 'items': {}, } if not isinstance(field.child, _UnvalidatedField): - mapping['items'] = { - "type": self._map_field(field.child).get('type') - } + mapping['items'] = self.map_field(field.child) return mapping # DateField and DateTimeField type is string @@ -310,11 +449,17 @@ class AutoSchema(ViewInspector): content['format'] = field.protocol return content - # DecimalField has multipleOf based on decimal_places if isinstance(field, serializers.DecimalField): - content = { - 'type': 'number' - } + if getattr(field, 'coerce_to_string', api_settings.COERCE_DECIMAL_TO_STRING): + content = { + 'type': 'string', + 'format': 'decimal', + } + else: + content = { + 'type': 'number' + } + if field.decimal_places: content['multipleOf'] = float('.' + (field.decimal_places - 1) * '0' + '1') if field.max_whole_digits: @@ -325,7 +470,7 @@ class AutoSchema(ViewInspector): if isinstance(field, serializers.FloatField): content = { - 'type': 'number' + 'type': 'number', } self._map_min_max(field, content) return content @@ -335,13 +480,23 @@ class AutoSchema(ViewInspector): 'type': 'integer' } self._map_min_max(field, content) + # 2147483647 is max for int32_size, so we use int64 for format + if int(content.get('maximum', 0)) > 2147483647 or int(content.get('minimum', 0)) > 2147483647: + content['format'] = 'int64' return content + if isinstance(field, serializers.FileField): + return { + 'type': 'string', + 'format': 'binary' + } + # Simplest cases, default to 'string' type: FIELD_CLASS_SCHEMA_TYPE = { serializers.BooleanField: 'boolean', serializers.JSONField: 'object', serializers.DictField: 'object', + serializers.HStoreField: 'object', } return {'type': FIELD_CLASS_SCHEMA_TYPE.get(field.__class__, 'string')} @@ -351,12 +506,8 @@ class AutoSchema(ViewInspector): if field.min_value: content['minimum'] = field.min_value - def _map_serializer(self, serializer): + def map_serializer(self, serializer): # Assuming we have a valid serializer instance. - # TODO: - # - field is Nested or List serializer. - # - Handle read_only/write_only for request/response differences. - # - could do this with readOnly/writeOnly and then filter dict. required = [] properties = {} @@ -367,36 +518,35 @@ class AutoSchema(ViewInspector): if field.required: required.append(field.field_name) - schema = self._map_field(field) + schema = self.map_field(field) if field.read_only: schema['readOnly'] = True if field.write_only: schema['writeOnly'] = True if field.allow_null: schema['nullable'] = True - if field.default and field.default != empty: # why don't they use None?! + if field.default is not None and field.default != empty and not callable(field.default): schema['default'] = field.default if field.help_text: schema['description'] = str(field.help_text) - self._map_field_validators(field.validators, schema) + self.map_field_validators(field, schema) properties[field.field_name] = schema result = { + 'type': 'object', 'properties': properties } - if len(required) > 0: + if required: result['required'] = required return result - def _map_field_validators(self, validators, schema): + def map_field_validators(self, field, schema): """ map field validators - :param list:validators: list of field validators - :param dict:schema: schema that the validators get added to """ - for v in validators: + for v in field.validators: # "Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification." # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#data-types if isinstance(v, EmailValidator): @@ -404,16 +554,25 @@ class AutoSchema(ViewInspector): if isinstance(v, URLValidator): schema['format'] = 'uri' if isinstance(v, RegexValidator): - schema['pattern'] = v.regex.pattern + # In Python, the token \Z does what \z does in other engines. + # https://stackoverflow.com/questions/53283160 + schema['pattern'] = v.regex.pattern.replace('\\Z', '\\z') elif isinstance(v, MaxLengthValidator): - schema['maxLength'] = v.limit_value + attr_name = 'maxLength' + if isinstance(field, serializers.ListField): + attr_name = 'maxItems' + schema[attr_name] = v.limit_value elif isinstance(v, MinLengthValidator): - schema['minLength'] = v.limit_value + attr_name = 'minLength' + if isinstance(field, serializers.ListField): + attr_name = 'minItems' + schema[attr_name] = v.limit_value elif isinstance(v, MaxValueValidator): schema['maximum'] = v.limit_value elif isinstance(v, MinValueValidator): schema['minimum'] = v.limit_value - elif isinstance(v, DecimalValidator): + elif isinstance(v, DecimalValidator) and \ + not getattr(field, 'coerce_to_string', api_settings.COERCE_DECIMAL_TO_STRING): if v.decimal_places: schema['multipleOf'] = float('.' + (v.decimal_places - 1) * '0' + '1') if v.max_digits: @@ -423,7 +582,25 @@ class AutoSchema(ViewInspector): schema['maximum'] = int(digits * '9') + 1 schema['minimum'] = -schema['maximum'] - def _get_serializer(self, method, path): + def get_paginator(self): + pagination_class = getattr(self.view, 'pagination_class', None) + if pagination_class: + return pagination_class() + return None + + def map_parsers(self, path, method): + return list(map(attrgetter('media_type'), self.view.parser_classes)) + + def map_renderers(self, path, method): + media_types = [] + for renderer in self.view.renderer_classes: + # BrowsableAPIRenderer not relevant to OpenAPI spec + if issubclass(renderer, renderers.BrowsableAPIRenderer): + continue + media_types.append(renderer.media_type) + return media_types + + def get_serializer(self, path, method): view = self.view if not hasattr(view, 'get_serializer'): @@ -438,33 +615,30 @@ class AutoSchema(ViewInspector): .format(view.__class__.__name__, method, path)) return None - def _get_request_body(self, path, method): + def _get_reference(self, serializer): + return {'$ref': '#/components/schemas/{}'.format(self.get_component_name(serializer))} + + def get_request_body(self, path, method): if method not in ('PUT', 'PATCH', 'POST'): return {} - serializer = self._get_serializer(path, method) + self.request_media_types = self.map_parsers(path, method) + + serializer = self.get_serializer(path, method) if not isinstance(serializer, serializers.Serializer): - return {} - - content = self._map_serializer(serializer) - # No required fields for PATCH - if method == 'PATCH': - del content['required'] - # No read_only fields for request. - for name, schema in content['properties'].copy().items(): - if 'readOnly' in schema: - del content['properties'][name] + item_schema = {} + else: + item_schema = self._get_reference(serializer) return { 'content': { - ct: {'schema': content} - for ct in self.content_types + ct: {'schema': item_schema} + for ct in self.request_media_types } } - def _get_responses(self, path, method): - # TODO: Handle multiple codes and pagination classes. + def get_responses(self, path, method): if method == 'DELETE': return { '204': { @@ -472,31 +646,31 @@ class AutoSchema(ViewInspector): } } - item_schema = {} - serializer = self._get_serializer(path, method) + self.response_media_types = self.map_renderers(path, method) - if isinstance(serializer, serializers.Serializer): - item_schema = self._map_serializer(serializer) - # No write_only fields for response. - for name, schema in item_schema['properties'].copy().items(): - if 'writeOnly' in schema: - del item_schema['properties'][name] - if 'required' in item_schema: - item_schema['required'] = [f for f in item_schema['required'] if f != name] + serializer = self.get_serializer(path, method) + + if not isinstance(serializer, serializers.Serializer): + item_schema = {} + else: + item_schema = self._get_reference(serializer) if is_list_view(path, method, self.view): response_schema = { 'type': 'array', 'items': item_schema, } + paginator = self.get_paginator() + if paginator: + response_schema = paginator.get_paginated_response_schema(response_schema) else: response_schema = item_schema - + status_code = '201' if method == 'POST' else '200' return { - '200': { + status_code: { 'content': { ct: {'schema': response_schema} - for ct in self.content_types + for ct in self.response_media_types }, # description is a mandatory property, # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject @@ -504,3 +678,112 @@ class AutoSchema(ViewInspector): 'description': "" } } + + def get_tags(self, path, method): + # If user have specified tags, use them. + if self._tags: + return self._tags + + # First element of a specific path could be valid tag. This is a fallback solution. + # PUT, PATCH, GET(Retrieve), DELETE: /user_profile/{id}/ tags = [user-profile] + # POST, GET(List): /user_profile/ tags = [user-profile] + if path.startswith('/'): + path = path[1:] + + return [path.split('/')[0].replace('_', '-')] + + def _get_path_parameters(self, path, method): + warnings.warn( + "Method `_get_path_parameters()` has been renamed to `get_path_parameters()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_path_parameters(path, method) + + def _get_filter_parameters(self, path, method): + warnings.warn( + "Method `_get_filter_parameters()` has been renamed to `get_filter_parameters()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_filter_parameters(path, method) + + def _get_responses(self, path, method): + warnings.warn( + "Method `_get_responses()` has been renamed to `get_responses()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_responses(path, method) + + def _get_request_body(self, path, method): + warnings.warn( + "Method `_get_request_body()` has been renamed to `get_request_body()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_request_body(path, method) + + def _get_serializer(self, path, method): + warnings.warn( + "Method `_get_serializer()` has been renamed to `get_serializer()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_serializer(path, method) + + def _get_paginator(self): + warnings.warn( + "Method `_get_paginator()` has been renamed to `get_paginator()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_paginator() + + def _map_field_validators(self, field, schema): + warnings.warn( + "Method `_map_field_validators()` has been renamed to `map_field_validators()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.map_field_validators(field, schema) + + def _map_serializer(self, serializer): + warnings.warn( + "Method `_map_serializer()` has been renamed to `map_serializer()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.map_serializer(serializer) + + def _map_field(self, field): + warnings.warn( + "Method `_map_field()` has been renamed to `map_field()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.map_field(field) + + def _map_choicefield(self, field): + warnings.warn( + "Method `_map_choicefield()` has been renamed to `map_choicefield()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.map_choicefield(field) + + def _get_pagination_parameters(self, path, method): + warnings.warn( + "Method `_get_pagination_parameters()` has been renamed to `get_pagination_parameters()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.get_pagination_parameters(path, method) + + def _allows_filters(self, path, method): + warnings.warn( + "Method `_allows_filters()` has been renamed to `allows_filters()`. " + "The old name will be removed in DRF v3.14.", + RemovedInDRF314Warning, stacklevel=2 + ) + return self.allows_filters(path, method) diff --git a/rest_framework/schemas/utils.py b/rest_framework/schemas/utils.py index 6724eb428..60ed69829 100644 --- a/rest_framework/schemas/utils.py +++ b/rest_framework/schemas/utils.py @@ -4,7 +4,7 @@ utils.py # Shared helper functions See schemas.__init__.py for package overview. """ from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework.mixins import RetrieveModelMixin diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 01f34298b..49eec8259 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -13,15 +13,13 @@ response content is handled by parsers and renderers. import copy import inspect import traceback -from collections import OrderedDict +from collections import OrderedDict, defaultdict from collections.abc import Mapping -from django.core.exceptions import ImproperlyConfigured +from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.core.exceptions import ValidationError as DjangoValidationError from django.db import models -from django.db.models import DurationField as ModelDurationField from django.db.models.fields import Field as DjangoModelField -from django.db.models.fields import FieldDoesNotExist from django.utils import timezone from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _ @@ -117,12 +115,16 @@ class BaseSerializer(Field): super().__init__(**kwargs) def __new__(cls, *args, **kwargs): - # We override this method in order to automagically create + # We override this method in order to automatically create # `ListSerializer` classes instead when `many=True` is set. if kwargs.pop('many', False): return cls.many_init(*args, **kwargs) return super().__new__(cls, *args, **kwargs) + # Allow type checkers to make serializers generic. + def __class_getitem__(cls, *args, **kwargs): + return cls + @classmethod def many_init(cls, *args, **kwargs): """ @@ -168,13 +170,6 @@ class BaseSerializer(Field): raise NotImplementedError('`create()` must be implemented.') def save(self, **kwargs): - assert not hasattr(self, 'save_object'), ( - 'Serializer `%s.%s` has old-style version 2 `.save_object()` ' - 'that is no longer compatible with REST framework 3. ' - 'Use the new-style `.create()` and `.update()` methods instead.' % - (self.__class__.__module__, self.__class__.__name__) - ) - assert hasattr(self, '_errors'), ( 'You must call `.is_valid()` before calling `.save()`.' ) @@ -199,10 +194,7 @@ class BaseSerializer(Field): "inspect 'serializer.validated_data' instead. " ) - validated_data = dict( - list(self.validated_data.items()) + - list(kwargs.items()) - ) + validated_data = {**self.validated_data, **kwargs} if self.instance is not None: self.instance = self.update(self.instance, validated_data) @@ -218,13 +210,6 @@ class BaseSerializer(Field): return self.instance def is_valid(self, raise_exception=False): - assert not hasattr(self, 'restore_object'), ( - 'Serializer `%s.%s` has old-style version 2 `.restore_object()` ' - 'that is no longer compatible with REST framework 3. ' - 'Use the new-style `.create()` and `.update()` methods instead.' % - (self.__class__.__module__, self.__class__.__name__) - ) - assert hasattr(self, 'initial_data'), ( 'Cannot call `.is_valid()` as no `data=` keyword argument was ' 'passed when instantiating the serializer instance.' @@ -299,18 +284,22 @@ class SerializerMetaclass(type): if isinstance(obj, Field)] fields.sort(key=lambda x: x[1]._creation_counter) - # If this class is subclassing another Serializer, add that Serializer's - # fields. Note that we loop over the bases in *reverse*. This is necessary - # in order to maintain the correct order of fields. - for base in reversed(bases): - if hasattr(base, '_declared_fields'): - fields = [ - (field_name, obj) for field_name, obj - in base._declared_fields.items() - if field_name not in attrs - ] + fields + # Ensures a base class field doesn't override cls attrs, and maintains + # field precedence when inheriting multiple parents. e.g. if there is a + # class C(A, B), and A and B both define 'field', use 'field' from A. + known = set(attrs) - return OrderedDict(fields) + def visit(name): + known.add(name) + return name + + base_fields = [ + (visit(name), f) + for base in bases if hasattr(base, '_declared_fields') + for name, f in base._declared_fields.items() if name not in known + ] + + return OrderedDict(base_fields + fields) def __new__(cls, name, bases, attrs): attrs['_declared_fields'] = cls._get_declared_fields(bases, attrs) @@ -449,7 +438,7 @@ class Serializer(BaseSerializer, metaclass=SerializerMetaclass): default = field.get_default() except SkipField: continue - defaults[field.field_name] = default + defaults[field.source] = default return defaults @@ -707,8 +696,7 @@ class ListSerializer(BaseSerializer): ) validated_data = [ - dict(list(attrs.items()) + list(kwargs.items())) - for attrs in self.validated_data + {**attrs, **kwargs} for attrs in self.validated_data ] if self.instance is not None: @@ -791,6 +779,8 @@ def raise_errors_on_nested_writes(method_name, serializer, validated_data): * Silently ignore the nested part of the update. * Automatically create a profile instance. """ + ModelClass = serializer.Meta.model + model_field_info = model_meta.get_field_info(ModelClass) # Ensure we don't have a writable nested field. For example: # @@ -800,6 +790,7 @@ def raise_errors_on_nested_writes(method_name, serializer, validated_data): assert not any( isinstance(field, BaseSerializer) and (field.source in validated_data) and + (field.source in model_field_info.relations) and isinstance(validated_data[field.source], (list, dict)) for field in serializer._writable_fields ), ( @@ -818,9 +809,19 @@ def raise_errors_on_nested_writes(method_name, serializer, validated_data): # class UserSerializer(ModelSerializer): # ... # address = serializer.CharField('profile.address') + # + # Though, non-relational fields (e.g., JSONField) are acceptable. For example: + # + # class NonRelationalPersonModel(models.Model): + # profile = JSONField() + # + # class UserSerializer(ModelSerializer): + # ... + # address = serializer.CharField('profile.address') assert not any( len(field.source_attrs) > 1 and (field.source_attrs[0] in validated_data) and + (field.source_attrs[0] in model_field_info.relations) and isinstance(validated_data[field.source_attrs[0]], (list, dict)) for field in serializer._writable_fields ), ( @@ -860,13 +861,14 @@ class ModelSerializer(Serializer): models.DateField: DateField, models.DateTimeField: DateTimeField, models.DecimalField: DecimalField, + models.DurationField: DurationField, models.EmailField: EmailField, models.Field: ModelField, models.FileField: FileField, models.FloatField: FloatField, models.ImageField: ImageField, models.IntegerField: IntegerField, - models.NullBooleanField: NullBooleanField, + models.NullBooleanField: BooleanField, models.PositiveIntegerField: IntegerField, models.PositiveSmallIntegerField: IntegerField, models.SlugField: SlugField, @@ -874,11 +876,16 @@ class ModelSerializer(Serializer): models.TextField: CharField, models.TimeField: TimeField, models.URLField: URLField, + models.UUIDField: UUIDField, models.GenericIPAddressField: IPAddressField, models.FilePathField: FilePathField, } - if ModelDurationField is not None: - serializer_field_mapping[ModelDurationField] = DurationField + if hasattr(models, 'JSONField'): + serializer_field_mapping[models.JSONField] = JSONField + if postgres_fields: + serializer_field_mapping[postgres_fields.HStoreField] = HStoreField + serializer_field_mapping[postgres_fields.ArrayField] = ListField + serializer_field_mapping[postgres_fields.JSONField] = JSONField serializer_related_field = PrimaryKeyRelatedField serializer_related_to_field = SlugRelatedField serializer_url_field = HyperlinkedIdentityField @@ -1233,10 +1240,13 @@ class ModelSerializer(Serializer): # `allow_blank` is only valid for textual fields. field_kwargs.pop('allow_blank', None) - if postgres_fields and isinstance(model_field, postgres_fields.JSONField): + is_django_jsonfield = hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField) + if (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or is_django_jsonfield: # Populate the `encoder` argument of `JSONField` instances generated - # for the PostgreSQL specific `JSONField`. + # for the model `JSONField`. field_kwargs['encoder'] = getattr(model_field, 'encoder', None) + if is_django_jsonfield: + field_kwargs['decoder'] = getattr(model_field, 'decoder', None) if postgres_fields and isinstance(model_field, postgres_fields.ArrayField): # Populate the `child` argument on `ListField` instances generated @@ -1396,7 +1406,7 @@ class ModelSerializer(Serializer): # so long as all the field names are included on the serializer. for parent_class in [model] + list(model._meta.parents): for unique_together_list in parent_class._meta.unique_together: - if set(field_names).issuperset(set(unique_together_list)): + if set(field_names).issuperset(unique_together_list): unique_constraint_names |= set(unique_together_list) # Now we have all the field names that have uniqueness constraints @@ -1503,28 +1513,55 @@ class ModelSerializer(Serializer): # which may map onto a model field. Any dotted field name lookups # cannot map to a field, and must be a traversal, so we're not # including those. - field_names = { - field.source for field in self._writable_fields + field_sources = OrderedDict( + (field.field_name, field.source) for field in self._writable_fields if (field.source != '*') and ('.' not in field.source) - } + ) # Special Case: Add read_only fields with defaults. - field_names |= { - field.source for field in self.fields.values() + field_sources.update(OrderedDict( + (field.field_name, field.source) for field in self.fields.values() if (field.read_only) and (field.default != empty) and (field.source != '*') and ('.' not in field.source) - } + )) + + # Invert so we can find the serializer field names that correspond to + # the model field names in the unique_together sets. This also allows + # us to check that multiple fields don't map to the same source. + source_map = defaultdict(list) + for name, source in field_sources.items(): + source_map[source].append(name) # Note that we make sure to check `unique_together` both on the # base model class, but also on any parent classes. validators = [] for parent_class in model_class_inheritance_tree: for unique_together in parent_class._meta.unique_together: - if field_names.issuperset(set(unique_together)): - validator = UniqueTogetherValidator( - queryset=parent_class._default_manager, - fields=unique_together + # Skip if serializer does not map to all unique together sources + if not set(source_map).issuperset(unique_together): + continue + + for source in unique_together: + assert len(source_map[source]) == 1, ( + "Unable to create `UniqueTogetherValidator` for " + "`{model}.{field}` as `{serializer}` has multiple " + "fields ({fields}) that map to this model field. " + "Either remove the extra fields, or override " + "`Meta.validators` with a `UniqueTogetherValidator` " + "using the desired field names." + .format( + model=self.Meta.model.__name__, + serializer=self.__class__.__name__, + field=source, + fields=', '.join(source_map[source]), + ) ) - validators.append(validator) + + field_names = tuple(source_map[f][0] for f in unique_together) + validator = UniqueTogetherValidator( + queryset=parent_class._default_manager, + fields=field_names + ) + validators.append(validator) return validators def get_unique_for_date_validators(self): @@ -1569,19 +1606,6 @@ class ModelSerializer(Serializer): return validators -if hasattr(models, 'UUIDField'): - ModelSerializer.serializer_field_mapping[models.UUIDField] = UUIDField - -# IPAddressField is deprecated in Django -if hasattr(models, 'IPAddressField'): - ModelSerializer.serializer_field_mapping[models.IPAddressField] = IPAddressField - -if postgres_fields: - ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = HStoreField - ModelSerializer.serializer_field_mapping[postgres_fields.ArrayField] = ListField - ModelSerializer.serializer_field_mapping[postgres_fields.JSONField] = JSONField - - class HyperlinkedModelSerializer(ModelSerializer): """ A type of `ModelSerializer` that uses hyperlinked relationships instead diff --git a/rest_framework/settings.py b/rest_framework/settings.py index c4c0e7939..9eb4c5653 100644 --- a/rest_framework/settings.py +++ b/rest_framework/settings.py @@ -182,14 +182,19 @@ def import_from_string(val, setting_name): class APISettings: """ - A settings object, that allows API settings to be accessed as properties. - For example: + A settings object that allows REST Framework settings to be accessed as + properties. For example: from rest_framework.settings import api_settings print(api_settings.DEFAULT_RENDERER_CLASSES) Any setting with string import paths will be automatically resolved and return the class, rather than the string literal. + + Note: + This is an internal class that is only compatible with settings namespaced + under the REST_FRAMEWORK name. It is not intended to be used by 3rd-party + apps, and test helpers like `override_settings` may not work as expected. """ def __init__(self, user_settings=None, defaults=None, import_strings=None): if user_settings: diff --git a/rest_framework/static/rest_framework/js/bootstrap.min.js b/rest_framework/static/rest_framework/js/bootstrap.min.js index 4cd821990..eb0a8b410 100644 --- a/rest_framework/static/rest_framework/js/bootstrap.min.js +++ b/rest_framework/static/rest_framework/js/bootstrap.min.js @@ -1,6 +1,6 @@ /*! - * Bootstrap v3.4.0 (https://getbootstrap.com/) - * Copyright 2011-2018 Twitter, Inc. + * Bootstrap v3.4.1 (https://getbootstrap.com/) + * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(idocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){return(t=g.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-dc.width?"left":"left"==s&&l.left-ha.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var t=g.fn.tooltip;g.fn.tooltip=function e(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=t,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.0",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.0",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(n[t+1]===undefined||e .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.0",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return nthis.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(idocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-dc.width?"left":"left"==s&&l.left-ha.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(n[t+1]===undefined||e .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 - + diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 5d9d80b05..a88e1591c 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -77,7 +77,7 @@
    {% block request_forms %} - + {% if 'GET' in allowed_methods %}
    @@ -176,9 +176,9 @@
    HTTP {{ response.status_code }} {{ response.status_text }}{% for key, val in response_headers|items %}
    -{{ key }}: {{ val|break_long_headers|urlize_quoted_links }}{% endfor %}
    +{{ key }}: {{ val|break_long_headers|urlize }}{% endfor %}
     
    -{{ content|urlize_quoted_links }}
    +{{ content|urlize }}
    @@ -293,7 +293,7 @@ csrfToken: "{% if request %}{{ csrf_token }}{% endif %}" }; - + diff --git a/rest_framework/templates/rest_framework/docs/error.html b/rest_framework/templates/rest_framework/docs/error.html index 6afd25e7b..694f88a15 100644 --- a/rest_framework/templates/rest_framework/docs/error.html +++ b/rest_framework/templates/rest_framework/docs/error.html @@ -48,7 +48,7 @@ being applied unexpectedly?

    when including the docs urls:

    -   url(r'^docs/', include_docs_urls(title='Your API',
    +   path('docs/', include_docs_urls(title='Your API',
                                         authentication_classes=[],
                                         permission_classes=[])),
     
    @@ -66,6 +66,6 @@ at rest_framework/docs/error.html.

    - + diff --git a/rest_framework/templates/rest_framework/docs/index.html b/rest_framework/templates/rest_framework/docs/index.html index 6804afe10..dfd363772 100644 --- a/rest_framework/templates/rest_framework/docs/index.html +++ b/rest_framework/templates/rest_framework/docs/index.html @@ -38,7 +38,7 @@ {% include "rest_framework/docs/auth/basic.html" %} {% include "rest_framework/docs/auth/session.html" %} - + diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index 79dd953ff..7bfa8f599 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -4,9 +4,9 @@ from collections import OrderedDict from django import template from django.template import loader from django.urls import NoReverseMatch, reverse -from django.utils.encoding import force_str, iri_to_uri +from django.utils.encoding import iri_to_uri from django.utils.html import escape, format_html, smart_urlquote -from django.utils.safestring import SafeData, mark_safe +from django.utils.safestring import mark_safe from rest_framework.compat import apply_markdown, pygments_highlight from rest_framework.renderers import HTMLFormRenderer @@ -311,85 +311,6 @@ def smart_urlquote_wrapper(matched_url): return None -@register.filter(needs_autoescape=True) -def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True): - """ - Converts any URLs in text into clickable links. - - Works on http://, https://, www. links, and also on links ending in one of - the original seven gTLDs (.com, .edu, .gov, .int, .mil, .net, and .org). - Links can have trailing punctuation (periods, commas, close-parens) and - leading punctuation (opening parens) and it'll still do the right thing. - - If trim_url_limit is not None, the URLs in link text longer than this limit - will truncated to trim_url_limit-3 characters and appended with an ellipsis. - - If nofollow is True, the URLs in link text will get a rel="nofollow" - attribute. - - If autoescape is True, the link text and URLs will get autoescaped. - """ - def trim_url(x, limit=trim_url_limit): - return limit is not None and (len(x) > limit and ('%s...' % x[:max(0, limit - 3)])) or x - - safe_input = isinstance(text, SafeData) - - # Unfortunately, Django built-in cannot be used here, because escaping - # is to be performed on words, which have been forcibly coerced to text - def conditional_escape(text): - return escape(text) if autoescape and not safe_input else text - - words = word_split_re.split(force_str(text)) - for i, word in enumerate(words): - if '.' in word or '@' in word or ':' in word: - # Deal with punctuation. - lead, middle, trail = '', word, '' - for punctuation in TRAILING_PUNCTUATION: - if middle.endswith(punctuation): - middle = middle[:-len(punctuation)] - trail = punctuation + trail - for opening, closing in WRAPPING_PUNCTUATION: - if middle.startswith(opening): - middle = middle[len(opening):] - lead = lead + opening - # Keep parentheses at the end only if they're balanced. - if ( - middle.endswith(closing) and - middle.count(closing) == middle.count(opening) + 1 - ): - middle = middle[:-len(closing)] - trail = closing + trail - - # Make URL we want to point to. - url = None - nofollow_attr = ' rel="nofollow"' if nofollow else '' - if simple_url_re.match(middle): - url = smart_urlquote_wrapper(middle) - elif simple_url_2_re.match(middle): - url = smart_urlquote_wrapper('http://%s' % middle) - elif ':' not in middle and simple_email_re.match(middle): - local, domain = middle.rsplit('@', 1) - try: - domain = domain.encode('idna').decode('ascii') - except UnicodeError: - continue - url = 'mailto:%s@%s' % (local, domain) - nofollow_attr = '' - - # Make link. - if url: - trimmed = trim_url(middle) - lead, trail = conditional_escape(lead), conditional_escape(trail) - url, trimmed = conditional_escape(url), conditional_escape(trimmed) - middle = '%s' % (url, nofollow_attr, trimmed) - words[i] = '%s%s%s' % (lead, middle, trail) - else: - words[i] = conditional_escape(word) - else: - words[i] = conditional_escape(word) - return mark_safe(''.join(words)) - - @register.filter def break_long_headers(header): """ diff --git a/rest_framework/test.py b/rest_framework/test.py index ab16c2787..f2581cacc 100644 --- a/rest_framework/test.py +++ b/rest_framework/test.py @@ -179,9 +179,11 @@ class APIRequestFactory(DjangoRequestFactory): ret = renderer.render(data) # Determine the content-type header from the renderer - content_type = "{}; charset={}".format( - renderer.media_type, renderer.charset - ) + content_type = renderer.media_type + if renderer.charset: + content_type = "{}; charset={}".format( + content_type, renderer.charset + ) # Coerce text to bytes if required. if isinstance(ret, str): diff --git a/rest_framework/urlpatterns.py b/rest_framework/urlpatterns.py index 831d344dd..bed5708eb 100644 --- a/rest_framework/urlpatterns.py +++ b/rest_framework/urlpatterns.py @@ -1,8 +1,6 @@ -from django.conf.urls import include, url +from django.urls import URLResolver, include, path, re_path, register_converter +from django.urls.resolvers import RoutePattern -from rest_framework.compat import ( - URLResolver, get_regex_pattern, is_route_pattern, path, register_converter -) from rest_framework.settings import api_settings @@ -37,7 +35,7 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required, suffix_r for urlpattern in urlpatterns: if isinstance(urlpattern, URLResolver): # Set of included URL patterns - regex = get_regex_pattern(urlpattern) + regex = urlpattern.pattern.regex.pattern namespace = urlpattern.namespace app_name = urlpattern.app_name kwargs = urlpattern.default_kwargs @@ -48,17 +46,17 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required, suffix_r suffix_route) # if the original pattern was a RoutePattern we need to preserve it - if is_route_pattern(urlpattern): + if isinstance(urlpattern.pattern, RoutePattern): assert path is not None route = str(urlpattern.pattern) new_pattern = path(route, include((patterns, app_name), namespace), kwargs) else: - new_pattern = url(regex, include((patterns, app_name), namespace), kwargs) + new_pattern = re_path(regex, include((patterns, app_name), namespace), kwargs) ret.append(new_pattern) else: # Regular URL pattern - regex = get_regex_pattern(urlpattern).rstrip('$').rstrip('/') + suffix_pattern + regex = urlpattern.pattern.regex.pattern.rstrip('$').rstrip('/') + suffix_pattern view = urlpattern.callback kwargs = urlpattern.default_args name = urlpattern.name @@ -67,13 +65,13 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required, suffix_r ret.append(urlpattern) # if the original pattern was a RoutePattern we need to preserve it - if is_route_pattern(urlpattern): + if isinstance(urlpattern.pattern, RoutePattern): assert path is not None assert suffix_route is not None route = str(urlpattern.pattern).rstrip('$').rstrip('/') + suffix_route new_pattern = path(route, view, kwargs, name) else: - new_pattern = url(regex, view, kwargs, name) + new_pattern = re_path(regex, view, kwargs, name) ret.append(new_pattern) @@ -106,12 +104,9 @@ def format_suffix_patterns(urlpatterns, suffix_required=False, allowed=None): else: suffix_pattern = r'\.(?P<%s>[a-z0-9]+)/?$' % suffix_kwarg - if path and register_converter: - converter_name, suffix_converter = _get_format_path_converter(suffix_kwarg, allowed) - register_converter(suffix_converter, converter_name) + converter_name, suffix_converter = _get_format_path_converter(suffix_kwarg, allowed) + register_converter(suffix_converter, converter_name) - suffix_route = '<%s:%s>' % (converter_name, suffix_kwarg) - else: - suffix_route = None + suffix_route = '<%s:%s>' % (converter_name, suffix_kwarg) return apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required, suffix_route) diff --git a/rest_framework/urls.py b/rest_framework/urls.py index 482a0a364..0aa301332 100644 --- a/rest_framework/urls.py +++ b/rest_framework/urls.py @@ -6,16 +6,16 @@ your API requires authentication: urlpatterns = [ ... - url(r'^auth/', include('rest_framework.urls')) + path('auth/', include('rest_framework.urls')) ] You should make sure your authentication settings include `SessionAuthentication`. """ -from django.conf.urls import url from django.contrib.auth import views +from django.urls import path app_name = 'rest_framework' urlpatterns = [ - url(r'^login/$', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'), - url(r'^logout/$', views.LogoutView.as_view(), name='logout'), + path('login/', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'), + path('logout/', views.LogoutView.as_view(), name='logout'), ] diff --git a/rest_framework/utils/field_mapping.py b/rest_framework/utils/field_mapping.py index b90c3eead..4f8a4f192 100644 --- a/rest_framework/utils/field_mapping.py +++ b/rest_framework/utils/field_mapping.py @@ -58,7 +58,6 @@ def get_detail_view_name(model): that refer to instances of the model. """ return '%(model_name)s-detail' % { - 'app_label': model._meta.app_label, 'model_name': model._meta.object_name.lower() } @@ -91,7 +90,9 @@ def get_field_kwargs(field_name, model_field): if isinstance(model_field, models.SlugField): kwargs['allow_unicode'] = model_field.allow_unicode - if isinstance(model_field, models.TextField) or (postgres_fields and isinstance(model_field, postgres_fields.JSONField)): + if isinstance(model_field, models.TextField) and not model_field.choices or \ + (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or \ + (hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField)): kwargs['style'] = {'base_template': 'textarea.html'} if isinstance(model_field, models.AutoField) or not model_field.editable: @@ -103,7 +104,7 @@ def get_field_kwargs(field_name, model_field): if model_field.has_default() or model_field.blank or model_field.null: kwargs['required'] = False - if model_field.null and not isinstance(model_field, models.NullBooleanField): + if model_field.null: kwargs['allow_null'] = True if model_field.blank and (isinstance(model_field, (models.CharField, models.TextField))): diff --git a/rest_framework/utils/urls.py b/rest_framework/utils/urls.py index 3534e5f49..afb06994c 100644 --- a/rest_framework/utils/urls.py +++ b/rest_framework/utils/urls.py @@ -11,7 +11,7 @@ def replace_query_param(url, key, val): (scheme, netloc, path, query, fragment) = parse.urlsplit(force_str(url)) query_dict = parse.parse_qs(query, keep_blank_values=True) query_dict[force_str(key)] = [force_str(val)] - query = parse.urlencode(sorted(list(query_dict.items())), doseq=True) + query = parse.urlencode(sorted(query_dict.items()), doseq=True) return parse.urlunsplit((scheme, netloc, path, query, fragment)) @@ -23,5 +23,5 @@ def remove_query_param(url, key): (scheme, netloc, path, query, fragment) = parse.urlsplit(force_str(url)) query_dict = parse.parse_qs(query, keep_blank_values=True) query_dict.pop(key, None) - query = parse.urlencode(sorted(list(query_dict.items())), doseq=True) + query = parse.urlencode(sorted(query_dict.items()), doseq=True) return parse.urlunsplit((scheme, netloc, path, query, fragment)) diff --git a/rest_framework/validators.py b/rest_framework/validators.py index 1cbe31b5e..a5cb75a84 100644 --- a/rest_framework/validators.py +++ b/rest_framework/validators.py @@ -37,44 +37,39 @@ class UniqueValidator: Should be applied to an individual field on the serializer. """ message = _('This field must be unique.') + requires_context = True def __init__(self, queryset, message=None, lookup='exact'): self.queryset = queryset - self.serializer_field = None self.message = message or self.message self.lookup = lookup - def set_context(self, serializer_field): - """ - This hook is called by the serializer instance, - prior to the validation call being made. - """ - # Determine the underlying model field name. This may not be the - # same as the serializer field name if `source=<>` is set. - self.field_name = serializer_field.source_attrs[-1] - # Determine the existing instance, if this is an update operation. - self.instance = getattr(serializer_field.parent, 'instance', None) - - def filter_queryset(self, value, queryset): + def filter_queryset(self, value, queryset, field_name): """ Filter the queryset to all instances matching the given attribute. """ - filter_kwargs = {'%s__%s' % (self.field_name, self.lookup): value} + filter_kwargs = {'%s__%s' % (field_name, self.lookup): value} return qs_filter(queryset, **filter_kwargs) - def exclude_current_instance(self, queryset): + def exclude_current_instance(self, queryset, instance): """ If an instance is being updated, then do not include that instance itself as a uniqueness conflict. """ - if self.instance is not None: - return queryset.exclude(pk=self.instance.pk) + if instance is not None: + return queryset.exclude(pk=instance.pk) return queryset - def __call__(self, value): + def __call__(self, value, serializer_field): + # Determine the underlying model field name. This may not be the + # same as the serializer field name if `source=<>` is set. + field_name = serializer_field.source_attrs[-1] + # Determine the existing instance, if this is an update operation. + instance = getattr(serializer_field.parent, 'instance', None) + queryset = self.queryset - queryset = self.filter_queryset(value, queryset) - queryset = self.exclude_current_instance(queryset) + queryset = self.filter_queryset(value, queryset, field_name) + queryset = self.exclude_current_instance(queryset, instance) if qs_exists(queryset): raise ValidationError(self.message, code='unique') @@ -93,69 +88,67 @@ class UniqueTogetherValidator: """ message = _('The fields {field_names} must make a unique set.') missing_message = _('This field is required.') + requires_context = True def __init__(self, queryset, fields, message=None): self.queryset = queryset self.fields = fields - self.serializer_field = None self.message = message or self.message - def set_context(self, serializer): - """ - This hook is called by the serializer instance, - prior to the validation call being made. - """ - # Determine the existing instance, if this is an update operation. - self.instance = getattr(serializer, 'instance', None) - - def enforce_required_fields(self, attrs): + def enforce_required_fields(self, attrs, serializer): """ The `UniqueTogetherValidator` always forces an implied 'required' state on the fields it applies to. """ - if self.instance is not None: + if serializer.instance is not None: return missing_items = { field_name: self.missing_message for field_name in self.fields - if field_name not in attrs + if serializer.fields[field_name].source not in attrs } if missing_items: raise ValidationError(missing_items, code='required') - def filter_queryset(self, attrs, queryset): + def filter_queryset(self, attrs, queryset, serializer): """ Filter the queryset to all instances matching the given attributes. """ + # field names => field sources + sources = [ + serializer.fields[field_name].source + for field_name in self.fields + ] + # If this is an update, then any unprovided field should # have it's value set based on the existing instance attribute. - if self.instance is not None: - for field_name in self.fields: - if field_name not in attrs: - attrs[field_name] = getattr(self.instance, field_name) + if serializer.instance is not None: + for source in sources: + if source not in attrs: + attrs[source] = getattr(serializer.instance, source) # Determine the filter keyword arguments and filter the queryset. filter_kwargs = { - field_name: attrs[field_name] - for field_name in self.fields + source: attrs[source] + for source in sources } return qs_filter(queryset, **filter_kwargs) - def exclude_current_instance(self, attrs, queryset): + def exclude_current_instance(self, attrs, queryset, instance): """ If an instance is being updated, then do not include that instance itself as a uniqueness conflict. """ - if self.instance is not None: - return queryset.exclude(pk=self.instance.pk) + if instance is not None: + return queryset.exclude(pk=instance.pk) return queryset - def __call__(self, attrs): - self.enforce_required_fields(attrs) + def __call__(self, attrs, serializer): + self.enforce_required_fields(attrs, serializer) queryset = self.queryset - queryset = self.filter_queryset(attrs, queryset) - queryset = self.exclude_current_instance(attrs, queryset) + queryset = self.filter_queryset(attrs, queryset, serializer) + queryset = self.exclude_current_instance(attrs, queryset, serializer.instance) # Ignore validation if any field is None checked_values = [ @@ -174,9 +167,21 @@ class UniqueTogetherValidator: ) +class ProhibitSurrogateCharactersValidator: + message = _('Surrogate characters are not allowed: U+{code_point:X}.') + code = 'surrogate_characters_not_allowed' + + def __call__(self, value): + for surrogate_character in (ch for ch in str(value) + if 0xD800 <= ord(ch) <= 0xDFFF): + message = self.message.format(code_point=ord(surrogate_character)) + raise ValidationError(message, code=self.code) + + class BaseUniqueForValidator: message = None missing_message = _('This field is required.') + requires_context = True def __init__(self, queryset, field, date_field, message=None): self.queryset = queryset @@ -184,18 +189,6 @@ class BaseUniqueForValidator: self.date_field = date_field self.message = message or self.message - def set_context(self, serializer): - """ - This hook is called by the serializer instance, - prior to the validation call being made. - """ - # Determine the underlying model field names. These may not be the - # same as the serializer field names if `source=<>` is set. - self.field_name = serializer.fields[self.field].source_attrs[-1] - self.date_field_name = serializer.fields[self.date_field].source_attrs[-1] - # Determine the existing instance, if this is an update operation. - self.instance = getattr(serializer, 'instance', None) - def enforce_required_fields(self, attrs): """ The `UniqueForValidator` classes always force an implied @@ -209,23 +202,28 @@ class BaseUniqueForValidator: if missing_items: raise ValidationError(missing_items, code='required') - def filter_queryset(self, attrs, queryset): + def filter_queryset(self, attrs, queryset, field_name, date_field_name): raise NotImplementedError('`filter_queryset` must be implemented.') - def exclude_current_instance(self, attrs, queryset): + def exclude_current_instance(self, attrs, queryset, instance): """ If an instance is being updated, then do not include that instance itself as a uniqueness conflict. """ - if self.instance is not None: - return queryset.exclude(pk=self.instance.pk) + if instance is not None: + return queryset.exclude(pk=instance.pk) return queryset - def __call__(self, attrs): + def __call__(self, attrs, serializer): + # Determine the underlying model field names. These may not be the + # same as the serializer field names if `source=<>` is set. + field_name = serializer.fields[self.field].source_attrs[-1] + date_field_name = serializer.fields[self.date_field].source_attrs[-1] + self.enforce_required_fields(attrs) queryset = self.queryset - queryset = self.filter_queryset(attrs, queryset) - queryset = self.exclude_current_instance(attrs, queryset) + queryset = self.filter_queryset(attrs, queryset, field_name, date_field_name) + queryset = self.exclude_current_instance(attrs, queryset, serializer.instance) if qs_exists(queryset): message = self.message.format(date_field=self.date_field) raise ValidationError({ @@ -244,39 +242,39 @@ class BaseUniqueForValidator: class UniqueForDateValidator(BaseUniqueForValidator): message = _('This field must be unique for the "{date_field}" date.') - def filter_queryset(self, attrs, queryset): + def filter_queryset(self, attrs, queryset, field_name, date_field_name): value = attrs[self.field] date = attrs[self.date_field] filter_kwargs = {} - filter_kwargs[self.field_name] = value - filter_kwargs['%s__day' % self.date_field_name] = date.day - filter_kwargs['%s__month' % self.date_field_name] = date.month - filter_kwargs['%s__year' % self.date_field_name] = date.year + filter_kwargs[field_name] = value + filter_kwargs['%s__day' % date_field_name] = date.day + filter_kwargs['%s__month' % date_field_name] = date.month + filter_kwargs['%s__year' % date_field_name] = date.year return qs_filter(queryset, **filter_kwargs) class UniqueForMonthValidator(BaseUniqueForValidator): message = _('This field must be unique for the "{date_field}" month.') - def filter_queryset(self, attrs, queryset): + def filter_queryset(self, attrs, queryset, field_name, date_field_name): value = attrs[self.field] date = attrs[self.date_field] filter_kwargs = {} - filter_kwargs[self.field_name] = value - filter_kwargs['%s__month' % self.date_field_name] = date.month + filter_kwargs[field_name] = value + filter_kwargs['%s__month' % date_field_name] = date.month return qs_filter(queryset, **filter_kwargs) class UniqueForYearValidator(BaseUniqueForValidator): message = _('This field must be unique for the "{date_field}" year.') - def filter_queryset(self, attrs, queryset): + def filter_queryset(self, attrs, queryset, field_name, date_field_name): value = attrs[self.field] date = attrs[self.date_field] filter_kwargs = {} - filter_kwargs[self.field_name] = value - filter_kwargs['%s__year' % self.date_field_name] = date.year + filter_kwargs[field_name] = value + filter_kwargs['%s__year' % date_field_name] = date.year return qs_filter(queryset, **filter_kwargs) diff --git a/rest_framework/versioning.py b/rest_framework/versioning.py index 8c35a1a58..78cfc9dc8 100644 --- a/rest_framework/versioning.py +++ b/rest_framework/versioning.py @@ -60,8 +60,8 @@ class URLPathVersioning(BaseVersioning): An example URL conf for two views that accept two different versions. urlpatterns = [ - url(r'^(?P[v1|v2]+)/users/$', users_list, name='users-list'), - url(r'^(?P[v1|v2]+)/users/(?P[0-9]+)/$', users_detail, name='users-detail') + re_path(r'^(?P[v1|v2]+)/users/$', users_list, name='users-list'), + re_path(r'^(?P[v1|v2]+)/users/(?P[0-9]+)/$', users_detail, name='users-detail') ] GET /1.0/something/ HTTP/1.1 @@ -99,14 +99,14 @@ class NamespaceVersioning(BaseVersioning): # users/urls.py urlpatterns = [ - url(r'^/users/$', users_list, name='users-list'), - url(r'^/users/(?P[0-9]+)/$', users_detail, name='users-detail') + path('/users/', users_list, name='users-list'), + path('/users//', users_detail, name='users-detail') ] # urls.py urlpatterns = [ - url(r'^v1/', include('users.urls', namespace='v1')), - url(r'^v2/', include('users.urls', namespace='v2')) + path('v1/', include('users.urls', namespace='v1')), + path('v2/', include('users.urls', namespace='v2')) ] GET /1.0/something/ HTTP/1.1 diff --git a/rest_framework/views.py b/rest_framework/views.py index bec10560a..5b0622069 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -3,11 +3,11 @@ Provides an APIView class that is the base of all views in REST framework. """ from django.conf import settings from django.core.exceptions import PermissionDenied -from django.db import connection, models, transaction +from django.db import connections, models from django.http import Http404 from django.http.response import HttpResponseBase from django.utils.cache import cc_delim_re, patch_vary_headers -from django.utils.encoding import smart_text +from django.utils.encoding import smart_str from django.views.decorators.csrf import csrf_exempt from django.views.generic import View @@ -56,16 +56,16 @@ def get_view_description(view, html=False): if description is None: description = view.__class__.__doc__ or '' - description = formatting.dedent(smart_text(description)) + description = formatting.dedent(smart_str(description)) if html: return formatting.markup_description(description) return description def set_rollback(): - atomic_requests = connection.settings_dict.get('ATOMIC_REQUESTS', False) - if atomic_requests and connection.in_atomic_block: - transaction.set_rollback(True) + for db in connections.all(): + if db.settings_dict['ATOMIC_REQUESTS'] and db.in_atomic_block: + db.set_rollback(True) def exception_handler(exc, context): @@ -166,13 +166,13 @@ class APIView(View): """ raise exceptions.MethodNotAllowed(request.method) - def permission_denied(self, request, message=None): + def permission_denied(self, request, message=None, code=None): """ If request is not permitted, determine what kind of exception to raise. """ if request.authenticators and not request.successful_authenticator: raise exceptions.NotAuthenticated() - raise exceptions.PermissionDenied(detail=message) + raise exceptions.PermissionDenied(detail=message, code=code) def throttled(self, request, wait): """ @@ -331,7 +331,9 @@ class APIView(View): for permission in self.get_permissions(): if not permission.has_permission(request, self): self.permission_denied( - request, message=getattr(permission, 'message', None) + request, + message=getattr(permission, 'message', None), + code=getattr(permission, 'code', None) ) def check_object_permissions(self, request, obj): @@ -342,7 +344,9 @@ class APIView(View): for permission in self.get_permissions(): if not permission.has_object_permission(request, self, obj): self.permission_denied( - request, message=getattr(permission, 'message', None) + request, + message=getattr(permission, 'message', None), + code=getattr(permission, 'code', None) ) def check_throttles(self, request): diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py index d94c81df4..5a1f8acf5 100644 --- a/rest_framework/viewsets.py +++ b/rest_framework/viewsets.py @@ -25,11 +25,21 @@ from django.utils.decorators import classonlymethod from django.views.decorators.csrf import csrf_exempt from rest_framework import generics, mixins, views +from rest_framework.decorators import MethodMapper from rest_framework.reverse import reverse def _is_extra_action(attr): - return hasattr(attr, 'mapping') + return hasattr(attr, 'mapping') and isinstance(attr.mapping, MethodMapper) + + +def _check_attr_name(func, name): + assert func.__name__ == name, ( + 'Expected function (`{func.__name__}`) to match its attribute name ' + '(`{name}`). If using a decorator, ensure the inner function is ' + 'decorated with `functools.wraps`, or that `{func.__name__}.__name__` ' + 'is otherwise set to `{name}`.').format(func=func, name=name) + return func class ViewSetMixin: @@ -92,6 +102,10 @@ class ViewSetMixin: def view(request, *args, **kwargs): self = cls(**initkwargs) + + if 'get' in actions and 'head' not in actions: + actions['head'] = actions['get'] + # We also store the mapping of request methods to actions, # so that we can later set the action attribute. # eg. `self.action = 'list'` on an incoming GET request. @@ -103,9 +117,6 @@ class ViewSetMixin: handler = getattr(self, action) setattr(self, method, handler) - if hasattr(self, 'get') and not hasattr(self, 'head'): - self.head = self.get - self.request = request self.args = args self.kwargs = kwargs @@ -148,6 +159,11 @@ class ViewSetMixin: Reverse the action for the given `url_name`. """ url_name = '%s-%s' % (self.basename, url_name) + namespace = None + if self.request and self.request.resolver_match: + namespace = self.request.resolver_match.namespace + if namespace: + url_name = namespace + ':' + url_name kwargs.setdefault('request', self.request) return reverse(url_name, *args, **kwargs) @@ -157,7 +173,9 @@ class ViewSetMixin: """ Get the methods that are marked as an extra ViewSet `@action`. """ - return [method for _, method in getmembers(cls, _is_extra_action)] + return [_check_attr_name(method, name) + for name, method + in getmembers(cls, _is_extra_action)] def get_extra_action_url_map(self): """ diff --git a/runtests.py b/runtests.py index 19513cdbf..82028ea32 100755 --- a/runtests.py +++ b/runtests.py @@ -11,7 +11,7 @@ PYTEST_ARGS = { FLAKE8_ARGS = ['rest_framework', 'tests'] -ISORT_ARGS = ['--recursive', '--check-only', '--diff', 'rest_framework', 'tests'] +ISORT_ARGS = ['--check-only', '--diff', 'rest_framework', 'tests'] def exit_on_failure(ret, message=None): diff --git a/setup.cfg b/setup.cfg index c021fdde0..abb7cca90 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,14 +6,14 @@ addopts=--tb=short --strict -ra testspath = tests [flake8] -ignore = E501 +ignore = E501,W504 banned-modules = json = use from rest_framework.utils import json! [isort] skip=.tox atomic=true multi_line_output=5 -known_standard_library=types +extra_standard_library=types known_third_party=pytest,_pytest,django,pytz,uritemplate known_first_party=rest_framework,tests diff --git a/setup.py b/setup.py index 2f8dafd21..e2a1c0222 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ This will install the latest version of Django REST Framework which works on your version of Python. If you can't upgrade your pip (or Python), request an older version of Django REST Framework: - $ python -m pip install "django<3.10" + $ python -m pip install "djangorestframework<3.10" """.format(*(REQUIRED_PYTHON + CURRENT_PYTHON))) sys.exit(1) @@ -82,17 +82,16 @@ setup( author_email='tom@tomchristie.com', # SEE NOTE BELOW (*) packages=find_packages(exclude=['tests*']), include_package_data=True, - install_requires=[], + install_requires=["django>=2.2"], python_requires=">=3.5", zip_safe=False, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 2.1', 'Framework :: Django :: 2.2', + 'Framework :: Django :: 3.0', + 'Framework :: Django :: 3.1', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', @@ -101,6 +100,8 @@ setup( 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3 :: Only', 'Topic :: Internet :: WWW/HTTP', ], diff --git a/tests/authentication/test_authentication.py b/tests/authentication/test_authentication.py index 37e265e17..a73e0d79c 100644 --- a/tests/authentication/test_authentication.py +++ b/tests/authentication/test_authentication.py @@ -2,10 +2,10 @@ import base64 import pytest from django.conf import settings -from django.conf.urls import include, url from django.contrib.auth.models import User from django.http import HttpResponse from django.test import TestCase, override_settings +from django.urls import include, path from rest_framework import ( HTTP_HEADER_ENCODING, exceptions, permissions, renderers, status @@ -47,34 +47,34 @@ class MockView(APIView): urlpatterns = [ - url( - r'^session/$', + path( + 'session/', MockView.as_view(authentication_classes=[SessionAuthentication]) ), - url( - r'^basic/$', + path( + 'basic/', MockView.as_view(authentication_classes=[BasicAuthentication]) ), - url( - r'^remote-user/$', + path( + 'remote-user/', MockView.as_view(authentication_classes=[RemoteUserAuthentication]) ), - url( - r'^token/$', + path( + 'token/', MockView.as_view(authentication_classes=[TokenAuthentication]) ), - url( - r'^customtoken/$', + path( + 'customtoken/', MockView.as_view(authentication_classes=[CustomTokenAuthentication]) ), - url( - r'^customkeywordtoken/$', + path( + 'customkeywordtoken/', MockView.as_view( authentication_classes=[CustomKeywordTokenAuthentication] ) ), - url(r'^auth-token/$', obtain_auth_token), - url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')), + path('auth-token/', obtain_auth_token), + path('auth/', include('rest_framework.urls', namespace='rest_framework')), ] @@ -159,6 +159,25 @@ class BasicAuthTests(TestCase): ) assert response.status_code == status.HTTP_401_UNAUTHORIZED + def test_decoding_of_utf8_credentials(self): + username = 'walterwhité' + email = 'walterwhite@example.com' + password = 'pässwörd' + User.objects.create_user( + username, email, password + ) + credentials = ('%s:%s' % (username, password)) + base64_credentials = base64.b64encode( + credentials.encode('utf-8') + ).decode(HTTP_HEADER_ENCODING) + auth = 'Basic %s' % base64_credentials + response = self.csrf_client.post( + '/basic/', + {'example': 'example'}, + HTTP_AUTHORIZATION=auth + ) + assert response.status_code == status.HTTP_200_OK + @override_settings(ROOT_URLCONF=__name__) class SessionAuthTests(TestCase): @@ -378,6 +397,10 @@ class TokenAuthTests(BaseTokenAuthTests, TestCase): key = token.generate_key() assert isinstance(key, str) + def test_generate_key_accessible_as_classmethod(self): + key = self.model.generate_key() + assert isinstance(key, str) + def test_token_login_json(self): """Ensure token login view using JSON POST works.""" client = APIClient(enforce_csrf_checks=True) diff --git a/tests/browsable_api/auth_urls.py b/tests/browsable_api/auth_urls.py index 7530c5e40..151278cbd 100644 --- a/tests/browsable_api/auth_urls.py +++ b/tests/browsable_api/auth_urls.py @@ -1,8 +1,8 @@ -from django.conf.urls import include, url +from django.urls import include, path from .views import MockView urlpatterns = [ - url(r'^$', MockView.as_view()), - url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')), + path('', MockView.as_view()), + path('auth/', include('rest_framework.urls', namespace='rest_framework')), ] diff --git a/tests/browsable_api/no_auth_urls.py b/tests/browsable_api/no_auth_urls.py index 348bfe1c0..65701c065 100644 --- a/tests/browsable_api/no_auth_urls.py +++ b/tests/browsable_api/no_auth_urls.py @@ -1,7 +1,7 @@ -from django.conf.urls import url +from django.urls import path from .views import MockView urlpatterns = [ - url(r'^$', MockView.as_view()), + path('', MockView.as_view()), ] diff --git a/tests/browsable_api/test_browsable_nested_api.py b/tests/browsable_api/test_browsable_nested_api.py index f945d2a43..a6c2ee6bd 100644 --- a/tests/browsable_api/test_browsable_nested_api.py +++ b/tests/browsable_api/test_browsable_nested_api.py @@ -1,6 +1,6 @@ -from django.conf.urls import url from django.test import TestCase from django.test.utils import override_settings +from django.urls import path from rest_framework import serializers from rest_framework.generics import ListCreateAPIView @@ -23,7 +23,7 @@ class NestedSerializersView(ListCreateAPIView): urlpatterns = [ - url(r'^api/$', NestedSerializersView.as_view(), name='api'), + path('api/', NestedSerializersView.as_view(), name='api'), ] diff --git a/tests/conftest.py b/tests/conftest.py index ac29e4a42..cc32cc637 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -24,6 +24,10 @@ def pytest_configure(config): 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:' + }, + 'secondary': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:' } }, SITE_ID=1, diff --git a/tests/models.py b/tests/models.py index 2c340a3e6..afe649760 100644 --- a/tests/models.py +++ b/tests/models.py @@ -37,6 +37,15 @@ class ManyToManySource(RESTFrameworkModel): class ForeignKeyTarget(RESTFrameworkModel): name = models.CharField(max_length=100) + def get_first_source(self): + """Used for testing related field against a callable.""" + return self.sources.all().order_by('pk')[0] + + @property + def first_source(self): + """Used for testing related field against a property.""" + return self.sources.all().order_by('pk')[0] + class UUIDForeignKeyTarget(RESTFrameworkModel): uuid = models.UUIDField(primary_key=True, default=uuid.uuid4) diff --git a/tests/schemas/test_coreapi.py b/tests/schemas/test_coreapi.py index 66275ade9..7b1f15fef 100644 --- a/tests/schemas/test_coreapi.py +++ b/tests/schemas/test_coreapi.py @@ -1,15 +1,15 @@ import unittest import pytest -from django.conf.urls import include, url from django.core.exceptions import PermissionDenied from django.http import Http404 from django.test import TestCase, override_settings +from django.urls import include, path from rest_framework import ( filters, generics, pagination, permissions, serializers ) -from rest_framework.compat import coreapi, coreschema, get_regex_pattern, path +from rest_framework.compat import coreapi, coreschema from rest_framework.decorators import action, api_view, schema from rest_framework.request import Request from rest_framework.routers import DefaultRouter, SimpleRouter @@ -24,8 +24,8 @@ from rest_framework.utils import formatting from rest_framework.views import APIView from rest_framework.viewsets import GenericViewSet, ModelViewSet -from . import views from ..models import BasicModel, ForeignKeySource, ManyToManySource +from . import views factory = APIRequestFactory() @@ -144,8 +144,8 @@ with override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.s router = DefaultRouter() router.register('example', ExampleViewSet, basename='example') urlpatterns = [ - url(r'^$', schema_view), - url(r'^', include(router.urls)) + path('', schema_view), + path('', include(router.urls)) ] @@ -406,9 +406,9 @@ class ExampleDetailView(APIView): class TestSchemaGenerator(TestCase): def setUp(self): self.patterns = [ - url(r'^example/?$', views.ExampleListView.as_view()), - url(r'^example/(?P\d+)/?$', views.ExampleDetailView.as_view()), - url(r'^example/(?P\d+)/sub/?$', views.ExampleDetailView.as_view()), + path('example/', views.ExampleListView.as_view()), + path('example//', views.ExampleDetailView.as_view()), + path('example//sub/', views.ExampleDetailView.as_view()), ] def test_schema_for_regular_views(self): @@ -455,7 +455,6 @@ class TestSchemaGenerator(TestCase): @unittest.skipUnless(coreapi, 'coreapi is not installed') -@unittest.skipUnless(path, 'needs Django 2') @override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema'}) class TestSchemaGeneratorDjango2(TestCase): def setUp(self): @@ -513,9 +512,9 @@ class TestSchemaGeneratorDjango2(TestCase): class TestSchemaGeneratorNotAtRoot(TestCase): def setUp(self): self.patterns = [ - url(r'^api/v1/example/?$', views.ExampleListView.as_view()), - url(r'^api/v1/example/(?P\d+)/?$', views.ExampleDetailView.as_view()), - url(r'^api/v1/example/(?P\d+)/sub/?$', views.ExampleDetailView.as_view()), + path('api/v1/example/', views.ExampleListView.as_view()), + path('api/v1/example//', views.ExampleDetailView.as_view()), + path('api/v1/example//sub/', views.ExampleDetailView.as_view()), ] def test_schema_for_regular_views(self): @@ -569,7 +568,7 @@ class TestSchemaGeneratorWithMethodLimitedViewSets(TestCase): router = DefaultRouter() router.register('example1', MethodLimitedViewSet, basename='example1') self.patterns = [ - url(r'^', include(router.urls)) + path('', include(router.urls)) ] def test_schema_for_regular_views(self): @@ -635,8 +634,8 @@ class TestSchemaGeneratorWithRestrictedViewSets(TestCase): router.register('example1', Http404ExampleViewSet, basename='example1') router.register('example2', PermissionDeniedExampleViewSet, basename='example2') self.patterns = [ - url('^example/?$', views.ExampleListView.as_view()), - url(r'^', include(router.urls)) + path('example/', views.ExampleListView.as_view()), + path('', include(router.urls)) ] def test_schema_for_regular_views(self): @@ -679,7 +678,7 @@ class ForeignKeySourceView(generics.CreateAPIView): class TestSchemaGeneratorWithForeignKey(TestCase): def setUp(self): self.patterns = [ - url(r'^example/?$', ForeignKeySourceView.as_view()), + path('example/', ForeignKeySourceView.as_view()), ] def test_schema_for_regular_views(self): @@ -725,7 +724,7 @@ class ManyToManySourceView(generics.CreateAPIView): class TestSchemaGeneratorWithManyToMany(TestCase): def setUp(self): self.patterns = [ - url(r'^example/?$', ManyToManySourceView.as_view()), + path('example/', ManyToManySourceView.as_view()), ] def test_schema_for_regular_views(self): @@ -1041,9 +1040,9 @@ with override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.s class SchemaGenerationExclusionTests(TestCase): def setUp(self): self.patterns = [ - url('^excluded-cbv/$', ExcludedAPIView.as_view()), - url('^excluded-fbv/$', excluded_fbv), - url('^included-fbv/$', included_fbv), + path('excluded-cbv/', ExcludedAPIView.as_view()), + path('excluded-fbv/', excluded_fbv), + path('included-fbv/', included_fbv), ] def test_schema_generator_excludes_correctly(self): @@ -1078,7 +1077,7 @@ class SchemaGenerationExclusionTests(TestCase): inspector = EndpointEnumerator(self.patterns) # Not pretty. Mimics internals of EndpointEnumerator to put should_include_endpoint under test - pairs = [(inspector.get_path_from_regex(get_regex_pattern(pattern)), pattern.callback) + pairs = [(inspector.get_path_from_regex(pattern.pattern.regex.pattern), pattern.callback) for pattern in self.patterns] should_include = [ @@ -1136,8 +1135,8 @@ class TestURLNamingCollisions(TestCase): pass patterns = [ - url(r'^test', simple_fbv), - url(r'^test/list/', simple_fbv), + path('test', simple_fbv), + path('test/list/', simple_fbv), ] generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) @@ -1173,14 +1172,14 @@ class TestURLNamingCollisions(TestCase): def test_manually_routing_generic_view(self): patterns = [ - url(r'^test', NamingCollisionView.as_view()), - url(r'^test/retrieve/', NamingCollisionView.as_view()), - url(r'^test/update/', NamingCollisionView.as_view()), + path('test', NamingCollisionView.as_view()), + path('test/retrieve/', NamingCollisionView.as_view()), + path('test/update/', NamingCollisionView.as_view()), # Fails with method names: - url(r'^test/get/', NamingCollisionView.as_view()), - url(r'^test/put/', NamingCollisionView.as_view()), - url(r'^test/delete/', NamingCollisionView.as_view()), + path('test/get/', NamingCollisionView.as_view()), + path('test/put/', NamingCollisionView.as_view()), + path('test/delete/', NamingCollisionView.as_view()), ] generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) @@ -1196,7 +1195,7 @@ class TestURLNamingCollisions(TestCase): def test_from_router(self): patterns = [ - url(r'from-router', include(naming_collisions_router.urls)), + path('from-router', include(naming_collisions_router.urls)), ] generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) @@ -1228,8 +1227,8 @@ class TestURLNamingCollisions(TestCase): def test_url_under_same_key_not_replaced(self): patterns = [ - url(r'example/(?P\d+)/$', BasicNamingCollisionView.as_view()), - url(r'example/(?P\w+)/$', BasicNamingCollisionView.as_view()), + path('example//', BasicNamingCollisionView.as_view()), + path('example//', BasicNamingCollisionView.as_view()), ] generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) @@ -1245,8 +1244,8 @@ class TestURLNamingCollisions(TestCase): pass patterns = [ - url(r'^test/list/', simple_fbv), - url(r'^test/(?P\d+)/list/', simple_fbv), + path('test/list/', simple_fbv), + path('test//list/', simple_fbv), ] generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) diff --git a/tests/schemas/test_managementcommand.py b/tests/schemas/test_managementcommand.py index 6cdf7f8b1..645eaf91d 100644 --- a/tests/schemas/test_managementcommand.py +++ b/tests/schemas/test_managementcommand.py @@ -1,10 +1,12 @@ import io +import os +import tempfile import pytest -from django.conf.urls import url from django.core.management import call_command from django.test import TestCase from django.test.utils import override_settings +from django.urls import path from rest_framework.compat import uritemplate, yaml from rest_framework.management.commands import generateschema @@ -18,7 +20,7 @@ class FooView(APIView): urlpatterns = [ - url(r'^$', FooView.as_view()) + path('', FooView.as_view()) ] @@ -73,6 +75,21 @@ class GenerateSchemaTests(TestCase): out_json = yaml.safe_load(self.out.getvalue()) assert out_json == CustomSchemaGenerator.SCHEMA + def test_writes_schema_to_file_on_parameter(self): + fd, path = tempfile.mkstemp() + try: + call_command('generateschema', '--file={}'.format(path), stdout=self.out) + # nothing on stdout + assert not self.out.getvalue() + + call_command('generateschema', stdout=self.out) + expected_out = self.out.getvalue() + # file output identical to stdout output + with os.fdopen(fd) as fh: + assert expected_out and fh.read() == expected_out + finally: + os.remove(path) + @pytest.mark.skipif(yaml is None, reason='PyYAML is required.') @override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema'}) def test_coreapi_renders_default_schema_with_custom_title_url_and_description(self): diff --git a/tests/schemas/test_openapi.py b/tests/schemas/test_openapi.py index 78a5609da..542c377b1 100644 --- a/tests/schemas/test_openapi.py +++ b/tests/schemas/test_openapi.py @@ -1,10 +1,18 @@ +import uuid +import warnings + import pytest -from django.conf.urls import url from django.test import RequestFactory, TestCase, override_settings +from django.urls import path from django.utils.translation import gettext_lazy as _ from rest_framework import filters, generics, pagination, routers, serializers +from rest_framework.authtoken.views import obtain_auth_token from rest_framework.compat import uritemplate +from rest_framework.parsers import JSONParser, MultiPartParser +from rest_framework.renderers import ( + BaseRenderer, BrowsableAPIRenderer, JSONRenderer, OpenAPIRenderer +) from rest_framework.request import Request from rest_framework.schemas.openapi import AutoSchema, SchemaGenerator @@ -42,26 +50,65 @@ class TestBasics(TestCase): class TestFieldMapping(TestCase): def test_list_field_mapping(self): + uuid1 = uuid.uuid4() + uuid2 = uuid.uuid4() inspector = AutoSchema() cases = [ (serializers.ListField(), {'items': {}, 'type': 'array'}), (serializers.ListField(child=serializers.BooleanField()), {'items': {'type': 'boolean'}, 'type': 'array'}), (serializers.ListField(child=serializers.FloatField()), {'items': {'type': 'number'}, 'type': 'array'}), (serializers.ListField(child=serializers.CharField()), {'items': {'type': 'string'}, 'type': 'array'}), + (serializers.ListField(child=serializers.IntegerField(max_value=4294967295)), + {'items': {'type': 'integer', 'maximum': 4294967295, 'format': 'int64'}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[('a', 'Choice A'), ('b', 'Choice B')])), + {'items': {'enum': ['a', 'b'], 'type': 'string'}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[(1, 'One'), (2, 'Two')])), + {'items': {'enum': [1, 2], 'type': 'integer'}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[(1.1, 'First'), (2.2, 'Second')])), + {'items': {'enum': [1.1, 2.2], 'type': 'number'}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[(True, 'true'), (False, 'false')])), + {'items': {'enum': [True, False], 'type': 'boolean'}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[(uuid1, 'uuid1'), (uuid2, 'uuid2')])), + {'items': {'enum': [uuid1, uuid2]}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[(1, 'One'), ('a', 'Choice A')])), + {'items': {'enum': [1, 'a']}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[ + (1, 'One'), ('a', 'Choice A'), (1.1, 'First'), (1.1, 'First'), (1, 'One'), ('a', 'Choice A'), (1, 'One') + ])), + {'items': {'enum': [1, 'a', 1.1]}, 'type': 'array'}), + (serializers.ListField(child=serializers.ChoiceField(choices=[ + (1, 'One'), (2, 'Two'), (3, 'Three'), (2, 'Two'), (3, 'Three'), (1, 'One'), + ])), + {'items': {'enum': [1, 2, 3], 'type': 'integer'}, 'type': 'array'}), + (serializers.IntegerField(min_value=2147483648), + {'type': 'integer', 'minimum': 2147483648, 'format': 'int64'}), ] for field, mapping in cases: with self.subTest(field=field): - assert inspector._map_field(field) == mapping + assert inspector.map_field(field) == mapping def test_lazy_string_field(self): - class Serializer(serializers.Serializer): + class ItemSerializer(serializers.Serializer): text = serializers.CharField(help_text=_('lazy string')) inspector = AutoSchema() - data = inspector._map_serializer(Serializer()) + data = inspector.map_serializer(ItemSerializer()) assert isinstance(data['properties']['text']['description'], str), "description must be str" + def test_boolean_default_field(self): + class Serializer(serializers.Serializer): + default_true = serializers.BooleanField(default=True) + default_false = serializers.BooleanField(default=False) + without_default = serializers.BooleanField() + + inspector = AutoSchema() + + data = inspector.map_serializer(Serializer()) + assert data['properties']['default_true']['default'] is True, "default must be true" + assert data['properties']['default_false']['default'] is False, "default must be false" + assert 'default' not in data['properties']['without_default'], "default must not be defined" + @pytest.mark.skipif(uritemplate is None, reason='uritemplate not installed.') class TestOperationIntrospection(TestCase): @@ -71,7 +118,7 @@ class TestOperationIntrospection(TestCase): method = 'GET' view = create_view( - views.ExampleListView, + views.DocStringExampleListView, method, create_request(path) ) @@ -80,8 +127,10 @@ class TestOperationIntrospection(TestCase): operation = inspector.get_operation(path, method) assert operation == { - 'operationId': 'ListExamples', + 'operationId': 'listDocStringExamples', + 'description': 'A description of my GET operation.', 'parameters': [], + 'tags': ['example'], 'responses': { '200': { 'description': '', @@ -102,28 +151,71 @@ class TestOperationIntrospection(TestCase): method = 'GET' view = create_view( - views.ExampleDetailView, + views.DocStringExampleDetailView, method, create_request(path) ) inspector = AutoSchema() inspector.view = view - parameters = inspector._get_path_parameters(path, method) - assert parameters == [{ - 'description': '', - 'in': 'path', - 'name': 'id', - 'required': True, - 'schema': { - 'type': 'string', + operation = inspector.get_operation(path, method) + assert operation == { + 'operationId': 'retrieveDocStringExampleDetail', + 'description': 'A description of my GET operation.', + 'parameters': [{ + 'description': '', + 'in': 'path', + 'name': 'id', + 'required': True, + 'schema': { + 'type': 'string', + }, + }], + 'tags': ['example'], + 'responses': { + '200': { + 'description': '', + 'content': { + 'application/json': { + 'schema': { + }, + }, + }, + }, }, - }] + } def test_request_body(self): path = '/' method = 'POST' + class ItemSerializer(serializers.Serializer): + text = serializers.CharField() + read_only = serializers.CharField(read_only=True) + + class View(generics.GenericAPIView): + serializer_class = ItemSerializer + + view = create_view( + View, + method, + create_request(path) + ) + inspector = AutoSchema() + inspector.view = view + + request_body = inspector.get_request_body(path, method) + print(request_body) + assert request_body['content']['application/json']['schema']['$ref'] == '#/components/schemas/Item' + + components = inspector.get_components(path, method) + assert components['Item']['required'] == ['text'] + assert sorted(list(components['Item']['properties'].keys())) == ['read_only', 'text'] + + def test_invalid_serializer_class_name(self): + path = '/' + method = 'POST' + class Serializer(serializers.Serializer): text = serializers.CharField() read_only = serializers.CharField(read_only=True) @@ -139,20 +231,22 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - request_body = inspector._get_request_body(path, method) - assert request_body['content']['application/json']['schema']['required'] == ['text'] - assert list(request_body['content']['application/json']['schema']['properties'].keys()) == ['text'] + serializer = inspector.get_serializer(path, method) + + with pytest.raises(Exception) as exc: + inspector.get_component_name(serializer) + assert "is an invalid class name for schema generation" in str(exc.value) def test_empty_required(self): path = '/' method = 'POST' - class Serializer(serializers.Serializer): + class ItemSerializer(serializers.Serializer): read_only = serializers.CharField(read_only=True) write_only = serializers.CharField(write_only=True, required=False) class View(generics.GenericAPIView): - serializer_class = Serializer + serializer_class = ItemSerializer view = create_view( View, @@ -162,23 +256,50 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - request_body = inspector._get_request_body(path, method) + components = inspector.get_components(path, method) + component = components['Item'] # there should be no empty 'required' property, see #6834 - assert 'required' not in request_body['content']['application/json']['schema'] + assert 'required' not in component - for response in inspector._get_responses(path, method).values(): - assert 'required' not in response['content']['application/json']['schema'] + for response in inspector.get_responses(path, method).values(): + assert 'required' not in component + + def test_empty_required_with_patch_method(self): + path = '/' + method = 'PATCH' + + class ItemSerializer(serializers.Serializer): + read_only = serializers.CharField(read_only=True) + write_only = serializers.CharField(write_only=True, required=False) + + class View(generics.GenericAPIView): + serializer_class = ItemSerializer + + view = create_view( + View, + method, + create_request(path) + ) + inspector = AutoSchema() + inspector.view = view + + components = inspector.get_components(path, method) + component = components['Item'] + # there should be no empty 'required' property, see #6834 + assert 'required' not in component + for response in inspector.get_responses(path, method).values(): + assert 'required' not in component def test_response_body_generation(self): path = '/' method = 'POST' - class Serializer(serializers.Serializer): + class ItemSerializer(serializers.Serializer): text = serializers.CharField() write_only = serializers.CharField(write_only=True) class View(generics.GenericAPIView): - serializer_class = Serializer + serializer_class = ItemSerializer view = create_view( View, @@ -188,10 +309,13 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) - assert responses['200']['content']['application/json']['schema']['required'] == ['text'] - assert list(responses['200']['content']['application/json']['schema']['properties'].keys()) == ['text'] - assert 'description' in responses['200'] + responses = inspector.get_responses(path, method) + assert responses['201']['content']['application/json']['schema']['$ref'] == '#/components/schemas/Item' + + components = inspector.get_components(path, method) + assert sorted(components['Item']['required']) == ['text', 'write_only'] + assert sorted(list(components['Item']['properties'].keys())) == ['text', 'write_only'] + assert 'description' in responses['201'] def test_response_body_nested_serializer(self): path = '/' @@ -200,12 +324,12 @@ class TestOperationIntrospection(TestCase): class NestedSerializer(serializers.Serializer): number = serializers.IntegerField() - class Serializer(serializers.Serializer): + class ItemSerializer(serializers.Serializer): text = serializers.CharField() nested = NestedSerializer() class View(generics.GenericAPIView): - serializer_class = Serializer + serializer_class = ItemSerializer view = create_view( View, @@ -215,8 +339,12 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) - schema = responses['200']['content']['application/json']['schema'] + responses = inspector.get_responses(path, method) + assert responses['201']['content']['application/json']['schema']['$ref'] == '#/components/schemas/Item' + components = inspector.get_components(path, method) + assert components['Item'] + + schema = components['Item'] assert sorted(schema['required']) == ['nested', 'text'] assert sorted(list(schema['properties'].keys())) == ['nested', 'text'] assert schema['properties']['nested']['type'] == 'object' @@ -242,7 +370,7 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) + responses = inspector.get_responses(path, method) assert responses == { '200': { 'description': '', @@ -251,18 +379,84 @@ class TestOperationIntrospection(TestCase): 'schema': { 'type': 'array', 'items': { - 'properties': { - 'text': { - 'type': 'string', - }, - }, - 'required': ['text'], + '$ref': '#/components/schemas/Item' }, }, }, }, }, } + components = inspector.get_components(path, method) + assert components == { + 'Item': { + 'type': 'object', + 'properties': { + 'text': { + 'type': 'string', + }, + }, + 'required': ['text'], + } + } + + def test_paginated_list_response_body_generation(self): + """Test that pagination properties are added for a paginated list view.""" + path = '/' + method = 'GET' + + class Pagination(pagination.BasePagination): + def get_paginated_response_schema(self, schema): + return { + 'type': 'object', + 'item': schema, + } + + class ItemSerializer(serializers.Serializer): + text = serializers.CharField() + + class View(generics.GenericAPIView): + serializer_class = ItemSerializer + pagination_class = Pagination + + view = create_view( + View, + method, + create_request(path), + ) + inspector = AutoSchema() + inspector.view = view + + responses = inspector.get_responses(path, method) + assert responses == { + '200': { + 'description': '', + 'content': { + 'application/json': { + 'schema': { + 'type': 'object', + 'item': { + 'type': 'array', + 'items': { + '$ref': '#/components/schemas/Item' + }, + }, + }, + }, + }, + }, + } + components = inspector.get_components(path, method) + assert components == { + 'Item': { + 'type': 'object', + 'properties': { + 'text': { + 'type': 'string', + }, + }, + 'required': ['text'], + } + } def test_delete_response_body_generation(self): """Test that a view's delete method generates a proper response body schema.""" @@ -280,22 +474,89 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) + responses = inspector.get_responses(path, method) assert responses == { '204': { 'description': '', }, } - def test_retrieve_response_body_generation(self): - """Test that a list of properties is returned for retrieve item views.""" + def test_parser_mapping(self): + """Test that view's parsers are mapped to OA media types""" + path = '/{id}/' + method = 'POST' + + class View(generics.CreateAPIView): + serializer_class = views.ExampleSerializer + parser_classes = [JSONParser, MultiPartParser] + + view = create_view( + View, + method, + create_request(path), + ) + inspector = AutoSchema() + inspector.view = view + + request_body = inspector.get_request_body(path, method) + + assert len(request_body['content'].keys()) == 2 + assert 'multipart/form-data' in request_body['content'] + assert 'application/json' in request_body['content'] + + def test_renderer_mapping(self): + """Test that view's renderers are mapped to OA media types""" path = '/{id}/' method = 'GET' - class ItemSerializer(serializers.Serializer): - text = serializers.CharField() + class CustomBrowsableAPIRenderer(BrowsableAPIRenderer): + media_type = 'image/jpeg' # that's a wild API renderer - class View(generics.GenericAPIView): + class TextRenderer(BaseRenderer): + media_type = 'text/plain' + format = 'text' + + class View(generics.CreateAPIView): + serializer_class = views.ExampleSerializer + renderer_classes = [JSONRenderer, TextRenderer, BrowsableAPIRenderer, CustomBrowsableAPIRenderer] + + view = create_view( + View, + method, + create_request(path), + ) + inspector = AutoSchema() + inspector.view = view + + responses = inspector.get_responses(path, method) + # TODO this should be changed once the multiple response + # schema support is there + success_response = responses['200'] + + # Check that the API renderers aren't included, but custom renderers are + assert set(success_response['content']) == {'application/json', 'text/plain'} + + def test_openapi_yaml_rendering_without_aliases(self): + renderer = OpenAPIRenderer() + + reused_object = {'test': 'test'} + data = { + 'o1': reused_object, + 'o2': reused_object, + } + assert ( + renderer.render(data) == b'o1:\n test: test\no2:\n test: test\n' or + renderer.render(data) == b'o2:\n test: test\no1:\n test: test\n' # py <= 3.5 + ) + + def test_serializer_filefield(self): + path = '/{id}/' + method = 'POST' + + class ItemSerializer(serializers.Serializer): + attachment = serializers.FileField() + + class View(generics.CreateAPIView): serializer_class = ItemSerializer view = create_view( @@ -306,25 +567,69 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) + components = inspector.get_components(path, method) + component = components['Item'] + properties = component['properties'] + assert properties['attachment']['format'] == 'binary' + + def test_retrieve_response_body_generation(self): + """ + Test that a list of properties is returned for retrieve item views. + + Pagination properties should not be added as the view represents a single item. + """ + path = '/{id}/' + method = 'GET' + + class Pagination(pagination.BasePagination): + def get_paginated_response_schema(self, schema): + return { + 'type': 'object', + 'item': schema, + } + + class ItemSerializer(serializers.Serializer): + text = serializers.CharField() + + class View(generics.GenericAPIView): + serializer_class = ItemSerializer + pagination_class = Pagination + + view = create_view( + View, + method, + create_request(path), + ) + inspector = AutoSchema() + inspector.view = view + + responses = inspector.get_responses(path, method) assert responses == { '200': { 'description': '', 'content': { 'application/json': { 'schema': { - 'properties': { - 'text': { - 'type': 'string', - }, - }, - 'required': ['text'], + '$ref': '#/components/schemas/Item' }, }, }, }, } + components = inspector.get_components(path, method) + assert components == { + 'Item': { + 'type': 'object', + 'properties': { + 'text': { + 'type': 'string', + }, + }, + 'required': ['text'], + } + } + def test_operation_id_generation(self): path = '/' method = 'GET' @@ -337,8 +642,74 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - operationId = inspector._get_operation_id(path, method) - assert operationId == 'ListExamples' + operationId = inspector.get_operation_id(path, method) + assert operationId == 'listExamples' + + def test_operation_id_custom_operation_id_base(self): + path = '/' + method = 'GET' + + view = create_view( + views.ExampleGenericAPIView, + method, + create_request(path), + ) + inspector = AutoSchema(operation_id_base="Ulysse") + inspector.view = view + + operationId = inspector.get_operation_id(path, method) + assert operationId == 'listUlysses' + + def test_operation_id_custom_name(self): + path = '/' + method = 'GET' + + view = create_view( + views.ExampleGenericAPIView, + method, + create_request(path), + ) + inspector = AutoSchema(operation_id_base='Ulysse') + inspector.view = view + + operationId = inspector.get_operation_id(path, method) + assert operationId == 'listUlysses' + + def test_operation_id_override_get(self): + class CustomSchema(AutoSchema): + def get_operation_id(self, path, method): + return 'myCustomOperationId' + + path = '/' + method = 'GET' + view = create_view( + views.ExampleGenericAPIView, + method, + create_request(path), + ) + inspector = CustomSchema() + inspector.view = view + + operationId = inspector.get_operation_id(path, method) + assert operationId == 'myCustomOperationId' + + def test_operation_id_override_base(self): + class CustomSchema(AutoSchema): + def get_operation_id_base(self, path, method, action): + return 'Item' + + path = '/' + method = 'GET' + view = create_view( + views.ExampleGenericAPIView, + method, + create_request(path), + ) + inspector = CustomSchema() + inspector.view = view + + operationId = inspector.get_operation_id(path, method) + assert operationId == 'listItem' def test_repeat_operation_ids(self): router = routers.SimpleRouter() @@ -355,6 +726,41 @@ class TestOperationIntrospection(TestCase): assert schema_str.count("newExample") == 1 assert schema_str.count("oldExample") == 1 + def test_duplicate_operation_id(self): + patterns = [ + path('duplicate1/', views.ExampleOperationIdDuplicate1.as_view()), + path('duplicate2/', views.ExampleOperationIdDuplicate2.as_view()), + ] + + generator = SchemaGenerator(patterns=patterns) + request = create_request('/') + + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter('always') + generator.get_schema(request=request) + + assert len(w) == 1 + assert issubclass(w[-1].category, UserWarning) + print(str(w[-1].message)) + assert 'You have a duplicated operationId' in str(w[-1].message) + + def test_operation_id_viewset(self): + router = routers.SimpleRouter() + router.register('account', views.ExampleViewSet, basename="account") + urlpatterns = router.urls + + generator = SchemaGenerator(patterns=urlpatterns) + + request = create_request('/') + schema = generator.get_schema(request=request) + print(schema) + assert schema['paths']['/account/']['get']['operationId'] == 'listExampleViewSets' + assert schema['paths']['/account/']['post']['operationId'] == 'createExampleViewSet' + assert schema['paths']['/account/{id}/']['get']['operationId'] == 'retrieveExampleViewSet' + assert schema['paths']['/account/{id}/']['put']['operationId'] == 'updateExampleViewSet' + assert schema['paths']['/account/{id}/']['patch']['operationId'] == 'partialUpdateExampleViewSet' + assert schema['paths']['/account/{id}/']['delete']['operationId'] == 'destroyExampleViewSet' + def test_serializer_datefield(self): path = '/' method = 'GET' @@ -366,13 +772,45 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) - response_schema = responses['200']['content']['application/json']['schema'] - properties = response_schema['items']['properties'] + components = inspector.get_components(path, method) + component = components['Example'] + properties = component['properties'] assert properties['date']['type'] == properties['datetime']['type'] == 'string' assert properties['date']['format'] == 'date' assert properties['datetime']['format'] == 'date-time' + def test_serializer_hstorefield(self): + path = '/' + method = 'GET' + view = create_view( + views.ExampleGenericAPIView, + method, + create_request(path), + ) + inspector = AutoSchema() + inspector.view = view + + components = inspector.get_components(path, method) + component = components['Example'] + properties = component['properties'] + assert properties['hstore']['type'] == 'object' + + def test_serializer_callable_default(self): + path = '/' + method = 'GET' + view = create_view( + views.ExampleGenericAPIView, + method, + create_request(path), + ) + inspector = AutoSchema() + inspector.view = view + + components = inspector.get_components(path, method) + component = components['Example'] + properties = component['properties'] + assert 'default' not in properties['uuid_field'] + def test_serializer_validators(self): path = '/' method = 'GET' @@ -384,9 +822,9 @@ class TestOperationIntrospection(TestCase): inspector = AutoSchema() inspector.view = view - responses = inspector._get_responses(path, method) - response_schema = responses['200']['content']['application/json']['schema'] - properties = response_schema['items']['properties'] + components = inspector.get_components(path, method) + component = components['ExampleValidated'] + properties = component['properties'] assert properties['integer']['type'] == 'integer' assert properties['integer']['maximum'] == 99 @@ -395,6 +833,9 @@ class TestOperationIntrospection(TestCase): assert properties['string']['minLength'] == 2 assert properties['string']['maxLength'] == 10 + assert properties['lst']['minItems'] == 2 + assert properties['lst']['maxItems'] == 10 + assert properties['regex']['pattern'] == r'[ABC]12{3}' assert properties['regex']['description'] == 'must have an A, B, or C followed by 1222' @@ -406,6 +847,16 @@ class TestOperationIntrospection(TestCase): assert properties['decimal2']['type'] == 'number' assert properties['decimal2']['multipleOf'] == .0001 + assert properties['decimal3'] == { + 'type': 'string', 'format': 'decimal', 'maximum': 1000000, 'minimum': -1000000, 'multipleOf': 0.01 + } + assert properties['decimal4'] == { + 'type': 'string', 'format': 'decimal', 'maximum': 1000000, 'minimum': -1000000, 'multipleOf': 0.01 + } + assert properties['decimal5'] == { + 'type': 'string', 'format': 'decimal', 'maximum': 10000, 'minimum': -10000, 'multipleOf': 0.01 + } + assert properties['email']['type'] == 'string' assert properties['email']['format'] == 'email' assert properties['email']['default'] == 'foo@bar.com' @@ -413,6 +864,7 @@ class TestOperationIntrospection(TestCase): assert properties['url']['type'] == 'string' assert properties['url']['nullable'] is True assert properties['url']['default'] == 'http://www.example.com' + assert '\\Z' not in properties['url']['pattern'] assert properties['uuid']['type'] == 'string' assert properties['uuid']['format'] == 'uuid' @@ -426,6 +878,56 @@ class TestOperationIntrospection(TestCase): assert properties['ip']['type'] == 'string' assert 'format' not in properties['ip'] + def test_overridden_tags(self): + class ExampleStringTagsViewSet(views.ExampleGenericAPIView): + schema = AutoSchema(tags=['example1', 'example2']) + + url_patterns = [ + path('test/', ExampleStringTagsViewSet.as_view()), + ] + generator = SchemaGenerator(patterns=url_patterns) + schema = generator.get_schema(request=create_request('/')) + assert schema['paths']['/test/']['get']['tags'] == ['example1', 'example2'] + + def test_overridden_get_tags_method(self): + class MySchema(AutoSchema): + def get_tags(self, path, method): + if path.endswith('/new/'): + tags = ['tag1', 'tag2'] + elif path.endswith('/old/'): + tags = ['tag2', 'tag3'] + else: + tags = ['tag4', 'tag5'] + + return tags + + class ExampleStringTagsViewSet(views.ExampleGenericViewSet): + schema = MySchema() + + router = routers.SimpleRouter() + router.register('example', ExampleStringTagsViewSet, basename="example") + generator = SchemaGenerator(patterns=router.urls) + schema = generator.get_schema(request=create_request('/')) + assert schema['paths']['/example/new/']['get']['tags'] == ['tag1', 'tag2'] + assert schema['paths']['/example/old/']['get']['tags'] == ['tag2', 'tag3'] + + def test_auto_generated_apiview_tags(self): + class RestaurantAPIView(views.ExampleGenericAPIView): + schema = AutoSchema(operation_id_base="restaurant") + pass + + class BranchAPIView(views.ExampleGenericAPIView): + pass + + url_patterns = [ + path('any-dash_underscore/', RestaurantAPIView.as_view()), + path('restaurants/branches/', BranchAPIView.as_view()) + ] + generator = SchemaGenerator(patterns=url_patterns) + schema = generator.get_schema(request=create_request('/')) + assert schema['paths']['/any-dash_underscore/']['get']['tags'] == ['any-dash-underscore'] + assert schema['paths']['/restaurants/branches/']['get']['tags'] == ['restaurants'] + @pytest.mark.skipif(uritemplate is None, reason='uritemplate not installed.') @override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.openapi.AutoSchema'}) @@ -437,12 +939,12 @@ class TestGenerator(TestCase): def test_paths_construction(self): """Construction of the `paths` key.""" patterns = [ - url(r'^example/?$', views.ExampleListView.as_view()), + path('example/', views.ExampleListView.as_view()), ] generator = SchemaGenerator(patterns=patterns) generator._initialise_endpoints() - paths = generator.get_paths() + paths = generator.get_schema()["paths"] assert '/example/' in paths example_operations = paths['/example/'] @@ -453,26 +955,26 @@ class TestGenerator(TestCase): def test_prefixed_paths_construction(self): """Construction of the `paths` key maintains a common prefix.""" patterns = [ - url(r'^v1/example/?$', views.ExampleListView.as_view()), - url(r'^v1/example/{pk}/?$', views.ExampleDetailView.as_view()), + path('v1/example/', views.ExampleListView.as_view()), + path('v1/example/{pk}/', views.ExampleDetailView.as_view()), ] generator = SchemaGenerator(patterns=patterns) generator._initialise_endpoints() - paths = generator.get_paths() + paths = generator.get_schema()["paths"] assert '/v1/example/' in paths assert '/v1/example/{id}/' in paths def test_mount_url_prefixed_to_paths(self): patterns = [ - url(r'^example/?$', views.ExampleListView.as_view()), - url(r'^example/{pk}/?$', views.ExampleDetailView.as_view()), + path('example/', views.ExampleListView.as_view()), + path('example/{pk}/', views.ExampleDetailView.as_view()), ] generator = SchemaGenerator(patterns=patterns, url='/api') generator._initialise_endpoints() - paths = generator.get_paths() + paths = generator.get_schema()["paths"] assert '/api/example/' in paths assert '/api/example/{id}/' in paths @@ -480,7 +982,7 @@ class TestGenerator(TestCase): def test_schema_construction(self): """Construction of the top level dictionary.""" patterns = [ - url(r'^example/?$', views.ExampleListView.as_view()), + path('example/', views.ExampleListView.as_view()), ] generator = SchemaGenerator(patterns=patterns) @@ -489,3 +991,131 @@ class TestGenerator(TestCase): assert 'openapi' in schema assert 'paths' in schema + + def test_schema_with_no_paths(self): + patterns = [] + generator = SchemaGenerator(patterns=patterns) + + request = create_request('/') + schema = generator.get_schema(request=request) + + assert schema['paths'] == {} + + def test_schema_information(self): + """Construction of the top level dictionary.""" + patterns = [ + path('example/', views.ExampleListView.as_view()), + ] + generator = SchemaGenerator(patterns=patterns, title='My title', version='1.2.3', description='My description') + + request = create_request('/') + schema = generator.get_schema(request=request) + + assert schema['info']['title'] == 'My title' + assert schema['info']['version'] == '1.2.3' + assert schema['info']['description'] == 'My description' + + def test_schema_information_empty(self): + """Construction of the top level dictionary.""" + patterns = [ + path('example/', views.ExampleListView.as_view()), + ] + generator = SchemaGenerator(patterns=patterns) + + request = create_request('/') + schema = generator.get_schema(request=request) + + assert schema['info']['title'] == '' + assert schema['info']['version'] == '' + + def test_serializer_model(self): + """Construction of the top level dictionary.""" + patterns = [ + path('example/', views.ExampleGenericAPIViewModel.as_view()), + ] + + generator = SchemaGenerator(patterns=patterns) + + request = create_request('/') + schema = generator.get_schema(request=request) + + print(schema) + + assert 'components' in schema + assert 'schemas' in schema['components'] + assert 'ExampleModel' in schema['components']['schemas'] + + def test_authtoken_serializer(self): + patterns = [ + path('api-token-auth/', obtain_auth_token) + ] + generator = SchemaGenerator(patterns=patterns) + + request = create_request('/') + schema = generator.get_schema(request=request) + + print(schema) + + route = schema['paths']['/api-token-auth/']['post'] + body_schema = route['requestBody']['content']['application/json']['schema'] + + assert body_schema == { + '$ref': '#/components/schemas/AuthToken' + } + assert schema['components']['schemas']['AuthToken'] == { + 'type': 'object', + 'properties': { + 'username': {'type': 'string', 'writeOnly': True}, + 'password': {'type': 'string', 'writeOnly': True}, + 'token': {'type': 'string', 'readOnly': True}, + }, + 'required': ['username', 'password'] + } + + def test_component_name(self): + patterns = [ + path('example/', views.ExampleAutoSchemaComponentName.as_view()), + ] + + generator = SchemaGenerator(patterns=patterns) + + request = create_request('/') + schema = generator.get_schema(request=request) + + print(schema) + assert 'components' in schema + assert 'schemas' in schema['components'] + assert 'Ulysses' in schema['components']['schemas'] + + def test_duplicate_component_name(self): + patterns = [ + path('duplicate1/', views.ExampleAutoSchemaDuplicate1.as_view()), + path('duplicate2/', views.ExampleAutoSchemaDuplicate2.as_view()), + ] + + generator = SchemaGenerator(patterns=patterns) + request = create_request('/') + + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter('always') + schema = generator.get_schema(request=request) + + assert len(w) == 1 + assert issubclass(w[-1].category, UserWarning) + assert 'has been overriden with a different value.' in str(w[-1].message) + + assert 'components' in schema + assert 'schemas' in schema['components'] + assert 'Duplicate' in schema['components']['schemas'] + + def test_component_should_not_be_generated_for_delete_method(self): + class ExampleView(generics.DestroyAPIView): + schema = AutoSchema(operation_id_base='example') + + url_patterns = [ + path('example/', ExampleView.as_view()), + ] + generator = SchemaGenerator(patterns=url_patterns) + schema = generator.get_schema(request=create_request('/')) + assert 'components' not in schema + assert 'content' not in schema['paths']['/example/']['delete']['responses']['204'] diff --git a/tests/schemas/views.py b/tests/schemas/views.py index 273f1d30a..18b3beae4 100644 --- a/tests/schemas/views.py +++ b/tests/schemas/views.py @@ -4,12 +4,14 @@ from django.core.validators import ( DecimalValidator, MaxLengthValidator, MaxValueValidator, MinLengthValidator, MinValueValidator, RegexValidator ) +from django.db import models from rest_framework import generics, permissions, serializers from rest_framework.decorators import action from rest_framework.response import Response +from rest_framework.schemas.openapi import AutoSchema from rest_framework.views import APIView -from rest_framework.viewsets import GenericViewSet +from rest_framework.viewsets import GenericViewSet, ViewSet class ExampleListView(APIView): @@ -29,10 +31,36 @@ class ExampleDetailView(APIView): pass +class DocStringExampleListView(APIView): + """ + get: A description of my GET operation. + post: A description of my POST operation. + """ + permission_classes = [permissions.IsAuthenticatedOrReadOnly] + + def get(self, *args, **kwargs): + pass + + def post(self, request, *args, **kwargs): + pass + + +class DocStringExampleDetailView(APIView): + permission_classes = [permissions.IsAuthenticatedOrReadOnly] + + def get(self, *args, **kwargs): + """ + A description of my GET operation. + """ + pass + + # Generics. class ExampleSerializer(serializers.Serializer): date = serializers.DateField() datetime = serializers.DateTimeField() + hstore = serializers.HStoreField() + uuid_field = serializers.UUIDField(default=uuid.uuid4) class ExampleGenericAPIView(generics.GenericAPIView): @@ -85,9 +113,19 @@ class ExampleValidatedSerializer(serializers.Serializer): ), help_text='must have an A, B, or C followed by 1222' ) - decimal1 = serializers.DecimalField(max_digits=6, decimal_places=2) - decimal2 = serializers.DecimalField(max_digits=5, decimal_places=0, + lst = serializers.ListField( + validators=( + MaxLengthValidator(limit_value=10), + MinLengthValidator(limit_value=2), + ) + ) + decimal1 = serializers.DecimalField(max_digits=6, decimal_places=2, coerce_to_string=False) + decimal2 = serializers.DecimalField(max_digits=5, decimal_places=0, coerce_to_string=False, validators=(DecimalValidator(max_digits=17, decimal_places=4),)) + decimal3 = serializers.DecimalField(max_digits=8, decimal_places=2, coerce_to_string=True) + decimal4 = serializers.DecimalField(max_digits=8, decimal_places=2, coerce_to_string=True, + validators=(DecimalValidator(max_digits=17, decimal_places=4),)) + decimal5 = serializers.DecimalField(max_digits=6, decimal_places=2) email = serializers.EmailField(default='foo@bar.com') url = serializers.URLField(default='http://www.example.com', allow_null=True) uuid = serializers.UUIDField() @@ -105,3 +143,101 @@ class ExampleValidatedAPIView(generics.GenericAPIView): url='http://localhost', uuid=uuid.uuid4(), ip4='127.0.0.1', ip6='::1', ip='192.168.1.1') return Response(serializer.data) + + +# Serializer with model. +class OpenAPIExample(models.Model): + first_name = models.CharField(max_length=30) + + +class ExampleSerializerModel(serializers.Serializer): + date = serializers.DateField() + datetime = serializers.DateTimeField() + hstore = serializers.HStoreField() + uuid_field = serializers.UUIDField(default=uuid.uuid4) + + class Meta: + model = OpenAPIExample + + +class ExampleOperationIdDuplicate1(generics.GenericAPIView): + serializer_class = ExampleSerializerModel + + def get(self, *args, **kwargs): + pass + + +class ExampleOperationIdDuplicate2(generics.GenericAPIView): + serializer_class = ExampleSerializerModel + + def get(self, *args, **kwargs): + pass + + +class ExampleGenericAPIViewModel(generics.GenericAPIView): + serializer_class = ExampleSerializerModel + + def get(self, *args, **kwargs): + from datetime import datetime + now = datetime.now() + + serializer = self.get_serializer(data=now.date(), datetime=now) + return Response(serializer.data) + + +class ExampleAutoSchemaComponentName(generics.GenericAPIView): + serializer_class = ExampleSerializerModel + schema = AutoSchema(component_name="Ulysses") + + def get(self, *args, **kwargs): + from datetime import datetime + now = datetime.now() + + serializer = self.get_serializer(data=now.date(), datetime=now) + return Response(serializer.data) + + +class ExampleAutoSchemaDuplicate1(generics.GenericAPIView): + serializer_class = ExampleValidatedSerializer + schema = AutoSchema(component_name="Duplicate") + + def get(self, *args, **kwargs): + from datetime import datetime + now = datetime.now() + + serializer = self.get_serializer(data=now.date(), datetime=now) + return Response(serializer.data) + + +class ExampleAutoSchemaDuplicate2(generics.GenericAPIView): + serializer_class = ExampleSerializerModel + schema = AutoSchema(component_name="Duplicate") + + def get(self, *args, **kwargs): + from datetime import datetime + now = datetime.now() + + serializer = self.get_serializer(data=now.date(), datetime=now) + return Response(serializer.data) + + +class ExampleViewSet(ViewSet): + serializer_class = ExampleSerializerModel + + def list(self, request): + pass + + def create(self, request): + pass + + def retrieve(self, request, pk=None): + pass + + def update(self, request, pk=None): + pass + + def partial_update(self, request, pk=None): + pass + + def destroy(self, request, pk=None): + pass diff --git a/tests/test_api_client.py b/tests/test_api_client.py index 74a3579e2..976f10ed1 100644 --- a/tests/test_api_client.py +++ b/tests/test_api_client.py @@ -2,9 +2,9 @@ import os import tempfile import unittest -from django.conf.urls import url from django.http import HttpResponse from django.test import override_settings +from django.urls import path, re_path from rest_framework.compat import coreapi, coreschema from rest_framework.parsers import FileUploadParser @@ -178,13 +178,13 @@ class HeadersView(APIView): urlpatterns = [ - url(r'^$', SchemaView.as_view()), - url(r'^example/$', ListView.as_view()), - url(r'^example/(?P[0-9]+)/$', DetailView.as_view()), - url(r'^upload/$', UploadView.as_view()), - url(r'^download/$', DownloadView.as_view()), - url(r'^text/$', TextView.as_view()), - url(r'^headers/$', HeadersView.as_view()), + path('', SchemaView.as_view()), + path('example/', ListView.as_view()), + re_path(r'^example/(?P[0-9]+)/$', DetailView.as_view()), + path('upload/', UploadView.as_view()), + path('download/', DownloadView.as_view()), + path('text/', TextView.as_view()), + path('headers/', HeadersView.as_view()), ] diff --git a/tests/test_atomic_requests.py b/tests/test_atomic_requests.py index de04d2c06..beda5cba1 100644 --- a/tests/test_atomic_requests.py +++ b/tests/test_atomic_requests.py @@ -1,9 +1,9 @@ import unittest -from django.conf.urls import url from django.db import connection, connections, transaction from django.http import Http404 from django.test import TestCase, TransactionTestCase, override_settings +from django.urls import path from rest_framework import status from rest_framework.exceptions import APIException @@ -44,7 +44,7 @@ class NonAtomicAPIExceptionView(APIView): urlpatterns = ( - url(r'^$', NonAtomicAPIExceptionView.as_view()), + path('', NonAtomicAPIExceptionView.as_view()), ) @@ -130,6 +130,41 @@ class DBTransactionAPIExceptionTests(TestCase): assert BasicModel.objects.count() == 0 +@unittest.skipUnless( + connection.features.uses_savepoints, + "'atomic' requires transactions and savepoints." +) +class MultiDBTransactionAPIExceptionTests(TestCase): + databases = '__all__' + + def setUp(self): + self.view = APIExceptionView.as_view() + connections.databases['default']['ATOMIC_REQUESTS'] = True + connections.databases['secondary']['ATOMIC_REQUESTS'] = True + + def tearDown(self): + connections.databases['default']['ATOMIC_REQUESTS'] = False + connections.databases['secondary']['ATOMIC_REQUESTS'] = False + + def test_api_exception_rollback_transaction(self): + """ + Transaction is rollbacked by our transaction atomic block. + """ + request = factory.post('/') + num_queries = 4 if connection.features.can_release_savepoints else 3 + with self.assertNumQueries(num_queries): + # 1 - begin savepoint + # 2 - insert + # 3 - rollback savepoint + # 4 - release savepoint + with transaction.atomic(), transaction.atomic(using='secondary'): + response = self.view(request) + assert transaction.get_rollback() + assert transaction.get_rollback(using='secondary') + assert response.status_code == status.HTTP_500_INTERNAL_SERVER_ERROR + assert BasicModel.objects.count() == 0 + + @unittest.skipUnless( connection.features.uses_savepoints, "'atomic' requires transactions and savepoints." diff --git a/tests/test_authtoken.py b/tests/test_authtoken.py index 036e317ef..30e416d65 100644 --- a/tests/test_authtoken.py +++ b/tests/test_authtoken.py @@ -1,10 +1,11 @@ +import importlib from io import StringIO import pytest from django.contrib.admin import site from django.contrib.auth.models import User from django.core.management import CommandError, call_command -from django.test import TestCase +from django.test import TestCase, modify_settings from rest_framework.authtoken.admin import TokenAdmin from rest_framework.authtoken.management.commands.drf_create_token import \ @@ -21,6 +22,14 @@ class AuthTokenTests(TestCase): self.user = User.objects.create_user(username='test_user') self.token = Token.objects.create(key='test token', user=self.user) + def test_authtoken_can_be_imported_when_not_included_in_installed_apps(self): + import rest_framework.authtoken.models + with modify_settings(INSTALLED_APPS={'remove': 'rest_framework.authtoken'}): + importlib.reload(rest_framework.authtoken.models) + # Set the proxy and abstract properties back to the version, + # where authtoken is among INSTALLED_APPS. + importlib.reload(rest_framework.authtoken.models) + def test_model_admin_displayed_fields(self): mock_request = object() token_admin = TokenAdmin(self.token, self.site) diff --git a/tests/test_decorators.py b/tests/test_decorators.py index e10f0e5c5..99ba13e60 100644 --- a/tests/test_decorators.py +++ b/tests/test_decorators.py @@ -22,10 +22,6 @@ class DecoratorTestCase(TestCase): def setUp(self): self.factory = APIRequestFactory() - def _finalize_response(self, request, response, *args, **kwargs): - response.request = request - return APIView.finalize_response(self, request, response, *args, **kwargs) - def test_api_view_incorrect(self): """ If @api_view is not applied correct, we should raise an assertion. diff --git a/tests/test_description.py b/tests/test_description.py index ae00fe4a9..9e7e4dc32 100644 --- a/tests/test_description.py +++ b/tests/test_description.py @@ -1,192 +1,180 @@ -from django.test import TestCase - -from rest_framework.compat import apply_markdown -from rest_framework.utils.formatting import dedent -from rest_framework.views import APIView - -# We check that docstrings get nicely un-indented. -DESCRIPTION = """an example docstring -==================== - -* list -* list - -another header --------------- - - code block - -indented - -# hash style header # - -``` json -[{ - "alpha": 1, - "beta: "this is a string" -}] -```""" - - -# If markdown is installed we also test it's working -# (and that our wrapped forces '=' to h2 and '-' to h3) -MARKED_DOWN_HILITE = """ -
    [{
    "alpha": 1,
    \ - "beta: "this\ - is a \ -string"
    }]
    - -


    """ - -MARKED_DOWN_NOT_HILITE = """ -

    json -[{ - "alpha": 1, - "beta: "this is a string" -}]

    """ - -# We support markdown < 2.1 and markdown >= 2.1 -MARKED_DOWN_lt_21 = """

    an example docstring

    -
      -
    • list
    • -
    • list
    • -
    -

    another header

    -
    code block
    -
    -

    indented

    -

    hash style header

    %s""" - -MARKED_DOWN_gte_21 = """

    an example docstring

    -
      -
    • list
    • -
    • list
    • -
    -

    another header

    -
    code block
    -
    -

    indented

    -

    hash style header

    %s""" - - -class TestViewNamesAndDescriptions(TestCase): - def test_view_name_uses_class_name(self): - """ - Ensure view names are based on the class name. - """ - class MockView(APIView): - pass - assert MockView().get_view_name() == 'Mock' - - def test_view_name_uses_name_attribute(self): - class MockView(APIView): - name = 'Foo' - assert MockView().get_view_name() == 'Foo' - - def test_view_name_uses_suffix_attribute(self): - class MockView(APIView): - suffix = 'List' - assert MockView().get_view_name() == 'Mock List' - - def test_view_name_preferences_name_over_suffix(self): - class MockView(APIView): - name = 'Foo' - suffix = 'List' - assert MockView().get_view_name() == 'Foo' - - def test_view_description_uses_docstring(self): - """Ensure view descriptions are based on the docstring.""" - class MockView(APIView): - """an example docstring - ==================== - - * list - * list - - another header - -------------- - - code block - - indented - - # hash style header # - - ``` json - [{ - "alpha": 1, - "beta: "this is a string" - }] - ```""" - - assert MockView().get_view_description() == DESCRIPTION - - def test_view_description_uses_description_attribute(self): - class MockView(APIView): - description = 'Foo' - assert MockView().get_view_description() == 'Foo' - - def test_view_description_allows_empty_description(self): - class MockView(APIView): - """Description.""" - description = '' - assert MockView().get_view_description() == '' - - def test_view_description_can_be_empty(self): - """ - Ensure that if a view has no docstring, - then it's description is the empty string. - """ - class MockView(APIView): - pass - assert MockView().get_view_description() == '' - - def test_view_description_can_be_promise(self): - """ - Ensure a view may have a docstring that is actually a lazily evaluated - class that can be converted to a string. - - See: https://github.com/encode/django-rest-framework/issues/1708 - """ - # use a mock object instead of gettext_lazy to ensure that we can't end - # up with a test case string in our l10n catalog - - class MockLazyStr: - def __init__(self, string): - self.s = string - - def __str__(self): - return self.s - - class MockView(APIView): - __doc__ = MockLazyStr("a gettext string") - - assert MockView().get_view_description() == 'a gettext string' - - def test_markdown(self): - """ - Ensure markdown to HTML works as expected. - """ - if apply_markdown: - md_applied = apply_markdown(DESCRIPTION) - gte_21_match = ( - md_applied == ( - MARKED_DOWN_gte_21 % MARKED_DOWN_HILITE) or - md_applied == ( - MARKED_DOWN_gte_21 % MARKED_DOWN_NOT_HILITE)) - lt_21_match = ( - md_applied == ( - MARKED_DOWN_lt_21 % MARKED_DOWN_HILITE) or - md_applied == ( - MARKED_DOWN_lt_21 % MARKED_DOWN_NOT_HILITE)) - assert gte_21_match or lt_21_match - - -def test_dedent_tabs(): - result = 'first string\n\nsecond string' - assert dedent(" first string\n\n second string") == result - assert dedent("first string\n\n second string") == result - assert dedent("\tfirst string\n\n\tsecond string") == result - assert dedent("first string\n\n\tsecond string") == result +import sys + +import pytest +from django.test import TestCase + +from rest_framework.compat import apply_markdown +from rest_framework.utils.formatting import dedent +from rest_framework.views import APIView + +# We check that docstrings get nicely un-indented. +DESCRIPTION = """an example docstring +==================== + +* list +* list + +another header +-------------- + + code block + +indented + +# hash style header # + +``` json +[{ + "alpha": 1, + "beta: "this is a string" +}] +```""" + + +# If markdown is installed we also test it's working +# (and that our wrapped forces '=' to h2 and '-' to h3) +MARKDOWN_BASE = """

    an example docstring

    +
      +
    • list
    • +
    • list
    • +
    +

    another header

    +
    code block
    +
    +

    indented

    +

    hash style header

    %s""" + +MARKDOWN_gte_33 = """ +
    [{
    \ + "alpha":\ + 1,
    \ + "beta: "this\ + is a \ +string"
    }]\ +
    +


    """ + +MARKDOWN_lt_33 = """ +
    [{
    \ + "alpha":\ + 1,
    \ + "beta: "this\ + is a\ + string"
    }]\ +
    + +


    """ + + +class TestViewNamesAndDescriptions(TestCase): + def test_view_name_uses_class_name(self): + """ + Ensure view names are based on the class name. + """ + class MockView(APIView): + pass + assert MockView().get_view_name() == 'Mock' + + def test_view_name_uses_name_attribute(self): + class MockView(APIView): + name = 'Foo' + assert MockView().get_view_name() == 'Foo' + + def test_view_name_uses_suffix_attribute(self): + class MockView(APIView): + suffix = 'List' + assert MockView().get_view_name() == 'Mock List' + + def test_view_name_preferences_name_over_suffix(self): + class MockView(APIView): + name = 'Foo' + suffix = 'List' + assert MockView().get_view_name() == 'Foo' + + def test_view_description_uses_docstring(self): + """Ensure view descriptions are based on the docstring.""" + class MockView(APIView): + """an example docstring + ==================== + + * list + * list + + another header + -------------- + + code block + + indented + + # hash style header # + + ``` json + [{ + "alpha": 1, + "beta: "this is a string" + }] + ```""" + + assert MockView().get_view_description() == DESCRIPTION + + def test_view_description_uses_description_attribute(self): + class MockView(APIView): + description = 'Foo' + assert MockView().get_view_description() == 'Foo' + + def test_view_description_allows_empty_description(self): + class MockView(APIView): + """Description.""" + description = '' + assert MockView().get_view_description() == '' + + def test_view_description_can_be_empty(self): + """ + Ensure that if a view has no docstring, + then it's description is the empty string. + """ + class MockView(APIView): + pass + assert MockView().get_view_description() == '' + + def test_view_description_can_be_promise(self): + """ + Ensure a view may have a docstring that is actually a lazily evaluated + class that can be converted to a string. + + See: https://github.com/encode/django-rest-framework/issues/1708 + """ + # use a mock object instead of gettext_lazy to ensure that we can't end + # up with a test case string in our l10n catalog + + class MockLazyStr: + def __init__(self, string): + self.s = string + + def __str__(self): + return self.s + + class MockView(APIView): + __doc__ = MockLazyStr("a gettext string") + + assert MockView().get_view_description() == 'a gettext string' + + @pytest.mark.skipif(not apply_markdown, reason="Markdown is not installed") + def test_markdown(self): + """ + Ensure markdown to HTML works as expected. + """ + # Markdown 3.3 is only supported on Python 3.6 and higher + if sys.version_info >= (3, 6): + assert apply_markdown(DESCRIPTION) == MARKDOWN_BASE % MARKDOWN_gte_33 + else: + assert apply_markdown(DESCRIPTION) == MARKDOWN_BASE % MARKDOWN_lt_33 + + +def test_dedent_tabs(): + result = 'first string\n\nsecond string' + assert dedent(" first string\n\n second string") == result + assert dedent("first string\n\n second string") == result + assert dedent("\tfirst string\n\n\tsecond string") == result + assert dedent("first string\n\n\tsecond string") == result diff --git a/tests/test_fields.py b/tests/test_fields.py index 7c495cd63..fdd570d8a 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -13,7 +13,6 @@ from django.utils.timezone import activate, deactivate, override, utc import rest_framework from rest_framework import exceptions, serializers -from rest_framework.compat import ProhibitNullCharactersValidator from rest_framework.fields import ( BuiltinSignatureError, DjangoImageField, is_simple_callable ) @@ -565,11 +564,10 @@ class TestCreateOnlyDefault: on the callable if possible """ class TestCallableDefault: - def set_context(self, serializer_field): - self.field = serializer_field + requires_context = True - def __call__(self): - return "success" if hasattr(self, 'field') else "failure" + def __call__(self, field=None): + return "success" if field is not None else "failure" class TestSerializer(serializers.Serializer): context_set = serializers.CharField(default=serializers.CreateOnlyDefault(TestCallableDefault())) @@ -671,7 +669,7 @@ class TestBooleanField(FieldValues): for input_value in inputs: with pytest.raises(serializers.ValidationError) as exc_info: field.run_validation(input_value) - expected = ['Must be a valid boolean.'.format(input_value)] + expected = ['Must be a valid boolean.'] assert exc_info.value.detail == expected @@ -699,7 +697,7 @@ class TestNullBooleanField(TestBooleanField): None: None, 'other': True } - field = serializers.NullBooleanField() + field = serializers.BooleanField(allow_null=True) class TestNullableBooleanField(TestNullBooleanField): @@ -748,7 +746,6 @@ class TestCharField(FieldValues): field.run_validation(' ') assert exc_info.value.detail == ['This field may not be blank.'] - @pytest.mark.skipif(ProhibitNullCharactersValidator is None, reason="Skipped on Django < 2.0") def test_null_bytes(self): field = serializers.CharField() @@ -759,6 +756,21 @@ class TestCharField(FieldValues): 'Null characters are not allowed.' ] + def test_surrogate_characters(self): + field = serializers.CharField() + + for code_point, expected_message in ( + (0xD800, 'Surrogate characters are not allowed: U+D800.'), + (0xDFFF, 'Surrogate characters are not allowed: U+DFFF.'), + ): + with pytest.raises(serializers.ValidationError) as exc_info: + field.run_validation(chr(code_point)) + assert exc_info.value.detail[0].code == 'surrogate_characters_not_allowed' + assert str(exc_info.value.detail[0]) == expected_message + + for code_point in (0xD800 - 1, 0xDFFF + 1): + field.run_validation(chr(code_point)) + def test_iterable_validators(self): """ Ensure `validators` parameter is compatible with reasonable iterables. @@ -1080,6 +1092,7 @@ class TestDecimalField(FieldValues): invalid_inputs = ( ('abc', ["A valid number is required."]), (Decimal('Nan'), ["A valid number is required."]), + (Decimal('Snan'), ["A valid number is required."]), (Decimal('Inf'), ["A valid number is required."]), ('12.345', ["Ensure that there are no more than 3 digits in total."]), (200000000000.0, ["Ensure that there are no more than 3 digits in total."]), diff --git a/tests/test_filters.py b/tests/test_filters.py index 6d7969a92..567e5f83f 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -4,6 +4,7 @@ from importlib import reload as reload_module import pytest from django.core.exceptions import ImproperlyConfigured from django.db import models +from django.db.models import CharField, Transform from django.db.models.functions import Concat, Upper from django.test import TestCase from django.test.utils import override_settings @@ -189,6 +190,41 @@ class SearchFilterTests(TestCase): assert terms == ['asdf'] + def test_search_field_with_additional_transforms(self): + from django.test.utils import register_lookup + + class SearchListView(generics.ListAPIView): + queryset = SearchFilterModel.objects.all() + serializer_class = SearchFilterSerializer + filter_backends = (filters.SearchFilter,) + search_fields = ('text__trim', ) + + view = SearchListView.as_view() + + # an example custom transform, that trims `a` from the string. + class TrimA(Transform): + function = 'TRIM' + lookup_name = 'trim' + + def as_sql(self, compiler, connection): + sql, params = compiler.compile(self.lhs) + return "trim(%s, 'a')" % sql, params + + with register_lookup(CharField, TrimA): + # Search including `a` + request = factory.get('/', {'search': 'abc'}) + + response = view(request) + assert response.data == [] + + # Search excluding `a` + request = factory.get('/', {'search': 'bc'}) + response = view(request) + assert response.data == [ + {'id': 1, 'title': 'z', 'text': 'abc'}, + {'id': 2, 'title': 'zz', 'text': 'bcd'}, + ] + class AttributeModel(models.Model): label = models.CharField(max_length=32) @@ -368,6 +404,21 @@ class SearchFilterAnnotatedFieldTests(TestCase): assert len(response.data) == 1 assert response.data[0]['title_text'] == 'ABCDEF' + def test_must_call_distinct_subsequent_m2m_fields(self): + f = filters.SearchFilter() + + queryset = SearchFilterModelM2M.objects.annotate( + title_text=Upper( + Concat(models.F('title'), models.F('text')) + ) + ).all() + + # Sanity check that m2m must call distinct + assert f.must_call_distinct(queryset, ['attributes']) + + # Annotated field should not prevent m2m must call distinct + assert f.must_call_distinct(queryset, ['title_text', 'attributes']) + class OrderingFilterModel(models.Model): title = models.CharField(max_length=20, verbose_name='verbose title') diff --git a/tests/test_generics.py b/tests/test_generics.py index 0b91e3465..2907d2773 100644 --- a/tests/test_generics.py +++ b/tests/test_generics.py @@ -662,3 +662,33 @@ class GetObjectOr404Tests(TestCase): def test_get_object_or_404_with_invalid_string_for_uuid(self): with pytest.raises(Http404): generics.get_object_or_404(UUIDForeignKeyTarget, pk='not-a-uuid') + + +class TestSerializer(TestCase): + + def test_serializer_class_not_provided(self): + class NoSerializerClass(generics.GenericAPIView): + pass + + with pytest.raises(AssertionError) as excinfo: + NoSerializerClass().get_serializer_class() + + assert str(excinfo.value) == ( + "'NoSerializerClass' should either include a `serializer_class` " + "attribute, or override the `get_serializer_class()` method.") + + def test_given_context_not_overridden(self): + context = object() + + class View(generics.ListAPIView): + serializer_class = serializers.Serializer + + def list(self, request): + response = Response() + response.serializer = self.get_serializer(context=context) + return response + + response = View.as_view()(factory.get('/')) + serializer = response.serializer + + assert serializer.context is context diff --git a/tests/test_htmlrenderer.py b/tests/test_htmlrenderer.py index e31a9ced5..fa0f4efc6 100644 --- a/tests/test_htmlrenderer.py +++ b/tests/test_htmlrenderer.py @@ -1,10 +1,10 @@ import django.template.loader import pytest -from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.http import Http404 from django.template import TemplateDoesNotExist, engines from django.test import TestCase, override_settings +from django.urls import path from rest_framework import status from rest_framework.decorators import api_view, renderer_classes @@ -35,9 +35,9 @@ def not_found(request): urlpatterns = [ - url(r'^$', example), - url(r'^permission_denied$', permission_denied), - url(r'^not_found$', not_found), + path('', example), + path('permission_denied', permission_denied), + path('not_found', not_found), ] diff --git a/tests/test_lazy_hyperlinks.py b/tests/test_lazy_hyperlinks.py index cf3ee735f..716d02d2a 100644 --- a/tests/test_lazy_hyperlinks.py +++ b/tests/test_lazy_hyperlinks.py @@ -1,6 +1,6 @@ -from django.conf.urls import url from django.db import models from django.test import TestCase, override_settings +from django.urls import path from rest_framework import serializers from rest_framework.renderers import JSONRenderer @@ -29,7 +29,7 @@ def dummy_view(request): urlpatterns = [ - url(r'^example/(?P[0-9]+)/$', dummy_view, name='example-detail'), + path('example//', dummy_view, name='example-detail'), ] diff --git a/tests/test_metadata.py b/tests/test_metadata.py index e1a1fd352..4abc0fc07 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -311,7 +311,8 @@ class TestMetadata: class TestSimpleMetadataFieldInfo(TestCase): def test_null_boolean_field_info_type(self): options = metadata.SimpleMetadata() - field_info = options.get_field_info(serializers.NullBooleanField()) + field_info = options.get_field_info(serializers.BooleanField( + allow_null=True)) assert field_info['type'] == 'boolean' def test_related_field_choices(self): diff --git a/tests/test_middleware.py b/tests/test_middleware.py index 28a5e558a..6b2c91db7 100644 --- a/tests/test_middleware.py +++ b/tests/test_middleware.py @@ -1,7 +1,7 @@ -from django.conf.urls import url from django.contrib.auth.models import User from django.http import HttpRequest from django.test import override_settings +from django.urls import path from rest_framework.authentication import TokenAuthentication from rest_framework.authtoken.models import Token @@ -17,8 +17,8 @@ class PostView(APIView): urlpatterns = [ - url(r'^auth$', APIView.as_view(authentication_classes=(TokenAuthentication,))), - url(r'^post$', PostView.as_view()), + path('auth', APIView.as_view(authentication_classes=(TokenAuthentication,))), + path('post', PostView.as_view()), ] diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py index 21ec82347..7da1b41ae 100644 --- a/tests/test_model_serializer.py +++ b/tests/test_model_serializer.py @@ -7,10 +7,11 @@ an appropriate set of serializer fields for each case. """ import datetime import decimal +import json # noqa import sys +import tempfile from collections import OrderedDict -import django import pytest from django.core.exceptions import ImproperlyConfigured from django.core.serializers.json import DjangoJSONEncoder @@ -61,7 +62,7 @@ class RegularFieldsModel(models.Model): email_field = models.EmailField(max_length=100) float_field = models.FloatField() integer_field = models.IntegerField() - null_boolean_field = models.NullBooleanField() + null_boolean_field = models.BooleanField(null=True, default=False) positive_integer_field = models.PositiveIntegerField() positive_small_integer_field = models.PositiveSmallIntegerField() slug_field = models.SlugField(max_length=100) @@ -71,7 +72,7 @@ class RegularFieldsModel(models.Model): time_field = models.TimeField() url_field = models.URLField(max_length=100) custom_field = CustomField() - file_path_field = models.FilePathField(path='/tmp/') + file_path_field = models.FilePathField(path=tempfile.gettempdir()) def method(self): return 'method' @@ -89,6 +90,7 @@ class FieldOptionsModel(models.Model): default_field = models.IntegerField(default=0) descriptive_field = models.IntegerField(help_text='Some help text', verbose_name='A label') choices_field = models.CharField(max_length=100, choices=COLOR_CHOICES) + text_choices_field = models.TextField(choices=COLOR_CHOICES) class ChoicesModel(models.Model): @@ -180,7 +182,7 @@ class TestRegularFieldMappings(TestCase): email_field = EmailField(max_length=100) float_field = FloatField() integer_field = IntegerField() - null_boolean_field = NullBooleanField(required=False) + null_boolean_field = BooleanField(allow_null=True, required=False) positive_integer_field = IntegerField() positive_small_integer_field = IntegerField() slug_field = SlugField(allow_unicode=False, max_length=100) @@ -190,8 +192,8 @@ class TestRegularFieldMappings(TestCase): time_field = TimeField() url_field = URLField(max_length=100) custom_field = ModelField(model_field=) - file_path_field = FilePathField(path='/tmp/') - """) + file_path_field = FilePathField(path=%r) + """ % tempfile.gettempdir()) self.assertEqual(repr(TestSerializer()), expected) @@ -211,27 +213,30 @@ class TestRegularFieldMappings(TestCase): default_field = IntegerField(required=False) descriptive_field = IntegerField(help_text='Some help text', label='A label') choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green'))) + text_choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green'))) """) self.assertEqual(repr(TestSerializer()), expected) - # merge this into test_regular_fields / RegularFieldsModel when - # Django 2.1 is the minimum supported version - @pytest.mark.skipif(django.VERSION < (2, 1), reason='Django version < 2.1') - def test_nullable_boolean_field(self): - class NullableBooleanModel(models.Model): - field = models.BooleanField(null=True, default=False) + def test_nullable_boolean_field_choices(self): + class NullableBooleanChoicesModel(models.Model): + CHECKLIST_OPTIONS = ( + (None, 'Unknown'), + (True, 'Yes'), + (False, 'No'), + ) - class NullableBooleanSerializer(serializers.ModelSerializer): + field = models.BooleanField(null=True, choices=CHECKLIST_OPTIONS) + + class NullableBooleanChoicesSerializer(serializers.ModelSerializer): class Meta: - model = NullableBooleanModel + model = NullableBooleanChoicesModel fields = ['field'] - expected = dedent(""" - NullableBooleanSerializer(): - field = BooleanField(allow_null=True, required=False) - """) - - self.assertEqual(repr(NullableBooleanSerializer()), expected) + serializer = NullableBooleanChoicesSerializer(data=dict( + field=None, + )) + self.assertTrue(serializer.is_valid()) + self.assertEqual(serializer.errors, {}) def test_method_field(self): """ @@ -454,6 +459,7 @@ class TestPosgresFieldsMapping(TestCase): """) self.assertEqual(repr(TestSerializer()), expected) + @pytest.mark.skipif(hasattr(models, 'JSONField'), reason='has models.JSONField') def test_json_field(self): class JSONFieldModel(models.Model): json_field = postgres_fields.JSONField() @@ -472,6 +478,30 @@ class TestPosgresFieldsMapping(TestCase): self.assertEqual(repr(TestSerializer()), expected) +class CustomJSONDecoder(json.JSONDecoder): + pass + + +@pytest.mark.skipif(not hasattr(models, 'JSONField'), reason='no models.JSONField') +class TestDjangoJSONFieldMapping(TestCase): + def test_json_field(self): + class JSONFieldModel(models.Model): + json_field = models.JSONField() + json_field_with_encoder = models.JSONField(encoder=DjangoJSONEncoder, decoder=CustomJSONDecoder) + + class TestSerializer(serializers.ModelSerializer): + class Meta: + model = JSONFieldModel + fields = ['json_field', 'json_field_with_encoder'] + + expected = dedent(""" + TestSerializer(): + json_field = JSONField(decoder=None, encoder=None, style={'base_template': 'textarea.html'}) + json_field_with_encoder = JSONField(decoder=, encoder=, style={'base_template': 'textarea.html'}) + """) + self.assertEqual(repr(TestSerializer()), expected) + + # Tests for relational field mappings. # ------------------------------------ diff --git a/tests/test_pagination.py b/tests/test_pagination.py index 11fd6844d..c028f0ea8 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -259,6 +259,41 @@ class TestPageNumberPagination: with pytest.raises(exceptions.NotFound): self.paginate_queryset(request) + def test_get_paginated_response_schema(self): + unpaginated_schema = { + 'type': 'object', + 'item': { + 'properties': { + 'test-property': { + 'type': 'integer', + }, + }, + }, + } + + assert self.pagination.get_paginated_response_schema(unpaginated_schema) == { + 'type': 'object', + 'properties': { + 'count': { + 'type': 'integer', + 'example': 123, + }, + 'next': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?page=4', + }, + 'previous': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?page=2', + }, + 'results': unpaginated_schema, + }, + } + class TestPageNumberPaginationOverride: """ @@ -535,6 +570,41 @@ class TestLimitOffset: assert content.get('next') == next_url assert content.get('previous') == prev_url + def test_get_paginated_response_schema(self): + unpaginated_schema = { + 'type': 'object', + 'item': { + 'properties': { + 'test-property': { + 'type': 'integer', + }, + }, + }, + } + + assert self.pagination.get_paginated_response_schema(unpaginated_schema) == { + 'type': 'object', + 'properties': { + 'count': { + 'type': 'integer', + 'example': 123, + }, + 'next': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?offset=400&limit=100', + }, + 'previous': { + 'type': 'string', + 'nullable': True, + 'format': 'uri', + 'example': 'http://api.example.org/accounts/?offset=200&limit=100', + }, + 'results': unpaginated_schema, + }, + } + class CursorPaginationTestsMixin: @@ -834,6 +904,33 @@ class CursorPaginationTestsMixin: assert current == [1, 1, 1, 1, 1] assert next == [1, 2, 3, 4, 4] + def test_get_paginated_response_schema(self): + unpaginated_schema = { + 'type': 'object', + 'item': { + 'properties': { + 'test-property': { + 'type': 'integer', + }, + }, + }, + } + + assert self.pagination.get_paginated_response_schema(unpaginated_schema) == { + 'type': 'object', + 'properties': { + 'next': { + 'type': 'string', + 'nullable': True, + }, + 'previous': { + 'type': 'string', + 'nullable': True, + }, + 'results': unpaginated_schema, + }, + } + class TestCursorPagination(CursorPaginationTestsMixin): """ diff --git a/tests/test_permissions.py b/tests/test_permissions.py index 03b80aae8..4e6cae4b8 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -2,8 +2,6 @@ import base64 import unittest from unittest import mock -import django -import pytest from django.conf import settings from django.contrib.auth.models import AnonymousUser, Group, Permission, User from django.db import models @@ -14,7 +12,6 @@ from rest_framework import ( HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers, status, views ) -from rest_framework.compat import PY36 from rest_framework.routers import DefaultRouter from rest_framework.test import APIRequestFactory from tests.models import BasicModel @@ -250,12 +247,6 @@ class BasicPermModel(models.Model): class Meta: app_label = 'tests' - if django.VERSION < (2, 1): - permissions = ( - ('view_basicpermmodel', 'Can view basic perm model'), - # add, change, delete built in to django - ) - class BasicPermSerializer(serializers.ModelSerializer): class Meta: @@ -438,6 +429,7 @@ class BasicPerm(permissions.BasePermission): class BasicPermWithDetail(permissions.BasePermission): message = 'Custom: You cannot access this resource' + code = 'permission_denied_custom' def has_permission(self, request, view): return False @@ -450,6 +442,7 @@ class BasicObjectPerm(permissions.BasePermission): class BasicObjectPermWithDetail(permissions.BasePermission): message = 'Custom: You cannot access this resource' + code = 'permission_denied_custom' def has_object_permission(self, request, view, obj): return False @@ -492,30 +485,35 @@ class CustomPermissionsTests(TestCase): credentials = basic_auth_header('username', 'password') self.request = factory.get('/1', format='json', HTTP_AUTHORIZATION=credentials) self.custom_message = 'Custom: You cannot access this resource' + self.custom_code = 'permission_denied_custom' def test_permission_denied(self): - response = denied_view(self.request, pk=1) - detail = response.data.get('detail') - self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) - self.assertNotEqual(detail, self.custom_message) + response = denied_view(self.request, pk=1) + detail = response.data.get('detail') + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.assertNotEqual(detail, self.custom_message) + self.assertNotEqual(detail.code, self.custom_code) def test_permission_denied_with_custom_detail(self): - response = denied_view_with_detail(self.request, pk=1) - detail = response.data.get('detail') - self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) - self.assertEqual(detail, self.custom_message) + response = denied_view_with_detail(self.request, pk=1) + detail = response.data.get('detail') + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.assertEqual(detail, self.custom_message) + self.assertEqual(detail.code, self.custom_code) def test_permission_denied_for_object(self): - response = denied_object_view(self.request, pk=1) - detail = response.data.get('detail') - self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) - self.assertNotEqual(detail, self.custom_message) + response = denied_object_view(self.request, pk=1) + detail = response.data.get('detail') + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.assertNotEqual(detail, self.custom_message) + self.assertNotEqual(detail.code, self.custom_code) def test_permission_denied_for_object_with_custom_detail(self): - response = denied_object_view_with_detail(self.request, pk=1) - detail = response.data.get('detail') - self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) - self.assertEqual(detail, self.custom_message) + response = denied_object_view_with_detail(self.request, pk=1) + detail = response.data.get('detail') + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.assertEqual(detail, self.custom_message) + self.assertEqual(detail.code, self.custom_code) class PermissionsCompositionTests(TestCase): @@ -600,7 +598,6 @@ class PermissionsCompositionTests(TestCase): ) assert composed_perm().has_permission(request, None) is True - @pytest.mark.skipif(not PY36, reason="assert_called_once() not available") def test_or_lazyness(self): request = factory.get('/1', format='json') request.user = AnonymousUser() @@ -609,19 +606,18 @@ class PermissionsCompositionTests(TestCase): with mock.patch.object(permissions.IsAuthenticated, 'has_permission', return_value=False) as mock_deny: composed_perm = (permissions.AllowAny | permissions.IsAuthenticated) hasperm = composed_perm().has_permission(request, None) - self.assertIs(hasperm, True) - mock_allow.assert_called_once() + assert hasperm is True + assert mock_allow.call_count == 1 mock_deny.assert_not_called() with mock.patch.object(permissions.AllowAny, 'has_permission', return_value=True) as mock_allow: with mock.patch.object(permissions.IsAuthenticated, 'has_permission', return_value=False) as mock_deny: composed_perm = (permissions.IsAuthenticated | permissions.AllowAny) hasperm = composed_perm().has_permission(request, None) - self.assertIs(hasperm, True) - mock_deny.assert_called_once() - mock_allow.assert_called_once() + assert hasperm is True + assert mock_deny.call_count == 1 + assert mock_allow.call_count == 1 - @pytest.mark.skipif(not PY36, reason="assert_called_once() not available") def test_object_or_lazyness(self): request = factory.get('/1', format='json') request.user = AnonymousUser() @@ -630,19 +626,18 @@ class PermissionsCompositionTests(TestCase): with mock.patch.object(permissions.IsAuthenticated, 'has_object_permission', return_value=False) as mock_deny: composed_perm = (permissions.AllowAny | permissions.IsAuthenticated) hasperm = composed_perm().has_object_permission(request, None, None) - self.assertIs(hasperm, True) - mock_allow.assert_called_once() + assert hasperm is True + assert mock_allow.call_count == 1 mock_deny.assert_not_called() with mock.patch.object(permissions.AllowAny, 'has_object_permission', return_value=True) as mock_allow: with mock.patch.object(permissions.IsAuthenticated, 'has_object_permission', return_value=False) as mock_deny: composed_perm = (permissions.IsAuthenticated | permissions.AllowAny) hasperm = composed_perm().has_object_permission(request, None, None) - self.assertIs(hasperm, True) - mock_deny.assert_called_once() - mock_allow.assert_called_once() + assert hasperm is True + assert mock_deny.call_count == 1 + assert mock_allow.call_count == 1 - @pytest.mark.skipif(not PY36, reason="assert_called_once() not available") def test_and_lazyness(self): request = factory.get('/1', format='json') request.user = AnonymousUser() @@ -651,19 +646,18 @@ class PermissionsCompositionTests(TestCase): with mock.patch.object(permissions.IsAuthenticated, 'has_permission', return_value=False) as mock_deny: composed_perm = (permissions.AllowAny & permissions.IsAuthenticated) hasperm = composed_perm().has_permission(request, None) - self.assertIs(hasperm, False) - mock_allow.assert_called_once() - mock_deny.assert_called_once() + assert hasperm is False + assert mock_allow.call_count == 1 + assert mock_deny.call_count == 1 with mock.patch.object(permissions.AllowAny, 'has_permission', return_value=True) as mock_allow: with mock.patch.object(permissions.IsAuthenticated, 'has_permission', return_value=False) as mock_deny: composed_perm = (permissions.IsAuthenticated & permissions.AllowAny) hasperm = composed_perm().has_permission(request, None) - self.assertIs(hasperm, False) + assert hasperm is False + assert mock_deny.call_count == 1 mock_allow.assert_not_called() - mock_deny.assert_called_once() - @pytest.mark.skipif(not PY36, reason="assert_called_once() not available") def test_object_and_lazyness(self): request = factory.get('/1', format='json') request.user = AnonymousUser() @@ -672,14 +666,14 @@ class PermissionsCompositionTests(TestCase): with mock.patch.object(permissions.IsAuthenticated, 'has_object_permission', return_value=False) as mock_deny: composed_perm = (permissions.AllowAny & permissions.IsAuthenticated) hasperm = composed_perm().has_object_permission(request, None, None) - self.assertIs(hasperm, False) - mock_allow.assert_called_once() - mock_deny.assert_called_once() + assert hasperm is False + assert mock_allow.call_count == 1 + assert mock_deny.call_count == 1 with mock.patch.object(permissions.AllowAny, 'has_object_permission', return_value=True) as mock_allow: with mock.patch.object(permissions.IsAuthenticated, 'has_object_permission', return_value=False) as mock_deny: composed_perm = (permissions.IsAuthenticated & permissions.AllowAny) hasperm = composed_perm().has_object_permission(request, None, None) - self.assertIs(hasperm, False) + assert hasperm is False + assert mock_deny.call_count == 1 mock_allow.assert_not_called() - mock_deny.assert_called_once() diff --git a/tests/test_relations.py b/tests/test_relations.py index 3281b7ea2..92aeecf6c 100644 --- a/tests/test_relations.py +++ b/tests/test_relations.py @@ -2,9 +2,9 @@ import uuid import pytest from _pytest.monkeypatch import MonkeyPatch -from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.test import override_settings +from django.urls import re_path from django.utils.datastructures import MultiValueDict from rest_framework import relations, serializers @@ -145,14 +145,18 @@ class TestProxiedPrimaryKeyRelatedField(APISimpleTestCase): assert representation == self.instance.pk.int -@override_settings(ROOT_URLCONF=[ - url(r'^example/(?P.+)/$', lambda: None, name='example'), -]) +urlpatterns = [ + re_path(r'^example/(?P.+)/$', lambda: None, name='example'), +] + + +@override_settings(ROOT_URLCONF='tests.test_relations') class TestHyperlinkedRelatedField(APISimpleTestCase): def setUp(self): self.queryset = MockQueryset([ MockObject(pk=1, name='foobar'), MockObject(pk=2, name='bazABCqux'), + MockObject(pk=2, name='bazABC qux'), ]) self.field = serializers.HyperlinkedRelatedField( view_name='example', @@ -191,6 +195,10 @@ class TestHyperlinkedRelatedField(APISimpleTestCase): instance = self.field.to_internal_value('http://example.org/example/baz%41%42%43qux/') assert instance is self.queryset.items[1] + def test_hyperlinked_related_lookup_url_space_encoded_exists(self): + instance = self.field.to_internal_value('http://example.org/example/bazABC%20qux/') + assert instance is self.queryset.items[2] + def test_hyperlinked_related_lookup_does_not_exist(self): with pytest.raises(serializers.ValidationError) as excinfo: self.field.to_internal_value('http://example.org/example/doesnotexist/') @@ -251,7 +259,7 @@ class TestHyperlinkedIdentityField(APISimpleTestCase): def test_improperly_configured(self): """ If a matching view cannot be reversed with the given instance, - the the user has misconfigured something, as the URL conf and the + the user has misconfigured something, as the URL conf and the hyperlinked field do not match. """ self.field.reverse = fail_reverse diff --git a/tests/test_relations_hyperlink.py b/tests/test_relations_hyperlink.py index 5ad0e31ff..77e4cd95f 100644 --- a/tests/test_relations_hyperlink.py +++ b/tests/test_relations_hyperlink.py @@ -1,5 +1,5 @@ -from django.conf.urls import url from django.test import TestCase, override_settings +from django.urls import path from rest_framework import serializers from rest_framework.test import APIRequestFactory @@ -17,14 +17,14 @@ def dummy_view(request, pk): urlpatterns = [ - url(r'^dummyurl/(?P[0-9]+)/$', dummy_view, name='dummy-url'), - url(r'^manytomanysource/(?P[0-9]+)/$', dummy_view, name='manytomanysource-detail'), - url(r'^manytomanytarget/(?P[0-9]+)/$', dummy_view, name='manytomanytarget-detail'), - url(r'^foreignkeysource/(?P[0-9]+)/$', dummy_view, name='foreignkeysource-detail'), - url(r'^foreignkeytarget/(?P[0-9]+)/$', dummy_view, name='foreignkeytarget-detail'), - url(r'^nullableforeignkeysource/(?P[0-9]+)/$', dummy_view, name='nullableforeignkeysource-detail'), - url(r'^onetoonetarget/(?P[0-9]+)/$', dummy_view, name='onetoonetarget-detail'), - url(r'^nullableonetoonesource/(?P[0-9]+)/$', dummy_view, name='nullableonetoonesource-detail'), + path('dummyurl//', dummy_view, name='dummy-url'), + path('manytomanysource//', dummy_view, name='manytomanysource-detail'), + path('manytomanytarget//', dummy_view, name='manytomanytarget-detail'), + path('foreignkeysource//', dummy_view, name='foreignkeysource-detail'), + path('foreignkeytarget//', dummy_view, name='foreignkeytarget-detail'), + path('nullableforeignkeysource//', dummy_view, name='nullableforeignkeysource-detail'), + path('onetoonetarget//', dummy_view, name='onetoonetarget-detail'), + path('nullableonetoonesource//', dummy_view, name='nullableonetoonesource-detail'), ] diff --git a/tests/test_relations_pk.py b/tests/test_relations_pk.py index 0da9da890..7a4878a2b 100644 --- a/tests/test_relations_pk.py +++ b/tests/test_relations_pk.py @@ -30,6 +30,25 @@ class ForeignKeyTargetSerializer(serializers.ModelSerializer): fields = ('id', 'name', 'sources') +class ForeignKeyTargetCallableSourceSerializer(serializers.ModelSerializer): + first_source = serializers.PrimaryKeyRelatedField( + source='get_first_source', + read_only=True, + ) + + class Meta: + model = ForeignKeyTarget + fields = ('id', 'name', 'first_source') + + +class ForeignKeyTargetPropertySourceSerializer(serializers.ModelSerializer): + first_source = serializers.PrimaryKeyRelatedField(read_only=True) + + class Meta: + model = ForeignKeyTarget + fields = ('id', 'name', 'first_source') + + class ForeignKeySourceSerializer(serializers.ModelSerializer): class Meta: model = ForeignKeySource @@ -389,6 +408,34 @@ class PKForeignKeyTests(TestCase): assert len(queryset) == 1 +class PKRelationTests(TestCase): + + def setUp(self): + self.target = ForeignKeyTarget.objects.create(name='target-1') + ForeignKeySource.objects.create(name='source-1', target=self.target) + ForeignKeySource.objects.create(name='source-2', target=self.target) + + def test_relation_field_callable_source(self): + serializer = ForeignKeyTargetCallableSourceSerializer(self.target) + expected = { + 'id': 1, + 'name': 'target-1', + 'first_source': 1, + } + with self.assertNumQueries(1): + self.assertEqual(serializer.data, expected) + + def test_relation_field_property_source(self): + serializer = ForeignKeyTargetPropertySourceSerializer(self.target) + expected = { + 'id': 1, + 'name': 'target-1', + 'first_source': 1, + } + with self.assertNumQueries(1): + self.assertEqual(serializer.data, expected) + + class PKNullableForeignKeyTests(TestCase): def setUp(self): target = ForeignKeyTarget(name='target-1') diff --git a/tests/test_renderers.py b/tests/test_renderers.py index c79c0a766..8271608e1 100644 --- a/tests/test_renderers.py +++ b/tests/test_renderers.py @@ -3,12 +3,12 @@ from collections import OrderedDict from collections.abc import MutableMapping import pytest -from django.conf.urls import include, url from django.core.cache import cache from django.db import models from django.http.request import HttpRequest from django.template import loader from django.test import TestCase, override_settings +from django.urls import include, path, re_path from django.utils.safestring import SafeText from django.utils.translation import gettext_lazy as _ @@ -111,14 +111,14 @@ class HTMLView1(APIView): urlpatterns = [ - url(r'^.*\.(?P.+)$', MockView.as_view(renderer_classes=[RendererA, RendererB])), - url(r'^$', MockView.as_view(renderer_classes=[RendererA, RendererB])), - url(r'^cache$', MockGETView.as_view()), - url(r'^parseerror$', MockPOSTView.as_view(renderer_classes=[JSONRenderer, BrowsableAPIRenderer])), - url(r'^html$', HTMLView.as_view()), - url(r'^html1$', HTMLView1.as_view()), - url(r'^empty$', EmptyGETView.as_view()), - url(r'^api', include('rest_framework.urls', namespace='rest_framework')) + re_path(r'^.*\.(?P.+)$', MockView.as_view(renderer_classes=[RendererA, RendererB])), + path('', MockView.as_view(renderer_classes=[RendererA, RendererB])), + path('cache', MockGETView.as_view()), + path('parseerror', MockPOSTView.as_view(renderer_classes=[JSONRenderer, BrowsableAPIRenderer])), + path('html', HTMLView.as_view()), + path('html1', HTMLView1.as_view()), + path('empty', EmptyGETView.as_view()), + path('api', include('rest_framework.urls', namespace='rest_framework')) ] @@ -637,7 +637,7 @@ class BrowsableAPIRendererTests(URLPatternsTestCase): router = SimpleRouter() router.register('examples', ExampleViewSet, basename='example') router.register('auth-examples', AuthExampleViewSet, basename='auth-example') - urlpatterns = [url(r'^api/', include(router.urls))] + urlpatterns = [path('api/', include(router.urls))] def setUp(self): self.renderer = BrowsableAPIRenderer() @@ -741,6 +741,11 @@ class AdminRendererTests(TestCase): class DummyGenericViewsetLike(APIView): lookup_field = 'test' + def get(self, request): + response = Response() + response.view = self + return response + def reverse_action(view, *args, **kwargs): self.assertEqual(kwargs['kwargs']['test'], 1) return '/example/' @@ -749,7 +754,7 @@ class AdminRendererTests(TestCase): view = DummyGenericViewsetLike.as_view() request = factory.get('/') response = view(request) - view = response.renderer_context['view'] + view = response.view self.assertEqual(self.renderer.get_result_url({'test': 1}, view), '/example/') self.assertIsNone(self.renderer.get_result_url({}, view)) @@ -760,11 +765,16 @@ class AdminRendererTests(TestCase): class DummyView(APIView): lookup_field = 'test' + def get(self, request): + response = Response() + response.view = self + return response + # get the view instance instead of the view function view = DummyView.as_view() request = factory.get('/') response = view(request) - view = response.renderer_context['view'] + view = response.view self.assertIsNone(self.renderer.get_result_url({'test': 1}, view)) self.assertIsNone(self.renderer.get_result_url({}, view)) diff --git a/tests/test_request.py b/tests/test_request.py index 0f682deb0..8f55d00ed 100644 --- a/tests/test_request.py +++ b/tests/test_request.py @@ -5,7 +5,6 @@ import os.path import tempfile import pytest -from django.conf.urls import url from django.contrib.auth import authenticate, login, logout from django.contrib.auth.middleware import AuthenticationMiddleware from django.contrib.auth.models import User @@ -13,6 +12,7 @@ from django.contrib.sessions.middleware import SessionMiddleware from django.core.files.uploadedfile import SimpleUploadedFile from django.http.request import RawPostDataException from django.test import TestCase, override_settings +from django.urls import path from rest_framework import status from rest_framework.authentication import SessionAuthentication @@ -137,7 +137,9 @@ class MockView(APIView): class EchoView(APIView): def post(self, request): - return Response(status=status.HTTP_200_OK, data=request.data) + response = Response(status=status.HTTP_200_OK, data=request.data) + response._request = request # test client sets `request` input + return response class FileUploadView(APIView): @@ -151,9 +153,9 @@ class FileUploadView(APIView): urlpatterns = [ - url(r'^$', MockView.as_view()), - url(r'^echo/$', EchoView.as_view()), - url(r'^upload/$', FileUploadView.as_view()) + path('', MockView.as_view()), + path('echo/', EchoView.as_view()), + path('upload/', FileUploadView.as_view()) ] @@ -203,8 +205,12 @@ class TestUserSetter(TestCase): # available to login and logout functions self.wrapped_request = factory.get('/') self.request = Request(self.wrapped_request) - SessionMiddleware().process_request(self.wrapped_request) - AuthenticationMiddleware().process_request(self.wrapped_request) + + def dummy_get_response(request): # pragma: no cover + return None + + SessionMiddleware(dummy_get_response).process_request(self.wrapped_request) + AuthenticationMiddleware(dummy_get_response).process_request(self.wrapped_request) User.objects.create_user('ringo', 'starr@thebeatles.com', 'yellow') self.user = authenticate(username='ringo', password='yellow') @@ -272,6 +278,12 @@ class TestSecure(TestCase): class TestHttpRequest(TestCase): + def test_repr(self): + http_request = factory.get('/path') + request = Request(http_request) + + assert repr(request) == "" + def test_attribute_access_proxy(self): http_request = factory.get('/') request = Request(http_request) @@ -300,7 +312,7 @@ class TestHttpRequest(TestCase): `RawPostDataException` being raised. """ response = APIClient().post('/echo/', data={'a': 'b'}, format='json') - request = response.renderer_context['request'] + request = response._request # ensure that request stream was consumed by json parser assert request.content_type.startswith('application/json') @@ -319,7 +331,7 @@ class TestHttpRequest(TestCase): the duplicate stream parse exception. """ response = APIClient().post('/echo/', data={'a': 'b'}) - request = response.renderer_context['request'] + request = response._request # ensure that request stream was consumed by form parser assert request.content_type.startswith('multipart/form-data') @@ -327,7 +339,7 @@ class TestHttpRequest(TestCase): # pass same HttpRequest to view, form data set on underlying request response = EchoView.as_view()(request._request) - request = response.renderer_context['request'] + request = response._request # ensure that request stream was consumed by form parser assert request.content_type.startswith('multipart/form-data') diff --git a/tests/test_requests_client.py b/tests/test_requests_client.py index 59b388c5a..c8e7be6ee 100644 --- a/tests/test_requests_client.py +++ b/tests/test_requests_client.py @@ -1,10 +1,10 @@ import unittest -from django.conf.urls import url from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.shortcuts import redirect from django.test import override_settings +from django.urls import path from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_protect, ensure_csrf_cookie @@ -90,10 +90,10 @@ class AuthView(APIView): urlpatterns = [ - url(r'^$', Root.as_view(), name='root'), - url(r'^headers/$', HeadersView.as_view(), name='headers'), - url(r'^session/$', SessionView.as_view(), name='session'), - url(r'^auth/$', AuthView.as_view(), name='auth'), + path('', Root.as_view(), name='root'), + path('headers/', HeadersView.as_view(), name='headers'), + path('session/', SessionView.as_view(), name='session'), + path('auth/', AuthView.as_view(), name='auth'), ] diff --git a/tests/test_response.py b/tests/test_response.py index d3a56d01b..0d5528dc9 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -1,5 +1,5 @@ -from django.conf.urls import include, url from django.test import TestCase, override_settings +from django.urls import include, path, re_path from rest_framework import generics, routers, serializers, status, viewsets from rest_framework.parsers import JSONParser @@ -117,15 +117,15 @@ new_model_viewset_router.register(r'', HTMLNewModelViewSet) urlpatterns = [ - url(r'^setbyview$', MockViewSettingContentType.as_view(renderer_classes=[RendererA, RendererB, RendererC])), - url(r'^.*\.(?P.+)$', MockView.as_view(renderer_classes=[RendererA, RendererB, RendererC])), - url(r'^$', MockView.as_view(renderer_classes=[RendererA, RendererB, RendererC])), - url(r'^html$', HTMLView.as_view()), - url(r'^json$', JSONView.as_view()), - url(r'^html1$', HTMLView1.as_view()), - url(r'^html_new_model$', HTMLNewModelView.as_view()), - url(r'^html_new_model_viewset', include(new_model_viewset_router.urls)), - url(r'^restframework', include('rest_framework.urls', namespace='rest_framework')) + path('setbyview', MockViewSettingContentType.as_view(renderer_classes=[RendererA, RendererB, RendererC])), + re_path(r'^.*\.(?P.+)$', MockView.as_view(renderer_classes=[RendererA, RendererB, RendererC])), + path('', MockView.as_view(renderer_classes=[RendererA, RendererB, RendererC])), + path('html', HTMLView.as_view()), + path('json', JSONView.as_view()), + path('html1', HTMLView1.as_view()), + path('html_new_model', HTMLNewModelView.as_view()), + path('html_new_model_viewset', include(new_model_viewset_router.urls)), + path('restframework', include('rest_framework.urls', namespace='rest_framework')) ] diff --git a/tests/test_reverse.py b/tests/test_reverse.py index 9ab1667c5..b26b448c9 100644 --- a/tests/test_reverse.py +++ b/tests/test_reverse.py @@ -1,6 +1,5 @@ -from django.conf.urls import url from django.test import TestCase, override_settings -from django.urls import NoReverseMatch +from django.urls import NoReverseMatch, path from rest_framework.reverse import reverse from rest_framework.test import APIRequestFactory @@ -13,7 +12,7 @@ def null_view(request): urlpatterns = [ - url(r'^view$', null_view, name='view'), + path('view', null_view, name='view'), ] diff --git a/tests/test_routers.py b/tests/test_routers.py index 0f428e2a5..f767a843d 100644 --- a/tests/test_routers.py +++ b/tests/test_routers.py @@ -1,17 +1,12 @@ -import warnings from collections import namedtuple import pytest -from django.conf.urls import include, url from django.core.exceptions import ImproperlyConfigured from django.db import models from django.test import TestCase, override_settings -from django.urls import resolve, reverse +from django.urls import include, path, resolve, reverse -from rest_framework import ( - RemovedInDRF311Warning, permissions, serializers, viewsets -) -from rest_framework.compat import get_regex_pattern +from rest_framework import permissions, serializers, viewsets from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.routers import DefaultRouter, SimpleRouter @@ -122,7 +117,7 @@ class TestSimpleRouter(URLPatternsTestCase, TestCase): router.register('basics', BasicViewSet, basename='basic') urlpatterns = [ - url(r'^api/', include(router.urls)), + path('api/', include(router.urls)), ] def setUp(self): @@ -167,8 +162,8 @@ class TestSimpleRouter(URLPatternsTestCase, TestCase): class TestRootView(URLPatternsTestCase, TestCase): urlpatterns = [ - url(r'^non-namespaced/', include(namespaced_router.urls)), - url(r'^namespaced/', include((namespaced_router.urls, 'namespaced'), namespace='namespaced')), + path('non-namespaced/', include(namespaced_router.urls)), + path('namespaced/', include((namespaced_router.urls, 'namespaced'), namespace='namespaced')), ] def test_retrieve_namespaced_root(self): @@ -185,8 +180,8 @@ class TestCustomLookupFields(URLPatternsTestCase, TestCase): Ensure that custom lookup fields are correctly routed. """ urlpatterns = [ - url(r'^example/', include(notes_router.urls)), - url(r'^example2/', include(kwarged_notes_router.urls)), + path('example/', include(notes_router.urls)), + path('example2/', include(kwarged_notes_router.urls)), ] def setUp(self): @@ -195,8 +190,7 @@ class TestCustomLookupFields(URLPatternsTestCase, TestCase): def test_custom_lookup_field_route(self): detail_route = notes_router.urls[-1] - detail_url_pattern = get_regex_pattern(detail_route) - assert '' in detail_url_pattern + assert '' in detail_route.pattern.regex.pattern def test_retrieve_lookup_field_list_view(self): response = self.client.get('/example/notes/') @@ -232,7 +226,7 @@ class TestLookupValueRegex(TestCase): def test_urls_limited_by_lookup_value_regex(self): expected = ['^notes/$', '^notes/(?P[0-9a-f]{32})/$'] for idx in range(len(expected)): - assert expected[idx] == get_regex_pattern(self.urls[idx]) + assert expected[idx] == self.urls[idx].pattern.regex.pattern @override_settings(ROOT_URLCONF='tests.test_routers') @@ -243,8 +237,8 @@ class TestLookupUrlKwargs(URLPatternsTestCase, TestCase): Setup a deep lookup_field, but map it to a simple URL kwarg. """ urlpatterns = [ - url(r'^example/', include(notes_router.urls)), - url(r'^example2/', include(kwarged_notes_router.urls)), + path('example/', include(notes_router.urls)), + path('example2/', include(kwarged_notes_router.urls)), ] def setUp(self): @@ -252,8 +246,7 @@ class TestLookupUrlKwargs(URLPatternsTestCase, TestCase): def test_custom_lookup_url_kwarg_route(self): detail_route = kwarged_notes_router.urls[-1] - detail_url_pattern = get_regex_pattern(detail_route) - assert '^notes/(?P' in detail_url_pattern + assert '^notes/(?P' in detail_route.pattern.regex.pattern def test_retrieve_lookup_url_kwarg_detail_view(self): response = self.client.get('/example2/notes/fo/') @@ -276,7 +269,7 @@ class TestTrailingSlashIncluded(TestCase): def test_urls_have_trailing_slash_by_default(self): expected = ['^notes/$', '^notes/(?P[^/.]+)/$'] for idx in range(len(expected)): - assert expected[idx] == get_regex_pattern(self.urls[idx]) + assert expected[idx] == self.urls[idx].pattern.regex.pattern class TestTrailingSlashRemoved(TestCase): @@ -291,7 +284,7 @@ class TestTrailingSlashRemoved(TestCase): def test_urls_can_have_trailing_slash_removed(self): expected = ['^notes$', '^notes/(?P[^/.]+)$'] for idx in range(len(expected)): - assert expected[idx] == get_regex_pattern(self.urls[idx]) + assert expected[idx] == self.urls[idx].pattern.regex.pattern class TestNameableRoot(TestCase): @@ -432,7 +425,7 @@ class TestDynamicListAndDetailRouter(TestCase): class TestEmptyPrefix(URLPatternsTestCase, TestCase): urlpatterns = [ - url(r'^empty-prefix/', include(empty_prefix_router.urls)), + path('empty-prefix/', include(empty_prefix_router.urls)), ] def test_empty_prefix_list(self): @@ -449,7 +442,7 @@ class TestEmptyPrefix(URLPatternsTestCase, TestCase): class TestRegexUrlPath(URLPatternsTestCase, TestCase): urlpatterns = [ - url(r'^regex/', include(regex_url_path_router.urls)), + path('regex/', include(regex_url_path_router.urls)), ] def test_regex_url_path_list(self): @@ -468,7 +461,7 @@ class TestRegexUrlPath(URLPatternsTestCase, TestCase): class TestViewInitkwargs(URLPatternsTestCase, TestCase): urlpatterns = [ - url(r'^example/', include(notes_router.urls)), + path('example/', include(notes_router.urls)), ] def test_suffix(self): @@ -488,71 +481,3 @@ class TestViewInitkwargs(URLPatternsTestCase, TestCase): initkwargs = match.func.initkwargs assert initkwargs['basename'] == 'routertestmodel' - - -class TestBaseNameRename(TestCase): - - def test_base_name_and_basename_assertion(self): - router = SimpleRouter() - - msg = "Do not provide both the `basename` and `base_name` arguments." - with warnings.catch_warnings(record=True) as w, \ - self.assertRaisesMessage(AssertionError, msg): - warnings.simplefilter('always') - router.register('mock', MockViewSet, 'mock', base_name='mock') - - msg = "The `base_name` argument is pending deprecation in favor of `basename`." - assert len(w) == 1 - assert str(w[0].message) == msg - - def test_base_name_argument_deprecation(self): - router = SimpleRouter() - - with pytest.warns(RemovedInDRF311Warning) as w: - warnings.simplefilter('always') - router.register('mock', MockViewSet, base_name='mock') - - msg = "The `base_name` argument is pending deprecation in favor of `basename`." - assert len(w) == 1 - assert str(w[0].message) == msg - assert router.registry == [ - ('mock', MockViewSet, 'mock'), - ] - - def test_basename_argument_no_warnings(self): - router = SimpleRouter() - - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always') - router.register('mock', MockViewSet, basename='mock') - - assert len(w) == 0 - assert router.registry == [ - ('mock', MockViewSet, 'mock'), - ] - - def test_get_default_base_name_deprecation(self): - msg = "`CustomRouter.get_default_base_name` method should be renamed `get_default_basename`." - - # Class definition should raise a warning - with pytest.warns(RemovedInDRF311Warning) as w: - warnings.simplefilter('always') - - class CustomRouter(SimpleRouter): - def get_default_base_name(self, viewset): - return 'foo' - - assert len(w) == 1 - assert str(w[0].message) == msg - - # Deprecated method implementation should still be called - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always') - - router = CustomRouter() - router.register('mock', MockViewSet) - - assert len(w) == 0 - assert router.registry == [ - ('mock', MockViewSet, 'foo'), - ] diff --git a/tests/test_serializer.py b/tests/test_serializer.py index 0d4b50c1d..afefd70e1 100644 --- a/tests/test_serializer.py +++ b/tests/test_serializer.py @@ -1,6 +1,7 @@ import inspect import pickle import re +import sys from collections import ChainMap from collections.abc import Mapping @@ -204,6 +205,13 @@ class TestSerializer: exceptions.ErrorDetail(string='Raised error', code='invalid') ]} + @pytest.mark.skipif( + sys.version_info < (3, 7), + reason="subscriptable classes requires Python 3.7 or higher", + ) + def test_serializer_is_subscriptable(self): + assert serializers.Serializer is serializers.Serializer["foo"] + class TestValidateMethod: def test_non_field_error_validate_method(self): @@ -555,7 +563,7 @@ class TestDefaultOutput: bar = serializers.CharField(source='foo.bar', allow_null=True) optional = serializers.CharField(required=False, allow_null=True) - # allow_null=True should imply default=None when serialising: + # allow_null=True should imply default=None when serializing: assert Serializer({'foo': None}).data == {'foo': None, 'bar': None, 'optional': None, } @@ -682,3 +690,53 @@ class TestDeclaredFieldInheritance: assert len(Parent().get_fields()) == 2 assert len(Child().get_fields()) == 2 assert len(Grandchild().get_fields()) == 2 + + def test_multiple_inheritance(self): + class A(serializers.Serializer): + field = serializers.CharField() + + class B(serializers.Serializer): + field = serializers.IntegerField() + + class TestSerializer(A, B): + pass + + fields = { + name: type(f) for name, f + in TestSerializer()._declared_fields.items() + } + assert fields == { + 'field': serializers.CharField, + } + + def test_field_ordering(self): + class Base(serializers.Serializer): + f1 = serializers.CharField() + f2 = serializers.CharField() + + class A(Base): + f3 = serializers.IntegerField() + + class B(serializers.Serializer): + f3 = serializers.CharField() + f4 = serializers.CharField() + + class TestSerializer(A, B): + f2 = serializers.IntegerField() + f5 = serializers.CharField() + + fields = { + name: type(f) for name, f + in TestSerializer()._declared_fields.items() + } + + # `IntegerField`s should be the 'winners' in field name conflicts + # - `TestSerializer.f2` should override `Base.F2` + # - `A.f3` should override `B.f3` + assert fields == { + 'f1': serializers.CharField, + 'f2': serializers.IntegerField, + 'f3': serializers.IntegerField, + 'f4': serializers.CharField, + 'f5': serializers.CharField, + } diff --git a/tests/test_serializer_lists.py b/tests/test_serializer_lists.py index 98e72385a..f35c4fcc9 100644 --- a/tests/test_serializer_lists.py +++ b/tests/test_serializer_lists.py @@ -1,3 +1,5 @@ +import sys + import pytest from django.http import QueryDict from django.utils.datastructures import MultiValueDict @@ -55,6 +57,13 @@ class TestListSerializer: assert serializer.is_valid() assert serializer.validated_data == expected_output + @pytest.mark.skipif( + sys.version_info < (3, 7), + reason="subscriptable classes requires Python 3.7 or higher", + ) + def test_list_serializer_is_subscriptable(self): + assert serializers.ListSerializer is serializers.ListSerializer["foo"] + class TestListSerializerContainingNestedSerializer: """ diff --git a/tests/test_serializer_nested.py b/tests/test_serializer_nested.py index ab30fad22..09ac37f24 100644 --- a/tests/test_serializer_nested.py +++ b/tests/test_serializer_nested.py @@ -4,6 +4,8 @@ from django.http import QueryDict from django.test import TestCase from rest_framework import serializers +from rest_framework.compat import postgres_fields +from rest_framework.serializers import raise_errors_on_nested_writes class TestNestedSerializer: @@ -302,3 +304,53 @@ class TestNestedWriteErrors(TestCase): 'serializer `tests.test_serializer_nested.DottedAddressSerializer`, ' 'or set `read_only=True` on dotted-source serializer fields.' ) + + +if postgres_fields: + class NonRelationalPersonModel(models.Model): + """Model declaring a postgres JSONField""" + data = postgres_fields.JSONField() + + class Meta: + required_db_features = {'supports_json_field'} + + +@pytest.mark.skipif(not postgres_fields, reason='psycopg2 is not installed') +class TestNestedNonRelationalFieldWrite: + """ + Test that raise_errors_on_nested_writes does not raise `AssertionError` when the + model field is not a relation. + """ + + def test_nested_serializer_create_and_update(self): + + class NonRelationalPersonDataSerializer(serializers.Serializer): + occupation = serializers.CharField() + + class NonRelationalPersonSerializer(serializers.ModelSerializer): + data = NonRelationalPersonDataSerializer() + + class Meta: + model = NonRelationalPersonModel + fields = ['data'] + + serializer = NonRelationalPersonSerializer(data={'data': {'occupation': 'developer'}}) + assert serializer.is_valid() + assert serializer.validated_data == {'data': {'occupation': 'developer'}} + raise_errors_on_nested_writes('create', serializer, serializer.validated_data) + raise_errors_on_nested_writes('update', serializer, serializer.validated_data) + + def test_dotted_source_field_create_and_update(self): + + class DottedNonRelationalPersonSerializer(serializers.ModelSerializer): + occupation = serializers.CharField(source='data.occupation') + + class Meta: + model = NonRelationalPersonModel + fields = ['occupation'] + + serializer = DottedNonRelationalPersonSerializer(data={'occupation': 'developer'}) + assert serializer.is_valid() + assert serializer.validated_data == {'data': {'occupation': 'developer'}} + raise_errors_on_nested_writes('create', serializer, serializer.validated_data) + raise_errors_on_nested_writes('update', serializer, serializer.validated_data) diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 28d6b4011..4b84f6647 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -2,13 +2,14 @@ import unittest from django.template import Context, Template from django.test import TestCase +from django.utils.html import urlize from rest_framework.compat import coreapi, coreschema from rest_framework.relations import Hyperlink from rest_framework.templatetags import rest_framework from rest_framework.templatetags.rest_framework import ( add_nested_class, add_query_param, as_string, break_long_headers, - format_value, get_pagination_html, schema_links, urlize_quoted_links + format_value, get_pagination_html, schema_links ) from rest_framework.test import APIRequestFactory @@ -246,7 +247,7 @@ class Issue1386Tests(TestCase): def test_issue_1386(self): """ - Test function urlize_quoted_links with different args + Test function urlize with different args """ correct_urls = [ "asdf.com", @@ -255,7 +256,7 @@ class Issue1386Tests(TestCase): "as.d8f.ghj8.gov", ] for i in correct_urls: - res = urlize_quoted_links(i) + res = urlize(i) self.assertNotEqual(res, i) self.assertIn(i, res) @@ -264,11 +265,11 @@ class Issue1386Tests(TestCase): "asdf.netnet", ] for i in incorrect_urls: - res = urlize_quoted_links(i) + res = urlize(i) self.assertEqual(i, res) # example from issue #1386, this shouldn't raise an exception - urlize_quoted_links("asdf:[/p]zxcv.com") + urlize("asdf:[/p]zxcv.com") def test_smart_urlquote_wrapper_handles_value_error(self): def mock_smart_urlquote(url): @@ -289,7 +290,7 @@ class URLizerTests(TestCase): For all items in dict test assert that the value is urlized key """ for original, urlized in data.items(): - assert urlize_quoted_links(original, nofollow=False) == urlized + assert urlize(original, nofollow=False) == urlized def test_json_with_url(self): """ @@ -297,26 +298,26 @@ class URLizerTests(TestCase): """ data = {} data['"url": "http://api/users/1/", '] = \ - '"url": "http://api/users/1/", ' + '"url": "http://api/users/1/", ' data['"foo_set": [\n "http://api/foos/1/"\n], '] = \ - '"foo_set": [\n "http://api/foos/1/"\n], ' + '"foo_set": [\n "http://api/foos/1/"\n], ' self._urlize_dict_check(data) def test_template_render_with_autoescape(self): """ Test that HTML is correctly escaped in Browsable API views. """ - template = Template("{% load rest_framework %}{{ content|urlize_quoted_links }}") + template = Template("{% load rest_framework %}{{ content|urlize }}") rendered = template.render(Context({'content': ' http://example.com'})) assert rendered == '<script>alert()</script>' \ ' http://example.com' def test_template_render_with_noautoescape(self): """ - Test if the autoescape value is getting passed to urlize_quoted_links filter. + Test if the autoescape value is getting passed to urlize filter. """ template = Template("{% load rest_framework %}" - "{% autoescape off %}{{ content|urlize_quoted_links }}" + "{% autoescape off %}{{ content|urlize }}" "{% endautoescape %}") rendered = template.render(Context({'content': ' "http://example.com" '})) assert rendered == ' "http://example.com" ' diff --git a/tests/test_testing.py b/tests/test_testing.py index 8094bfd8d..cc60e4f00 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -1,9 +1,9 @@ from io import BytesIO -from django.conf.urls import url from django.contrib.auth.models import User from django.shortcuts import redirect from django.test import TestCase, override_settings +from django.urls import path from rest_framework import fields, serializers from rest_framework.decorators import api_view @@ -47,10 +47,10 @@ def post_view(request): urlpatterns = [ - url(r'^view/$', view), - url(r'^session-view/$', session_view), - url(r'^redirect-view/$', redirect_view), - url(r'^post-view/$', post_view) + path('view/', view), + path('session-view/', session_view), + path('redirect-view/', redirect_view), + path('post-view/', post_view) ] @@ -284,7 +284,7 @@ class TestAPIRequestFactory(TestCase): class TestUrlPatternTestCase(URLPatternsTestCase): urlpatterns = [ - url(r'^$', view), + path('', view), ] @classmethod diff --git a/tests/test_urlpatterns.py b/tests/test_urlpatterns.py index 25cc0032e..adcd0a742 100644 --- a/tests/test_urlpatterns.py +++ b/tests/test_urlpatterns.py @@ -1,11 +1,9 @@ -import unittest from collections import namedtuple -from django.conf.urls import include, url from django.test import TestCase -from django.urls import Resolver404 +from django.urls import Resolver404, URLResolver, include, path, re_path +from django.urls.resolvers import RegexPattern -from rest_framework.compat import make_url_resolver, path, re_path from rest_framework.test import APIRequestFactory from rest_framework.urlpatterns import format_suffix_patterns @@ -28,7 +26,7 @@ class FormatSuffixTests(TestCase): urlpatterns = format_suffix_patterns(urlpatterns, allowed=allowed) except Exception: self.fail("Failed to apply `format_suffix_patterns` on the supplied urlpatterns") - resolver = make_url_resolver(r'^/', urlpatterns) + resolver = URLResolver(RegexPattern(r'^/'), urlpatterns) for test_path in test_paths: try: test_path, expected_resolved = test_path @@ -62,11 +60,10 @@ class FormatSuffixTests(TestCase): def test_trailing_slash(self): urlpatterns = [ - url(r'^test/$', dummy_view), + path('test/', dummy_view), ] self._test_trailing_slash(urlpatterns) - @unittest.skipUnless(path, 'needs Django 2') def test_trailing_slash_django2(self): urlpatterns = [ path('test/', dummy_view), @@ -83,18 +80,16 @@ class FormatSuffixTests(TestCase): def test_format_suffix(self): urlpatterns = [ - url(r'^test$', dummy_view), + path('test', dummy_view), ] self._test_format_suffix(urlpatterns) - @unittest.skipUnless(path, 'needs Django 2') def test_format_suffix_django2(self): urlpatterns = [ path('test', dummy_view), ] self._test_format_suffix(urlpatterns) - @unittest.skipUnless(path, 'needs Django 2') def test_format_suffix_django2_args(self): urlpatterns = [ path('convtest/', dummy_view), @@ -120,11 +115,10 @@ class FormatSuffixTests(TestCase): def test_default_args(self): urlpatterns = [ - url(r'^test$', dummy_view, {'foo': 'bar'}), + path('test', dummy_view, {'foo': 'bar'}), ] self._test_default_args(urlpatterns) - @unittest.skipUnless(path, 'needs Django 2') def test_default_args_django2(self): urlpatterns = [ path('test', dummy_view, {'foo': 'bar'}), @@ -140,16 +134,6 @@ class FormatSuffixTests(TestCase): self._resolve_urlpatterns(urlpatterns, test_paths) def test_included_urls(self): - nested_patterns = [ - url(r'^path$', dummy_view) - ] - urlpatterns = [ - url(r'^test/', include(nested_patterns), {'foo': 'bar'}), - ] - self._test_included_urls(urlpatterns) - - @unittest.skipUnless(path, 'needs Django 2') - def test_included_urls_django2(self): nested_patterns = [ path('path', dummy_view) ] @@ -158,46 +142,35 @@ class FormatSuffixTests(TestCase): ] self._test_included_urls(urlpatterns) - @unittest.skipUnless(path, 'needs Django 2') - def test_included_urls_django2_mixed(self): - nested_patterns = [ - path('path', dummy_view) - ] - urlpatterns = [ - url('^test/', include(nested_patterns), {'foo': 'bar'}), - ] - self._test_included_urls(urlpatterns) - - @unittest.skipUnless(path, 'needs Django 2') - def test_included_urls_django2_mixed_args(self): + def test_included_urls_mixed(self): nested_patterns = [ path('path/', dummy_view), - url('^url/(?P[0-9]+)$', dummy_view) + re_path(r'^re_path/(?P[0-9]+)$', dummy_view) ] urlpatterns = [ - url('^purl/(?P[0-9]+)/', include(nested_patterns), {'foo': 'bar'}), + re_path(r'^pre_path/(?P[0-9]+)/', include(nested_patterns), {'foo': 'bar'}), path('ppath//', include(nested_patterns), {'foo': 'bar'}), ] test_paths = [ - # parent url() nesting child path() - URLTestPath('/purl/87/path/42', (), {'parent': '87', 'child': 42, 'foo': 'bar', }), - URLTestPath('/purl/87/path/42.api', (), {'parent': '87', 'child': 42, 'foo': 'bar', 'format': 'api'}), - URLTestPath('/purl/87/path/42.asdf', (), {'parent': '87', 'child': 42, 'foo': 'bar', 'format': 'asdf'}), + # parent re_path() nesting child path() + URLTestPath('/pre_path/87/path/42', (), {'parent': '87', 'child': 42, 'foo': 'bar', }), + URLTestPath('/pre_path/87/path/42.api', (), {'parent': '87', 'child': 42, 'foo': 'bar', 'format': 'api'}), + URLTestPath('/pre_path/87/path/42.asdf', (), {'parent': '87', 'child': 42, 'foo': 'bar', 'format': 'asdf'}), - # parent path() nesting child url() - URLTestPath('/ppath/87/url/42', (), {'parent': 87, 'child': '42', 'foo': 'bar', }), - URLTestPath('/ppath/87/url/42.api', (), {'parent': 87, 'child': '42', 'foo': 'bar', 'format': 'api'}), - URLTestPath('/ppath/87/url/42.asdf', (), {'parent': 87, 'child': '42', 'foo': 'bar', 'format': 'asdf'}), + # parent path() nesting child re_path() + URLTestPath('/ppath/87/re_path/42', (), {'parent': 87, 'child': '42', 'foo': 'bar', }), + URLTestPath('/ppath/87/re_path/42.api', (), {'parent': 87, 'child': '42', 'foo': 'bar', 'format': 'api'}), + URLTestPath('/ppath/87/re_path/42.asdf', (), {'parent': 87, 'child': '42', 'foo': 'bar', 'format': 'asdf'}), # parent path() nesting child path() URLTestPath('/ppath/87/path/42', (), {'parent': 87, 'child': 42, 'foo': 'bar', }), URLTestPath('/ppath/87/path/42.api', (), {'parent': 87, 'child': 42, 'foo': 'bar', 'format': 'api'}), URLTestPath('/ppath/87/path/42.asdf', (), {'parent': 87, 'child': 42, 'foo': 'bar', 'format': 'asdf'}), - # parent url() nesting child url() - URLTestPath('/purl/87/url/42', (), {'parent': '87', 'child': '42', 'foo': 'bar', }), - URLTestPath('/purl/87/url/42.api', (), {'parent': '87', 'child': '42', 'foo': 'bar', 'format': 'api'}), - URLTestPath('/purl/87/url/42.asdf', (), {'parent': '87', 'child': '42', 'foo': 'bar', 'format': 'asdf'}), + # parent re_path() nesting child re_path() + URLTestPath('/pre_path/87/re_path/42', (), {'parent': '87', 'child': '42', 'foo': 'bar', }), + URLTestPath('/pre_path/87/re_path/42.api', (), {'parent': '87', 'child': '42', 'foo': 'bar', 'format': 'api'}), + URLTestPath('/pre_path/87/re_path/42.asdf', (), {'parent': '87', 'child': '42', 'foo': 'bar', 'format': 'asdf'}), ] self._resolve_urlpatterns(urlpatterns, test_paths) @@ -210,14 +183,13 @@ class FormatSuffixTests(TestCase): ] self._resolve_urlpatterns(urlpatterns, test_paths, allowed=allowed_formats) - def test_allowed_formats(self): + def test_allowed_formats_re_path(self): urlpatterns = [ - url('^test$', dummy_view), + re_path(r'^test$', dummy_view), ] self._test_allowed_formats(urlpatterns) - @unittest.skipUnless(path, 'needs Django 2') - def test_allowed_formats_django2(self): + def test_allowed_formats_path(self): urlpatterns = [ path('test', dummy_view), ] diff --git a/tests/test_utils.py b/tests/test_utils.py index 500c6a3fa..c72f680fe 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,7 +1,7 @@ from unittest import mock -from django.conf.urls import url from django.test import TestCase, override_settings +from django.urls import path from rest_framework.decorators import action from rest_framework.routers import SimpleRouter @@ -64,12 +64,12 @@ class ResourceViewSet(ModelViewSet): router = SimpleRouter() router.register(r'resources', ResourceViewSet) urlpatterns = [ - url(r'^$', Root.as_view()), - url(r'^resource/$', ResourceRoot.as_view()), - url(r'^resource/customname$', CustomNameResourceInstance.as_view()), - url(r'^resource/(?P[0-9]+)$', ResourceInstance.as_view()), - url(r'^resource/(?P[0-9]+)/$', NestedResourceRoot.as_view()), - url(r'^resource/(?P[0-9]+)/(?P[A-Za-z]+)$', NestedResourceInstance.as_view()), + path('', Root.as_view()), + path('resource/', ResourceRoot.as_view()), + path('resource/customname', CustomNameResourceInstance.as_view()), + path('resource/', ResourceInstance.as_view()), + path('resource//', NestedResourceRoot.as_view()), + path('resource//', NestedResourceInstance.as_view()), ] urlpatterns += router.urls diff --git a/tests/test_validation_error.py b/tests/test_validation_error.py index 562fe37e6..341c4342a 100644 --- a/tests/test_validation_error.py +++ b/tests/test_validation_error.py @@ -2,6 +2,7 @@ from django.test import TestCase from rest_framework import serializers, status from rest_framework.decorators import api_view +from rest_framework.exceptions import ValidationError from rest_framework.response import Response from rest_framework.settings import api_settings from rest_framework.test import APIRequestFactory @@ -99,3 +100,12 @@ class TestValidationErrorWithCodes(TestCase): response = view(request) assert response.status_code == status.HTTP_400_BAD_REQUEST assert response.data == self.expected_response_data + + +class TestValidationErrorConvertsTuplesToLists(TestCase): + def test_validation_error_details(self): + error = ValidationError(detail=('message1', 'message2')) + assert isinstance(error.detail, list) + assert len(error.detail) == 2 + assert str(error.detail[0]) == 'message1' + assert str(error.detail[1]) == 'message2' diff --git a/tests/test_validators.py b/tests/test_validators.py index fe31ba235..4962cf581 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -301,6 +301,92 @@ class TestUniquenessTogetherValidation(TestCase): ] } + def test_read_only_fields_with_default_and_source(self): + class ReadOnlySerializer(serializers.ModelSerializer): + name = serializers.CharField(source='race_name', default='test', read_only=True) + + class Meta: + model = UniquenessTogetherModel + fields = ['name', 'position'] + validators = [ + UniqueTogetherValidator( + queryset=UniquenessTogetherModel.objects.all(), + fields=['name', 'position'] + ) + ] + + serializer = ReadOnlySerializer(data={'position': 1}) + assert serializer.is_valid(raise_exception=True) + + def test_writeable_fields_with_source(self): + class WriteableSerializer(serializers.ModelSerializer): + name = serializers.CharField(source='race_name') + + class Meta: + model = UniquenessTogetherModel + fields = ['name', 'position'] + validators = [ + UniqueTogetherValidator( + queryset=UniquenessTogetherModel.objects.all(), + fields=['name', 'position'] + ) + ] + + serializer = WriteableSerializer(data={'name': 'test', 'position': 1}) + assert serializer.is_valid(raise_exception=True) + + # Validation error should use seriazlier field name, not source + serializer = WriteableSerializer(data={'position': 1}) + assert not serializer.is_valid() + assert serializer.errors == { + 'name': [ + 'This field is required.' + ] + } + + def test_default_validator_with_fields_with_source(self): + class TestSerializer(serializers.ModelSerializer): + name = serializers.CharField(source='race_name') + + class Meta: + model = UniquenessTogetherModel + fields = ['name', 'position'] + + serializer = TestSerializer() + expected = dedent(""" + TestSerializer(): + name = CharField(source='race_name') + position = IntegerField() + class Meta: + validators = [] + """) + assert repr(serializer) == expected + + def test_default_validator_with_multiple_fields_with_same_source(self): + class TestSerializer(serializers.ModelSerializer): + name = serializers.CharField(source='race_name') + other_name = serializers.CharField(source='race_name') + + class Meta: + model = UniquenessTogetherModel + fields = ['name', 'other_name', 'position'] + + serializer = TestSerializer(data={ + 'name': 'foo', + 'other_name': 'foo', + 'position': 1, + }) + with pytest.raises(AssertionError) as excinfo: + serializer.is_valid() + + expected = ( + "Unable to create `UniqueTogetherValidator` for " + "`UniquenessTogetherModel.race_name` as `TestSerializer` has " + "multiple fields (name, other_name) that map to this model field. " + "Either remove the extra fields, or override `Meta.validators` " + "with a `UniqueTogetherValidator` using the desired field names.") + assert str(excinfo.value) == expected + def test_allow_explict_override(self): """ Ensure validators can be explicitly removed.. @@ -359,10 +445,10 @@ class TestUniquenessTogetherValidation(TestCase): data = {'race_name': 'bar'} queryset = MockQueryset() + serializer = UniquenessTogetherSerializer(instance=self.instance) validator = UniqueTogetherValidator(queryset, fields=('race_name', 'position')) - validator.instance = self.instance - validator.filter_queryset(attrs=data, queryset=queryset) + validator.filter_queryset(attrs=data, queryset=queryset, serializer=serializer) assert queryset.called_with == {'race_name': 'bar', 'position': 1} @@ -586,4 +672,6 @@ class ValidatorsTests(TestCase): validator = BaseUniqueForValidator(queryset=object(), field='foo', date_field='bar') with pytest.raises(NotImplementedError): - validator.filter_queryset(attrs=None, queryset=None) + validator.filter_queryset( + attrs=None, queryset=None, field_name='', date_field_name='' + ) diff --git a/tests/test_versioning.py b/tests/test_versioning.py index d4e269df3..d40d54229 100644 --- a/tests/test_versioning.py +++ b/tests/test_versioning.py @@ -1,6 +1,6 @@ import pytest -from django.conf.urls import include, url from django.test import override_settings +from django.urls import include, path, re_path from rest_framework import serializers, status, versioning from rest_framework.decorators import APIView @@ -144,14 +144,14 @@ class TestRequestVersion: class TestURLReversing(URLPatternsTestCase, APITestCase): included = [ - url(r'^namespaced/$', dummy_view, name='another'), - url(r'^example/(?P\d+)/$', dummy_pk_view, name='example-detail') + path('namespaced/', dummy_view, name='another'), + path('example//', dummy_pk_view, name='example-detail') ] urlpatterns = [ - url(r'^v1/', include((included, 'v1'), namespace='v1')), - url(r'^another/$', dummy_view, name='another'), - url(r'^(?P[v1|v2]+)/another/$', dummy_view, name='another'), + path('v1/', include((included, 'v1'), namespace='v1')), + path('another/', dummy_view, name='another'), + re_path(r'^(?P[v1|v2]+)/another/$', dummy_view, name='another'), ] def test_reverse_unversioned(self): @@ -310,12 +310,12 @@ class TestAllowedAndDefaultVersion: class TestHyperlinkedRelatedField(URLPatternsTestCase, APITestCase): included = [ - url(r'^namespaced/(?P\d+)/$', dummy_pk_view, name='namespaced'), + path('namespaced//', dummy_pk_view, name='namespaced'), ] urlpatterns = [ - url(r'^v1/', include((included, 'v1'), namespace='v1')), - url(r'^v2/', include((included, 'v2'), namespace='v2')) + path('v1/', include((included, 'v1'), namespace='v1')), + path('v2/', include((included, 'v2'), namespace='v2')) ] def setUp(self): @@ -342,17 +342,17 @@ class TestHyperlinkedRelatedField(URLPatternsTestCase, APITestCase): class TestNamespaceVersioningHyperlinkedRelatedFieldScheme(URLPatternsTestCase, APITestCase): nested = [ - url(r'^namespaced/(?P\d+)/$', dummy_pk_view, name='nested'), + path('namespaced//', dummy_pk_view, name='nested'), ] included = [ - url(r'^namespaced/(?P\d+)/$', dummy_pk_view, name='namespaced'), - url(r'^nested/', include((nested, 'nested-namespace'), namespace='nested-namespace')) + path('namespaced//', dummy_pk_view, name='namespaced'), + path('nested/', include((nested, 'nested-namespace'), namespace='nested-namespace')) ] urlpatterns = [ - url(r'^v1/', include((included, 'restframeworkv1'), namespace='v1')), - url(r'^v2/', include((included, 'restframeworkv2'), namespace='v2')), - url(r'^non-api/(?P\d+)/$', dummy_pk_view, name='non-api-view') + path('v1/', include((included, 'restframeworkv1'), namespace='v1')), + path('v2/', include((included, 'restframeworkv2'), namespace='v2')), + path('non-api//', dummy_pk_view, name='non-api-view') ] def _create_field(self, view_name, version): diff --git a/tests/test_viewsets.py b/tests/test_viewsets.py index eac36f095..8842b0b1c 100644 --- a/tests/test_viewsets.py +++ b/tests/test_viewsets.py @@ -1,9 +1,10 @@ from collections import OrderedDict +from functools import wraps import pytest -from django.conf.urls import include, url from django.db import models from django.test import TestCase, override_settings +from django.urls import include, path from rest_framework import status from rest_framework.decorators import action @@ -33,18 +34,31 @@ class Action(models.Model): pass +def decorate(fn): + @wraps(fn) + def wrapper(self, request, *args, **kwargs): + return fn(self, request, *args, **kwargs) + return wrapper + + class ActionViewSet(GenericViewSet): queryset = Action.objects.all() def list(self, request, *args, **kwargs): - return Response() + response = Response() + response.view = self + return response def retrieve(self, request, *args, **kwargs): - return Response() + response = Response() + response.view = self + return response @action(detail=False) def list_action(self, request, *args, **kwargs): - raise NotImplementedError + response = Response() + response.view = self + return response @action(detail=False, url_name='list-custom') def custom_list_action(self, request, *args, **kwargs): @@ -62,11 +76,23 @@ class ActionViewSet(GenericViewSet): def unresolvable_detail_action(self, request, *args, **kwargs): raise NotImplementedError + @action(detail=False) + @decorate + def wrapped_list_action(self, request, *args, **kwargs): + raise NotImplementedError + + @action(detail=True) + @decorate + def wrapped_detail_action(self, request, *args, **kwargs): + raise NotImplementedError + class ActionNamesViewSet(GenericViewSet): def retrieve(self, request, *args, **kwargs): - return Response() + response = Response() + response.view = self + return response @action(detail=True) def unnamed_action(self, request, *args, **kwargs): @@ -81,14 +107,24 @@ class ActionNamesViewSet(GenericViewSet): raise NotImplementedError +class ThingWithMapping: + def __init__(self): + self.mapping = {} + + +class ActionViewSetWithMapping(ActionViewSet): + mapper = ThingWithMapping() + + router = SimpleRouter() router.register(r'actions', ActionViewSet) router.register(r'actions-alt', ActionViewSet, basename='actions-alt') router.register(r'names', ActionNamesViewSet, basename='names') +router.register(r'mapping', ActionViewSetWithMapping, basename='mapping') urlpatterns = [ - url(r'^api/', include(router.urls)), + path('api/', include(router.urls)), ] @@ -103,7 +139,7 @@ class InitializeViewSetsTestCase(TestCase): assert response.status_code == status.HTTP_200_OK assert response.data == {'ACTION': 'LIST'} - def testhead_request_against_viewset(self): + def test_head_request_against_viewset(self): request = factory.head('/', '', content_type='application/json') my_view = BasicViewSet.as_view(actions={ 'get': 'list', @@ -145,6 +181,22 @@ class InitializeViewSetsTestCase(TestCase): self.assertNotIn(attribute, dir(bare_view)) self.assertIn(attribute, dir(view)) + def test_viewset_action_attr(self): + view = ActionViewSet.as_view(actions={'get': 'list'}) + + get = view(factory.get('/')) + head = view(factory.head('/')) + assert get.view.action == 'list' + assert head.view.action == 'list' + + def test_viewset_action_attr_for_extra_action(self): + view = ActionViewSet.as_view(actions=dict(ActionViewSet.list_action.mapping)) + + get = view(factory.get('/')) + head = view(factory.head('/')) + assert get.view.action == 'list_action' + assert head.view.action == 'list_action' + class GetExtraActionsTests(TestCase): @@ -157,32 +209,74 @@ class GetExtraActionsTests(TestCase): 'detail_action', 'list_action', 'unresolvable_detail_action', + 'wrapped_detail_action', + 'wrapped_list_action', ] self.assertEqual(actual, expected) + def test_should_only_return_decorated_methods(self): + view = ActionViewSetWithMapping() + actual = [action.__name__ for action in view.get_extra_actions()] + expected = [ + 'custom_detail_action', + 'custom_list_action', + 'detail_action', + 'list_action', + 'unresolvable_detail_action', + 'wrapped_detail_action', + 'wrapped_list_action', + ] + self.assertEqual(actual, expected) + + def test_attr_name_check(self): + def decorate(fn): + def wrapper(self, request, *args, **kwargs): + return fn(self, request, *args, **kwargs) + return wrapper + + class ActionViewSet(GenericViewSet): + queryset = Action.objects.all() + + @action(detail=False) + @decorate + def wrapped_list_action(self, request, *args, **kwargs): + raise NotImplementedError + + view = ActionViewSet() + with pytest.raises(AssertionError) as excinfo: + view.get_extra_actions() + + assert str(excinfo.value) == ( + 'Expected function (`wrapper`) to match its attribute name ' + '(`wrapped_list_action`). If using a decorator, ensure the inner ' + 'function is decorated with `functools.wraps`, or that ' + '`wrapper.__name__` is otherwise set to `wrapped_list_action`.') + @override_settings(ROOT_URLCONF='tests.test_viewsets') class GetExtraActionUrlMapTests(TestCase): def test_list_view(self): response = self.client.get('/api/actions/') - view = response.renderer_context['view'] + view = response.view expected = OrderedDict([ ('Custom list action', 'http://testserver/api/actions/custom_list_action/'), ('List action', 'http://testserver/api/actions/list_action/'), + ('Wrapped list action', 'http://testserver/api/actions/wrapped_list_action/'), ]) self.assertEqual(view.get_extra_action_url_map(), expected) def test_detail_view(self): response = self.client.get('/api/actions/1/') - view = response.renderer_context['view'] + view = response.view expected = OrderedDict([ ('Custom detail action', 'http://testserver/api/actions/1/custom_detail_action/'), ('Detail action', 'http://testserver/api/actions/1/detail_action/'), + ('Wrapped detail action', 'http://testserver/api/actions/1/wrapped_detail_action/'), # "Unresolvable detail action" excluded, since it's not resolvable ]) @@ -194,7 +288,7 @@ class GetExtraActionUrlMapTests(TestCase): def test_action_names(self): # Action 'name' and 'suffix' kwargs should be respected response = self.client.get('/api/names/1/') - view = response.renderer_context['view'] + view = response.view expected = OrderedDict([ ('Custom Name', 'http://testserver/api/names/1/named_action/'), diff --git a/tests/urls.py b/tests/urls.py index 76ada5e3d..d9147683f 100644 --- a/tests/urls.py +++ b/tests/urls.py @@ -3,14 +3,14 @@ URLConf for test suite. We need only the docs urls for DocumentationRenderer tests. """ -from django.conf.urls import url +from django.urls import path from rest_framework.compat import coreapi from rest_framework.documentation import include_docs_urls if coreapi: urlpatterns = [ - url(r'^docs/', include_docs_urls(title='Test Suite API')), + path('docs/', include_docs_urls(title='Test Suite API')), ] else: urlpatterns = [] diff --git a/tox.ini b/tox.ini index 699ca909c..544bab163 100644 --- a/tox.ini +++ b/tox.ini @@ -1,31 +1,31 @@ [tox] envlist = - {py35,py36}-django111, - {py35,py36,py37}-django20, - {py35,py36,py37}-django21 - {py35,py36,py37}-django22 - {py36,py37}-djangomaster, + {py35,py36,py37}-django22, + {py36,py37,py38}-django30, + {py36,py37,py38,py39}-django31, + {py36,py37,py38,py39}-django32, + {py38,py39}-djangomaster, base,dist,lint,docs, [travis:env] DJANGO = - 1.11: django111 - 2.0: django20 - 2.1: django21 2.2: django22 + 3.0: django30 + 3.1: django31 + 3.2: django32 master: djangomaster [testenv] -commands = ./runtests.py --fast --coverage {posargs} +commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --fast --coverage {posargs} envdir = {toxworkdir}/venvs/{envname} setenv = PYTHONDONTWRITEBYTECODE=1 PYTHONWARNINGS=once deps = - django111: Django>=1.11,<2.0 - django20: Django>=2.0,<2.1 - django21: Django>=2.1,<2.2 django22: Django>=2.2,<3.0 + django30: Django>=3.0,<3.1 + django31: Django>=3.1,<3.2 + django32: Django>=3.2a1,<4.0 djangomaster: https://github.com/django/django/archive/master.tar.gz -rrequirements/requirements-testing.txt -rrequirements/requirements-optionals.txt @@ -44,14 +44,12 @@ deps = -rrequirements/requirements-optionals.txt [testenv:lint] -basepython = python3.7 commands = ./runtests.py --lintonly deps = -rrequirements/requirements-codestyle.txt -rrequirements/requirements-testing.txt [testenv:docs] -basepython = python3.7 skip_install = true commands = mkdocs build deps =