code
string | repo_name
string | path
string | language
string | license
string | size
int64 |
---|---|---|---|---|---|
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/ps.js | JavaScript | mit | 1,049 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/pt-BR.js | JavaScript | mit | 876 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/pt.js | JavaScript | mit | 878 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/ro.js | JavaScript | mit | 938 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/ru.js | JavaScript | mit | 1,171 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/sl.js | JavaScript | mit | 925 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/sq.js | JavaScript | mit | 903 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/sr-Cyrl.js | JavaScript | mit | 1,109 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/sr.js | JavaScript | mit | 980 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/sv.js | JavaScript | mit | 786 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/th.js | JavaScript | mit | 1,074 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/tk.js | JavaScript | mit | 771 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/tr.js | JavaScript | mit | 775 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/uk.js | JavaScript | mit | 1,156 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/vi.js | JavaScript | mit | 796 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/zh-CN.js | JavaScript | mit | 768 |
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}(); | castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/i18n/zh-TW.js | JavaScript | mit | 707 |
/*!
* Select2 4.0.13
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
;(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = function (root, jQuery) {
if (jQuery === undefined) {
// require('jQuery') returns a factory that requires window to
// build a jQuery instance, we normalize how we use modules
// that require this pattern but the window provided is a noop
// if it's defined (how jquery works)
if (typeof window !== 'undefined') {
jQuery = require('jquery');
}
else {
jQuery = require('jquery')(root);
}
}
factory(jQuery);
return jQuery;
};
} else {
// Browser globals
factory(jQuery);
}
} (function (jQuery) {
// This is needed so we can catch the AMD loader configuration and use it
// The inner file should be wrapped (by `banner.start.js`) in a function that
// returns the AMD loader references.
var S2 =(function () {
// Restore the Select2 AMD loader so it can be used
// Needed mostly in the language files, where the loader is not inserted
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
var S2 = jQuery.fn.select2.amd;
}
var S2;(function () { if (!S2 || !S2.requirejs) {
if (!S2) { S2 = {}; } else { require = S2; }
/**
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
*/
//Going sloppy to avoid 'use strict' string cost, but strict practices should
//be followed.
/*global setTimeout: false */
var requirejs, require, define;
(function (undef) {
var main, req, makeMap, handlers,
defined = {},
waiting = {},
config = {},
defining = {},
hasOwn = Object.prototype.hasOwnProperty,
aps = [].slice,
jsSuffixRegExp = /\.js$/;
function hasProp(obj, prop) {
return hasOwn.call(obj, prop);
}
/**
* Given a relative module name, like ./something, normalize it to
* a real name that can be mapped to a path.
* @param {String} name the relative name
* @param {String} baseName a real name that the name arg is relative
* to.
* @returns {String} normalized name
*/
function normalize(name, baseName) {
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
baseParts = baseName && baseName.split("/"),
map = config.map,
starMap = (map && map['*']) || {};
//Adjust any relative paths.
if (name) {
name = name.split('/');
lastIndex = name.length - 1;
// If wanting node ID compatibility, strip .js from end
// of IDs. Have to do this here, and not in nameToUrl
// because node allows either .js or non .js to map
// to same file.
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
}
// Starts with a '.' so need the baseName
if (name[0].charAt(0) === '.' && baseParts) {
//Convert baseName to array, and lop off the last part,
//so that . matches that 'directory' and not name of the baseName's
//module. For instance, baseName of 'one/two/three', maps to
//'one/two/three.js', but we want the directory, 'one/two' for
//this normalization.
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
name = normalizedBaseParts.concat(name);
}
//start trimDots
for (i = 0; i < name.length; i++) {
part = name[i];
if (part === '.') {
name.splice(i, 1);
i -= 1;
} else if (part === '..') {
// If at the start, or previous value is still ..,
// keep them so that when converted to a path it may
// still work when converted to a path, even though
// as an ID it is less than ideal. In larger point
// releases, may be better to just kick out an error.
if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
continue;
} else if (i > 0) {
name.splice(i - 1, 2);
i -= 2;
}
}
}
//end trimDots
name = name.join('/');
}
//Apply map config if available.
if ((baseParts || starMap) && map) {
nameParts = name.split('/');
for (i = nameParts.length; i > 0; i -= 1) {
nameSegment = nameParts.slice(0, i).join("/");
if (baseParts) {
//Find the longest baseName segment match in the config.
//So, do joins on the biggest to smallest lengths of baseParts.
for (j = baseParts.length; j > 0; j -= 1) {
mapValue = map[baseParts.slice(0, j).join('/')];
//baseName segment has config, find if it has one for
//this name.
if (mapValue) {
mapValue = mapValue[nameSegment];
if (mapValue) {
//Match, update name to the new value.
foundMap = mapValue;
foundI = i;
break;
}
}
}
}
if (foundMap) {
break;
}
//Check for a star map match, but just hold on to it,
//if there is a shorter segment match later in a matching
//config, then favor over this star map.
if (!foundStarMap && starMap && starMap[nameSegment]) {
foundStarMap = starMap[nameSegment];
starI = i;
}
}
if (!foundMap && foundStarMap) {
foundMap = foundStarMap;
foundI = starI;
}
if (foundMap) {
nameParts.splice(0, foundI, foundMap);
name = nameParts.join('/');
}
}
return name;
}
function makeRequire(relName, forceSync) {
return function () {
//A version of a require function that passes a moduleName
//value for items that may need to
//look up paths relative to the moduleName
var args = aps.call(arguments, 0);
//If first arg is not require('string'), and there is only
//one arg, it is the array form without a callback. Insert
//a null so that the following concat is correct.
if (typeof args[0] !== 'string' && args.length === 1) {
args.push(null);
}
return req.apply(undef, args.concat([relName, forceSync]));
};
}
function makeNormalize(relName) {
return function (name) {
return normalize(name, relName);
};
}
function makeLoad(depName) {
return function (value) {
defined[depName] = value;
};
}
function callDep(name) {
if (hasProp(waiting, name)) {
var args = waiting[name];
delete waiting[name];
defining[name] = true;
main.apply(undef, args);
}
if (!hasProp(defined, name) && !hasProp(defining, name)) {
throw new Error('No ' + name);
}
return defined[name];
}
//Turns a plugin!resource to [plugin, resource]
//with the plugin being undefined if the name
//did not have a plugin prefix.
function splitPrefix(name) {
var prefix,
index = name ? name.indexOf('!') : -1;
if (index > -1) {
prefix = name.substring(0, index);
name = name.substring(index + 1, name.length);
}
return [prefix, name];
}
//Creates a parts array for a relName where first part is plugin ID,
//second part is resource ID. Assumes relName has already been normalized.
function makeRelParts(relName) {
return relName ? splitPrefix(relName) : [];
}
/**
* Makes a name map, normalizing the name, and using a plugin
* for normalization if necessary. Grabs a ref to plugin
* too, as an optimization.
*/
makeMap = function (name, relParts) {
var plugin,
parts = splitPrefix(name),
prefix = parts[0],
relResourceName = relParts[1];
name = parts[1];
if (prefix) {
prefix = normalize(prefix, relResourceName);
plugin = callDep(prefix);
}
//Normalize according
if (prefix) {
if (plugin && plugin.normalize) {
name = plugin.normalize(name, makeNormalize(relResourceName));
} else {
name = normalize(name, relResourceName);
}
} else {
name = normalize(name, relResourceName);
parts = splitPrefix(name);
prefix = parts[0];
name = parts[1];
if (prefix) {
plugin = callDep(prefix);
}
}
//Using ridiculous property names for space reasons
return {
f: prefix ? prefix + '!' + name : name, //fullName
n: name,
pr: prefix,
p: plugin
};
};
function makeConfig(name) {
return function () {
return (config && config.config && config.config[name]) || {};
};
}
handlers = {
require: function (name) {
return makeRequire(name);
},
exports: function (name) {
var e = defined[name];
if (typeof e !== 'undefined') {
return e;
} else {
return (defined[name] = {});
}
},
module: function (name) {
return {
id: name,
uri: '',
exports: defined[name],
config: makeConfig(name)
};
}
};
main = function (name, deps, callback, relName) {
var cjsModule, depName, ret, map, i, relParts,
args = [],
callbackType = typeof callback,
usingExports;
//Use name if no relName
relName = relName || name;
relParts = makeRelParts(relName);
//Call the callback to define the module, if necessary.
if (callbackType === 'undefined' || callbackType === 'function') {
//Pull out the defined dependencies and pass the ordered
//values to the callback.
//Default to [require, exports, module] if no deps
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
for (i = 0; i < deps.length; i += 1) {
map = makeMap(deps[i], relParts);
depName = map.f;
//Fast path CommonJS standard dependencies.
if (depName === "require") {
args[i] = handlers.require(name);
} else if (depName === "exports") {
//CommonJS module spec 1.1
args[i] = handlers.exports(name);
usingExports = true;
} else if (depName === "module") {
//CommonJS module spec 1.1
cjsModule = args[i] = handlers.module(name);
} else if (hasProp(defined, depName) ||
hasProp(waiting, depName) ||
hasProp(defining, depName)) {
args[i] = callDep(depName);
} else if (map.p) {
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
args[i] = defined[depName];
} else {
throw new Error(name + ' missing ' + depName);
}
}
ret = callback ? callback.apply(defined[name], args) : undefined;
if (name) {
//If setting exports via "module" is in play,
//favor that over return value and exports. After that,
//favor a non-undefined return value over exports use.
if (cjsModule && cjsModule.exports !== undef &&
cjsModule.exports !== defined[name]) {
defined[name] = cjsModule.exports;
} else if (ret !== undef || !usingExports) {
//Use the return value from the function.
defined[name] = ret;
}
}
} else if (name) {
//May just be an object definition for the module. Only
//worry about defining if have a module name.
defined[name] = callback;
}
};
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
if (typeof deps === "string") {
if (handlers[deps]) {
//callback in this case is really relName
return handlers[deps](callback);
}
//Just return the module wanted. In this scenario, the
//deps arg is the module name, and second arg (if passed)
//is just the relName.
//Normalize module name, if it contains . or ..
return callDep(makeMap(deps, makeRelParts(callback)).f);
} else if (!deps.splice) {
//deps is a config object, not an array.
config = deps;
if (config.deps) {
req(config.deps, config.callback);
}
if (!callback) {
return;
}
if (callback.splice) {
//callback is an array, which means it is a dependency list.
//Adjust args if there are dependencies
deps = callback;
callback = relName;
relName = null;
} else {
deps = undef;
}
}
//Support require(['a'])
callback = callback || function () {};
//If relName is a function, it is an errback handler,
//so remove it.
if (typeof relName === 'function') {
relName = forceSync;
forceSync = alt;
}
//Simulate async callback;
if (forceSync) {
main(undef, deps, callback, relName);
} else {
//Using a non-zero value because of concern for what old browsers
//do, and latest browsers "upgrade" to 4 if lower value is used:
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
//If want a value immediately, use require('id') instead -- something
//that works in almond on the global level, but not guaranteed and
//unlikely to work in other AMD implementations.
setTimeout(function () {
main(undef, deps, callback, relName);
}, 4);
}
return req;
};
/**
* Just drops the config on the floor, but returns req in case
* the config return value is used.
*/
req.config = function (cfg) {
return req(cfg);
};
/**
* Expose module registry for debugging and tooling
*/
requirejs._defined = defined;
define = function (name, deps, callback) {
if (typeof name !== 'string') {
throw new Error('See almond README: incorrect module build, no module name');
}
//This module may not have dependencies
if (!deps.splice) {
//deps is not an array, so probably means
//an object literal or factory function for
//the value. Adjust args.
callback = deps;
deps = [];
}
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
waiting[name] = [name, deps, callback];
}
};
define.amd = {
jQuery: true
};
}());
S2.requirejs = requirejs;S2.require = require;S2.define = define;
}
}());
S2.define("almond", function(){});
/* global jQuery:false, $:false */
S2.define('jquery',[],function () {
var _$ = jQuery || $;
if (_$ == null && console && console.error) {
console.error(
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
'found. Make sure that you are including jQuery before Select2 on your ' +
'web page.'
);
}
return _$;
});
S2.define('select2/utils',[
'jquery'
], function ($) {
var Utils = {};
Utils.Extend = function (ChildClass, SuperClass) {
var __hasProp = {}.hasOwnProperty;
function BaseConstructor () {
this.constructor = ChildClass;
}
for (var key in SuperClass) {
if (__hasProp.call(SuperClass, key)) {
ChildClass[key] = SuperClass[key];
}
}
BaseConstructor.prototype = SuperClass.prototype;
ChildClass.prototype = new BaseConstructor();
ChildClass.__super__ = SuperClass.prototype;
return ChildClass;
};
function getMethods (theClass) {
var proto = theClass.prototype;
var methods = [];
for (var methodName in proto) {
var m = proto[methodName];
if (typeof m !== 'function') {
continue;
}
if (methodName === 'constructor') {
continue;
}
methods.push(methodName);
}
return methods;
}
Utils.Decorate = function (SuperClass, DecoratorClass) {
var decoratedMethods = getMethods(DecoratorClass);
var superMethods = getMethods(SuperClass);
function DecoratedClass () {
var unshift = Array.prototype.unshift;
var argCount = DecoratorClass.prototype.constructor.length;
var calledConstructor = SuperClass.prototype.constructor;
if (argCount > 0) {
unshift.call(arguments, SuperClass.prototype.constructor);
calledConstructor = DecoratorClass.prototype.constructor;
}
calledConstructor.apply(this, arguments);
}
DecoratorClass.displayName = SuperClass.displayName;
function ctr () {
this.constructor = DecoratedClass;
}
DecoratedClass.prototype = new ctr();
for (var m = 0; m < superMethods.length; m++) {
var superMethod = superMethods[m];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
}
var calledMethod = function (methodName) {
// Stub out the original method if it's not decorating an actual method
var originalMethod = function () {};
if (methodName in DecoratedClass.prototype) {
originalMethod = DecoratedClass.prototype[methodName];
}
var decoratedMethod = DecoratorClass.prototype[methodName];
return function () {
var unshift = Array.prototype.unshift;
unshift.call(arguments, originalMethod);
return decoratedMethod.apply(this, arguments);
};
};
for (var d = 0; d < decoratedMethods.length; d++) {
var decoratedMethod = decoratedMethods[d];
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
}
return DecoratedClass;
};
var Observable = function () {
this.listeners = {};
};
Observable.prototype.on = function (event, callback) {
this.listeners = this.listeners || {};
if (event in this.listeners) {
this.listeners[event].push(callback);
} else {
this.listeners[event] = [callback];
}
};
Observable.prototype.trigger = function (event) {
var slice = Array.prototype.slice;
var params = slice.call(arguments, 1);
this.listeners = this.listeners || {};
// Params should always come in as an array
if (params == null) {
params = [];
}
// If there are no arguments to the event, use a temporary object
if (params.length === 0) {
params.push({});
}
// Set the `_type` of the first object to the event
params[0]._type = event;
if (event in this.listeners) {
this.invoke(this.listeners[event], slice.call(arguments, 1));
}
if ('*' in this.listeners) {
this.invoke(this.listeners['*'], arguments);
}
};
Observable.prototype.invoke = function (listeners, params) {
for (var i = 0, len = listeners.length; i < len; i++) {
listeners[i].apply(this, params);
}
};
Utils.Observable = Observable;
Utils.generateChars = function (length) {
var chars = '';
for (var i = 0; i < length; i++) {
var randomChar = Math.floor(Math.random() * 36);
chars += randomChar.toString(36);
}
return chars;
};
Utils.bind = function (func, context) {
return function () {
func.apply(context, arguments);
};
};
Utils._convertData = function (data) {
for (var originalKey in data) {
var keys = originalKey.split('-');
var dataLevel = data;
if (keys.length === 1) {
continue;
}
for (var k = 0; k < keys.length; k++) {
var key = keys[k];
// Lowercase the first letter
// By default, dash-separated becomes camelCase
key = key.substring(0, 1).toLowerCase() + key.substring(1);
if (!(key in dataLevel)) {
dataLevel[key] = {};
}
if (k == keys.length - 1) {
dataLevel[key] = data[originalKey];
}
dataLevel = dataLevel[key];
}
delete data[originalKey];
}
return data;
};
Utils.hasScroll = function (index, el) {
// Adapted from the function created by @ShadowScripter
// and adapted by @BillBarry on the Stack Exchange Code Review website.
// The original code can be found at
// http://codereview.stackexchange.com/q/13338
// and was designed to be used with the Sizzle selector engine.
var $el = $(el);
var overflowX = el.style.overflowX;
var overflowY = el.style.overflowY;
//Check both x and y declarations
if (overflowX === overflowY &&
(overflowY === 'hidden' || overflowY === 'visible')) {
return false;
}
if (overflowX === 'scroll' || overflowY === 'scroll') {
return true;
}
return ($el.innerHeight() < el.scrollHeight ||
$el.innerWidth() < el.scrollWidth);
};
Utils.escapeMarkup = function (markup) {
var replaceMap = {
'\\': '\',
'&': '&',
'<': '<',
'>': '>',
'"': '"',
'\'': ''',
'/': '/'
};
// Do not try to escape the markup if it's not a string
if (typeof markup !== 'string') {
return markup;
}
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
return replaceMap[match];
});
};
// Append an array of jQuery nodes to a given element.
Utils.appendMany = function ($element, $nodes) {
// jQuery 1.7.x does not support $.fn.append() with an array
// Fall back to a jQuery object collection using $.fn.add()
if ($.fn.jquery.substr(0, 3) === '1.7') {
var $jqNodes = $();
$.map($nodes, function (node) {
$jqNodes = $jqNodes.add(node);
});
$nodes = $jqNodes;
}
$element.append($nodes);
};
// Cache objects in Utils.__cache instead of $.data (see #4346)
Utils.__cache = {};
var id = 0;
Utils.GetUniqueElementId = function (element) {
// Get a unique element Id. If element has no id,
// creates a new unique number, stores it in the id
// attribute and returns the new id.
// If an id already exists, it simply returns it.
var select2Id = element.getAttribute('data-select2-id');
if (select2Id == null) {
// If element has id, use it.
if (element.id) {
select2Id = element.id;
element.setAttribute('data-select2-id', select2Id);
} else {
element.setAttribute('data-select2-id', ++id);
select2Id = id.toString();
}
}
return select2Id;
};
Utils.StoreData = function (element, name, value) {
// Stores an item in the cache for a specified element.
// name is the cache key.
var id = Utils.GetUniqueElementId(element);
if (!Utils.__cache[id]) {
Utils.__cache[id] = {};
}
Utils.__cache[id][name] = value;
};
Utils.GetData = function (element, name) {
// Retrieves a value from the cache by its key (name)
// name is optional. If no name specified, return
// all cache items for the specified element.
// and for a specified element.
var id = Utils.GetUniqueElementId(element);
if (name) {
if (Utils.__cache[id]) {
if (Utils.__cache[id][name] != null) {
return Utils.__cache[id][name];
}
return $(element).data(name); // Fallback to HTML5 data attribs.
}
return $(element).data(name); // Fallback to HTML5 data attribs.
} else {
return Utils.__cache[id];
}
};
Utils.RemoveData = function (element) {
// Removes all cached items for a specified element.
var id = Utils.GetUniqueElementId(element);
if (Utils.__cache[id] != null) {
delete Utils.__cache[id];
}
element.removeAttribute('data-select2-id');
};
return Utils;
});
S2.define('select2/results',[
'jquery',
'./utils'
], function ($, Utils) {
function Results ($element, options, dataAdapter) {
this.$element = $element;
this.data = dataAdapter;
this.options = options;
Results.__super__.constructor.call(this);
}
Utils.Extend(Results, Utils.Observable);
Results.prototype.render = function () {
var $results = $(
'<ul class="select2-results__options" role="listbox"></ul>'
);
if (this.options.get('multiple')) {
$results.attr('aria-multiselectable', 'true');
}
this.$results = $results;
return $results;
};
Results.prototype.clear = function () {
this.$results.empty();
};
Results.prototype.displayMessage = function (params) {
var escapeMarkup = this.options.get('escapeMarkup');
this.clear();
this.hideLoading();
var $message = $(
'<li role="alert" aria-live="assertive"' +
' class="select2-results__option"></li>'
);
var message = this.options.get('translations').get(params.message);
$message.append(
escapeMarkup(
message(params.args)
)
);
$message[0].className += ' select2-results__message';
this.$results.append($message);
};
Results.prototype.hideMessages = function () {
this.$results.find('.select2-results__message').remove();
};
Results.prototype.append = function (data) {
this.hideLoading();
var $options = [];
if (data.results == null || data.results.length === 0) {
if (this.$results.children().length === 0) {
this.trigger('results:message', {
message: 'noResults'
});
}
return;
}
data.results = this.sort(data.results);
for (var d = 0; d < data.results.length; d++) {
var item = data.results[d];
var $option = this.option(item);
$options.push($option);
}
this.$results.append($options);
};
Results.prototype.position = function ($results, $dropdown) {
var $resultsContainer = $dropdown.find('.select2-results');
$resultsContainer.append($results);
};
Results.prototype.sort = function (data) {
var sorter = this.options.get('sorter');
return sorter(data);
};
Results.prototype.highlightFirstItem = function () {
var $options = this.$results
.find('.select2-results__option[aria-selected]');
var $selected = $options.filter('[aria-selected=true]');
// Check if there are any selected options
if ($selected.length > 0) {
// If there are selected options, highlight the first
$selected.first().trigger('mouseenter');
} else {
// If there are no selected options, highlight the first option
// in the dropdown
$options.first().trigger('mouseenter');
}
this.ensureHighlightVisible();
};
Results.prototype.setClasses = function () {
var self = this;
this.data.current(function (selected) {
var selectedIds = $.map(selected, function (s) {
return s.id.toString();
});
var $options = self.$results
.find('.select2-results__option[aria-selected]');
$options.each(function () {
var $option = $(this);
var item = Utils.GetData(this, 'data');
// id needs to be converted to a string when comparing
var id = '' + item.id;
if ((item.element != null && item.element.selected) ||
(item.element == null && $.inArray(id, selectedIds) > -1)) {
$option.attr('aria-selected', 'true');
} else {
$option.attr('aria-selected', 'false');
}
});
});
};
Results.prototype.showLoading = function (params) {
this.hideLoading();
var loadingMore = this.options.get('translations').get('searching');
var loading = {
disabled: true,
loading: true,
text: loadingMore(params)
};
var $loading = this.option(loading);
$loading.className += ' loading-results';
this.$results.prepend($loading);
};
Results.prototype.hideLoading = function () {
this.$results.find('.loading-results').remove();
};
Results.prototype.option = function (data) {
var option = document.createElement('li');
option.className = 'select2-results__option';
var attrs = {
'role': 'option',
'aria-selected': 'false'
};
var matches = window.Element.prototype.matches ||
window.Element.prototype.msMatchesSelector ||
window.Element.prototype.webkitMatchesSelector;
if ((data.element != null && matches.call(data.element, ':disabled')) ||
(data.element == null && data.disabled)) {
delete attrs['aria-selected'];
attrs['aria-disabled'] = 'true';
}
if (data.id == null) {
delete attrs['aria-selected'];
}
if (data._resultId != null) {
option.id = data._resultId;
}
if (data.title) {
option.title = data.title;
}
if (data.children) {
attrs.role = 'group';
attrs['aria-label'] = data.text;
delete attrs['aria-selected'];
}
for (var attr in attrs) {
var val = attrs[attr];
option.setAttribute(attr, val);
}
if (data.children) {
var $option = $(option);
var label = document.createElement('strong');
label.className = 'select2-results__group';
var $label = $(label);
this.template(data, label);
var $children = [];
for (var c = 0; c < data.children.length; c++) {
var child = data.children[c];
var $child = this.option(child);
$children.push($child);
}
var $childrenContainer = $('<ul></ul>', {
'class': 'select2-results__options select2-results__options--nested'
});
$childrenContainer.append($children);
$option.append(label);
$option.append($childrenContainer);
} else {
this.template(data, option);
}
Utils.StoreData(option, 'data', data);
return option;
};
Results.prototype.bind = function (container, $container) {
var self = this;
var id = container.id + '-results';
this.$results.attr('id', id);
container.on('results:all', function (params) {
self.clear();
self.append(params.data);
if (container.isOpen()) {
self.setClasses();
self.highlightFirstItem();
}
});
container.on('results:append', function (params) {
self.append(params.data);
if (container.isOpen()) {
self.setClasses();
}
});
container.on('query', function (params) {
self.hideMessages();
self.showLoading(params);
});
container.on('select', function () {
if (!container.isOpen()) {
return;
}
self.setClasses();
if (self.options.get('scrollAfterSelect')) {
self.highlightFirstItem();
}
});
container.on('unselect', function () {
if (!container.isOpen()) {
return;
}
self.setClasses();
if (self.options.get('scrollAfterSelect')) {
self.highlightFirstItem();
}
});
container.on('open', function () {
// When the dropdown is open, aria-expended="true"
self.$results.attr('aria-expanded', 'true');
self.$results.attr('aria-hidden', 'false');
self.setClasses();
self.ensureHighlightVisible();
});
container.on('close', function () {
// When the dropdown is closed, aria-expended="false"
self.$results.attr('aria-expanded', 'false');
self.$results.attr('aria-hidden', 'true');
self.$results.removeAttr('aria-activedescendant');
});
container.on('results:toggle', function () {
var $highlighted = self.getHighlightedResults();
if ($highlighted.length === 0) {
return;
}
$highlighted.trigger('mouseup');
});
container.on('results:select', function () {
var $highlighted = self.getHighlightedResults();
if ($highlighted.length === 0) {
return;
}
var data = Utils.GetData($highlighted[0], 'data');
if ($highlighted.attr('aria-selected') == 'true') {
self.trigger('close', {});
} else {
self.trigger('select', {
data: data
});
}
});
container.on('results:previous', function () {
var $highlighted = self.getHighlightedResults();
var $options = self.$results.find('[aria-selected]');
var currentIndex = $options.index($highlighted);
// If we are already at the top, don't move further
// If no options, currentIndex will be -1
if (currentIndex <= 0) {
return;
}
var nextIndex = currentIndex - 1;
// If none are highlighted, highlight the first
if ($highlighted.length === 0) {
nextIndex = 0;
}
var $next = $options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset = self.$results.offset().top;
var nextTop = $next.offset().top;
var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
if (nextIndex === 0) {
self.$results.scrollTop(0);
} else if (nextTop - currentOffset < 0) {
self.$results.scrollTop(nextOffset);
}
});
container.on('results:next', function () {
var $highlighted = self.getHighlightedResults();
var $options = self.$results.find('[aria-selected]');
var currentIndex = $options.index($highlighted);
var nextIndex = currentIndex + 1;
// If we are at the last option, stay there
if (nextIndex >= $options.length) {
return;
}
var $next = $options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset = self.$results.offset().top +
self.$results.outerHeight(false);
var nextBottom = $next.offset().top + $next.outerHeight(false);
var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
if (nextIndex === 0) {
self.$results.scrollTop(0);
} else if (nextBottom > currentOffset) {
self.$results.scrollTop(nextOffset);
}
});
container.on('results:focus', function (params) {
params.element.addClass('select2-results__option--highlighted');
});
container.on('results:message', function (params) {
self.displayMessage(params);
});
if ($.fn.mousewheel) {
this.$results.on('mousewheel', function (e) {
var top = self.$results.scrollTop();
var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
if (isAtTop) {
self.$results.scrollTop(0);
e.preventDefault();
e.stopPropagation();
} else if (isAtBottom) {
self.$results.scrollTop(
self.$results.get(0).scrollHeight - self.$results.height()
);
e.preventDefault();
e.stopPropagation();
}
});
}
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
function (evt) {
var $this = $(this);
var data = Utils.GetData(this, 'data');
if ($this.attr('aria-selected') === 'true') {
if (self.options.get('multiple')) {
self.trigger('unselect', {
originalEvent: evt,
data: data
});
} else {
self.trigger('close', {});
}
return;
}
self.trigger('select', {
originalEvent: evt,
data: data
});
});
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
function (evt) {
var data = Utils.GetData(this, 'data');
self.getHighlightedResults()
.removeClass('select2-results__option--highlighted');
self.trigger('results:focus', {
data: data,
element: $(this)
});
});
};
Results.prototype.getHighlightedResults = function () {
var $highlighted = this.$results
.find('.select2-results__option--highlighted');
return $highlighted;
};
Results.prototype.destroy = function () {
this.$results.remove();
};
Results.prototype.ensureHighlightVisible = function () {
var $highlighted = this.getHighlightedResults();
if ($highlighted.length === 0) {
return;
}
var $options = this.$results.find('[aria-selected]');
var currentIndex = $options.index($highlighted);
var currentOffset = this.$results.offset().top;
var nextTop = $highlighted.offset().top;
var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
var offsetDelta = nextTop - currentOffset;
nextOffset -= $highlighted.outerHeight(false) * 2;
if (currentIndex <= 2) {
this.$results.scrollTop(0);
} else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
this.$results.scrollTop(nextOffset);
}
};
Results.prototype.template = function (result, container) {
var template = this.options.get('templateResult');
var escapeMarkup = this.options.get('escapeMarkup');
var content = template(result, container);
if (content == null) {
container.style.display = 'none';
} else if (typeof content === 'string') {
container.innerHTML = escapeMarkup(content);
} else {
$(container).append(content);
}
};
return Results;
});
S2.define('select2/keys',[
], function () {
var KEYS = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46
};
return KEYS;
});
S2.define('select2/selection/base',[
'jquery',
'../utils',
'../keys'
], function ($, Utils, KEYS) {
function BaseSelection ($element, options) {
this.$element = $element;
this.options = options;
BaseSelection.__super__.constructor.call(this);
}
Utils.Extend(BaseSelection, Utils.Observable);
BaseSelection.prototype.render = function () {
var $selection = $(
'<span class="select2-selection" role="combobox" ' +
' aria-haspopup="true" aria-expanded="false">' +
'</span>'
);
this._tabindex = 0;
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
} else if (this.$element.attr('tabindex') != null) {
this._tabindex = this.$element.attr('tabindex');
}
$selection.attr('title', this.$element.attr('title'));
$selection.attr('tabindex', this._tabindex);
$selection.attr('aria-disabled', 'false');
this.$selection = $selection;
return $selection;
};
BaseSelection.prototype.bind = function (container, $container) {
var self = this;
var resultsId = container.id + '-results';
this.container = container;
this.$selection.on('focus', function (evt) {
self.trigger('focus', evt);
});
this.$selection.on('blur', function (evt) {
self._handleBlur(evt);
});
this.$selection.on('keydown', function (evt) {
self.trigger('keypress', evt);
if (evt.which === KEYS.SPACE) {
evt.preventDefault();
}
});
container.on('results:focus', function (params) {
self.$selection.attr('aria-activedescendant', params.data._resultId);
});
container.on('selection:update', function (params) {
self.update(params.data);
});
container.on('open', function () {
// When the dropdown is open, aria-expanded="true"
self.$selection.attr('aria-expanded', 'true');
self.$selection.attr('aria-owns', resultsId);
self._attachCloseHandler(container);
});
container.on('close', function () {
// When the dropdown is closed, aria-expanded="false"
self.$selection.attr('aria-expanded', 'false');
self.$selection.removeAttr('aria-activedescendant');
self.$selection.removeAttr('aria-owns');
self.$selection.trigger('focus');
self._detachCloseHandler(container);
});
container.on('enable', function () {
self.$selection.attr('tabindex', self._tabindex);
self.$selection.attr('aria-disabled', 'false');
});
container.on('disable', function () {
self.$selection.attr('tabindex', '-1');
self.$selection.attr('aria-disabled', 'true');
});
};
BaseSelection.prototype._handleBlur = function (evt) {
var self = this;
// This needs to be delayed as the active element is the body when the tab
// key is pressed, possibly along with others.
window.setTimeout(function () {
// Don't trigger `blur` if the focus is still in the selection
if (
(document.activeElement == self.$selection[0]) ||
($.contains(self.$selection[0], document.activeElement))
) {
return;
}
self.trigger('blur', evt);
}, 1);
};
BaseSelection.prototype._attachCloseHandler = function (container) {
$(document.body).on('mousedown.select2.' + container.id, function (e) {
var $target = $(e.target);
var $select = $target.closest('.select2');
var $all = $('.select2.select2-container--open');
$all.each(function () {
if (this == $select[0]) {
return;
}
var $element = Utils.GetData(this, 'element');
$element.select2('close');
});
});
};
BaseSelection.prototype._detachCloseHandler = function (container) {
$(document.body).off('mousedown.select2.' + container.id);
};
BaseSelection.prototype.position = function ($selection, $container) {
var $selectionContainer = $container.find('.selection');
$selectionContainer.append($selection);
};
BaseSelection.prototype.destroy = function () {
this._detachCloseHandler(this.container);
};
BaseSelection.prototype.update = function (data) {
throw new Error('The `update` method must be defined in child classes.');
};
/**
* Helper method to abstract the "enabled" (not "disabled") state of this
* object.
*
* @return {true} if the instance is not disabled.
* @return {false} if the instance is disabled.
*/
BaseSelection.prototype.isEnabled = function () {
return !this.isDisabled();
};
/**
* Helper method to abstract the "disabled" state of this object.
*
* @return {true} if the disabled option is true.
* @return {false} if the disabled option is false.
*/
BaseSelection.prototype.isDisabled = function () {
return this.options.get('disabled');
};
return BaseSelection;
});
S2.define('select2/selection/single',[
'jquery',
'./base',
'../utils',
'../keys'
], function ($, BaseSelection, Utils, KEYS) {
function SingleSelection () {
SingleSelection.__super__.constructor.apply(this, arguments);
}
Utils.Extend(SingleSelection, BaseSelection);
SingleSelection.prototype.render = function () {
var $selection = SingleSelection.__super__.render.call(this);
$selection.addClass('select2-selection--single');
$selection.html(
'<span class="select2-selection__rendered"></span>' +
'<span class="select2-selection__arrow" role="presentation">' +
'<b role="presentation"></b>' +
'</span>'
);
return $selection;
};
SingleSelection.prototype.bind = function (container, $container) {
var self = this;
SingleSelection.__super__.bind.apply(this, arguments);
var id = container.id + '-container';
this.$selection.find('.select2-selection__rendered')
.attr('id', id)
.attr('role', 'textbox')
.attr('aria-readonly', 'true');
this.$selection.attr('aria-labelledby', id);
this.$selection.on('mousedown', function (evt) {
// Only respond to left clicks
if (evt.which !== 1) {
return;
}
self.trigger('toggle', {
originalEvent: evt
});
});
this.$selection.on('focus', function (evt) {
// User focuses on the container
});
this.$selection.on('blur', function (evt) {
// User exits the container
});
container.on('focus', function (evt) {
if (!container.isOpen()) {
self.$selection.trigger('focus');
}
});
};
SingleSelection.prototype.clear = function () {
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title'); // clear tooltip on empty
};
SingleSelection.prototype.display = function (data, container) {
var template = this.options.get('templateSelection');
var escapeMarkup = this.options.get('escapeMarkup');
return escapeMarkup(template(data, container));
};
SingleSelection.prototype.selectionContainer = function () {
return $('<span></span>');
};
SingleSelection.prototype.update = function (data) {
if (data.length === 0) {
this.clear();
return;
}
var selection = data[0];
var $rendered = this.$selection.find('.select2-selection__rendered');
var formatted = this.display(selection, $rendered);
$rendered.empty().append(formatted);
var title = selection.title || selection.text;
if (title) {
$rendered.attr('title', title);
} else {
$rendered.removeAttr('title');
}
};
return SingleSelection;
});
S2.define('select2/selection/multiple',[
'jquery',
'./base',
'../utils'
], function ($, BaseSelection, Utils) {
function MultipleSelection ($element, options) {
MultipleSelection.__super__.constructor.apply(this, arguments);
}
Utils.Extend(MultipleSelection, BaseSelection);
MultipleSelection.prototype.render = function () {
var $selection = MultipleSelection.__super__.render.call(this);
$selection.addClass('select2-selection--multiple');
$selection.html(
'<ul class="select2-selection__rendered"></ul>'
);
return $selection;
};
MultipleSelection.prototype.bind = function (container, $container) {
var self = this;
MultipleSelection.__super__.bind.apply(this, arguments);
this.$selection.on('click', function (evt) {
self.trigger('toggle', {
originalEvent: evt
});
});
this.$selection.on(
'click',
'.select2-selection__choice__remove',
function (evt) {
// Ignore the event if it is disabled
if (self.isDisabled()) {
return;
}
var $remove = $(this);
var $selection = $remove.parent();
var data = Utils.GetData($selection[0], 'data');
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}
);
};
MultipleSelection.prototype.clear = function () {
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
};
MultipleSelection.prototype.display = function (data, container) {
var template = this.options.get('templateSelection');
var escapeMarkup = this.options.get('escapeMarkup');
return escapeMarkup(template(data, container));
};
MultipleSelection.prototype.selectionContainer = function () {
var $container = $(
'<li class="select2-selection__choice">' +
'<span class="select2-selection__choice__remove" role="presentation">' +
'×' +
'</span>' +
'</li>'
);
return $container;
};
MultipleSelection.prototype.update = function (data) {
this.clear();
if (data.length === 0) {
return;
}
var $selections = [];
for (var d = 0; d < data.length; d++) {
var selection = data[d];
var $selection = this.selectionContainer();
var formatted = this.display(selection, $selection);
$selection.append(formatted);
var title = selection.title || selection.text;
if (title) {
$selection.attr('title', title);
}
Utils.StoreData($selection[0], 'data', selection);
$selections.push($selection);
}
var $rendered = this.$selection.find('.select2-selection__rendered');
Utils.appendMany($rendered, $selections);
};
return MultipleSelection;
});
S2.define('select2/selection/placeholder',[
'../utils'
], function (Utils) {
function Placeholder (decorated, $element, options) {
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this, $element, options);
}
Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
if (typeof placeholder === 'string') {
placeholder = {
id: '',
text: placeholder
};
}
return placeholder;
};
Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
var $placeholder = this.selectionContainer();
$placeholder.html(this.display(placeholder));
$placeholder.addClass('select2-selection__placeholder')
.removeClass('select2-selection__choice');
return $placeholder;
};
Placeholder.prototype.update = function (decorated, data) {
var singlePlaceholder = (
data.length == 1 && data[0].id != this.placeholder.id
);
var multipleSelections = data.length > 1;
if (multipleSelections || singlePlaceholder) {
return decorated.call(this, data);
}
this.clear();
var $placeholder = this.createPlaceholder(this.placeholder);
this.$selection.find('.select2-selection__rendered').append($placeholder);
};
return Placeholder;
});
S2.define('select2/selection/allowClear',[
'jquery',
'../keys',
'../utils'
], function ($, KEYS, Utils) {
function AllowClear () { }
AllowClear.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
if (this.placeholder == null) {
if (this.options.get('debug') && window.console && console.error) {
console.error(
'Select2: The `allowClear` option should be used in combination ' +
'with the `placeholder` option.'
);
}
}
this.$selection.on('mousedown', '.select2-selection__clear',
function (evt) {
self._handleClear(evt);
});
container.on('keypress', function (evt) {
self._handleKeyboardClear(evt, container);
});
};
AllowClear.prototype._handleClear = function (_, evt) {
// Ignore the event if it is disabled
if (this.isDisabled()) {
return;
}
var $clear = this.$selection.find('.select2-selection__clear');
// Ignore the event if nothing has been selected
if ($clear.length === 0) {
return;
}
evt.stopPropagation();
var data = Utils.GetData($clear[0], 'data');
var previousVal = this.$element.val();
this.$element.val(this.placeholder.id);
var unselectData = {
data: data
};
this.trigger('clear', unselectData);
if (unselectData.prevented) {
this.$element.val(previousVal);
return;
}
for (var d = 0; d < data.length; d++) {
unselectData = {
data: data[d]
};
// Trigger the `unselect` event, so people can prevent it from being
// cleared.
this.trigger('unselect', unselectData);
// If the event was prevented, don't clear it out.
if (unselectData.prevented) {
this.$element.val(previousVal);
return;
}
}
this.$element.trigger('input').trigger('change');
this.trigger('toggle', {});
};
AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
if (container.isOpen()) {
return;
}
if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
this._handleClear(evt);
}
};
AllowClear.prototype.update = function (decorated, data) {
decorated.call(this, data);
if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
data.length === 0) {
return;
}
var removeAll = this.options.get('translations').get('removeAllItems');
var $remove = $(
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
'×' +
'</span>'
);
Utils.StoreData($remove[0], 'data', data);
this.$selection.find('.select2-selection__rendered').prepend($remove);
};
return AllowClear;
});
S2.define('select2/selection/search',[
'jquery',
'../utils',
'../keys'
], function ($, Utils, KEYS) {
function Search (decorated, $element, options) {
decorated.call(this, $element, options);
}
Search.prototype.render = function (decorated) {
var $search = $(
'<li class="select2-search select2-search--inline">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
'</li>'
);
this.$searchContainer = $search;
this.$search = $search.find('input');
var $rendered = decorated.call(this);
this._transferTabIndex();
return $rendered;
};
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
decorated.call(this, container, $container);
container.on('open', function () {
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
});
container.on('close', function () {
self.$search.val('');
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.trigger('focus');
});
container.on('enable', function () {
self.$search.prop('disabled', false);
self._transferTabIndex();
});
container.on('disable', function () {
self.$search.prop('disabled', true);
});
container.on('focus', function (evt) {
self.$search.trigger('focus');
});
container.on('results:focus', function (params) {
if (params.data._resultId) {
self.$search.attr('aria-activedescendant', params.data._resultId);
} else {
self.$search.removeAttr('aria-activedescendant');
}
});
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
self.trigger('focus', evt);
});
this.$selection.on('focusout', '.select2-search--inline', function (evt) {
self._handleBlur(evt);
});
this.$selection.on('keydown', '.select2-search--inline', function (evt) {
evt.stopPropagation();
self.trigger('keypress', evt);
self._keyUpPrevented = evt.isDefaultPrevented();
var key = evt.which;
if (key === KEYS.BACKSPACE && self.$search.val() === '') {
var $previousChoice = self.$searchContainer
.prev('.select2-selection__choice');
if ($previousChoice.length > 0) {
var item = Utils.GetData($previousChoice[0], 'data');
self.searchRemoveChoice(item);
evt.preventDefault();
}
}
});
this.$selection.on('click', '.select2-search--inline', function (evt) {
if (self.$search.val()) {
evt.stopPropagation();
}
});
// Try to detect the IE version should the `documentMode` property that
// is stored on the document. This is only implemented in IE and is
// slightly cleaner than doing a user agent check.
// This property is not available in Edge, but Edge also doesn't have
// this bug.
var msie = document.documentMode;
var disableInputEvents = msie && msie <= 11;
// Workaround for browsers which do not support the `input` event
// This will prevent double-triggering of events for browsers which support
// both the `keyup` and `input` events.
this.$selection.on(
'input.searchcheck',
'.select2-search--inline',
function (evt) {
// IE will trigger the `input` event when a placeholder is used on a
// search box. To get around this issue, we are forced to ignore all
// `input` events in IE and keep using `keyup`.
if (disableInputEvents) {
self.$selection.off('input.search input.searchcheck');
return;
}
// Unbind the duplicated `keyup` event
self.$selection.off('keyup.search');
}
);
this.$selection.on(
'keyup.search input.search',
'.select2-search--inline',
function (evt) {
// IE will trigger the `input` event when a placeholder is used on a
// search box. To get around this issue, we are forced to ignore all
// `input` events in IE and keep using `keyup`.
if (disableInputEvents && evt.type === 'input') {
self.$selection.off('input.search input.searchcheck');
return;
}
var key = evt.which;
// We can freely ignore events from modifier keys
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
return;
}
// Tabbing will be handled during the `keydown` phase
if (key == KEYS.TAB) {
return;
}
self.handleSearch(evt);
}
);
};
/**
* This method will transfer the tabindex attribute from the rendered
* selection to the search box. This allows for the search box to be used as
* the primary focus instead of the selection container.
*
* @private
*/
Search.prototype._transferTabIndex = function (decorated) {
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
this.$selection.attr('tabindex', '-1');
};
Search.prototype.createPlaceholder = function (decorated, placeholder) {
this.$search.attr('placeholder', placeholder.text);
};
Search.prototype.update = function (decorated, data) {
var searchHadFocus = this.$search[0] == document.activeElement;
this.$search.attr('placeholder', '');
decorated.call(this, data);
this.$selection.find('.select2-selection__rendered')
.append(this.$searchContainer);
this.resizeSearch();
if (searchHadFocus) {
this.$search.trigger('focus');
}
};
Search.prototype.handleSearch = function () {
this.resizeSearch();
if (!this._keyUpPrevented) {
var input = this.$search.val();
this.trigger('query', {
term: input
});
}
this._keyUpPrevented = false;
};
Search.prototype.searchRemoveChoice = function (decorated, item) {
this.trigger('unselect', {
data: item
});
this.$search.val(item.text);
this.handleSearch();
};
Search.prototype.resizeSearch = function () {
this.$search.css('width', '25px');
var width = '';
if (this.$search.attr('placeholder') !== '') {
width = this.$selection.find('.select2-selection__rendered').width();
} else {
var minimumWidth = this.$search.val().length + 1;
width = (minimumWidth * 0.75) + 'em';
}
this.$search.css('width', width);
};
return Search;
});
S2.define('select2/selection/eventRelay',[
'jquery'
], function ($) {
function EventRelay () { }
EventRelay.prototype.bind = function (decorated, container, $container) {
var self = this;
var relayEvents = [
'open', 'opening',
'close', 'closing',
'select', 'selecting',
'unselect', 'unselecting',
'clear', 'clearing'
];
var preventableEvents = [
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
];
decorated.call(this, container, $container);
container.on('*', function (name, params) {
// Ignore events that should not be relayed
if ($.inArray(name, relayEvents) === -1) {
return;
}
// The parameters should always be an object
params = params || {};
// Generate the jQuery event for the Select2 event
var evt = $.Event('select2:' + name, {
params: params
});
self.$element.trigger(evt);
// Only handle preventable events if it was one
if ($.inArray(name, preventableEvents) === -1) {
return;
}
params.prevented = evt.isDefaultPrevented();
});
};
return EventRelay;
});
S2.define('select2/translation',[
'jquery',
'require'
], function ($, require) {
function Translation (dict) {
this.dict = dict || {};
}
Translation.prototype.all = function () {
return this.dict;
};
Translation.prototype.get = function (key) {
return this.dict[key];
};
Translation.prototype.extend = function (translation) {
this.dict = $.extend({}, translation.all(), this.dict);
};
// Static functions
Translation._cache = {};
Translation.loadPath = function (path) {
if (!(path in Translation._cache)) {
var translations = require(path);
Translation._cache[path] = translations;
}
return new Translation(Translation._cache[path]);
};
return Translation;
});
S2.define('select2/diacritics',[
], function () {
var diacritics = {
'\u24B6': 'A',
'\uFF21': 'A',
'\u00C0': 'A',
'\u00C1': 'A',
'\u00C2': 'A',
'\u1EA6': 'A',
'\u1EA4': 'A',
'\u1EAA': 'A',
'\u1EA8': 'A',
'\u00C3': 'A',
'\u0100': 'A',
'\u0102': 'A',
'\u1EB0': 'A',
'\u1EAE': 'A',
'\u1EB4': 'A',
'\u1EB2': 'A',
'\u0226': 'A',
'\u01E0': 'A',
'\u00C4': 'A',
'\u01DE': 'A',
'\u1EA2': 'A',
'\u00C5': 'A',
'\u01FA': 'A',
'\u01CD': 'A',
'\u0200': 'A',
'\u0202': 'A',
'\u1EA0': 'A',
'\u1EAC': 'A',
'\u1EB6': 'A',
'\u1E00': 'A',
'\u0104': 'A',
'\u023A': 'A',
'\u2C6F': 'A',
'\uA732': 'AA',
'\u00C6': 'AE',
'\u01FC': 'AE',
'\u01E2': 'AE',
'\uA734': 'AO',
'\uA736': 'AU',
'\uA738': 'AV',
'\uA73A': 'AV',
'\uA73C': 'AY',
'\u24B7': 'B',
'\uFF22': 'B',
'\u1E02': 'B',
'\u1E04': 'B',
'\u1E06': 'B',
'\u0243': 'B',
'\u0182': 'B',
'\u0181': 'B',
'\u24B8': 'C',
'\uFF23': 'C',
'\u0106': 'C',
'\u0108': 'C',
'\u010A': 'C',
'\u010C': 'C',
'\u00C7': 'C',
'\u1E08': 'C',
'\u0187': 'C',
'\u023B': 'C',
'\uA73E': 'C',
'\u24B9': 'D',
'\uFF24': 'D',
'\u1E0A': 'D',
'\u010E': 'D',
'\u1E0C': 'D',
'\u1E10': 'D',
'\u1E12': 'D',
'\u1E0E': 'D',
'\u0110': 'D',
'\u018B': 'D',
'\u018A': 'D',
'\u0189': 'D',
'\uA779': 'D',
'\u01F1': 'DZ',
'\u01C4': 'DZ',
'\u01F2': 'Dz',
'\u01C5': 'Dz',
'\u24BA': 'E',
'\uFF25': 'E',
'\u00C8': 'E',
'\u00C9': 'E',
'\u00CA': 'E',
'\u1EC0': 'E',
'\u1EBE': 'E',
'\u1EC4': 'E',
'\u1EC2': 'E',
'\u1EBC': 'E',
'\u0112': 'E',
'\u1E14': 'E',
'\u1E16': 'E',
'\u0114': 'E',
'\u0116': 'E',
'\u00CB': 'E',
'\u1EBA': 'E',
'\u011A': 'E',
'\u0204': 'E',
'\u0206': 'E',
'\u1EB8': 'E',
'\u1EC6': 'E',
'\u0228': 'E',
'\u1E1C': 'E',
'\u0118': 'E',
'\u1E18': 'E',
'\u1E1A': 'E',
'\u0190': 'E',
'\u018E': 'E',
'\u24BB': 'F',
'\uFF26': 'F',
'\u1E1E': 'F',
'\u0191': 'F',
'\uA77B': 'F',
'\u24BC': 'G',
'\uFF27': 'G',
'\u01F4': 'G',
'\u011C': 'G',
'\u1E20': 'G',
'\u011E': 'G',
'\u0120': 'G',
'\u01E6': 'G',
'\u0122': 'G',
'\u01E4': 'G',
'\u0193': 'G',
'\uA7A0': 'G',
'\uA77D': 'G',
'\uA77E': 'G',
'\u24BD': 'H',
'\uFF28': 'H',
'\u0124': 'H',
'\u1E22': 'H',
'\u1E26': 'H',
'\u021E': 'H',
'\u1E24': 'H',
'\u1E28': 'H',
'\u1E2A': 'H',
'\u0126': 'H',
'\u2C67': 'H',
'\u2C75': 'H',
'\uA78D': 'H',
'\u24BE': 'I',
'\uFF29': 'I',
'\u00CC': 'I',
'\u00CD': 'I',
'\u00CE': 'I',
'\u0128': 'I',
'\u012A': 'I',
'\u012C': 'I',
'\u0130': 'I',
'\u00CF': 'I',
'\u1E2E': 'I',
'\u1EC8': 'I',
'\u01CF': 'I',
'\u0208': 'I',
'\u020A': 'I',
'\u1ECA': 'I',
'\u012E': 'I',
'\u1E2C': 'I',
'\u0197': 'I',
'\u24BF': 'J',
'\uFF2A': 'J',
'\u0134': 'J',
'\u0248': 'J',
'\u24C0': 'K',
'\uFF2B': 'K',
'\u1E30': 'K',
'\u01E8': 'K',
'\u1E32': 'K',
'\u0136': 'K',
'\u1E34': 'K',
'\u0198': 'K',
'\u2C69': 'K',
'\uA740': 'K',
'\uA742': 'K',
'\uA744': 'K',
'\uA7A2': 'K',
'\u24C1': 'L',
'\uFF2C': 'L',
'\u013F': 'L',
'\u0139': 'L',
'\u013D': 'L',
'\u1E36': 'L',
'\u1E38': 'L',
'\u013B': 'L',
'\u1E3C': 'L',
'\u1E3A': 'L',
'\u0141': 'L',
'\u023D': 'L',
'\u2C62': 'L',
'\u2C60': 'L',
'\uA748': 'L',
'\uA746': 'L',
'\uA780': 'L',
'\u01C7': 'LJ',
'\u01C8': 'Lj',
'\u24C2': 'M',
'\uFF2D': 'M',
'\u1E3E': 'M',
'\u1E40': 'M',
'\u1E42': 'M',
'\u2C6E': 'M',
'\u019C': 'M',
'\u24C3': 'N',
'\uFF2E': 'N',
'\u01F8': 'N',
'\u0143': 'N',
'\u00D1': 'N',
'\u1E44': 'N',
'\u0147': 'N',
'\u1E46': 'N',
'\u0145': 'N',
'\u1E4A': 'N',
'\u1E48': 'N',
'\u0220': 'N',
'\u019D': 'N',
'\uA790': 'N',
'\uA7A4': 'N',
'\u01CA': 'NJ',
'\u01CB': 'Nj',
'\u24C4': 'O',
'\uFF2F': 'O',
'\u00D2': 'O',
'\u00D3': 'O',
'\u00D4': 'O',
'\u1ED2': 'O',
'\u1ED0': 'O',
'\u1ED6': 'O',
'\u1ED4': 'O',
'\u00D5': 'O',
'\u1E4C': 'O',
'\u022C': 'O',
'\u1E4E': 'O',
'\u014C': 'O',
'\u1E50': 'O',
'\u1E52': 'O',
'\u014E': 'O',
'\u022E': 'O',
'\u0230': 'O',
'\u00D6': 'O',
'\u022A': 'O',
'\u1ECE': 'O',
'\u0150': 'O',
'\u01D1': 'O',
'\u020C': 'O',
'\u020E': 'O',
'\u01A0': 'O',
'\u1EDC': 'O',
'\u1EDA': 'O',
'\u1EE0': 'O',
'\u1EDE': 'O',
'\u1EE2': 'O',
'\u1ECC': 'O',
'\u1ED8': 'O',
'\u01EA': 'O',
'\u01EC': 'O',
'\u00D8': 'O',
'\u01FE': 'O',
'\u0186': 'O',
'\u019F': 'O',
'\uA74A': 'O',
'\uA74C': 'O',
'\u0152': 'OE',
'\u01A2': 'OI',
'\uA74E': 'OO',
'\u0222': 'OU',
'\u24C5': 'P',
'\uFF30': 'P',
'\u1E54': 'P',
'\u1E56': 'P',
'\u01A4': 'P',
'\u2C63': 'P',
'\uA750': 'P',
'\uA752': 'P',
'\uA754': 'P',
'\u24C6': 'Q',
'\uFF31': 'Q',
'\uA756': 'Q',
'\uA758': 'Q',
'\u024A': 'Q',
'\u24C7': 'R',
'\uFF32': 'R',
'\u0154': 'R',
'\u1E58': 'R',
'\u0158': 'R',
'\u0210': 'R',
'\u0212': 'R',
'\u1E5A': 'R',
'\u1E5C': 'R',
'\u0156': 'R',
'\u1E5E': 'R',
'\u024C': 'R',
'\u2C64': 'R',
'\uA75A': 'R',
'\uA7A6': 'R',
'\uA782': 'R',
'\u24C8': 'S',
'\uFF33': 'S',
'\u1E9E': 'S',
'\u015A': 'S',
'\u1E64': 'S',
'\u015C': 'S',
'\u1E60': 'S',
'\u0160': 'S',
'\u1E66': 'S',
'\u1E62': 'S',
'\u1E68': 'S',
'\u0218': 'S',
'\u015E': 'S',
'\u2C7E': 'S',
'\uA7A8': 'S',
'\uA784': 'S',
'\u24C9': 'T',
'\uFF34': 'T',
'\u1E6A': 'T',
'\u0164': 'T',
'\u1E6C': 'T',
'\u021A': 'T',
'\u0162': 'T',
'\u1E70': 'T',
'\u1E6E': 'T',
'\u0166': 'T',
'\u01AC': 'T',
'\u01AE': 'T',
'\u023E': 'T',
'\uA786': 'T',
'\uA728': 'TZ',
'\u24CA': 'U',
'\uFF35': 'U',
'\u00D9': 'U',
'\u00DA': 'U',
'\u00DB': 'U',
'\u0168': 'U',
'\u1E78': 'U',
'\u016A': 'U',
'\u1E7A': 'U',
'\u016C': 'U',
'\u00DC': 'U',
'\u01DB': 'U',
'\u01D7': 'U',
'\u01D5': 'U',
'\u01D9': 'U',
'\u1EE6': 'U',
'\u016E': 'U',
'\u0170': 'U',
'\u01D3': 'U',
'\u0214': 'U',
'\u0216': 'U',
'\u01AF': 'U',
'\u1EEA': 'U',
'\u1EE8': 'U',
'\u1EEE': 'U',
'\u1EEC': 'U',
'\u1EF0': 'U',
'\u1EE4': 'U',
'\u1E72': 'U',
'\u0172': 'U',
'\u1E76': 'U',
'\u1E74': 'U',
'\u0244': 'U',
'\u24CB': 'V',
'\uFF36': 'V',
'\u1E7C': 'V',
'\u1E7E': 'V',
'\u01B2': 'V',
'\uA75E': 'V',
'\u0245': 'V',
'\uA760': 'VY',
'\u24CC': 'W',
'\uFF37': 'W',
'\u1E80': 'W',
'\u1E82': 'W',
'\u0174': 'W',
'\u1E86': 'W',
'\u1E84': 'W',
'\u1E88': 'W',
'\u2C72': 'W',
'\u24CD': 'X',
'\uFF38': 'X',
'\u1E8A': 'X',
'\u1E8C': 'X',
'\u24CE': 'Y',
'\uFF39': 'Y',
'\u1EF2': 'Y',
'\u00DD': 'Y',
'\u0176': 'Y',
'\u1EF8': 'Y',
'\u0232': 'Y',
'\u1E8E': 'Y',
'\u0178': 'Y',
'\u1EF6': 'Y',
'\u1EF4': 'Y',
'\u01B3': 'Y',
'\u024E': 'Y',
'\u1EFE': 'Y',
'\u24CF': 'Z',
'\uFF3A': 'Z',
'\u0179': 'Z',
'\u1E90': 'Z',
'\u017B': 'Z',
'\u017D': 'Z',
'\u1E92': 'Z',
'\u1E94': 'Z',
'\u01B5': 'Z',
'\u0224': 'Z',
'\u2C7F': 'Z',
'\u2C6B': 'Z',
'\uA762': 'Z',
'\u24D0': 'a',
'\uFF41': 'a',
'\u1E9A': 'a',
'\u00E0': 'a',
'\u00E1': 'a',
'\u00E2': 'a',
'\u1EA7': 'a',
'\u1EA5': 'a',
'\u1EAB': 'a',
'\u1EA9': 'a',
'\u00E3': 'a',
'\u0101': 'a',
'\u0103': 'a',
'\u1EB1': 'a',
'\u1EAF': 'a',
'\u1EB5': 'a',
'\u1EB3': 'a',
'\u0227': 'a',
'\u01E1': 'a',
'\u00E4': 'a',
'\u01DF': 'a',
'\u1EA3': 'a',
'\u00E5': 'a',
'\u01FB': 'a',
'\u01CE': 'a',
'\u0201': 'a',
'\u0203': 'a',
'\u1EA1': 'a',
'\u1EAD': 'a',
'\u1EB7': 'a',
'\u1E01': 'a',
'\u0105': 'a',
'\u2C65': 'a',
'\u0250': 'a',
'\uA733': 'aa',
'\u00E6': 'ae',
'\u01FD': 'ae',
'\u01E3': 'ae',
'\uA735': 'ao',
'\uA737': 'au',
'\uA739': 'av',
'\uA73B': 'av',
'\uA73D': 'ay',
'\u24D1': 'b',
'\uFF42': 'b',
'\u1E03': 'b',
'\u1E05': 'b',
'\u1E07': 'b',
'\u0180': 'b',
'\u0183': 'b',
'\u0253': 'b',
'\u24D2': 'c',
'\uFF43': 'c',
'\u0107': 'c',
'\u0109': 'c',
'\u010B': 'c',
'\u010D': 'c',
'\u00E7': 'c',
'\u1E09': 'c',
'\u0188': 'c',
'\u023C': 'c',
'\uA73F': 'c',
'\u2184': 'c',
'\u24D3': 'd',
'\uFF44': 'd',
'\u1E0B': 'd',
'\u010F': 'd',
'\u1E0D': 'd',
'\u1E11': 'd',
'\u1E13': 'd',
'\u1E0F': 'd',
'\u0111': 'd',
'\u018C': 'd',
'\u0256': 'd',
'\u0257': 'd',
'\uA77A': 'd',
'\u01F3': 'dz',
'\u01C6': 'dz',
'\u24D4': 'e',
'\uFF45': 'e',
'\u00E8': 'e',
'\u00E9': 'e',
'\u00EA': 'e',
'\u1EC1': 'e',
'\u1EBF': 'e',
'\u1EC5': 'e',
'\u1EC3': 'e',
'\u1EBD': 'e',
'\u0113': 'e',
'\u1E15': 'e',
'\u1E17': 'e',
'\u0115': 'e',
'\u0117': 'e',
'\u00EB': 'e',
'\u1EBB': 'e',
'\u011B': 'e',
'\u0205': 'e',
'\u0207': 'e',
'\u1EB9': 'e',
'\u1EC7': 'e',
'\u0229': 'e',
'\u1E1D': 'e',
'\u0119': 'e',
'\u1E19': 'e',
'\u1E1B': 'e',
'\u0247': 'e',
'\u025B': 'e',
'\u01DD': 'e',
'\u24D5': 'f',
'\uFF46': 'f',
'\u1E1F': 'f',
'\u0192': 'f',
'\uA77C': 'f',
'\u24D6': 'g',
'\uFF47': 'g',
'\u01F5': 'g',
'\u011D': 'g',
'\u1E21': 'g',
'\u011F': 'g',
'\u0121': 'g',
'\u01E7': 'g',
'\u0123': 'g',
'\u01E5': 'g',
'\u0260': 'g',
'\uA7A1': 'g',
'\u1D79': 'g',
'\uA77F': 'g',
'\u24D7': 'h',
'\uFF48': 'h',
'\u0125': 'h',
'\u1E23': 'h',
'\u1E27': 'h',
'\u021F': 'h',
'\u1E25': 'h',
'\u1E29': 'h',
'\u1E2B': 'h',
'\u1E96': 'h',
'\u0127': 'h',
'\u2C68': 'h',
'\u2C76': 'h',
'\u0265': 'h',
'\u0195': 'hv',
'\u24D8': 'i',
'\uFF49': 'i',
'\u00EC': 'i',
'\u00ED': 'i',
'\u00EE': 'i',
'\u0129': 'i',
'\u012B': 'i',
'\u012D': 'i',
'\u00EF': 'i',
'\u1E2F': 'i',
'\u1EC9': 'i',
'\u01D0': 'i',
'\u0209': 'i',
'\u020B': 'i',
'\u1ECB': 'i',
'\u012F': 'i',
'\u1E2D': 'i',
'\u0268': 'i',
'\u0131': 'i',
'\u24D9': 'j',
'\uFF4A': 'j',
'\u0135': 'j',
'\u01F0': 'j',
'\u0249': 'j',
'\u24DA': 'k',
'\uFF4B': 'k',
'\u1E31': 'k',
'\u01E9': 'k',
'\u1E33': 'k',
'\u0137': 'k',
'\u1E35': 'k',
'\u0199': 'k',
'\u2C6A': 'k',
'\uA741': 'k',
'\uA743': 'k',
'\uA745': 'k',
'\uA7A3': 'k',
'\u24DB': 'l',
'\uFF4C': 'l',
'\u0140': 'l',
'\u013A': 'l',
'\u013E': 'l',
'\u1E37': 'l',
'\u1E39': 'l',
'\u013C': 'l',
'\u1E3D': 'l',
'\u1E3B': 'l',
'\u017F': 'l',
'\u0142': 'l',
'\u019A': 'l',
'\u026B': 'l',
'\u2C61': 'l',
'\uA749': 'l',
'\uA781': 'l',
'\uA747': 'l',
'\u01C9': 'lj',
'\u24DC': 'm',
'\uFF4D': 'm',
'\u1E3F': 'm',
'\u1E41': 'm',
'\u1E43': 'm',
'\u0271': 'm',
'\u026F': 'm',
'\u24DD': 'n',
'\uFF4E': 'n',
'\u01F9': 'n',
'\u0144': 'n',
'\u00F1': 'n',
'\u1E45': 'n',
'\u0148': 'n',
'\u1E47': 'n',
'\u0146': 'n',
'\u1E4B': 'n',
'\u1E49': 'n',
'\u019E': 'n',
'\u0272': 'n',
'\u0149': 'n',
'\uA791': 'n',
'\uA7A5': 'n',
'\u01CC': 'nj',
'\u24DE': 'o',
'\uFF4F': 'o',
'\u00F2': 'o',
'\u00F3': 'o',
'\u00F4': 'o',
'\u1ED3': 'o',
'\u1ED1': 'o',
'\u1ED7': 'o',
'\u1ED5': 'o',
'\u00F5': 'o',
'\u1E4D': 'o',
'\u022D': 'o',
'\u1E4F': 'o',
'\u014D': 'o',
'\u1E51': 'o',
'\u1E53': 'o',
'\u014F': 'o',
'\u022F': 'o',
'\u0231': 'o',
'\u00F6': 'o',
'\u022B': 'o',
'\u1ECF': 'o',
'\u0151': 'o',
'\u01D2': 'o',
'\u020D': 'o',
'\u020F': 'o',
'\u01A1': 'o',
'\u1EDD': 'o',
'\u1EDB': 'o',
'\u1EE1': 'o',
'\u1EDF': 'o',
'\u1EE3': 'o',
'\u1ECD': 'o',
'\u1ED9': 'o',
'\u01EB': 'o',
'\u01ED': 'o',
'\u00F8': 'o',
'\u01FF': 'o',
'\u0254': 'o',
'\uA74B': 'o',
'\uA74D': 'o',
'\u0275': 'o',
'\u0153': 'oe',
'\u01A3': 'oi',
'\u0223': 'ou',
'\uA74F': 'oo',
'\u24DF': 'p',
'\uFF50': 'p',
'\u1E55': 'p',
'\u1E57': 'p',
'\u01A5': 'p',
'\u1D7D': 'p',
'\uA751': 'p',
'\uA753': 'p',
'\uA755': 'p',
'\u24E0': 'q',
'\uFF51': 'q',
'\u024B': 'q',
'\uA757': 'q',
'\uA759': 'q',
'\u24E1': 'r',
'\uFF52': 'r',
'\u0155': 'r',
'\u1E59': 'r',
'\u0159': 'r',
'\u0211': 'r',
'\u0213': 'r',
'\u1E5B': 'r',
'\u1E5D': 'r',
'\u0157': 'r',
'\u1E5F': 'r',
'\u024D': 'r',
'\u027D': 'r',
'\uA75B': 'r',
'\uA7A7': 'r',
'\uA783': 'r',
'\u24E2': 's',
'\uFF53': 's',
'\u00DF': 's',
'\u015B': 's',
'\u1E65': 's',
'\u015D': 's',
'\u1E61': 's',
'\u0161': 's',
'\u1E67': 's',
'\u1E63': 's',
'\u1E69': 's',
'\u0219': 's',
'\u015F': 's',
'\u023F': 's',
'\uA7A9': 's',
'\uA785': 's',
'\u1E9B': 's',
'\u24E3': 't',
'\uFF54': 't',
'\u1E6B': 't',
'\u1E97': 't',
'\u0165': 't',
'\u1E6D': 't',
'\u021B': 't',
'\u0163': 't',
'\u1E71': 't',
'\u1E6F': 't',
'\u0167': 't',
'\u01AD': 't',
'\u0288': 't',
'\u2C66': 't',
'\uA787': 't',
'\uA729': 'tz',
'\u24E4': 'u',
'\uFF55': 'u',
'\u00F9': 'u',
'\u00FA': 'u',
'\u00FB': 'u',
'\u0169': 'u',
'\u1E79': 'u',
'\u016B': 'u',
'\u1E7B': 'u',
'\u016D': 'u',
'\u00FC': 'u',
'\u01DC': 'u',
'\u01D8': 'u',
'\u01D6': 'u',
'\u01DA': 'u',
'\u1EE7': 'u',
'\u016F': 'u',
'\u0171': 'u',
'\u01D4': 'u',
'\u0215': 'u',
'\u0217': 'u',
'\u01B0': 'u',
'\u1EEB': 'u',
'\u1EE9': 'u',
'\u1EEF': 'u',
'\u1EED': 'u',
'\u1EF1': 'u',
'\u1EE5': 'u',
'\u1E73': 'u',
'\u0173': 'u',
'\u1E77': 'u',
'\u1E75': 'u',
'\u0289': 'u',
'\u24E5': 'v',
'\uFF56': 'v',
'\u1E7D': 'v',
'\u1E7F': 'v',
'\u028B': 'v',
'\uA75F': 'v',
'\u028C': 'v',
'\uA761': 'vy',
'\u24E6': 'w',
'\uFF57': 'w',
'\u1E81': 'w',
'\u1E83': 'w',
'\u0175': 'w',
'\u1E87': 'w',
'\u1E85': 'w',
'\u1E98': 'w',
'\u1E89': 'w',
'\u2C73': 'w',
'\u24E7': 'x',
'\uFF58': 'x',
'\u1E8B': 'x',
'\u1E8D': 'x',
'\u24E8': 'y',
'\uFF59': 'y',
'\u1EF3': 'y',
'\u00FD': 'y',
'\u0177': 'y',
'\u1EF9': 'y',
'\u0233': 'y',
'\u1E8F': 'y',
'\u00FF': 'y',
'\u1EF7': 'y',
'\u1E99': 'y',
'\u1EF5': 'y',
'\u01B4': 'y',
'\u024F': 'y',
'\u1EFF': 'y',
'\u24E9': 'z',
'\uFF5A': 'z',
'\u017A': 'z',
'\u1E91': 'z',
'\u017C': 'z',
'\u017E': 'z',
'\u1E93': 'z',
'\u1E95': 'z',
'\u01B6': 'z',
'\u0225': 'z',
'\u0240': 'z',
'\u2C6C': 'z',
'\uA763': 'z',
'\u0386': '\u0391',
'\u0388': '\u0395',
'\u0389': '\u0397',
'\u038A': '\u0399',
'\u03AA': '\u0399',
'\u038C': '\u039F',
'\u038E': '\u03A5',
'\u03AB': '\u03A5',
'\u038F': '\u03A9',
'\u03AC': '\u03B1',
'\u03AD': '\u03B5',
'\u03AE': '\u03B7',
'\u03AF': '\u03B9',
'\u03CA': '\u03B9',
'\u0390': '\u03B9',
'\u03CC': '\u03BF',
'\u03CD': '\u03C5',
'\u03CB': '\u03C5',
'\u03B0': '\u03C5',
'\u03CE': '\u03C9',
'\u03C2': '\u03C3',
'\u2019': '\''
};
return diacritics;
});
S2.define('select2/data/base',[
'../utils'
], function (Utils) {
function BaseAdapter ($element, options) {
BaseAdapter.__super__.constructor.call(this);
}
Utils.Extend(BaseAdapter, Utils.Observable);
BaseAdapter.prototype.current = function (callback) {
throw new Error('The `current` method must be defined in child classes.');
};
BaseAdapter.prototype.query = function (params, callback) {
throw new Error('The `query` method must be defined in child classes.');
};
BaseAdapter.prototype.bind = function (container, $container) {
// Can be implemented in subclasses
};
BaseAdapter.prototype.destroy = function () {
// Can be implemented in subclasses
};
BaseAdapter.prototype.generateResultId = function (container, data) {
var id = container.id + '-result-';
id += Utils.generateChars(4);
if (data.id != null) {
id += '-' + data.id.toString();
} else {
id += '-' + Utils.generateChars(4);
}
return id;
};
return BaseAdapter;
});
S2.define('select2/data/select',[
'./base',
'../utils',
'jquery'
], function (BaseAdapter, Utils, $) {
function SelectAdapter ($element, options) {
this.$element = $element;
this.options = options;
SelectAdapter.__super__.constructor.call(this);
}
Utils.Extend(SelectAdapter, BaseAdapter);
SelectAdapter.prototype.current = function (callback) {
var data = [];
var self = this;
this.$element.find(':selected').each(function () {
var $option = $(this);
var option = self.item($option);
data.push(option);
});
callback(data);
};
SelectAdapter.prototype.select = function (data) {
var self = this;
data.selected = true;
// If data.element is a DOM node, use it instead
if ($(data.element).is('option')) {
data.element.selected = true;
this.$element.trigger('input').trigger('change');
return;
}
if (this.$element.prop('multiple')) {
this.current(function (currentData) {
var val = [];
data = [data];
data.push.apply(data, currentData);
for (var d = 0; d < data.length; d++) {
var id = data[d].id;
if ($.inArray(id, val) === -1) {
val.push(id);
}
}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
});
} else {
var val = data.id;
this.$element.val(val);
this.$element.trigger('input').trigger('change');
}
};
SelectAdapter.prototype.unselect = function (data) {
var self = this;
if (!this.$element.prop('multiple')) {
return;
}
data.selected = false;
if ($(data.element).is('option')) {
data.element.selected = false;
this.$element.trigger('input').trigger('change');
return;
}
this.current(function (currentData) {
var val = [];
for (var d = 0; d < currentData.length; d++) {
var id = currentData[d].id;
if (id !== data.id && $.inArray(id, val) === -1) {
val.push(id);
}
}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
});
};
SelectAdapter.prototype.bind = function (container, $container) {
var self = this;
this.container = container;
container.on('select', function (params) {
self.select(params.data);
});
container.on('unselect', function (params) {
self.unselect(params.data);
});
};
SelectAdapter.prototype.destroy = function () {
// Remove anything added to child elements
this.$element.find('*').each(function () {
// Remove any custom data set by Select2
Utils.RemoveData(this);
});
};
SelectAdapter.prototype.query = function (params, callback) {
var data = [];
var self = this;
var $options = this.$element.children();
$options.each(function () {
var $option = $(this);
if (!$option.is('option') && !$option.is('optgroup')) {
return;
}
var option = self.item($option);
var matches = self.matches(params, option);
if (matches !== null) {
data.push(matches);
}
});
callback({
results: data
});
};
SelectAdapter.prototype.addOptions = function ($options) {
Utils.appendMany(this.$element, $options);
};
SelectAdapter.prototype.option = function (data) {
var option;
if (data.children) {
option = document.createElement('optgroup');
option.label = data.text;
} else {
option = document.createElement('option');
if (option.textContent !== undefined) {
option.textContent = data.text;
} else {
option.innerText = data.text;
}
}
if (data.id !== undefined) {
option.value = data.id;
}
if (data.disabled) {
option.disabled = true;
}
if (data.selected) {
option.selected = true;
}
if (data.title) {
option.title = data.title;
}
var $option = $(option);
var normalizedData = this._normalizeItem(data);
normalizedData.element = option;
// Override the option's data with the combined data
Utils.StoreData(option, 'data', normalizedData);
return $option;
};
SelectAdapter.prototype.item = function ($option) {
var data = {};
data = Utils.GetData($option[0], 'data');
if (data != null) {
return data;
}
if ($option.is('option')) {
data = {
id: $option.val(),
text: $option.text(),
disabled: $option.prop('disabled'),
selected: $option.prop('selected'),
title: $option.prop('title')
};
} else if ($option.is('optgroup')) {
data = {
text: $option.prop('label'),
children: [],
title: $option.prop('title')
};
var $children = $option.children('option');
var children = [];
for (var c = 0; c < $children.length; c++) {
var $child = $($children[c]);
var child = this.item($child);
children.push(child);
}
data.children = children;
}
data = this._normalizeItem(data);
data.element = $option[0];
Utils.StoreData($option[0], 'data', data);
return data;
};
SelectAdapter.prototype._normalizeItem = function (item) {
if (item !== Object(item)) {
item = {
id: item,
text: item
};
}
item = $.extend({}, {
text: ''
}, item);
var defaults = {
selected: false,
disabled: false
};
if (item.id != null) {
item.id = item.id.toString();
}
if (item.text != null) {
item.text = item.text.toString();
}
if (item._resultId == null && item.id && this.container != null) {
item._resultId = this.generateResultId(this.container, item);
}
return $.extend({}, defaults, item);
};
SelectAdapter.prototype.matches = function (params, data) {
var matcher = this.options.get('matcher');
return matcher(params, data);
};
return SelectAdapter;
});
S2.define('select2/data/array',[
'./select',
'../utils',
'jquery'
], function (SelectAdapter, Utils, $) {
function ArrayAdapter ($element, options) {
this._dataToConvert = options.get('data') || [];
ArrayAdapter.__super__.constructor.call(this, $element, options);
}
Utils.Extend(ArrayAdapter, SelectAdapter);
ArrayAdapter.prototype.bind = function (container, $container) {
ArrayAdapter.__super__.bind.call(this, container, $container);
this.addOptions(this.convertToOptions(this._dataToConvert));
};
ArrayAdapter.prototype.select = function (data) {
var $option = this.$element.find('option').filter(function (i, elm) {
return elm.value == data.id.toString();
});
if ($option.length === 0) {
$option = this.option(data);
this.addOptions($option);
}
ArrayAdapter.__super__.select.call(this, data);
};
ArrayAdapter.prototype.convertToOptions = function (data) {
var self = this;
var $existing = this.$element.find('option');
var existingIds = $existing.map(function () {
return self.item($(this)).id;
}).get();
var $options = [];
// Filter out all items except for the one passed in the argument
function onlyItem (item) {
return function () {
return $(this).val() == item.id;
};
}
for (var d = 0; d < data.length; d++) {
var item = this._normalizeItem(data[d]);
// Skip items which were pre-loaded, only merge the data
if ($.inArray(item.id, existingIds) >= 0) {
var $existingOption = $existing.filter(onlyItem(item));
var existingData = this.item($existingOption);
var newData = $.extend(true, {}, item, existingData);
var $newOption = this.option(newData);
$existingOption.replaceWith($newOption);
continue;
}
var $option = this.option(item);
if (item.children) {
var $children = this.convertToOptions(item.children);
Utils.appendMany($option, $children);
}
$options.push($option);
}
return $options;
};
return ArrayAdapter;
});
S2.define('select2/data/ajax',[
'./array',
'../utils',
'jquery'
], function (ArrayAdapter, Utils, $) {
function AjaxAdapter ($element, options) {
this.ajaxOptions = this._applyDefaults(options.get('ajax'));
if (this.ajaxOptions.processResults != null) {
this.processResults = this.ajaxOptions.processResults;
}
AjaxAdapter.__super__.constructor.call(this, $element, options);
}
Utils.Extend(AjaxAdapter, ArrayAdapter);
AjaxAdapter.prototype._applyDefaults = function (options) {
var defaults = {
data: function (params) {
return $.extend({}, params, {
q: params.term
});
},
transport: function (params, success, failure) {
var $request = $.ajax(params);
$request.then(success);
$request.fail(failure);
return $request;
}
};
return $.extend({}, defaults, options, true);
};
AjaxAdapter.prototype.processResults = function (results) {
return results;
};
AjaxAdapter.prototype.query = function (params, callback) {
var matches = [];
var self = this;
if (this._request != null) {
// JSONP requests cannot always be aborted
if ($.isFunction(this._request.abort)) {
this._request.abort();
}
this._request = null;
}
var options = $.extend({
type: 'GET'
}, this.ajaxOptions);
if (typeof options.url === 'function') {
options.url = options.url.call(this.$element, params);
}
if (typeof options.data === 'function') {
options.data = options.data.call(this.$element, params);
}
function request () {
var $request = options.transport(options, function (data) {
var results = self.processResults(data, params);
if (self.options.get('debug') && window.console && console.error) {
// Check to make sure that the response included a `results` key.
if (!results || !results.results || !$.isArray(results.results)) {
console.error(
'Select2: The AJAX results did not return an array in the ' +
'`results` key of the response.'
);
}
}
callback(results);
}, function () {
// Attempt to detect if a request was aborted
// Only works if the transport exposes a status property
if ('status' in $request &&
($request.status === 0 || $request.status === '0')) {
return;
}
self.trigger('results:message', {
message: 'errorLoading'
});
});
self._request = $request;
}
if (this.ajaxOptions.delay && params.term != null) {
if (this._queryTimeout) {
window.clearTimeout(this._queryTimeout);
}
this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
} else {
request();
}
};
return AjaxAdapter;
});
S2.define('select2/data/tags',[
'jquery'
], function ($) {
function Tags (decorated, $element, options) {
var tags = options.get('tags');
var createTag = options.get('createTag');
if (createTag !== undefined) {
this.createTag = createTag;
}
var insertTag = options.get('insertTag');
if (insertTag !== undefined) {
this.insertTag = insertTag;
}
decorated.call(this, $element, options);
if ($.isArray(tags)) {
for (var t = 0; t < tags.length; t++) {
var tag = tags[t];
var item = this._normalizeItem(tag);
var $option = this.option(item);
this.$element.append($option);
}
}
}
Tags.prototype.query = function (decorated, params, callback) {
var self = this;
this._removeOldTags();
if (params.term == null || params.page != null) {
decorated.call(this, params, callback);
return;
}
function wrapper (obj, child) {
var data = obj.results;
for (var i = 0; i < data.length; i++) {
var option = data[i];
var checkChildren = (
option.children != null &&
!wrapper({
results: option.children
}, true)
);
var optionText = (option.text || '').toUpperCase();
var paramsTerm = (params.term || '').toUpperCase();
var checkText = optionText === paramsTerm;
if (checkText || checkChildren) {
if (child) {
return false;
}
obj.data = data;
callback(obj);
return;
}
}
if (child) {
return true;
}
var tag = self.createTag(params);
if (tag != null) {
var $option = self.option(tag);
$option.attr('data-select2-tag', true);
self.addOptions([$option]);
self.insertTag(data, tag);
}
obj.results = data;
callback(obj);
}
decorated.call(this, params, wrapper);
};
Tags.prototype.createTag = function (decorated, params) {
var term = $.trim(params.term);
if (term === '') {
return null;
}
return {
id: term,
text: term
};
};
Tags.prototype.insertTag = function (_, data, tag) {
data.unshift(tag);
};
Tags.prototype._removeOldTags = function (_) {
var $options = this.$element.find('option[data-select2-tag]');
$options.each(function () {
if (this.selected) {
return;
}
$(this).remove();
});
};
return Tags;
});
S2.define('select2/data/tokenizer',[
'jquery'
], function ($) {
function Tokenizer (decorated, $element, options) {
var tokenizer = options.get('tokenizer');
if (tokenizer !== undefined) {
this.tokenizer = tokenizer;
}
decorated.call(this, $element, options);
}
Tokenizer.prototype.bind = function (decorated, container, $container) {
decorated.call(this, container, $container);
this.$search = container.dropdown.$search || container.selection.$search ||
$container.find('.select2-search__field');
};
Tokenizer.prototype.query = function (decorated, params, callback) {
var self = this;
function createAndSelect (data) {
// Normalize the data object so we can use it for checks
var item = self._normalizeItem(data);
// Check if the data object already exists as a tag
// Select it if it doesn't
var $existingOptions = self.$element.find('option').filter(function () {
return $(this).val() === item.id;
});
// If an existing option wasn't found for it, create the option
if (!$existingOptions.length) {
var $option = self.option(item);
$option.attr('data-select2-tag', true);
self._removeOldTags();
self.addOptions([$option]);
}
// Select the item, now that we know there is an option for it
select(item);
}
function select (data) {
self.trigger('select', {
data: data
});
}
params.term = params.term || '';
var tokenData = this.tokenizer(params, this.options, createAndSelect);
if (tokenData.term !== params.term) {
// Replace the search term if we have the search box
if (this.$search.length) {
this.$search.val(tokenData.term);
this.$search.trigger('focus');
}
params.term = tokenData.term;
}
decorated.call(this, params, callback);
};
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
var separators = options.get('tokenSeparators') || [];
var term = params.term;
var i = 0;
var createTag = this.createTag || function (params) {
return {
id: params.term,
text: params.term
};
};
while (i < term.length) {
var termChar = term[i];
if ($.inArray(termChar, separators) === -1) {
i++;
continue;
}
var part = term.substr(0, i);
var partParams = $.extend({}, params, {
term: part
});
var data = createTag(partParams);
if (data == null) {
i++;
continue;
}
callback(data);
// Reset the term to not include the tokenized portion
term = term.substr(i + 1) || '';
i = 0;
}
return {
term: term
};
};
return Tokenizer;
});
S2.define('select2/data/minimumInputLength',[
], function () {
function MinimumInputLength (decorated, $e, options) {
this.minimumInputLength = options.get('minimumInputLength');
decorated.call(this, $e, options);
}
MinimumInputLength.prototype.query = function (decorated, params, callback) {
params.term = params.term || '';
if (params.term.length < this.minimumInputLength) {
this.trigger('results:message', {
message: 'inputTooShort',
args: {
minimum: this.minimumInputLength,
input: params.term,
params: params
}
});
return;
}
decorated.call(this, params, callback);
};
return MinimumInputLength;
});
S2.define('select2/data/maximumInputLength',[
], function () {
function MaximumInputLength (decorated, $e, options) {
this.maximumInputLength = options.get('maximumInputLength');
decorated.call(this, $e, options);
}
MaximumInputLength.prototype.query = function (decorated, params, callback) {
params.term = params.term || '';
if (this.maximumInputLength > 0 &&
params.term.length > this.maximumInputLength) {
this.trigger('results:message', {
message: 'inputTooLong',
args: {
maximum: this.maximumInputLength,
input: params.term,
params: params
}
});
return;
}
decorated.call(this, params, callback);
};
return MaximumInputLength;
});
S2.define('select2/data/maximumSelectionLength',[
], function (){
function MaximumSelectionLength (decorated, $e, options) {
this.maximumSelectionLength = options.get('maximumSelectionLength');
decorated.call(this, $e, options);
}
MaximumSelectionLength.prototype.bind =
function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('select', function () {
self._checkIfMaximumSelected();
});
};
MaximumSelectionLength.prototype.query =
function (decorated, params, callback) {
var self = this;
this._checkIfMaximumSelected(function () {
decorated.call(self, params, callback);
});
};
MaximumSelectionLength.prototype._checkIfMaximumSelected =
function (_, successCallback) {
var self = this;
this.current(function (currentData) {
var count = currentData != null ? currentData.length : 0;
if (self.maximumSelectionLength > 0 &&
count >= self.maximumSelectionLength) {
self.trigger('results:message', {
message: 'maximumSelected',
args: {
maximum: self.maximumSelectionLength
}
});
return;
}
if (successCallback) {
successCallback();
}
});
};
return MaximumSelectionLength;
});
S2.define('select2/dropdown',[
'jquery',
'./utils'
], function ($, Utils) {
function Dropdown ($element, options) {
this.$element = $element;
this.options = options;
Dropdown.__super__.constructor.call(this);
}
Utils.Extend(Dropdown, Utils.Observable);
Dropdown.prototype.render = function () {
var $dropdown = $(
'<span class="select2-dropdown">' +
'<span class="select2-results"></span>' +
'</span>'
);
$dropdown.attr('dir', this.options.get('dir'));
this.$dropdown = $dropdown;
return $dropdown;
};
Dropdown.prototype.bind = function () {
// Should be implemented in subclasses
};
Dropdown.prototype.position = function ($dropdown, $container) {
// Should be implemented in subclasses
};
Dropdown.prototype.destroy = function () {
// Remove the dropdown from the DOM
this.$dropdown.remove();
};
return Dropdown;
});
S2.define('select2/dropdown/search',[
'jquery',
'../utils'
], function ($, Utils) {
function Search () { }
Search.prototype.render = function (decorated) {
var $rendered = decorated.call(this);
var $search = $(
'<span class="select2-search select2-search--dropdown">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
'</span>'
);
this.$searchContainer = $search;
this.$search = $search.find('input');
$rendered.prepend($search);
return $rendered;
};
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
decorated.call(this, container, $container);
this.$search.on('keydown', function (evt) {
self.trigger('keypress', evt);
self._keyUpPrevented = evt.isDefaultPrevented();
});
// Workaround for browsers which do not support the `input` event
// This will prevent double-triggering of events for browsers which support
// both the `keyup` and `input` events.
this.$search.on('input', function (evt) {
// Unbind the duplicated `keyup` event
$(this).off('keyup');
});
this.$search.on('keyup input', function (evt) {
self.handleSearch(evt);
});
container.on('open', function () {
self.$search.attr('tabindex', 0);
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
window.setTimeout(function () {
self.$search.trigger('focus');
}, 0);
});
container.on('close', function () {
self.$search.attr('tabindex', -1);
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.val('');
self.$search.trigger('blur');
});
container.on('focus', function () {
if (!container.isOpen()) {
self.$search.trigger('focus');
}
});
container.on('results:all', function (params) {
if (params.query.term == null || params.query.term === '') {
var showSearch = self.showSearch(params);
if (showSearch) {
self.$searchContainer.removeClass('select2-search--hide');
} else {
self.$searchContainer.addClass('select2-search--hide');
}
}
});
container.on('results:focus', function (params) {
if (params.data._resultId) {
self.$search.attr('aria-activedescendant', params.data._resultId);
} else {
self.$search.removeAttr('aria-activedescendant');
}
});
};
Search.prototype.handleSearch = function (evt) {
if (!this._keyUpPrevented) {
var input = this.$search.val();
this.trigger('query', {
term: input
});
}
this._keyUpPrevented = false;
};
Search.prototype.showSearch = function (_, params) {
return true;
};
return Search;
});
S2.define('select2/dropdown/hidePlaceholder',[
], function () {
function HidePlaceholder (decorated, $element, options, dataAdapter) {
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this, $element, options, dataAdapter);
}
HidePlaceholder.prototype.append = function (decorated, data) {
data.results = this.removePlaceholder(data.results);
decorated.call(this, data);
};
HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
if (typeof placeholder === 'string') {
placeholder = {
id: '',
text: placeholder
};
}
return placeholder;
};
HidePlaceholder.prototype.removePlaceholder = function (_, data) {
var modifiedData = data.slice(0);
for (var d = data.length - 1; d >= 0; d--) {
var item = data[d];
if (this.placeholder.id === item.id) {
modifiedData.splice(d, 1);
}
}
return modifiedData;
};
return HidePlaceholder;
});
S2.define('select2/dropdown/infiniteScroll',[
'jquery'
], function ($) {
function InfiniteScroll (decorated, $element, options, dataAdapter) {
this.lastParams = {};
decorated.call(this, $element, options, dataAdapter);
this.$loadingMore = this.createLoadingMore();
this.loading = false;
}
InfiniteScroll.prototype.append = function (decorated, data) {
this.$loadingMore.remove();
this.loading = false;
decorated.call(this, data);
if (this.showLoadingMore(data)) {
this.$results.append(this.$loadingMore);
this.loadMoreIfNeeded();
}
};
InfiniteScroll.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('query', function (params) {
self.lastParams = params;
self.loading = true;
});
container.on('query:append', function (params) {
self.lastParams = params;
self.loading = true;
});
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
};
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
var isLoadMoreVisible = $.contains(
document.documentElement,
this.$loadingMore[0]
);
if (this.loading || !isLoadMoreVisible) {
return;
}
var currentOffset = this.$results.offset().top +
this.$results.outerHeight(false);
var loadingMoreOffset = this.$loadingMore.offset().top +
this.$loadingMore.outerHeight(false);
if (currentOffset + 50 >= loadingMoreOffset) {
this.loadMore();
}
};
InfiniteScroll.prototype.loadMore = function () {
this.loading = true;
var params = $.extend({}, {page: 1}, this.lastParams);
params.page++;
this.trigger('query:append', params);
};
InfiniteScroll.prototype.showLoadingMore = function (_, data) {
return data.pagination && data.pagination.more;
};
InfiniteScroll.prototype.createLoadingMore = function () {
var $option = $(
'<li ' +
'class="select2-results__option select2-results__option--load-more"' +
'role="option" aria-disabled="true"></li>'
);
var message = this.options.get('translations').get('loadingMore');
$option.html(message(this.lastParams));
return $option;
};
return InfiniteScroll;
});
S2.define('select2/dropdown/attachBody',[
'jquery',
'../utils'
], function ($, Utils) {
function AttachBody (decorated, $element, options) {
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
decorated.call(this, $element, options);
}
AttachBody.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('open', function () {
self._showDropdown();
self._attachPositioningHandler(container);
// Must bind after the results handlers to ensure correct sizing
self._bindContainerResultHandlers(container);
});
container.on('close', function () {
self._hideDropdown();
self._detachPositioningHandler(container);
});
this.$dropdownContainer.on('mousedown', function (evt) {
evt.stopPropagation();
});
};
AttachBody.prototype.destroy = function (decorated) {
decorated.call(this);
this.$dropdownContainer.remove();
};
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
// Clone all of the container classes
$dropdown.attr('class', $container.attr('class'));
$dropdown.removeClass('select2');
$dropdown.addClass('select2-container--open');
$dropdown.css({
position: 'absolute',
top: -999999
});
this.$container = $container;
};
AttachBody.prototype.render = function (decorated) {
var $container = $('<span></span>');
var $dropdown = decorated.call(this);
$container.append($dropdown);
this.$dropdownContainer = $container;
return $container;
};
AttachBody.prototype._hideDropdown = function (decorated) {
this.$dropdownContainer.detach();
};
AttachBody.prototype._bindContainerResultHandlers =
function (decorated, container) {
// These should only be bound once
if (this._containerResultsHandlersBound) {
return;
}
var self = this;
container.on('results:all', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:message', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('select', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('unselect', function () {
self._positionDropdown();
self._resizeDropdown();
});
this._containerResultsHandlersBound = true;
};
AttachBody.prototype._attachPositioningHandler =
function (decorated, container) {
var self = this;
var scrollEvent = 'scroll.select2.' + container.id;
var resizeEvent = 'resize.select2.' + container.id;
var orientationEvent = 'orientationchange.select2.' + container.id;
var $watchers = this.$container.parents().filter(Utils.hasScroll);
$watchers.each(function () {
Utils.StoreData(this, 'select2-scroll-position', {
x: $(this).scrollLeft(),
y: $(this).scrollTop()
});
});
$watchers.on(scrollEvent, function (ev) {
var position = Utils.GetData(this, 'select2-scroll-position');
$(this).scrollTop(position.y);
});
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
function (e) {
self._positionDropdown();
self._resizeDropdown();
});
};
AttachBody.prototype._detachPositioningHandler =
function (decorated, container) {
var scrollEvent = 'scroll.select2.' + container.id;
var resizeEvent = 'resize.select2.' + container.id;
var orientationEvent = 'orientationchange.select2.' + container.id;
var $watchers = this.$container.parents().filter(Utils.hasScroll);
$watchers.off(scrollEvent);
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
};
AttachBody.prototype._positionDropdown = function () {
var $window = $(window);
var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
var newDirection = null;
var offset = this.$container.offset();
offset.bottom = offset.top + this.$container.outerHeight(false);
var container = {
height: this.$container.outerHeight(false)
};
container.top = offset.top;
container.bottom = offset.top + container.height;
var dropdown = {
height: this.$dropdown.outerHeight(false)
};
var viewport = {
top: $window.scrollTop(),
bottom: $window.scrollTop() + $window.height()
};
var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
var css = {
left: offset.left,
top: container.bottom
};
// Determine what the parent element is to use for calculating the offset
var $offsetParent = this.$dropdownParent;
// For statically positioned elements, we need to get the element
// that is determining the offset
if ($offsetParent.css('position') === 'static') {
$offsetParent = $offsetParent.offsetParent();
}
var parentOffset = {
top: 0,
left: 0
};
if (
$.contains(document.body, $offsetParent[0]) ||
$offsetParent[0].isConnected
) {
parentOffset = $offsetParent.offset();
}
css.top -= parentOffset.top;
css.left -= parentOffset.left;
if (!isCurrentlyAbove && !isCurrentlyBelow) {
newDirection = 'below';
}
if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
newDirection = 'above';
} else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
newDirection = 'below';
}
if (newDirection == 'above' ||
(isCurrentlyAbove && newDirection !== 'below')) {
css.top = container.top - parentOffset.top - dropdown.height;
}
if (newDirection != null) {
this.$dropdown
.removeClass('select2-dropdown--below select2-dropdown--above')
.addClass('select2-dropdown--' + newDirection);
this.$container
.removeClass('select2-container--below select2-container--above')
.addClass('select2-container--' + newDirection);
}
this.$dropdownContainer.css(css);
};
AttachBody.prototype._resizeDropdown = function () {
var css = {
width: this.$container.outerWidth(false) + 'px'
};
if (this.options.get('dropdownAutoWidth')) {
css.minWidth = css.width;
css.position = 'relative';
css.width = 'auto';
}
this.$dropdown.css(css);
};
AttachBody.prototype._showDropdown = function (decorated) {
this.$dropdownContainer.appendTo(this.$dropdownParent);
this._positionDropdown();
this._resizeDropdown();
};
return AttachBody;
});
S2.define('select2/dropdown/minimumResultsForSearch',[
], function () {
function countResults (data) {
var count = 0;
for (var d = 0; d < data.length; d++) {
var item = data[d];
if (item.children) {
count += countResults(item.children);
} else {
count++;
}
}
return count;
}
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
this.minimumResultsForSearch = options.get('minimumResultsForSearch');
if (this.minimumResultsForSearch < 0) {
this.minimumResultsForSearch = Infinity;
}
decorated.call(this, $element, options, dataAdapter);
}
MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
if (countResults(params.data.results) < this.minimumResultsForSearch) {
return false;
}
return decorated.call(this, params);
};
return MinimumResultsForSearch;
});
S2.define('select2/dropdown/selectOnClose',[
'../utils'
], function (Utils) {
function SelectOnClose () { }
SelectOnClose.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('close', function (params) {
self._handleSelectOnClose(params);
});
};
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
if (params && params.originalSelect2Event != null) {
var event = params.originalSelect2Event;
// Don't select an item if the close event was triggered from a select or
// unselect event
if (event._type === 'select' || event._type === 'unselect') {
return;
}
}
var $highlightedResults = this.getHighlightedResults();
// Only select highlighted results
if ($highlightedResults.length < 1) {
return;
}
var data = Utils.GetData($highlightedResults[0], 'data');
// Don't re-select already selected resulte
if (
(data.element != null && data.element.selected) ||
(data.element == null && data.selected)
) {
return;
}
this.trigger('select', {
data: data
});
};
return SelectOnClose;
});
S2.define('select2/dropdown/closeOnSelect',[
], function () {
function CloseOnSelect () { }
CloseOnSelect.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
container.on('select', function (evt) {
self._selectTriggered(evt);
});
container.on('unselect', function (evt) {
self._selectTriggered(evt);
});
};
CloseOnSelect.prototype._selectTriggered = function (_, evt) {
var originalEvent = evt.originalEvent;
// Don't close if the control key is being held
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
return;
}
this.trigger('close', {
originalEvent: originalEvent,
originalSelect2Event: evt
});
};
return CloseOnSelect;
});
S2.define('select2/i18n/en',[],function () {
// English
return {
errorLoading: function () {
return 'The results could not be loaded.';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
var message = 'Please delete ' + overChars + ' character';
if (overChars != 1) {
message += 's';
}
return message;
},
inputTooShort: function (args) {
var remainingChars = args.minimum - args.input.length;
var message = 'Please enter ' + remainingChars + ' or more characters';
return message;
},
loadingMore: function () {
return 'Loading more results…';
},
maximumSelected: function (args) {
var message = 'You can only select ' + args.maximum + ' item';
if (args.maximum != 1) {
message += 's';
}
return message;
},
noResults: function () {
return 'No results found';
},
searching: function () {
return 'Searching…';
},
removeAllItems: function () {
return 'Remove all items';
}
};
});
S2.define('select2/defaults',[
'jquery',
'require',
'./results',
'./selection/single',
'./selection/multiple',
'./selection/placeholder',
'./selection/allowClear',
'./selection/search',
'./selection/eventRelay',
'./utils',
'./translation',
'./diacritics',
'./data/select',
'./data/array',
'./data/ajax',
'./data/tags',
'./data/tokenizer',
'./data/minimumInputLength',
'./data/maximumInputLength',
'./data/maximumSelectionLength',
'./dropdown',
'./dropdown/search',
'./dropdown/hidePlaceholder',
'./dropdown/infiniteScroll',
'./dropdown/attachBody',
'./dropdown/minimumResultsForSearch',
'./dropdown/selectOnClose',
'./dropdown/closeOnSelect',
'./i18n/en'
], function ($, require,
ResultsList,
SingleSelection, MultipleSelection, Placeholder, AllowClear,
SelectionSearch, EventRelay,
Utils, Translation, DIACRITICS,
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
EnglishTranslation) {
function Defaults () {
this.reset();
}
Defaults.prototype.apply = function (options) {
options = $.extend(true, {}, this.defaults, options);
if (options.dataAdapter == null) {
if (options.ajax != null) {
options.dataAdapter = AjaxData;
} else if (options.data != null) {
options.dataAdapter = ArrayData;
} else {
options.dataAdapter = SelectData;
}
if (options.minimumInputLength > 0) {
options.dataAdapter = Utils.Decorate(
options.dataAdapter,
MinimumInputLength
);
}
if (options.maximumInputLength > 0) {
options.dataAdapter = Utils.Decorate(
options.dataAdapter,
MaximumInputLength
);
}
if (options.maximumSelectionLength > 0) {
options.dataAdapter = Utils.Decorate(
options.dataAdapter,
MaximumSelectionLength
);
}
if (options.tags) {
options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
}
if (options.tokenSeparators != null || options.tokenizer != null) {
options.dataAdapter = Utils.Decorate(
options.dataAdapter,
Tokenizer
);
}
if (options.query != null) {
var Query = require(options.amdBase + 'compat/query');
options.dataAdapter = Utils.Decorate(
options.dataAdapter,
Query
);
}
if (options.initSelection != null) {
var InitSelection = require(options.amdBase + 'compat/initSelection');
options.dataAdapter = Utils.Decorate(
options.dataAdapter,
InitSelection
);
}
}
if (options.resultsAdapter == null) {
options.resultsAdapter = ResultsList;
if (options.ajax != null) {
options.resultsAdapter = Utils.Decorate(
options.resultsAdapter,
InfiniteScroll
);
}
if (options.placeholder != null) {
options.resultsAdapter = Utils.Decorate(
options.resultsAdapter,
HidePlaceholder
);
}
if (options.selectOnClose) {
options.resultsAdapter = Utils.Decorate(
options.resultsAdapter,
SelectOnClose
);
}
}
if (options.dropdownAdapter == null) {
if (options.multiple) {
options.dropdownAdapter = Dropdown;
} else {
var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
options.dropdownAdapter = SearchableDropdown;
}
if (options.minimumResultsForSearch !== 0) {
options.dropdownAdapter = Utils.Decorate(
options.dropdownAdapter,
MinimumResultsForSearch
);
}
if (options.closeOnSelect) {
options.dropdownAdapter = Utils.Decorate(
options.dropdownAdapter,
CloseOnSelect
);
}
if (
options.dropdownCssClass != null ||
options.dropdownCss != null ||
options.adaptDropdownCssClass != null
) {
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
options.dropdownAdapter = Utils.Decorate(
options.dropdownAdapter,
DropdownCSS
);
}
options.dropdownAdapter = Utils.Decorate(
options.dropdownAdapter,
AttachBody
);
}
if (options.selectionAdapter == null) {
if (options.multiple) {
options.selectionAdapter = MultipleSelection;
} else {
options.selectionAdapter = SingleSelection;
}
// Add the placeholder mixin if a placeholder was specified
if (options.placeholder != null) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
Placeholder
);
}
if (options.allowClear) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
AllowClear
);
}
if (options.multiple) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
SelectionSearch
);
}
if (
options.containerCssClass != null ||
options.containerCss != null ||
options.adaptContainerCssClass != null
) {
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
ContainerCSS
);
}
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
EventRelay
);
}
// If the defaults were not previously applied from an element, it is
// possible for the language option to have not been resolved
options.language = this._resolveLanguage(options.language);
// Always fall back to English since it will always be complete
options.language.push('en');
var uniqueLanguages = [];
for (var l = 0; l < options.language.length; l++) {
var language = options.language[l];
if (uniqueLanguages.indexOf(language) === -1) {
uniqueLanguages.push(language);
}
}
options.language = uniqueLanguages;
options.translations = this._processTranslations(
options.language,
options.debug
);
return options;
};
Defaults.prototype.reset = function () {
function stripDiacritics (text) {
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
function match(a) {
return DIACRITICS[a] || a;
}
return text.replace(/[^\u0000-\u007E]/g, match);
}
function matcher (params, data) {
// Always return the object if there is nothing to compare
if ($.trim(params.term) === '') {
return data;
}
// Do a recursive check for options with children
if (data.children && data.children.length > 0) {
// Clone the data object if there are children
// This is required as we modify the object to remove any non-matches
var match = $.extend(true, {}, data);
// Check each child of the option
for (var c = data.children.length - 1; c >= 0; c--) {
var child = data.children[c];
var matches = matcher(params, child);
// If there wasn't a match, remove the object in the array
if (matches == null) {
match.children.splice(c, 1);
}
}
// If any children matched, return the new object
if (match.children.length > 0) {
return match;
}
// If there were no matching children, check just the plain object
return matcher(params, match);
}
var original = stripDiacritics(data.text).toUpperCase();
var term = stripDiacritics(params.term).toUpperCase();
// Check if the text contains the term
if (original.indexOf(term) > -1) {
return data;
}
// If it doesn't contain the term, don't return anything
return null;
}
this.defaults = {
amdBase: './',
amdLanguageBase: './i18n/',
closeOnSelect: true,
debug: false,
dropdownAutoWidth: false,
escapeMarkup: Utils.escapeMarkup,
language: {},
matcher: matcher,
minimumInputLength: 0,
maximumInputLength: 0,
maximumSelectionLength: 0,
minimumResultsForSearch: 0,
selectOnClose: false,
scrollAfterSelect: false,
sorter: function (data) {
return data;
},
templateResult: function (result) {
return result.text;
},
templateSelection: function (selection) {
return selection.text;
},
theme: 'default',
width: 'resolve'
};
};
Defaults.prototype.applyFromElement = function (options, $element) {
var optionLanguage = options.language;
var defaultLanguage = this.defaults.language;
var elementLanguage = $element.prop('lang');
var parentLanguage = $element.closest('[lang]').prop('lang');
var languages = Array.prototype.concat.call(
this._resolveLanguage(elementLanguage),
this._resolveLanguage(optionLanguage),
this._resolveLanguage(defaultLanguage),
this._resolveLanguage(parentLanguage)
);
options.language = languages;
return options;
};
Defaults.prototype._resolveLanguage = function (language) {
if (!language) {
return [];
}
if ($.isEmptyObject(language)) {
return [];
}
if ($.isPlainObject(language)) {
return [language];
}
var languages;
if (!$.isArray(language)) {
languages = [language];
} else {
languages = language;
}
var resolvedLanguages = [];
for (var l = 0; l < languages.length; l++) {
resolvedLanguages.push(languages[l]);
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
// Extract the region information if it is included
var languageParts = languages[l].split('-');
var baseLanguage = languageParts[0];
resolvedLanguages.push(baseLanguage);
}
}
return resolvedLanguages;
};
Defaults.prototype._processTranslations = function (languages, debug) {
var translations = new Translation();
for (var l = 0; l < languages.length; l++) {
var languageData = new Translation();
var language = languages[l];
if (typeof language === 'string') {
try {
// Try to load it with the original name
languageData = Translation.loadPath(language);
} catch (e) {
try {
// If we couldn't load it, check if it wasn't the full path
language = this.defaults.amdLanguageBase + language;
languageData = Translation.loadPath(language);
} catch (ex) {
// The translation could not be loaded at all. Sometimes this is
// because of a configuration problem, other times this can be
// because of how Select2 helps load all possible translation files
if (debug && window.console && console.warn) {
console.warn(
'Select2: The language file for "' + language + '" could ' +
'not be automatically loaded. A fallback will be used instead.'
);
}
}
}
} else if ($.isPlainObject(language)) {
languageData = new Translation(language);
} else {
languageData = language;
}
translations.extend(languageData);
}
return translations;
};
Defaults.prototype.set = function (key, value) {
var camelKey = $.camelCase(key);
var data = {};
data[camelKey] = value;
var convertedData = Utils._convertData(data);
$.extend(true, this.defaults, convertedData);
};
var defaults = new Defaults();
return defaults;
});
S2.define('select2/options',[
'require',
'jquery',
'./defaults',
'./utils'
], function (require, $, Defaults, Utils) {
function Options (options, $element) {
this.options = options;
if ($element != null) {
this.fromElement($element);
}
if ($element != null) {
this.options = Defaults.applyFromElement(this.options, $element);
}
this.options = Defaults.apply(this.options);
if ($element && $element.is('input')) {
var InputCompat = require(this.get('amdBase') + 'compat/inputData');
this.options.dataAdapter = Utils.Decorate(
this.options.dataAdapter,
InputCompat
);
}
}
Options.prototype.fromElement = function ($e) {
var excludedData = ['select2'];
if (this.options.multiple == null) {
this.options.multiple = $e.prop('multiple');
}
if (this.options.disabled == null) {
this.options.disabled = $e.prop('disabled');
}
if (this.options.dir == null) {
if ($e.prop('dir')) {
this.options.dir = $e.prop('dir');
} else if ($e.closest('[dir]').prop('dir')) {
this.options.dir = $e.closest('[dir]').prop('dir');
} else {
this.options.dir = 'ltr';
}
}
$e.prop('disabled', this.options.disabled);
$e.prop('multiple', this.options.multiple);
if (Utils.GetData($e[0], 'select2Tags')) {
if (this.options.debug && window.console && console.warn) {
console.warn(
'Select2: The `data-select2-tags` attribute has been changed to ' +
'use the `data-data` and `data-tags="true"` attributes and will be ' +
'removed in future versions of Select2.'
);
}
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
Utils.StoreData($e[0], 'tags', true);
}
if (Utils.GetData($e[0], 'ajaxUrl')) {
if (this.options.debug && window.console && console.warn) {
console.warn(
'Select2: The `data-ajax-url` attribute has been changed to ' +
'`data-ajax--url` and support for the old attribute will be removed' +
' in future versions of Select2.'
);
}
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
}
var dataset = {};
function upperCaseLetter(_, letter) {
return letter.toUpperCase();
}
// Pre-load all of the attributes which are prefixed with `data-`
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
var attributeName = $e[0].attributes[attr].name;
var prefix = 'data-';
if (attributeName.substr(0, prefix.length) == prefix) {
// Get the contents of the attribute after `data-`
var dataName = attributeName.substring(prefix.length);
// Get the data contents from the consistent source
// This is more than likely the jQuery data helper
var dataValue = Utils.GetData($e[0], dataName);
// camelCase the attribute name to match the spec
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
// Store the data attribute contents into the dataset since
dataset[camelDataName] = dataValue;
}
}
// Prefer the element's `dataset` attribute if it exists
// jQuery 1.x does not correctly handle data attributes with multiple dashes
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
dataset = $.extend(true, {}, $e[0].dataset, dataset);
}
// Prefer our internal data cache if it exists
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
data = Utils._convertData(data);
for (var key in data) {
if ($.inArray(key, excludedData) > -1) {
continue;
}
if ($.isPlainObject(this.options[key])) {
$.extend(this.options[key], data[key]);
} else {
this.options[key] = data[key];
}
}
return this;
};
Options.prototype.get = function (key) {
return this.options[key];
};
Options.prototype.set = function (key, val) {
this.options[key] = val;
};
return Options;
});
S2.define('select2/core',[
'jquery',
'./options',
'./utils',
'./keys'
], function ($, Options, Utils, KEYS) {
var Select2 = function ($element, options) {
if (Utils.GetData($element[0], 'select2') != null) {
Utils.GetData($element[0], 'select2').destroy();
}
this.$element = $element;
this.id = this._generateId($element);
options = options || {};
this.options = new Options(options, $element);
Select2.__super__.constructor.call(this);
// Set up the tabindex
var tabindex = $element.attr('tabindex') || 0;
Utils.StoreData($element[0], 'old-tabindex', tabindex);
$element.attr('tabindex', '-1');
// Set up containers and adapters
var DataAdapter = this.options.get('dataAdapter');
this.dataAdapter = new DataAdapter($element, this.options);
var $container = this.render();
this._placeContainer($container);
var SelectionAdapter = this.options.get('selectionAdapter');
this.selection = new SelectionAdapter($element, this.options);
this.$selection = this.selection.render();
this.selection.position(this.$selection, $container);
var DropdownAdapter = this.options.get('dropdownAdapter');
this.dropdown = new DropdownAdapter($element, this.options);
this.$dropdown = this.dropdown.render();
this.dropdown.position(this.$dropdown, $container);
var ResultsAdapter = this.options.get('resultsAdapter');
this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
this.$results = this.results.render();
this.results.position(this.$results, this.$dropdown);
// Bind events
var self = this;
// Bind the container to all of the adapters
this._bindAdapters();
// Register any DOM event handlers
this._registerDomEvents();
// Register any internal event handlers
this._registerDataEvents();
this._registerSelectionEvents();
this._registerDropdownEvents();
this._registerResultsEvents();
this._registerEvents();
// Set the initial state
this.dataAdapter.current(function (initialData) {
self.trigger('selection:update', {
data: initialData
});
});
// Hide the original select
$element.addClass('select2-hidden-accessible');
$element.attr('aria-hidden', 'true');
// Synchronize any monitored attributes
this._syncAttributes();
Utils.StoreData($element[0], 'select2', this);
// Ensure backwards compatibility with $element.data('select2').
$element.data('select2', this);
};
Utils.Extend(Select2, Utils.Observable);
Select2.prototype._generateId = function ($element) {
var id = '';
if ($element.attr('id') != null) {
id = $element.attr('id');
} else if ($element.attr('name') != null) {
id = $element.attr('name') + '-' + Utils.generateChars(2);
} else {
id = Utils.generateChars(4);
}
id = id.replace(/(:|\.|\[|\]|,)/g, '');
id = 'select2-' + id;
return id;
};
Select2.prototype._placeContainer = function ($container) {
$container.insertAfter(this.$element);
var width = this._resolveWidth(this.$element, this.options.get('width'));
if (width != null) {
$container.css('width', width);
}
};
Select2.prototype._resolveWidth = function ($element, method) {
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
if (method == 'resolve') {
var styleWidth = this._resolveWidth($element, 'style');
if (styleWidth != null) {
return styleWidth;
}
return this._resolveWidth($element, 'element');
}
if (method == 'element') {
var elementWidth = $element.outerWidth(false);
if (elementWidth <= 0) {
return 'auto';
}
return elementWidth + 'px';
}
if (method == 'style') {
var style = $element.attr('style');
if (typeof(style) !== 'string') {
return null;
}
var attrs = style.split(';');
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
var attr = attrs[i].replace(/\s/g, '');
var matches = attr.match(WIDTH);
if (matches !== null && matches.length >= 1) {
return matches[1];
}
}
return null;
}
if (method == 'computedstyle') {
var computedStyle = window.getComputedStyle($element[0]);
return computedStyle.width;
}
return method;
};
Select2.prototype._bindAdapters = function () {
this.dataAdapter.bind(this, this.$container);
this.selection.bind(this, this.$container);
this.dropdown.bind(this, this.$container);
this.results.bind(this, this.$container);
};
Select2.prototype._registerDomEvents = function () {
var self = this;
this.$element.on('change.select2', function () {
self.dataAdapter.current(function (data) {
self.trigger('selection:update', {
data: data
});
});
});
this.$element.on('focus.select2', function (evt) {
self.trigger('focus', evt);
});
this._syncA = Utils.bind(this._syncAttributes, this);
this._syncS = Utils.bind(this._syncSubtree, this);
if (this.$element[0].attachEvent) {
this.$element[0].attachEvent('onpropertychange', this._syncA);
}
var observer = window.MutationObserver ||
window.WebKitMutationObserver ||
window.MozMutationObserver
;
if (observer != null) {
this._observer = new observer(function (mutations) {
self._syncA();
self._syncS(null, mutations);
});
this._observer.observe(this.$element[0], {
attributes: true,
childList: true,
subtree: false
});
} else if (this.$element[0].addEventListener) {
this.$element[0].addEventListener(
'DOMAttrModified',
self._syncA,
false
);
this.$element[0].addEventListener(
'DOMNodeInserted',
self._syncS,
false
);
this.$element[0].addEventListener(
'DOMNodeRemoved',
self._syncS,
false
);
}
};
Select2.prototype._registerDataEvents = function () {
var self = this;
this.dataAdapter.on('*', function (name, params) {
self.trigger(name, params);
});
};
Select2.prototype._registerSelectionEvents = function () {
var self = this;
var nonRelayEvents = ['toggle', 'focus'];
this.selection.on('toggle', function () {
self.toggleDropdown();
});
this.selection.on('focus', function (params) {
self.focus(params);
});
this.selection.on('*', function (name, params) {
if ($.inArray(name, nonRelayEvents) !== -1) {
return;
}
self.trigger(name, params);
});
};
Select2.prototype._registerDropdownEvents = function () {
var self = this;
this.dropdown.on('*', function (name, params) {
self.trigger(name, params);
});
};
Select2.prototype._registerResultsEvents = function () {
var self = this;
this.results.on('*', function (name, params) {
self.trigger(name, params);
});
};
Select2.prototype._registerEvents = function () {
var self = this;
this.on('open', function () {
self.$container.addClass('select2-container--open');
});
this.on('close', function () {
self.$container.removeClass('select2-container--open');
});
this.on('enable', function () {
self.$container.removeClass('select2-container--disabled');
});
this.on('disable', function () {
self.$container.addClass('select2-container--disabled');
});
this.on('blur', function () {
self.$container.removeClass('select2-container--focus');
});
this.on('query', function (params) {
if (!self.isOpen()) {
self.trigger('open', {});
}
this.dataAdapter.query(params, function (data) {
self.trigger('results:all', {
data: data,
query: params
});
});
});
this.on('query:append', function (params) {
this.dataAdapter.query(params, function (data) {
self.trigger('results:append', {
data: data,
query: params
});
});
});
this.on('keypress', function (evt) {
var key = evt.which;
if (self.isOpen()) {
if (key === KEYS.ESC || key === KEYS.TAB ||
(key === KEYS.UP && evt.altKey)) {
self.close(evt);
evt.preventDefault();
} else if (key === KEYS.ENTER) {
self.trigger('results:select', {});
evt.preventDefault();
} else if ((key === KEYS.SPACE && evt.ctrlKey)) {
self.trigger('results:toggle', {});
evt.preventDefault();
} else if (key === KEYS.UP) {
self.trigger('results:previous', {});
evt.preventDefault();
} else if (key === KEYS.DOWN) {
self.trigger('results:next', {});
evt.preventDefault();
}
} else {
if (key === KEYS.ENTER || key === KEYS.SPACE ||
(key === KEYS.DOWN && evt.altKey)) {
self.open();
evt.preventDefault();
}
}
});
};
Select2.prototype._syncAttributes = function () {
this.options.set('disabled', this.$element.prop('disabled'));
if (this.isDisabled()) {
if (this.isOpen()) {
this.close();
}
this.trigger('disable', {});
} else {
this.trigger('enable', {});
}
};
Select2.prototype._isChangeMutation = function (evt, mutations) {
var changed = false;
var self = this;
// Ignore any mutation events raised for elements that aren't options or
// optgroups. This handles the case when the select element is destroyed
if (
evt && evt.target && (
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
)
) {
return;
}
if (!mutations) {
// If mutation events aren't supported, then we can only assume that the
// change affected the selections
changed = true;
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
for (var n = 0; n < mutations.addedNodes.length; n++) {
var node = mutations.addedNodes[n];
if (node.selected) {
changed = true;
}
}
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
changed = true;
} else if ($.isArray(mutations)) {
$.each(mutations, function(evt, mutation) {
if (self._isChangeMutation(evt, mutation)) {
// We've found a change mutation.
// Let's escape from the loop and continue
changed = true;
return false;
}
});
}
return changed;
};
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = this._isChangeMutation(evt, mutations);
var self = this;
// Only re-pull the data if we think there is a change
if (changed) {
this.dataAdapter.current(function (currentData) {
self.trigger('selection:update', {
data: currentData
});
});
}
};
/**
* Override the trigger method to automatically trigger pre-events when
* there are events that can be prevented.
*/
Select2.prototype.trigger = function (name, args) {
var actualTrigger = Select2.__super__.trigger;
var preTriggerMap = {
'open': 'opening',
'close': 'closing',
'select': 'selecting',
'unselect': 'unselecting',
'clear': 'clearing'
};
if (args === undefined) {
args = {};
}
if (name in preTriggerMap) {
var preTriggerName = preTriggerMap[name];
var preTriggerArgs = {
prevented: false,
name: name,
args: args
};
actualTrigger.call(this, preTriggerName, preTriggerArgs);
if (preTriggerArgs.prevented) {
args.prevented = true;
return;
}
}
actualTrigger.call(this, name, args);
};
Select2.prototype.toggleDropdown = function () {
if (this.isDisabled()) {
return;
}
if (this.isOpen()) {
this.close();
} else {
this.open();
}
};
Select2.prototype.open = function () {
if (this.isOpen()) {
return;
}
if (this.isDisabled()) {
return;
}
this.trigger('query', {});
};
Select2.prototype.close = function (evt) {
if (!this.isOpen()) {
return;
}
this.trigger('close', { originalEvent : evt });
};
/**
* Helper method to abstract the "enabled" (not "disabled") state of this
* object.
*
* @return {true} if the instance is not disabled.
* @return {false} if the instance is disabled.
*/
Select2.prototype.isEnabled = function () {
return !this.isDisabled();
};
/**
* Helper method to abstract the "disabled" state of this object.
*
* @return {true} if the disabled option is true.
* @return {false} if the disabled option is false.
*/
Select2.prototype.isDisabled = function () {
return this.options.get('disabled');
};
Select2.prototype.isOpen = function () {
return this.$container.hasClass('select2-container--open');
};
Select2.prototype.hasFocus = function () {
return this.$container.hasClass('select2-container--focus');
};
Select2.prototype.focus = function (data) {
// No need to re-trigger focus events if we are already focused
if (this.hasFocus()) {
return;
}
this.$container.addClass('select2-container--focus');
this.trigger('focus', {});
};
Select2.prototype.enable = function (args) {
if (this.options.get('debug') && window.console && console.warn) {
console.warn(
'Select2: The `select2("enable")` method has been deprecated and will' +
' be removed in later Select2 versions. Use $element.prop("disabled")' +
' instead.'
);
}
if (args == null || args.length === 0) {
args = [true];
}
var disabled = !args[0];
this.$element.prop('disabled', disabled);
};
Select2.prototype.data = function () {
if (this.options.get('debug') &&
arguments.length > 0 && window.console && console.warn) {
console.warn(
'Select2: Data can no longer be set using `select2("data")`. You ' +
'should consider setting the value instead using `$element.val()`.'
);
}
var data = [];
this.dataAdapter.current(function (currentData) {
data = currentData;
});
return data;
};
Select2.prototype.val = function (args) {
if (this.options.get('debug') && window.console && console.warn) {
console.warn(
'Select2: The `select2("val")` method has been deprecated and will be' +
' removed in later Select2 versions. Use $element.val() instead.'
);
}
if (args == null || args.length === 0) {
return this.$element.val();
}
var newVal = args[0];
if ($.isArray(newVal)) {
newVal = $.map(newVal, function (obj) {
return obj.toString();
});
}
this.$element.val(newVal).trigger('input').trigger('change');
};
Select2.prototype.destroy = function () {
this.$container.remove();
if (this.$element[0].detachEvent) {
this.$element[0].detachEvent('onpropertychange', this._syncA);
}
if (this._observer != null) {
this._observer.disconnect();
this._observer = null;
} else if (this.$element[0].removeEventListener) {
this.$element[0]
.removeEventListener('DOMAttrModified', this._syncA, false);
this.$element[0]
.removeEventListener('DOMNodeInserted', this._syncS, false);
this.$element[0]
.removeEventListener('DOMNodeRemoved', this._syncS, false);
}
this._syncA = null;
this._syncS = null;
this.$element.off('.select2');
this.$element.attr('tabindex',
Utils.GetData(this.$element[0], 'old-tabindex'));
this.$element.removeClass('select2-hidden-accessible');
this.$element.attr('aria-hidden', 'false');
Utils.RemoveData(this.$element[0]);
this.$element.removeData('select2');
this.dataAdapter.destroy();
this.selection.destroy();
this.dropdown.destroy();
this.results.destroy();
this.dataAdapter = null;
this.selection = null;
this.dropdown = null;
this.results = null;
};
Select2.prototype.render = function () {
var $container = $(
'<span class="select2 select2-container">' +
'<span class="selection"></span>' +
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
'</span>'
);
$container.attr('dir', this.options.get('dir'));
this.$container = $container;
this.$container.addClass('select2-container--' + this.options.get('theme'));
Utils.StoreData($container[0], 'element', this.$element);
return $container;
};
return Select2;
});
S2.define('select2/compat/utils',[
'jquery'
], function ($) {
function syncCssClasses ($dest, $src, adapter) {
var classes, replacements = [], adapted;
classes = $.trim($dest.attr('class'));
if (classes) {
classes = '' + classes; // for IE which returns object
$(classes.split(/\s+/)).each(function () {
// Save all Select2 classes
if (this.indexOf('select2-') === 0) {
replacements.push(this);
}
});
}
classes = $.trim($src.attr('class'));
if (classes) {
classes = '' + classes; // for IE which returns object
$(classes.split(/\s+/)).each(function () {
// Only adapt non-Select2 classes
if (this.indexOf('select2-') !== 0) {
adapted = adapter(this);
if (adapted != null) {
replacements.push(adapted);
}
}
});
}
$dest.attr('class', replacements.join(' '));
}
return {
syncCssClasses: syncCssClasses
};
});
S2.define('select2/compat/containerCss',[
'jquery',
'./utils'
], function ($, CompatUtils) {
// No-op CSS adapter that discards all classes by default
function _containerAdapter (clazz) {
return null;
}
function ContainerCSS () { }
ContainerCSS.prototype.render = function (decorated) {
var $container = decorated.call(this);
var containerCssClass = this.options.get('containerCssClass') || '';
if ($.isFunction(containerCssClass)) {
containerCssClass = containerCssClass(this.$element);
}
var containerCssAdapter = this.options.get('adaptContainerCssClass');
containerCssAdapter = containerCssAdapter || _containerAdapter;
if (containerCssClass.indexOf(':all:') !== -1) {
containerCssClass = containerCssClass.replace(':all:', '');
var _cssAdapter = containerCssAdapter;
containerCssAdapter = function (clazz) {
var adapted = _cssAdapter(clazz);
if (adapted != null) {
// Append the old one along with the adapted one
return adapted + ' ' + clazz;
}
return clazz;
};
}
var containerCss = this.options.get('containerCss') || {};
if ($.isFunction(containerCss)) {
containerCss = containerCss(this.$element);
}
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
$container.css(containerCss);
$container.addClass(containerCssClass);
return $container;
};
return ContainerCSS;
});
S2.define('select2/compat/dropdownCss',[
'jquery',
'./utils'
], function ($, CompatUtils) {
// No-op CSS adapter that discards all classes by default
function _dropdownAdapter (clazz) {
return null;
}
function DropdownCSS () { }
DropdownCSS.prototype.render = function (decorated) {
var $dropdown = decorated.call(this);
var dropdownCssClass = this.options.get('dropdownCssClass') || '';
if ($.isFunction(dropdownCssClass)) {
dropdownCssClass = dropdownCssClass(this.$element);
}
var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
if (dropdownCssClass.indexOf(':all:') !== -1) {
dropdownCssClass = dropdownCssClass.replace(':all:', '');
var _cssAdapter = dropdownCssAdapter;
dropdownCssAdapter = function (clazz) {
var adapted = _cssAdapter(clazz);
if (adapted != null) {
// Append the old one along with the adapted one
return adapted + ' ' + clazz;
}
return clazz;
};
}
var dropdownCss = this.options.get('dropdownCss') || {};
if ($.isFunction(dropdownCss)) {
dropdownCss = dropdownCss(this.$element);
}
CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
$dropdown.css(dropdownCss);
$dropdown.addClass(dropdownCssClass);
return $dropdown;
};
return DropdownCSS;
});
S2.define('select2/compat/initSelection',[
'jquery'
], function ($) {
function InitSelection (decorated, $element, options) {
if (options.get('debug') && window.console && console.warn) {
console.warn(
'Select2: The `initSelection` option has been deprecated in favor' +
' of a custom data adapter that overrides the `current` method. ' +
'This method is now called multiple times instead of a single ' +
'time when the instance is initialized. Support will be removed ' +
'for the `initSelection` option in future versions of Select2'
);
}
this.initSelection = options.get('initSelection');
this._isInitialized = false;
decorated.call(this, $element, options);
}
InitSelection.prototype.current = function (decorated, callback) {
var self = this;
if (this._isInitialized) {
decorated.call(this, callback);
return;
}
this.initSelection.call(null, this.$element, function (data) {
self._isInitialized = true;
if (!$.isArray(data)) {
data = [data];
}
callback(data);
});
};
return InitSelection;
});
S2.define('select2/compat/inputData',[
'jquery',
'../utils'
], function ($, Utils) {
function InputData (decorated, $element, options) {
this._currentData = [];
this._valueSeparator = options.get('valueSeparator') || ',';
if ($element.prop('type') === 'hidden') {
if (options.get('debug') && console && console.warn) {
console.warn(
'Select2: Using a hidden input with Select2 is no longer ' +
'supported and may stop working in the future. It is recommended ' +
'to use a `<select>` element instead.'
);
}
}
decorated.call(this, $element, options);
}
InputData.prototype.current = function (_, callback) {
function getSelected (data, selectedIds) {
var selected = [];
if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
data.selected = true;
selected.push(data);
} else {
data.selected = false;
}
if (data.children) {
selected.push.apply(selected, getSelected(data.children, selectedIds));
}
return selected;
}
var selected = [];
for (var d = 0; d < this._currentData.length; d++) {
var data = this._currentData[d];
selected.push.apply(
selected,
getSelected(
data,
this.$element.val().split(
this._valueSeparator
)
)
);
}
callback(selected);
};
InputData.prototype.select = function (_, data) {
if (!this.options.get('multiple')) {
this.current(function (allData) {
$.map(allData, function (data) {
data.selected = false;
});
});
this.$element.val(data.id);
this.$element.trigger('input').trigger('change');
} else {
var value = this.$element.val();
value += this._valueSeparator + data.id;
this.$element.val(value);
this.$element.trigger('input').trigger('change');
}
};
InputData.prototype.unselect = function (_, data) {
var self = this;
data.selected = false;
this.current(function (allData) {
var values = [];
for (var d = 0; d < allData.length; d++) {
var item = allData[d];
if (data.id == item.id) {
continue;
}
values.push(item.id);
}
self.$element.val(values.join(self._valueSeparator));
self.$element.trigger('input').trigger('change');
});
};
InputData.prototype.query = function (_, params, callback) {
var results = [];
for (var d = 0; d < this._currentData.length; d++) {
var data = this._currentData[d];
var matches = this.matches(params, data);
if (matches !== null) {
results.push(matches);
}
}
callback({
results: results
});
};
InputData.prototype.addOptions = function (_, $options) {
var options = $.map($options, function ($option) {
return Utils.GetData($option[0], 'data');
});
this._currentData.push.apply(this._currentData, options);
};
return InputData;
});
S2.define('select2/compat/matcher',[
'jquery'
], function ($) {
function oldMatcher (matcher) {
function wrappedMatcher (params, data) {
var match = $.extend(true, {}, data);
if (params.term == null || $.trim(params.term) === '') {
return match;
}
if (data.children) {
for (var c = data.children.length - 1; c >= 0; c--) {
var child = data.children[c];
// Check if the child object matches
// The old matcher returned a boolean true or false
var doesMatch = matcher(params.term, child.text, child);
// If the child didn't match, pop it off
if (!doesMatch) {
match.children.splice(c, 1);
}
}
if (match.children.length > 0) {
return match;
}
}
if (matcher(params.term, data.text, data)) {
return match;
}
return null;
}
return wrappedMatcher;
}
return oldMatcher;
});
S2.define('select2/compat/query',[
], function () {
function Query (decorated, $element, options) {
if (options.get('debug') && window.console && console.warn) {
console.warn(
'Select2: The `query` option has been deprecated in favor of a ' +
'custom data adapter that overrides the `query` method. Support ' +
'will be removed for the `query` option in future versions of ' +
'Select2.'
);
}
decorated.call(this, $element, options);
}
Query.prototype.query = function (_, params, callback) {
params.callback = callback;
var query = this.options.get('query');
query.call(null, params);
};
return Query;
});
S2.define('select2/dropdown/attachContainer',[
], function () {
function AttachContainer (decorated, $element, options) {
decorated.call(this, $element, options);
}
AttachContainer.prototype.position =
function (decorated, $dropdown, $container) {
var $dropdownContainer = $container.find('.dropdown-wrapper');
$dropdownContainer.append($dropdown);
$dropdown.addClass('select2-dropdown--below');
$container.addClass('select2-container--below');
};
return AttachContainer;
});
S2.define('select2/dropdown/stopPropagation',[
], function () {
function StopPropagation () { }
StopPropagation.prototype.bind = function (decorated, container, $container) {
decorated.call(this, container, $container);
var stoppedEvents = [
'blur',
'change',
'click',
'dblclick',
'focus',
'focusin',
'focusout',
'input',
'keydown',
'keyup',
'keypress',
'mousedown',
'mouseenter',
'mouseleave',
'mousemove',
'mouseover',
'mouseup',
'search',
'touchend',
'touchstart'
];
this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
evt.stopPropagation();
});
};
return StopPropagation;
});
S2.define('select2/selection/stopPropagation',[
], function () {
function StopPropagation () { }
StopPropagation.prototype.bind = function (decorated, container, $container) {
decorated.call(this, container, $container);
var stoppedEvents = [
'blur',
'change',
'click',
'dblclick',
'focus',
'focusin',
'focusout',
'input',
'keydown',
'keyup',
'keypress',
'mousedown',
'mouseenter',
'mouseleave',
'mousemove',
'mouseover',
'mouseup',
'search',
'touchend',
'touchstart'
];
this.$selection.on(stoppedEvents.join(' '), function (evt) {
evt.stopPropagation();
});
};
return StopPropagation;
});
/*!
* jQuery Mousewheel 3.1.13
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*/
(function (factory) {
if ( typeof S2.define === 'function' && S2.define.amd ) {
// AMD. Register as an anonymous module.
S2.define('jquery-mousewheel',['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS style for Browserify
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
slice = Array.prototype.slice,
nullLowestDeltaTimeout, lowestDelta;
if ( $.event.fixHooks ) {
for ( var i = toFix.length; i; ) {
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
}
}
var special = $.event.special.mousewheel = {
version: '3.1.12',
setup: function() {
if ( this.addEventListener ) {
for ( var i = toBind.length; i; ) {
this.addEventListener( toBind[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
// Store the line height and page height for this particular element
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i = toBind.length; i; ) {
this.removeEventListener( toBind[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
// Clean up the data we added to the element
$.removeData(this, 'mousewheel-line-height');
$.removeData(this, 'mousewheel-page-height');
},
getLineHeight: function(elem) {
var $elem = $(elem),
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
if (!$parent.length) {
$parent = $('body');
}
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
},
getPageHeight: function(elem) {
return $(elem).height();
},
settings: {
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
normalizeOffset: true // calls getBoundingClientRect for each event
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
},
unmousewheel: function(fn) {
return this.unbind('mousewheel', fn);
}
});
function handler(event) {
var orgEvent = event || window.event,
args = slice.call(arguments, 1),
delta = 0,
deltaX = 0,
deltaY = 0,
absDelta = 0,
offsetX = 0,
offsetY = 0;
event = $.event.fix(orgEvent);
event.type = 'mousewheel';
// Old school scrollwheel delta
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaX = deltaY * -1;
deltaY = 0;
}
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
delta = deltaY === 0 ? deltaX : deltaY;
// New school wheel delta (wheel event)
if ( 'deltaY' in orgEvent ) {
deltaY = orgEvent.deltaY * -1;
delta = deltaY;
}
if ( 'deltaX' in orgEvent ) {
deltaX = orgEvent.deltaX;
if ( deltaY === 0 ) { delta = deltaX * -1; }
}
// No change actually happened, no reason to go any further
if ( deltaY === 0 && deltaX === 0 ) { return; }
// Need to convert lines and pages to pixels if we aren't already in pixels
// There are three delta modes:
// * deltaMode 0 is by pixels, nothing to do
// * deltaMode 1 is by lines
// * deltaMode 2 is by pages
if ( orgEvent.deltaMode === 1 ) {
var lineHeight = $.data(this, 'mousewheel-line-height');
delta *= lineHeight;
deltaY *= lineHeight;
deltaX *= lineHeight;
} else if ( orgEvent.deltaMode === 2 ) {
var pageHeight = $.data(this, 'mousewheel-page-height');
delta *= pageHeight;
deltaY *= pageHeight;
deltaX *= pageHeight;
}
// Store lowest absolute delta to normalize the delta values
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
if ( !lowestDelta || absDelta < lowestDelta ) {
lowestDelta = absDelta;
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
lowestDelta /= 40;
}
}
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
// Divide all the things by 40!
delta /= 40;
deltaX /= 40;
deltaY /= 40;
}
// Get a whole, normalized value for the deltas
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
// Normalise offsetX and offsetY properties
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
var boundingRect = this.getBoundingClientRect();
offsetX = event.clientX - boundingRect.left;
offsetY = event.clientY - boundingRect.top;
}
// Add information to the event object
event.deltaX = deltaX;
event.deltaY = deltaY;
event.deltaFactor = lowestDelta;
event.offsetX = offsetX;
event.offsetY = offsetY;
// Go ahead and set deltaMode to 0 since we converted to pixels
// Although this is a little odd since we overwrite the deltaX/Y
// properties with normalized deltas.
event.deltaMode = 0;
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
// Clearout lowestDelta after sometime to better
// handle multiple device types that give different
// a different lowestDelta
// Ex: trackpad = 3 and mouse wheel = 120
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
return ($.event.dispatch || $.event.handle).apply(this, args);
}
function nullLowestDelta() {
lowestDelta = null;
}
function shouldAdjustOldDeltas(orgEvent, absDelta) {
// If this is an older event and the delta is divisable by 120,
// then we are assuming that the browser is treating this as an
// older mouse wheel event and that we should divide the deltas
// by 40 to try and get a more usable deltaFactor.
// Side note, this actually impacts the reported scroll distance
// in older browsers and can cause scrolling to be slower than native.
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
}
}));
S2.define('jquery.select2',[
'jquery',
'jquery-mousewheel',
'./select2/core',
'./select2/defaults',
'./select2/utils'
], function ($, _, Select2, Defaults, Utils) {
if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];
$.fn.select2 = function (options) {
options = options || {};
if (typeof options === 'object') {
this.each(function () {
var instanceOptions = $.extend(true, {}, options);
var instance = new Select2($(this), instanceOptions);
});
return this;
} else if (typeof options === 'string') {
var ret;
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = Utils.GetData(this, 'select2');
if (instance == null && window.console && console.error) {
console.error(
'The select2(\'' + options + '\') method was called on an ' +
'element that is not using Select2.'
);
}
ret = instance[options].apply(instance, args);
});
// Check if we should be returning `this`
if ($.inArray(options, thisMethods) > -1) {
return this;
}
return ret;
} else {
throw new Error('Invalid arguments for Select2: ' + options);
}
};
}
if ($.fn.select2.defaults == null) {
$.fn.select2.defaults = Defaults;
}
return Select2;
});
// Return the AMD loader configuration so it can be used outside of this file
return {
define: S2.define,
require: S2.require
};
}());
// Autoload the jQuery bindings
// We know that all of the modules exist above this, so we're safe
var select2 = S2.require('jquery.select2');
// Hold the AMD module references on the jQuery function that was just loaded
// This allows Select2 to use the internal loader outside of this file, such
// as in the language files.
jQuery.fn.select2.amd = S2;
// Return the Select2 instance for anyone who is importing it.
return select2;
}));
| castiel248/Convert | Lib/site-packages/django/contrib/admin/static/admin/js/vendor/select2/select2.full.js | JavaScript | mit | 173,566 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% translate 'Page not found' %}{% endblock %}
{% block content %}
<h2>{% translate 'Page not found' %}</h2>
<p>{% translate 'We’re sorry, but the requested page could not be found.' %}</p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/404.html | HTML | mit | 282 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Server error' %}
</div>
{% endblock %}
{% block title %}{% translate 'Server error (500)' %}{% endblock %}
{% block content %}
<h1>{% translate 'Server Error <em>(500)</em>' %}</h1>
<p>{% translate 'There’s been an error. It’s been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.' %}</p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/500.html | HTML | mit | 551 |
{% load i18n %}
<div class="actions">
{% block actions %}
{% block actions-form %}
{% for field in action_form %}{% if field.label %}<label>{{ field.label }} {{ field }}</label>{% else %}{{ field }}{% endif %}{% endfor %}
{% endblock %}
{% block actions-submit %}
<button type="submit" class="button" title="{% translate "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% translate "Go" %}</button>
{% endblock %}
{% block actions-counter %}
{% if actions_selection_counter %}
<span class="action-counter" data-actions-icnt="{{ cl.result_list|length }}">{{ selection_note }}</span>
{% if cl.result_count != cl.result_list|length %}
<span class="all hidden">{{ selection_note_all }}</span>
<span class="question hidden">
<a href="#" title="{% translate "Click here to select the objects across all pages" %}">{% blocktranslate with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktranslate %}</a>
</span>
<span class="clear hidden"><a href="#">{% translate "Clear selection" %}</a></span>
{% endif %}
{% endif %}
{% endblock %}
{% endblock %}
</div>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/actions.html | HTML | mit | 1,235 |
{% extends "admin/index.html" %}
{% load i18n %}
{% block bodyclass %}{{ block.super }} app-{{ app_label }}{% endblock %}
{% if not is_popup %}
{% block nav-breadcrumbs %}
<nav aria-label="{% translate 'Breadcrumbs' %}">
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
›
{% for app in app_list %}
{{ app.name }}
{% endfor %}
</div>
</nav>
{% endblock %}
{% endif %}
{% block sidebar %}{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/app_index.html | HTML | mit | 493 |
{% load i18n %}
{% if app_list %}
{% for app in app_list %}
<div class="app-{{ app.app_label }} module{% if app.app_url in request.path|urlencode %} current-app{% endif %}">
<table>
<caption>
<a href="{{ app.app_url }}" class="section" title="{% blocktranslate with name=app.name %}Models in the {{ name }} application{% endblocktranslate %}">{{ app.name }}</a>
</caption>
{% for model in app.models %}
<tr class="model-{{ model.object_name|lower }}{% if model.admin_url in request.path|urlencode %} current-model{% endif %}">
{% if model.admin_url %}
<th scope="row"><a href="{{ model.admin_url }}"{% if model.admin_url in request.path|urlencode %} aria-current="page"{% endif %}>{{ model.name }}</a></th>
{% else %}
<th scope="row">{{ model.name }}</th>
{% endif %}
{% if model.add_url %}
<td><a href="{{ model.add_url }}" class="addlink">{% translate 'Add' %}</a></td>
{% else %}
<td></td>
{% endif %}
{% if model.admin_url and show_changelinks %}
{% if model.view_only %}
<td><a href="{{ model.admin_url }}" class="viewlink">{% translate 'View' %}</a></td>
{% else %}
<td><a href="{{ model.admin_url }}" class="changelink">{% translate 'Change' %}</a></td>
{% endif %}
{% elif show_changelinks %}
<td></td>
{% endif %}
</tr>
{% endfor %}
</table>
</div>
{% endfor %}
{% else %}
<p>{% translate 'You don’t have permission to view or edit anything.' %}</p>
{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/app_list.html | HTML | mit | 1,716 |
{% extends "admin/change_form.html" %}
{% load i18n %}
{% block form_top %}
{% if not is_popup %}
<p>{% translate 'First, enter a username and password. Then, you’ll be able to edit more user options.' %}</p>
{% else %}
<p>{% translate "Enter a username and password." %}</p>
{% endif %}
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/auth/user/add_form.html | HTML | mit | 320 |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% load admin_urls %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
› <a href="{% url opts|admin_urlname:'change' original.pk|admin_urlquote %}">{{ original|truncatewords:"18" }}</a>
› {% translate 'Change password' %}
</div>
{% endblock %}
{% endif %}
{% block content %}<div id="content-main">
<form{% if form_url %} action="{{ form_url }}"{% endif %} method="post" id="{{ opts.model_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
<input type="text" name="username" value="{{ original.get_username }}" class="hidden">
<div>
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
{% if form.errors %}
<p class="errornote">
{% blocktranslate count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
</p>
{% endif %}
<p>{% blocktranslate with username=original %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktranslate %}</p>
<fieldset class="module aligned">
<div class="form-row">
{{ form.password1.errors }}
<div class="flex-container">{{ form.password1.label_tag }} {{ form.password1 }}</div>
{% if form.password1.help_text %}
<div class="help"{% if form.password1.id_for_label %} id="{{ form.password1.id_for_label }}_helptext">{% endif %}{{ form.password1.help_text|safe }}</div>
{% endif %}
</div>
<div class="form-row">
{{ form.password2.errors }}
<div class="flex-container">{{ form.password2.label_tag }} {{ form.password2 }}</div>
{% if form.password2.help_text %}
<div class="help"{% if form.password2.id_for_label %} id="{{ form.password2.id_for_label }}_helptext"{% endif %}>{{ form.password2.help_text|safe }}</div>
{% endif %}
</div>
</fieldset>
<div class="submit-row">
<input type="submit" value="{% translate 'Change password' %}" class="default">
</div>
</div>
</form></div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/auth/user/change_password.html | HTML | mit | 2,515 |
{% load i18n static %}<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}">
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}">
{% block dark-mode-vars %}
<link rel="stylesheet" href="{% static "admin/css/dark_mode.css" %}">
<script src="{% static "admin/js/theme.js" %}" defer></script>
{% endblock %}
{% if not is_popup and is_nav_sidebar_enabled %}
<link rel="stylesheet" href="{% static "admin/css/nav_sidebar.css" %}">
<script src="{% static 'admin/js/nav_sidebar.js' %}" defer></script>
{% endif %}
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
{% block extrahead %}{% endblock %}
{% block responsive %}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="{% static "admin/css/responsive.css" %}">
{% if LANGUAGE_BIDI %}<link rel="stylesheet" href="{% static "admin/css/responsive_rtl.css" %}">{% endif %}
{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE">{% endblock %}
</head>
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
data-admin-utc-offset="{% now "Z" %}">
<a href="#content-start" class="skip-to-content-link">{% translate 'Skip to main content' %}</a>
<!-- Container -->
<div id="container">
{% if not is_popup %}
<!-- Header -->
{% block header %}
<div id="header">
<div id="branding">
{% block branding %}{% endblock %}
</div>
{% block usertools %}
{% if has_permission %}
<div id="user-tools">
{% block welcome-msg %}
{% translate 'Welcome,' %}
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
{% endblock %}
{% block userlinks %}
{% if site_url %}
<a href="{{ site_url }}">{% translate 'View site' %}</a> /
{% endif %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}
<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> /
{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">{% translate 'Change password' %}</a> /
{% endif %}
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% translate 'Log out' %}</button>
</form>
{% include "admin/color_theme_toggle.html" %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% block nav-global %}{% endblock %}
</div>
{% endblock %}
<!-- END Header -->
{% block nav-breadcrumbs %}
<nav aria-label="{% translate 'Breadcrumbs' %}">
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
{% if title %} › {{ title }}{% endif %}
</div>
{% endblock %}
</nav>
{% endblock %}
{% endif %}
<div class="main" id="main">
{% if not is_popup and is_nav_sidebar_enabled %}
{% block nav-sidebar %}
{% include "admin/nav_sidebar.html" %}
{% endblock %}
{% endif %}
<div id="content-start" class="content" tabindex="-1">
{% block messages %}
{% if messages %}
<ul class="messagelist">{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
{% endfor %}</ul>
{% endif %}
{% endblock messages %}
<!-- Content -->
<div id="content" class="{% block coltype %}colM{% endblock %}">
{% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
{% block content_subtitle %}{% if subtitle %}<h2>{{ subtitle }}</h2>{% endif %}{% endblock %}
{% block content %}
{% block object-tools %}{% endblock %}
{{ content }}
{% endblock %}
{% block sidebar %}{% endblock %}
<br class="clear">
</div>
<!-- END Content -->
{% block footer %}<div id="footer"></div>{% endblock %}
</div>
</div>
</div>
<!-- END Container -->
<!-- SVGs -->
<svg xmlns="http://www.w3.org/2000/svg" class="base-svgs">
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-auto"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2V4a8 8 0 1 0 0 16z"/></symbol>
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-moon"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol>
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-sun"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol>
</svg>
<!-- END SVGs -->
</body>
</html>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/base.html | HTML | mit | 6,110 |
{% extends "admin/base.html" %}
{% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></h1>
{% if user.is_anonymous %}
{% include "admin/color_theme_toggle.html" %}
{% endif %}
{% endblock %}
{% block nav-global %}{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/base_site.html | HTML | mit | 448 |
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_modify %}
{% block extrahead %}{{ block.super }}
<script src="{% url 'admin:jsi18n' %}"></script>
{{ media }}
{% endblock %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block coltype %}colM{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› {% if has_view_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
› {% if add %}{% blocktranslate with name=opts.verbose_name %}Add {{ name }}{% endblocktranslate %}{% else %}{{ original|truncatewords:"18" }}{% endif %}
</div>
{% endblock %}
{% endif %}
{% block content %}<div id="content-main">
{% block object-tools %}
{% if change and not is_popup %}
<ul class="object-tools">
{% block object-tools-items %}
{% change_form_object_tools %}
{% endblock %}
</ul>
{% endif %}
{% endblock %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}{% if form_url %}action="{{ form_url }}" {% endif %}method="post" id="{{ opts.model_name }}_form" novalidate>{% csrf_token %}{% block form_top %}{% endblock %}
<div>
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
{% if errors %}
<p class="errornote">
{% blocktranslate count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
</p>
{{ adminform.form.non_field_errors }}
{% endif %}
{% block field_sets %}
{% for fieldset in adminform %}
{% include "admin/includes/fieldset.html" %}
{% endfor %}
{% endblock %}
{% block after_field_sets %}{% endblock %}
{% block inline_field_sets %}
{% for inline_admin_formset in inline_admin_formsets %}
{% include inline_admin_formset.opts.template %}
{% endfor %}
{% endblock %}
{% block after_related_objects %}{% endblock %}
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
{% block admin_change_form_document_ready %}
<script id="django-admin-form-add-constants"
src="{% static 'admin/js/change_form.js' %}"
{% if adminform and add %}
data-model-name="{{ opts.model_name }}"
{% endif %}
async>
</script>
{% endblock %}
{# JavaScript for prepopulated fields #}
{% prepopulated_fields_js %}
</div>
</form></div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/change_form.html | HTML | mit | 3,019 |
{% load i18n admin_urls %}
{% block object-tools-items %}
<li>
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
<a href="{% add_preserved_filters history_url %}" class="historylink">{% translate "History" %}</a>
</li>
{% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% translate "View on site" %}</a></li>{% endif %}
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/change_form_object_tools.html | HTML | mit | 403 |
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_list %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" href="{% static "admin/css/changelists.css" %}">
{% if cl.formset %}
<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">
{% endif %}
{% if cl.formset or action_form %}
<script src="{% url 'admin:jsi18n' %}"></script>
{% endif %}
{{ media.css }}
{% if not actions_on_top and not actions_on_bottom %}
<style>
#changelist table thead th:first-child {width: inherit}
</style>
{% endif %}
{% endblock %}
{% block extrahead %}
{{ block.super }}
{{ media.js }}
<script src="{% static 'admin/js/filters.js' %}" defer></script>
{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a>
› {{ cl.opts.verbose_name_plural|capfirst }}
</div>
{% endblock %}
{% endif %}
{% block coltype %}{% endblock %}
{% block content %}
<div id="content-main">
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% change_list_object_tools %}
{% endblock %}
</ul>
{% endblock %}
{% if cl.formset and cl.formset.errors %}
<p class="errornote">
{% blocktranslate count counter=cl.formset.total_error_count %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
</p>
{{ cl.formset.non_form_errors }}
{% endif %}
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
<div class="changelist-form-container">
{% block search %}{% search_form cl %}{% endblock %}
{% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %}
<form id="changelist-form" method="post"{% if cl.formset and cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
{% if cl.formset %}
<div>{{ cl.formset.management_form }}</div>
{% endif %}
{% block result_list %}
{% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %}
{% result_list cl %}
{% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %}
{% endblock %}
{% block pagination %}{% pagination cl %}{% endblock %}
</form>
</div>
{% block filters %}
{% if cl.has_filters %}
<div id="changelist-filter">
<h2>{% translate 'Filter' %}</h2>
{% if cl.has_active_filters %}<h3 id="changelist-filter-clear">
<a href="{{ cl.clear_all_filters_qs }}">✖ {% translate "Clear all filters" %}</a>
</h3>{% endif %}
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
</div>
{% endif %}
{% endblock %}
</div>
</div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/change_list.html | HTML | mit | 3,290 |
{% load i18n admin_urls %}
{% block object-tools-items %}
{% if has_add_permission %}
<li>
{% url cl.opts|admin_urlname:'add' as add_url %}
<a href="{% add_preserved_filters add_url is_popup to_field %}" class="addlink">
{% blocktranslate with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktranslate %}
</a>
</li>
{% endif %}
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/change_list_object_tools.html | HTML | mit | 378 |
{% load i18n %}
{% if result_hidden_fields %}
<div class="hiddenfields">{# DIV for HTML validation #}
{% for item in result_hidden_fields %}{{ item }}{% endfor %}
</div>
{% endif %}
{% if results %}
<div class="results">
<table id="result_list">
<thead>
<tr>
{% for header in result_headers %}
<th scope="col"{{ header.class_attrib }}>
{% if header.sortable and header.sort_priority > 0 %}
<div class="sortoptions">
<a class="sortremove" href="{{ header.url_remove }}" title="{% translate "Remove from sorting" %}"></a>
{% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktranslate with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktranslate %}">{{ header.sort_priority }}</span>{% endif %}
<a href="{{ header.url_toggle }}" class="toggle {{ header.ascending|yesno:'ascending,descending' }}" title="{% translate "Toggle sorting" %}"></a>
</div>
{% endif %}
<div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
<div class="clear"></div>
</th>{% endfor %}
</tr>
</thead>
<tbody>
{% for result in results %}
{% if result.form and result.form.non_field_errors %}
<tr><td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td></tr>
{% endif %}
<tr>{% for item in result %}{{ item }}{% endfor %}</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/change_list_results.html | HTML | mit | 1,502 |
{% load i18n %}
<button class="theme-toggle">
<div class="visually-hidden theme-label-when-auto">{% translate 'Toggle theme (current theme: auto)' %}</div>
<div class="visually-hidden theme-label-when-light">{% translate 'Toggle theme (current theme: light)' %}</div>
<div class="visually-hidden theme-label-when-dark">{% translate 'Toggle theme (current theme: dark)' %}</div>
<svg aria-hidden="true" class="theme-icon-when-auto">
<use xlink:href="#icon-auto" />
</svg>
<svg aria-hidden="true" class="theme-icon-when-dark">
<use xlink:href="#icon-moon" />
</svg>
<svg aria-hidden="true" class="theme-icon-when-light">
<use xlink:href="#icon-sun" />
</svg>
</button>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/color_theme_toggle.html | HTML | mit | 697 |
{% if show %}
<nav class="toplinks">
{% block date-hierarchy-toplinks %}
{% block date-hierarchy-back %}
{% if back %}<a href="{{ back.link }}" class="date-back">‹ {{ back.title }}</a>{% endif %}
{% endblock %}
{% block date-hierarchy-choices %}
{% for choice in choices %}
{% if choice.link %}<a href="{{ choice.link }}">{{ choice.title }}</a>{% else %}{{ choice.title }}{% endif %}
{% endfor %}
{% endblock %}
{% endblock %}
</nav>
{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/date_hierarchy.html | HTML | mit | 453 |
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static %}
{% block extrahead %}
{{ block.super }}
{{ media }}
<script src="{% static 'admin/js/cancel.js' %}" async></script>
{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
› <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
› {% translate 'Delete' %}
</div>
{% endblock %}
{% block content %}
{% if perms_lacking %}
{% block delete_forbidden %}
<p>{% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}</p>
<ul id="deleted-objects">{{ perms_lacking|unordered_list }}</ul>
{% endblock %}
{% elif protected %}
{% block delete_protected %}
<p>{% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktranslate %}</p>
<ul id="deleted-objects">{{ protected|unordered_list }}</ul>
{% endblock %}
{% else %}
{% block delete_confirm %}
<p>{% blocktranslate with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktranslate %}</p>
{% include "admin/includes/object_delete_summary.html" %}
<h2>{% translate "Objects" %}</h2>
<ul id="deleted-objects">{{ deleted_objects|unordered_list }}</ul>
<form method="post">{% csrf_token %}
<div>
<input type="hidden" name="post" value="yes">
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
<input type="submit" value="{% translate 'Yes, I’m sure' %}">
<a href="#" class="button cancel-link">{% translate "No, take me back" %}</a>
</div>
</form>
{% endblock %}
{% endif %}
{% endblock content %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/delete_confirmation.html | HTML | mit | 2,539 |
{% extends "admin/base_site.html" %}
{% load i18n l10n admin_urls static %}
{% block extrahead %}
{{ block.super }}
{{ media }}
<script src="{% static 'admin/js/cancel.js' %}" async></script>
{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
› {% translate 'Delete multiple objects' %}
</div>
{% endblock %}
{% block content %}
{% if perms_lacking %}
<p>{% blocktranslate %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}</p>
<ul>{{ perms_lacking|unordered_list }}</ul>
{% elif protected %}
<p>{% blocktranslate %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktranslate %}</p>
<ul>{{ protected|unordered_list }}</ul>
{% else %}
<p>{% blocktranslate %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktranslate %}</p>
{% include "admin/includes/object_delete_summary.html" %}
<h2>{% translate "Objects" %}</h2>
{% for deletable_object in deletable_objects %}
<ul>{{ deletable_object|unordered_list }}</ul>
{% endfor %}
<form method="post">{% csrf_token %}
<div>
{% for obj in queryset %}
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}">
{% endfor %}
<input type="hidden" name="action" value="delete_selected">
<input type="hidden" name="post" value="yes">
<input type="submit" value="{% translate 'Yes, I’m sure' %}">
<a href="#" class="button cancel-link">{% translate "No, take me back" %}</a>
</div>
</form>
{% endif %}
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/delete_selected_confirmation.html | HTML | mit | 2,241 |
{% load i18n admin_urls %}
<div class="js-inline-admin-formset inline-group"
id="{{ inline_admin_formset.formset.prefix }}-group"
data-inline-type="stacked"
data-inline-formset="{{ inline_admin_formset.inline_formset_data }}">
<fieldset class="module {{ inline_admin_formset.classes }}">
{% if inline_admin_formset.formset.max_num == 1 %}
<h2>{{ inline_admin_formset.opts.verbose_name|capfirst }}</h2>
{% else %}
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2>
{% endif %}
{{ inline_admin_formset.formset.management_form }}
{{ inline_admin_formset.formset.non_form_errors }}
{% for inline_admin_form in inline_admin_formset %}<div class="inline-related{% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ forloop.counter0 }}{% endif %}">
<h3><b>{{ inline_admin_formset.opts.verbose_name|capfirst }}:</b> <span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{{ inline_admin_formset.has_change_permission|yesno:'inlinechangelink,inlineviewlink' }}">{% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}</a>{% endif %}
{% else %}#{{ forloop.counter }}{% endif %}</span>
{% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %}
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
</h3>
{% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %}
{% for fieldset in inline_admin_form %}
{% include "admin/includes/fieldset.html" %}
{% endfor %}
{% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
{% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
</div>{% endfor %}
</fieldset>
</div>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/edit_inline/stacked.html | HTML | mit | 2,580 |
{% load i18n admin_urls static admin_modify %}
<div class="js-inline-admin-formset inline-group" id="{{ inline_admin_formset.formset.prefix }}-group"
data-inline-type="tabular"
data-inline-formset="{{ inline_admin_formset.inline_formset_data }}">
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}">
{{ inline_admin_formset.formset.management_form }}
<fieldset class="module {{ inline_admin_formset.classes }}">
{% if inline_admin_formset.formset.max_num == 1 %}
<h2>{{ inline_admin_formset.opts.verbose_name|capfirst }}</h2>
{% else %}
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2>
{% endif %}
{{ inline_admin_formset.formset.non_form_errors }}
<table>
<thead><tr>
<th class="original"></th>
{% for field in inline_admin_formset.fields %}
<th class="column-{{ field.name }}{% if field.required %} required{% endif %}{% if field.widget.is_hidden %} hidden{% endif %}">{{ field.label|capfirst }}
{% if field.help_text %}<img src="{% static "admin/img/icon-unknown.svg" %}" class="help help-tooltip" width="10" height="10" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}">{% endif %}
</th>
{% endfor %}
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}<th>{% translate "Delete?" %}</th>{% endif %}
</tr></thead>
<tbody>
{% for inline_admin_form in inline_admin_formset %}
{% if inline_admin_form.form.non_field_errors %}
<tr class="row-form-errors"><td colspan="{{ inline_admin_form|cell_count }}">{{ inline_admin_form.form.non_field_errors }}</td></tr>
{% endif %}
<tr class="form-row {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form{% endif %}"
id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ forloop.counter0 }}{% endif %}">
<td class="original">
{% if inline_admin_form.original or inline_admin_form.show_url %}<p>
{% if inline_admin_form.original %}
{{ inline_admin_form.original }}
{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}<a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{{ inline_admin_formset.has_change_permission|yesno:'inlinechangelink,inlineviewlink' }}">{% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}</a>{% endif %}
{% endif %}
{% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %}
</p>{% endif %}
{% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
{% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
</td>
{% for fieldset in inline_admin_form %}
{% for line in fieldset %}
{% for field in line %}
<td class="{% if field.field.name %}field-{{ field.field.name }}{% endif %}{% if field.field.is_hidden %} hidden{% endif %}">
{% if field.is_readonly %}
<p>{{ field.contents }}</p>
{% else %}
{{ field.field.errors.as_ul }}
{{ field.field }}
{% endif %}
</td>
{% endfor %}
{% endfor %}
{% endfor %}
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</fieldset>
</div>
</div>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/edit_inline/tabular.html | HTML | mit | 4,086 |
{% load i18n %}
<details data-filter-title="{{ title }}" open>
<summary>
{% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}
</summary>
<ul>
{% for choice in choices %}
<li{% if choice.selected %} class="selected"{% endif %}>
<a href="{{ choice.query_string|iriencode }}">{{ choice.display }}</a></li>
{% endfor %}
</ul>
</details>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/filter.html | HTML | mit | 395 |
<fieldset class="module aligned {{ fieldset.classes }}">
{% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
{% if fieldset.description %}
<div class="description">{{ fieldset.description|safe }}</div>
{% endif %}
{% for line in fieldset %}
<div class="form-row{% if line.fields|length == 1 and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
{% if line.fields|length == 1 %}{{ line.errors }}{% else %}<div class="flex-container form-multiline">{% endif %}
{% for field in line %}
<div>
{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %}
<div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% elif field.is_checkbox %} checkbox-row{% endif %}">
{% if field.is_checkbox %}
{{ field.field }}{{ field.label_tag }}
{% else %}
{{ field.label_tag }}
{% if field.is_readonly %}
<div class="readonly">{{ field.contents }}</div>
{% else %}
{{ field.field }}
{% endif %}
{% endif %}
</div>
{% if field.field.help_text %}
<div class="help"{% if field.field.id_for_label %} id="{{ field.field.id_for_label }}_helptext"{% endif %}>
<div>{{ field.field.help_text|safe }}</div>
</div>
{% endif %}
</div>
{% endfor %}
{% if not line.fields|length == 1 %}</div>{% endif %}
</div>
{% endfor %}
</fieldset>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/includes/fieldset.html | HTML | mit | 2,200 |
{% load i18n %}
<h2>{% translate "Summary" %}</h2>
<ul>
{% for model_name, object_count in model_count %}
<li>{{ model_name|capfirst }}: {{ object_count }}</li>
{% endfor %}
</ul>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/includes/object_delete_summary.html | HTML | mit | 192 |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/dashboard.css" %}">{% endblock %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
{% block nav-breadcrumbs %}{% endblock %}
{% block nav-sidebar %}{% endblock %}
{% block content %}
<div id="content-main">
{% include "admin/app_list.html" with app_list=app_list show_changelinks=True %}
</div>
{% endblock %}
{% block sidebar %}
<div id="content-related">
<div class="module" id="recent-actions-module">
<h2>{% translate 'Recent actions' %}</h2>
<h3>{% translate 'My actions' %}</h3>
{% load log %}
{% get_admin_log 10 as admin_log for_user user %}
{% if not admin_log %}
<p>{% translate 'None available' %}</p>
{% else %}
<ul class="actionlist">
{% for entry in admin_log %}
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
{% if entry.is_deletion or not entry.get_admin_url %}
{{ entry.object_repr }}
{% else %}
<a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
{% endif %}
<br>
{% if entry.content_type %}
<span class="mini quiet">{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}</span>
{% else %}
<span class="mini quiet">{% translate 'Unknown content' %}</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/index.html | HTML | mit | 1,849 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {{ title }}
</div>
{% endblock %}
{% block content %}
<p>{% translate 'Something’s wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user.' %}</p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/invalid_setup.html | HTML | mit | 447 |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/login.css" %}">
{{ form.media }}
{% endblock %}
{% block bodyclass %}{{ block.super }} login{% endblock %}
{% block usertools %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block nav-sidebar %}{% endblock %}
{% block content_title %}{% endblock %}
{% block nav-breadcrumbs %}{% endblock %}
{% block content %}
{% if form.errors and not form.non_field_errors %}
<p class="errornote">
{% blocktranslate count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
</p>
{% endif %}
{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<p class="errornote">
{{ error }}
</p>
{% endfor %}
{% endif %}
<div id="content-main">
{% if user.is_authenticated %}
<p class="errornote">
{% blocktranslate trimmed %}
You are authenticated as {{ username }}, but are not authorized to
access this page. Would you like to login to a different account?
{% endblocktranslate %}
</p>
{% endif %}
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
<div class="form-row">
{{ form.username.errors }}
{{ form.username.label_tag }} {{ form.username }}
</div>
<div class="form-row">
{{ form.password.errors }}
{{ form.password.label_tag }} {{ form.password }}
<input type="hidden" name="next" value="{{ next }}">
</div>
{% url 'admin_password_reset' as password_reset_url %}
{% if password_reset_url %}
<div class="password-reset-link">
<a href="{{ password_reset_url }}">{% translate 'Forgotten your password or username?' %}</a>
</div>
{% endif %}
<div class="submit-row">
<input type="submit" value="{% translate 'Log in' %}">
</div>
</form>
</div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/login.html | HTML | mit | 1,899 |
{% load i18n %}
<button class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar" aria-label="{% translate 'Toggle navigation' %}"></button>
<nav class="sticky" id="nav-sidebar" aria-label="{% translate 'Sidebar' %}">
<input type="search" id="nav-filter"
placeholder="{% translate 'Start typing to filter…' %}"
aria-label="{% translate 'Filter navigation items' %}">
{% include 'admin/app_list.html' with app_list=available_apps show_changelinks=False %}
</nav>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/nav_sidebar.html | HTML | mit | 486 |
{% extends "admin/base_site.html" %}
{% load i18n admin_urls %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ module_name }}</a>
› <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
› {% translate 'History' %}
</div>
{% endblock %}
{% block content %}
<div id="content-main">
<div id="change-history" class="module">
{% if action_list %}
<table>
<thead>
<tr>
<th scope="col">{% translate 'Date/time' %}</th>
<th scope="col">{% translate 'User' %}</th>
<th scope="col">{% translate 'Action' %}</th>
</tr>
</thead>
<tbody>
{% for action in action_list %}
<tr>
<th scope="row">{{ action.action_time|date:"DATETIME_FORMAT" }}</th>
<td>{{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
<td>{{ action.get_change_message }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<p class="paginator">
{% if pagination_required %}
{% for i in page_range %}
{% if i == action_list.paginator.ELLIPSIS %}
{{ action_list.paginator.ELLIPSIS }}
{% elif i == action_list.number %}
<span class="this-page">{{ i }}</span>
{% else %}
<a href="?{{ page_var }}={{ i }}" {% if i == action_list.paginator.num_pages %} class="end" {% endif %}>{{ i }}</a>
{% endif %}
{% endfor %}
{% endif %}
{{ action_list.paginator.count }} {% blocktranslate count counter=action_list.paginator.count %}entry{% plural %}entries{% endblocktranslate %}
</p>
{% else %}
<p>{% translate 'This object doesn’t have a change history. It probably wasn’t added via this admin site.' %}</p>
{% endif %}
</div>
</div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/object_history.html | HTML | mit | 2,136 |
{% load admin_list %}
{% load i18n %}
<p class="paginator">
{% if pagination_required %}
{% for i in page_range %}
{% paginator_number cl i %}
{% endfor %}
{% endif %}
{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}
{% if show_all_url %}<a href="{{ show_all_url }}" class="showall">{% translate 'Show all' %}</a>{% endif %}
{% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% translate 'Save' %}">{% endif %}
</p>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/pagination.html | HTML | mit | 549 |
{% load i18n static %}<!DOCTYPE html>
<html>
<head><title>{% translate 'Popup closing…' %}</title></head>
<body>
<script id="django-admin-popup-response-constants"
src="{% static "admin/js/popup_response.js" %}"
data-popup-response="{{ popup_response_data }}">
</script>
</body>
</html>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/popup_response.html | HTML | mit | 327 |
{% load static %}
<script id="django-admin-prepopulated-fields-constants"
src="{% static "admin/js/prepopulate_init.js" %}"
data-prepopulated-fields="{{ prepopulated_fields_json }}">
</script>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/prepopulated_fields_js.html | HTML | mit | 209 |
{% load i18n static %}
{% if cl.search_fields %}
<div id="toolbar"><form id="changelist-search" method="get">
<div><!-- DIV needed for valid HTML -->
<label for="searchbar"><img src="{% static "admin/img/search.svg" %}" alt="Search"></label>
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar"{% if cl.search_help_text %} aria-describedby="searchbar_helptext"{% endif %}>
<input type="submit" value="{% translate 'Search' %}">
{% if show_result_count %}
<span class="small quiet">{% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %} (<a href="?{% if cl.is_popup %}{{ is_popup_var }}=1{% endif %}">{% if cl.show_full_result_count %}{% blocktranslate with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktranslate %}{% else %}{% translate "Show all" %}{% endif %}</a>)</span>
{% endif %}
{% for pair in cl.params.items %}
{% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}">{% endif %}
{% endfor %}
</div>
{% if cl.search_help_text %}
<br class="clear">
<div class="help" id="searchbar_helptext">{{ cl.search_help_text }}</div>
{% endif %}
</form></div>
{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/search_form.html | HTML | mit | 1,257 |
{% load i18n admin_urls %}
<div class="submit-row">
{% block submit-row %}
{% if show_save %}<input type="submit" value="{% translate 'Save' %}" class="default" name="_save">{% endif %}
{% if show_save_as_new %}<input type="submit" value="{% translate 'Save as new' %}" name="_saveasnew">{% endif %}
{% if show_save_and_add_another %}<input type="submit" value="{% translate 'Save and add another' %}" name="_addanother">{% endif %}
{% if show_save_and_continue %}<input type="submit" value="{% if can_change %}{% translate 'Save and continue editing' %}{% else %}{% translate 'Save and view' %}{% endif %}" name="_continue">{% endif %}
{% if show_close %}
{% url opts|admin_urlname:'changelist' as changelist_url %}
<a href="{% add_preserved_filters changelist_url %}" class="closelink">{% translate 'Close' %}</a>
{% endif %}
{% if show_delete_link and original %}
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
<a href="{% add_preserved_filters delete_url %}" class="deletelink">{% translate "Delete" %}</a>
{% endif %}
{% endblock %}
</div>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/submit_line.html | HTML | mit | 1,093 |
{% if widget.is_initial %}<p class="file-upload">{{ widget.initial_text }}: <a href="{{ widget.value.url }}">{{ widget.value }}</a>{% if not widget.required %}
<span class="clearable-file-input">
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% if widget.attrs.disabled %} disabled{% endif %}>
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label></span>{% endif %}<br>
{{ widget.input_text }}:{% endif %}
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% if widget.is_initial %}</p>{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/clearable_file_input.html | HTML | mit | 618 |
{% include 'django/forms/widgets/input.html' %}{% if related_url %}<a href="{{ related_url }}" class="related-lookup" id="lookup_id_{{ widget.name }}" title="{{ link_title }}"></a>{% endif %}{% if link_label %}
<strong>{% if link_url %}<a href="{{ link_url }}">{{ link_label }}</a>{% else %}{{ link_label }}{% endif %}</strong>{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/foreign_key_raw_id.html | HTML | mit | 339 |
{% include 'admin/widgets/foreign_key_raw_id.html' %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/many_to_many_raw_id.html | HTML | mit | 54 |
{% include "django/forms/widgets/multiple_input.html" %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/radio.html | HTML | mit | 57 |
{% load i18n static %}
<div class="related-widget-wrapper" {% if not model_has_limit_choices_to %}data-model-ref="{{ model }}"{% endif %}>
{{ rendered_widget }}
{% block links %}
{% spaceless %}
{% if not is_hidden %}
{% if can_change_related %}
<a class="related-widget-wrapper-link change-related" id="change_id_{{ name }}"
data-href-template="{{ change_related_template_url }}?{{ url_params }}"
data-popup="yes"
title="{% blocktranslate %}Change selected {{ model }}{% endblocktranslate %}">
<img src="{% static 'admin/img/icon-changelink.svg' %}" alt="{% translate 'Change' %}">
</a>
{% endif %}
{% if can_add_related %}
<a class="related-widget-wrapper-link add-related" id="add_id_{{ name }}"
data-popup="yes"
href="{{ add_related_url }}?{{ url_params }}"
title="{% blocktranslate %}Add another {{ model }}{% endblocktranslate %}">
<img src="{% static 'admin/img/icon-addlink.svg' %}" alt="{% translate 'Add' %}">
</a>
{% endif %}
{% if can_delete_related %}
<a class="related-widget-wrapper-link delete-related" id="delete_id_{{ name }}"
data-href-template="{{ delete_related_template_url }}?{{ url_params }}"
data-popup="yes"
title="{% blocktranslate %}Delete selected {{ model }}{% endblocktranslate %}">
<img src="{% static 'admin/img/icon-deletelink.svg' %}" alt="{% translate 'Delete' %}">
</a>
{% endif %}
{% if can_view_related %}
<a class="related-widget-wrapper-link view-related" id="view_id_{{ name }}"
data-href-template="{{ change_related_template_url }}?{{ view_related_url_params }}"
title="{% blocktranslate %}View selected {{ model }}{% endblocktranslate %}">
<img src="{% static 'admin/img/icon-viewlink.svg' %}" alt="{% translate 'View' %}">
</a>
{% endif %}
{% endif %}
{% endspaceless %}
{% endblock %}
</div>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html | HTML | mit | 2,096 |
<p class="datetime">
{{ date_label }} {% with widget=widget.subwidgets.0 %}{% include widget.template_name %}{% endwith %}<br>
{{ time_label }} {% with widget=widget.subwidgets.1 %}{% include widget.template_name %}{% endwith %}
</p>
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/split_datetime.html | HTML | mit | 238 |
{% if url_valid %}<p class="url">{{ current_label }} <a href="{{ widget.href }}">{{ widget.value }}</a><br>{{ change_label }} {% endif %}{% include "django/forms/widgets/input.html" %}{% if url_valid %}</p>{% endif %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/admin/widgets/url.html | HTML | mit | 218 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="{% url 'admin:index' %}">{% translate 'Home' %}</a></div>{% endblock %}
{% block nav-sidebar %}{% endblock %}
{% block content %}
<p>{% translate "Thanks for spending some quality time with the web site today." %}</p>
<p><a href="{% url 'admin:index' %}">{% translate 'Log in again' %}</a></p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/logged_out.html | HTML | mit | 425 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block userlinks %}
{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> / {% endif %}{% translate 'Change password' %} /
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% translate 'Log out' %}</button>
</form>
{% include "admin/color_theme_toggle.html" %}
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Password change' %}
</div>
{% endblock %}
{% block content %}
<p>{% translate 'Your password was changed.' %}</p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_change_done.html | HTML | mit | 745 |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block userlinks %}
{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> / {% endif %} {% translate 'Change password' %} /
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% translate 'Log out' %}</button>
</form>
{% include "admin/color_theme_toggle.html" %}
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Password change' %}
</div>
{% endblock %}
{% block content %}<div id="content-main">
<form method="post">{% csrf_token %}
<div>
{% if form.errors %}
<p class="errornote">
{% blocktranslate count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
</p>
{% endif %}
<p>{% translate 'Please enter your old password, for security’s sake, and then enter your new password twice so we can verify you typed it in correctly.' %}</p>
<fieldset class="module aligned wide">
<div class="form-row">
{{ form.old_password.errors }}
<div class="flex-container">{{ form.old_password.label_tag }} {{ form.old_password }}</div>
</div>
<div class="form-row">
{{ form.new_password1.errors }}
<div class="flex-container">{{ form.new_password1.label_tag }} {{ form.new_password1 }}</div>
{% if form.new_password1.help_text %}
<div class="help"{% if form.new_password1.id_for_label %} id="{{ form.new_password1.id_for_label }}_helptext"{% endif %}>{{ form.new_password1.help_text|safe }}</div>
{% endif %}
</div>
<div class="form-row">
{{ form.new_password2.errors }}
<div class="flex-container">{{ form.new_password2.label_tag }} {{ form.new_password2 }}</div>
{% if form.new_password2.help_text %}
<div class="help"{% if form.new_password2.id_for_label %} id="{{ form.new_password2.id_for_label }}_helptext"{% endif %}>{{ form.new_password2.help_text|safe }}</div>
{% endif %}
</div>
</fieldset>
<div class="submit-row">
<input type="submit" value="{% translate 'Change my password' %}" class="default">
</div>
</div>
</form></div>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_change_form.html | HTML | mit | 2,428 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Password reset' %}
</div>
{% endblock %}
{% block content %}
<p>{% translate "Your password has been set. You may go ahead and log in now." %}</p>
<p><a href="{{ login_url }}">{% translate 'Log in' %}</a></p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_reset_complete.html | HTML | mit | 417 |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Password reset confirmation' %}
</div>
{% endblock %}
{% block content %}
{% if validlink %}
<p>{% translate "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
<form method="post">{% csrf_token %}
<fieldset class="module aligned">
<input class="hidden" autocomplete="username" value="{{ form.user.get_username }}">
<div class="form-row field-password1">
{{ form.new_password1.errors }}
<label for="id_new_password1">{% translate 'New password:' %}</label>
{{ form.new_password1 }}
</div>
<div class="form-row field-password2">
{{ form.new_password2.errors }}
<label for="id_new_password2">{% translate 'Confirm password:' %}</label>
{{ form.new_password2 }}
</div>
<input type="submit" value="{% translate 'Change my password' %}">
</fieldset>
</form>
{% else %}
<p>{% translate "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_reset_confirm.html | HTML | mit | 1,366 |
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Password reset' %}
</div>
{% endblock %}
{% block content %}
<p>{% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}</p>
<p>{% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}</p>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_reset_done.html | HTML | mit | 588 |
{% load i18n %}{% autoescape off %}
{% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %}
{% translate "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
{% endblock %}
{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}
{% translate "Thanks for using our site!" %}
{% blocktranslate %}The {{ site_name }} team{% endblocktranslate %}
{% endautoescape %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_reset_email.html | HTML | mit | 612 |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
› {% translate 'Password reset' %}
</div>
{% endblock %}
{% block content %}
<p>{% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}</p>
<form method="post">{% csrf_token %}
<fieldset class="module aligned">
<div class="form-row field-email">
{{ form.email.errors }}
<label for="id_email">{% translate 'Email address:' %}</label>
{{ form.email }}
</div>
<input type="submit" value="{% translate 'Reset my password' %}">
</fieldset>
</form>
{% endblock %}
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templates/registration/password_reset_form.html | HTML | mit | 869 |
castiel248/Convert | Lib/site-packages/django/contrib/admin/templatetags/__init__.py | Python | mit | 0 |
|
import datetime
from django.conf import settings
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (
display_for_field,
display_for_value,
get_fields_from_path,
label_for_field,
lookup_field,
)
from django.contrib.admin.views.main import (
ALL_VAR,
IS_POPUP_VAR,
ORDER_VAR,
PAGE_VAR,
SEARCH_VAR,
)
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.template import Library
from django.template.loader import get_template
from django.templatetags.static import static
from django.urls import NoReverseMatch
from django.utils import formats, timezone
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from django.utils.text import capfirst
from django.utils.translation import gettext as _
from .base import InclusionAdminNode
register = Library()
@register.simple_tag
def paginator_number(cl, i):
"""
Generate an individual page index link in a paginated list.
"""
if i == cl.paginator.ELLIPSIS:
return format_html("{} ", cl.paginator.ELLIPSIS)
elif i == cl.page_num:
return format_html('<span class="this-page">{}</span> ', i)
else:
return format_html(
'<a href="{}"{}>{}</a> ',
cl.get_query_string({PAGE_VAR: i}),
mark_safe(' class="end"' if i == cl.paginator.num_pages else ""),
i,
)
def pagination(cl):
"""
Generate the series of links to the pages in a paginated list.
"""
pagination_required = (not cl.show_all or not cl.can_show_all) and cl.multi_page
page_range = (
cl.paginator.get_elided_page_range(cl.page_num) if pagination_required else []
)
need_show_all_link = cl.can_show_all and not cl.show_all and cl.multi_page
return {
"cl": cl,
"pagination_required": pagination_required,
"show_all_url": need_show_all_link and cl.get_query_string({ALL_VAR: ""}),
"page_range": page_range,
"ALL_VAR": ALL_VAR,
"1": 1,
}
@register.tag(name="pagination")
def pagination_tag(parser, token):
return InclusionAdminNode(
parser,
token,
func=pagination,
template_name="pagination.html",
takes_context=False,
)
def result_headers(cl):
"""
Generate the list column headers.
"""
ordering_field_columns = cl.get_ordering_field_columns()
for i, field_name in enumerate(cl.list_display):
text, attr = label_for_field(
field_name, cl.model, model_admin=cl.model_admin, return_attr=True
)
is_field_sortable = cl.sortable_by is None or field_name in cl.sortable_by
if attr:
field_name = _coerce_field_name(field_name, i)
# Potentially not sortable
# if the field is the action checkbox: no sorting and special class
if field_name == "action_checkbox":
yield {
"text": text,
"class_attrib": mark_safe(' class="action-checkbox-column"'),
"sortable": False,
}
continue
admin_order_field = getattr(attr, "admin_order_field", None)
# Set ordering for attr that is a property, if defined.
if isinstance(attr, property) and hasattr(attr, "fget"):
admin_order_field = getattr(attr.fget, "admin_order_field", None)
if not admin_order_field:
is_field_sortable = False
if not is_field_sortable:
# Not sortable
yield {
"text": text,
"class_attrib": format_html(' class="column-{}"', field_name),
"sortable": False,
}
continue
# OK, it is sortable if we got this far
th_classes = ["sortable", "column-{}".format(field_name)]
order_type = ""
new_order_type = "asc"
sort_priority = 0
# Is it currently being sorted on?
is_sorted = i in ordering_field_columns
if is_sorted:
order_type = ordering_field_columns.get(i).lower()
sort_priority = list(ordering_field_columns).index(i) + 1
th_classes.append("sorted %sending" % order_type)
new_order_type = {"asc": "desc", "desc": "asc"}[order_type]
# build new ordering param
o_list_primary = [] # URL for making this field the primary sort
o_list_remove = [] # URL for removing this field from sort
o_list_toggle = [] # URL for toggling order type for this field
def make_qs_param(t, n):
return ("-" if t == "desc" else "") + str(n)
for j, ot in ordering_field_columns.items():
if j == i: # Same column
param = make_qs_param(new_order_type, j)
# We want clicking on this header to bring the ordering to the
# front
o_list_primary.insert(0, param)
o_list_toggle.append(param)
# o_list_remove - omit
else:
param = make_qs_param(ot, j)
o_list_primary.append(param)
o_list_toggle.append(param)
o_list_remove.append(param)
if i not in ordering_field_columns:
o_list_primary.insert(0, make_qs_param(new_order_type, i))
yield {
"text": text,
"sortable": True,
"sorted": is_sorted,
"ascending": order_type == "asc",
"sort_priority": sort_priority,
"url_primary": cl.get_query_string({ORDER_VAR: ".".join(o_list_primary)}),
"url_remove": cl.get_query_string({ORDER_VAR: ".".join(o_list_remove)}),
"url_toggle": cl.get_query_string({ORDER_VAR: ".".join(o_list_toggle)}),
"class_attrib": format_html(' class="{}"', " ".join(th_classes))
if th_classes
else "",
}
def _boolean_icon(field_val):
icon_url = static(
"admin/img/icon-%s.svg" % {True: "yes", False: "no", None: "unknown"}[field_val]
)
return format_html('<img src="{}" alt="{}">', icon_url, field_val)
def _coerce_field_name(field_name, field_index):
"""
Coerce a field_name (which may be a callable) to a string.
"""
if callable(field_name):
if field_name.__name__ == "<lambda>":
return "lambda" + str(field_index)
else:
return field_name.__name__
return field_name
def items_for_result(cl, result, form):
"""
Generate the actual list of data.
"""
def link_in_col(is_first, field_name, cl):
if cl.list_display_links is None:
return False
if is_first and not cl.list_display_links:
return True
return field_name in cl.list_display_links
first = True
pk = cl.lookup_opts.pk.attname
for field_index, field_name in enumerate(cl.list_display):
empty_value_display = cl.model_admin.get_empty_value_display()
row_classes = ["field-%s" % _coerce_field_name(field_name, field_index)]
try:
f, attr, value = lookup_field(field_name, result, cl.model_admin)
except ObjectDoesNotExist:
result_repr = empty_value_display
else:
empty_value_display = getattr(
attr, "empty_value_display", empty_value_display
)
if f is None or f.auto_created:
if field_name == "action_checkbox":
row_classes = ["action-checkbox"]
boolean = getattr(attr, "boolean", False)
result_repr = display_for_value(value, empty_value_display, boolean)
if isinstance(value, (datetime.date, datetime.time)):
row_classes.append("nowrap")
else:
if isinstance(f.remote_field, models.ManyToOneRel):
field_val = getattr(result, f.name)
if field_val is None:
result_repr = empty_value_display
else:
result_repr = field_val
else:
result_repr = display_for_field(value, f, empty_value_display)
if isinstance(
f, (models.DateField, models.TimeField, models.ForeignKey)
):
row_classes.append("nowrap")
row_class = mark_safe(' class="%s"' % " ".join(row_classes))
# If list_display_links not defined, add the link tag to the first field
if link_in_col(first, field_name, cl):
table_tag = "th" if first else "td"
first = False
# Display link to the result's change_view if the url exists, else
# display just the result's representation.
try:
url = cl.url_for_result(result)
except NoReverseMatch:
link_or_text = result_repr
else:
url = add_preserved_filters(
{"preserved_filters": cl.preserved_filters, "opts": cl.opts}, url
)
# Convert the pk to something that can be used in JavaScript.
# Problem cases are non-ASCII strings.
if cl.to_field:
attr = str(cl.to_field)
else:
attr = pk
value = result.serializable_value(attr)
link_or_text = format_html(
'<a href="{}"{}>{}</a>',
url,
format_html(' data-popup-opener="{}"', value)
if cl.is_popup
else "",
result_repr,
)
yield format_html(
"<{}{}>{}</{}>", table_tag, row_class, link_or_text, table_tag
)
else:
# By default the fields come from ModelAdmin.list_editable, but if we pull
# the fields out of the form instead of list_editable custom admins
# can provide fields on a per request basis
if (
form
and field_name in form.fields
and not (
field_name == cl.model._meta.pk.name
and form[cl.model._meta.pk.name].is_hidden
)
):
bf = form[field_name]
result_repr = mark_safe(str(bf.errors) + str(bf))
yield format_html("<td{}>{}</td>", row_class, result_repr)
if form and not form[cl.model._meta.pk.name].is_hidden:
yield format_html("<td>{}</td>", form[cl.model._meta.pk.name])
class ResultList(list):
"""
Wrapper class used to return items in a list_editable changelist, annotated
with the form object for error reporting purposes. Needed to maintain
backwards compatibility with existing admin templates.
"""
def __init__(self, form, *items):
self.form = form
super().__init__(*items)
def results(cl):
if cl.formset:
for res, form in zip(cl.result_list, cl.formset.forms):
yield ResultList(form, items_for_result(cl, res, form))
else:
for res in cl.result_list:
yield ResultList(None, items_for_result(cl, res, None))
def result_hidden_fields(cl):
if cl.formset:
for res, form in zip(cl.result_list, cl.formset.forms):
if form[cl.model._meta.pk.name].is_hidden:
yield mark_safe(form[cl.model._meta.pk.name])
def result_list(cl):
"""
Display the headers and data list together.
"""
headers = list(result_headers(cl))
num_sorted_fields = 0
for h in headers:
if h["sortable"] and h["sorted"]:
num_sorted_fields += 1
return {
"cl": cl,
"result_hidden_fields": list(result_hidden_fields(cl)),
"result_headers": headers,
"num_sorted_fields": num_sorted_fields,
"results": list(results(cl)),
}
@register.tag(name="result_list")
def result_list_tag(parser, token):
return InclusionAdminNode(
parser,
token,
func=result_list,
template_name="change_list_results.html",
takes_context=False,
)
def date_hierarchy(cl):
"""
Display the date hierarchy for date drill-down functionality.
"""
if cl.date_hierarchy:
field_name = cl.date_hierarchy
field = get_fields_from_path(cl.model, field_name)[-1]
if isinstance(field, models.DateTimeField):
dates_or_datetimes = "datetimes"
qs_kwargs = {"is_dst": True} if settings.USE_DEPRECATED_PYTZ else {}
else:
dates_or_datetimes = "dates"
qs_kwargs = {}
year_field = "%s__year" % field_name
month_field = "%s__month" % field_name
day_field = "%s__day" % field_name
field_generic = "%s__" % field_name
year_lookup = cl.params.get(year_field)
month_lookup = cl.params.get(month_field)
day_lookup = cl.params.get(day_field)
def link(filters):
return cl.get_query_string(filters, [field_generic])
if not (year_lookup or month_lookup or day_lookup):
# select appropriate start level
date_range = cl.queryset.aggregate(
first=models.Min(field_name), last=models.Max(field_name)
)
if date_range["first"] and date_range["last"]:
if dates_or_datetimes == "datetimes":
date_range = {
k: timezone.localtime(v) if timezone.is_aware(v) else v
for k, v in date_range.items()
}
if date_range["first"].year == date_range["last"].year:
year_lookup = date_range["first"].year
if date_range["first"].month == date_range["last"].month:
month_lookup = date_range["first"].month
if year_lookup and month_lookup and day_lookup:
day = datetime.date(int(year_lookup), int(month_lookup), int(day_lookup))
return {
"show": True,
"back": {
"link": link({year_field: year_lookup, month_field: month_lookup}),
"title": capfirst(formats.date_format(day, "YEAR_MONTH_FORMAT")),
},
"choices": [
{"title": capfirst(formats.date_format(day, "MONTH_DAY_FORMAT"))}
],
}
elif year_lookup and month_lookup:
days = getattr(cl.queryset, dates_or_datetimes)(
field_name, "day", **qs_kwargs
)
return {
"show": True,
"back": {
"link": link({year_field: year_lookup}),
"title": str(year_lookup),
},
"choices": [
{
"link": link(
{
year_field: year_lookup,
month_field: month_lookup,
day_field: day.day,
}
),
"title": capfirst(formats.date_format(day, "MONTH_DAY_FORMAT")),
}
for day in days
],
}
elif year_lookup:
months = getattr(cl.queryset, dates_or_datetimes)(
field_name, "month", **qs_kwargs
)
return {
"show": True,
"back": {"link": link({}), "title": _("All dates")},
"choices": [
{
"link": link(
{year_field: year_lookup, month_field: month.month}
),
"title": capfirst(
formats.date_format(month, "YEAR_MONTH_FORMAT")
),
}
for month in months
],
}
else:
years = getattr(cl.queryset, dates_or_datetimes)(
field_name, "year", **qs_kwargs
)
return {
"show": True,
"back": None,
"choices": [
{
"link": link({year_field: str(year.year)}),
"title": str(year.year),
}
for year in years
],
}
@register.tag(name="date_hierarchy")
def date_hierarchy_tag(parser, token):
return InclusionAdminNode(
parser,
token,
func=date_hierarchy,
template_name="date_hierarchy.html",
takes_context=False,
)
def search_form(cl):
"""
Display a search form for searching the list.
"""
return {
"cl": cl,
"show_result_count": cl.result_count != cl.full_result_count,
"search_var": SEARCH_VAR,
"is_popup_var": IS_POPUP_VAR,
}
@register.tag(name="search_form")
def search_form_tag(parser, token):
return InclusionAdminNode(
parser,
token,
func=search_form,
template_name="search_form.html",
takes_context=False,
)
@register.simple_tag
def admin_list_filter(cl, spec):
tpl = get_template(spec.template)
return tpl.render(
{
"title": spec.title,
"choices": list(spec.choices(cl)),
"spec": spec,
}
)
def admin_actions(context):
"""
Track the number of times the action field has been rendered on the page,
so we know which value to use.
"""
context["action_index"] = context.get("action_index", -1) + 1
return context
@register.tag(name="admin_actions")
def admin_actions_tag(parser, token):
return InclusionAdminNode(
parser, token, func=admin_actions, template_name="actions.html"
)
@register.tag(name="change_list_object_tools")
def change_list_object_tools_tag(parser, token):
"""Display the row of change list object tools."""
return InclusionAdminNode(
parser,
token,
func=lambda context: context,
template_name="change_list_object_tools.html",
)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templatetags/admin_list.py | Python | mit | 18,492 |
import json
from django import template
from django.template.context import Context
from .base import InclusionAdminNode
register = template.Library()
def prepopulated_fields_js(context):
"""
Create a list of prepopulated_fields that should render JavaScript for
the prepopulated fields for both the admin form and inlines.
"""
prepopulated_fields = []
if "adminform" in context:
prepopulated_fields.extend(context["adminform"].prepopulated_fields)
if "inline_admin_formsets" in context:
for inline_admin_formset in context["inline_admin_formsets"]:
for inline_admin_form in inline_admin_formset:
if inline_admin_form.original is None:
prepopulated_fields.extend(inline_admin_form.prepopulated_fields)
prepopulated_fields_json = []
for field in prepopulated_fields:
prepopulated_fields_json.append(
{
"id": "#%s" % field["field"].auto_id,
"name": field["field"].name,
"dependency_ids": [
"#%s" % dependency.auto_id for dependency in field["dependencies"]
],
"dependency_list": [
dependency.name for dependency in field["dependencies"]
],
"maxLength": field["field"].field.max_length or 50,
"allowUnicode": getattr(field["field"].field, "allow_unicode", False),
}
)
context.update(
{
"prepopulated_fields": prepopulated_fields,
"prepopulated_fields_json": json.dumps(prepopulated_fields_json),
}
)
return context
@register.tag(name="prepopulated_fields_js")
def prepopulated_fields_js_tag(parser, token):
return InclusionAdminNode(
parser,
token,
func=prepopulated_fields_js,
template_name="prepopulated_fields_js.html",
)
def submit_row(context):
"""
Display the row of buttons for delete and save.
"""
add = context["add"]
change = context["change"]
is_popup = context["is_popup"]
save_as = context["save_as"]
show_save = context.get("show_save", True)
show_save_and_add_another = context.get("show_save_and_add_another", True)
show_save_and_continue = context.get("show_save_and_continue", True)
has_add_permission = context["has_add_permission"]
has_change_permission = context["has_change_permission"]
has_view_permission = context["has_view_permission"]
has_editable_inline_admin_formsets = context["has_editable_inline_admin_formsets"]
can_save = (
(has_change_permission and change)
or (has_add_permission and add)
or has_editable_inline_admin_formsets
)
can_save_and_add_another = (
has_add_permission
and not is_popup
and (not save_as or add)
and can_save
and show_save_and_add_another
)
can_save_and_continue = (
not is_popup and can_save and has_view_permission and show_save_and_continue
)
can_change = has_change_permission or has_editable_inline_admin_formsets
ctx = Context(context)
ctx.update(
{
"can_change": can_change,
"show_delete_link": (
not is_popup
and context["has_delete_permission"]
and change
and context.get("show_delete", True)
),
"show_save_as_new": not is_popup
and has_add_permission
and change
and save_as,
"show_save_and_add_another": can_save_and_add_another,
"show_save_and_continue": can_save_and_continue,
"show_save": show_save and can_save,
"show_close": not (show_save and can_save),
}
)
return ctx
@register.tag(name="submit_row")
def submit_row_tag(parser, token):
return InclusionAdminNode(
parser, token, func=submit_row, template_name="submit_line.html"
)
@register.tag(name="change_form_object_tools")
def change_form_object_tools_tag(parser, token):
"""Display the row of change form object tools."""
return InclusionAdminNode(
parser,
token,
func=lambda context: context,
template_name="change_form_object_tools.html",
)
@register.filter
def cell_count(inline_admin_form):
"""Return the number of cells used in a tabular inline."""
count = 1 # Hidden cell with hidden 'id' field
for fieldset in inline_admin_form:
# Count all visible fields.
for line in fieldset:
for field in line:
try:
is_hidden = field.field.is_hidden
except AttributeError:
is_hidden = field.field["is_hidden"]
if not is_hidden:
count += 1
if inline_admin_form.formset.can_delete:
# Delete checkbox
count += 1
return count
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templatetags/admin_modify.py | Python | mit | 4,978 |
from urllib.parse import parse_qsl, unquote, urlparse, urlunparse
from django import template
from django.contrib.admin.utils import quote
from django.urls import Resolver404, get_script_prefix, resolve
from django.utils.http import urlencode
register = template.Library()
@register.filter
def admin_urlname(value, arg):
return "admin:%s_%s_%s" % (value.app_label, value.model_name, arg)
@register.filter
def admin_urlquote(value):
return quote(value)
@register.simple_tag(takes_context=True)
def add_preserved_filters(context, url, popup=False, to_field=None):
opts = context.get("opts")
preserved_filters = context.get("preserved_filters")
parsed_url = list(urlparse(url))
parsed_qs = dict(parse_qsl(parsed_url[4]))
merged_qs = {}
if opts and preserved_filters:
preserved_filters = dict(parse_qsl(preserved_filters))
match_url = "/%s" % unquote(url).partition(get_script_prefix())[2]
try:
match = resolve(match_url)
except Resolver404:
pass
else:
current_url = "%s:%s" % (match.app_name, match.url_name)
changelist_url = "admin:%s_%s_changelist" % (
opts.app_label,
opts.model_name,
)
if (
changelist_url == current_url
and "_changelist_filters" in preserved_filters
):
preserved_filters = dict(
parse_qsl(preserved_filters["_changelist_filters"])
)
merged_qs.update(preserved_filters)
if popup:
from django.contrib.admin.options import IS_POPUP_VAR
merged_qs[IS_POPUP_VAR] = 1
if to_field:
from django.contrib.admin.options import TO_FIELD_VAR
merged_qs[TO_FIELD_VAR] = to_field
merged_qs.update(parsed_qs)
parsed_url[4] = urlencode(merged_qs)
return urlunparse(parsed_url)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templatetags/admin_urls.py | Python | mit | 1,926 |
from inspect import getfullargspec
from django.template.library import InclusionNode, parse_bits
class InclusionAdminNode(InclusionNode):
"""
Template tag that allows its template to be overridden per model, per app,
or globally.
"""
def __init__(self, parser, token, func, template_name, takes_context=True):
self.template_name = template_name
params, varargs, varkw, defaults, kwonly, kwonly_defaults, _ = getfullargspec(
func
)
bits = token.split_contents()
args, kwargs = parse_bits(
parser,
bits[1:],
params,
varargs,
varkw,
defaults,
kwonly,
kwonly_defaults,
takes_context,
bits[0],
)
super().__init__(func, takes_context, args, kwargs, filename=None)
def render(self, context):
opts = context["opts"]
app_label = opts.app_label.lower()
object_name = opts.object_name.lower()
# Load template for this render call. (Setting self.filename isn't
# thread-safe.)
context.render_context[self] = context.template.engine.select_template(
[
"admin/%s/%s/%s" % (app_label, object_name, self.template_name),
"admin/%s/%s" % (app_label, self.template_name),
"admin/%s" % self.template_name,
]
)
return super().render(context)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templatetags/base.py | Python | mit | 1,474 |
from django import template
from django.contrib.admin.models import LogEntry
register = template.Library()
class AdminLogNode(template.Node):
def __init__(self, limit, varname, user):
self.limit, self.varname, self.user = limit, varname, user
def __repr__(self):
return "<GetAdminLog Node>"
def render(self, context):
if self.user is None:
entries = LogEntry.objects.all()
else:
user_id = self.user
if not user_id.isdigit():
user_id = context[self.user].pk
entries = LogEntry.objects.filter(user__pk=user_id)
context[self.varname] = entries.select_related("content_type", "user")[
: int(self.limit)
]
return ""
@register.tag
def get_admin_log(parser, token):
"""
Populate a template variable with the admin log for the given criteria.
Usage::
{% get_admin_log [limit] as [varname] for_user [context_var_with_user_obj] %}
Examples::
{% get_admin_log 10 as admin_log for_user 23 %}
{% get_admin_log 10 as admin_log for_user user %}
{% get_admin_log 10 as admin_log %}
Note that ``context_var_containing_user_obj`` can be a hard-coded integer
(user ID) or the name of a template context variable containing the user
object whose ID you want.
"""
tokens = token.contents.split()
if len(tokens) < 4:
raise template.TemplateSyntaxError(
"'get_admin_log' statements require two arguments"
)
if not tokens[1].isdigit():
raise template.TemplateSyntaxError(
"First argument to 'get_admin_log' must be an integer"
)
if tokens[2] != "as":
raise template.TemplateSyntaxError(
"Second argument to 'get_admin_log' must be 'as'"
)
if len(tokens) > 4:
if tokens[4] != "for_user":
raise template.TemplateSyntaxError(
"Fourth argument to 'get_admin_log' must be 'for_user'"
)
return AdminLogNode(
limit=tokens[1],
varname=tokens[3],
user=(tokens[5] if len(tokens) > 5 else None),
)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/templatetags/log.py | Python | mit | 2,167 |
from contextlib import contextmanager
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test import modify_settings
from django.test.selenium import SeleniumTestCase
from django.utils.deprecation import MiddlewareMixin
from django.utils.translation import gettext as _
class CSPMiddleware(MiddlewareMixin):
"""The admin's JavaScript should be compatible with CSP."""
def process_response(self, request, response):
response.headers["Content-Security-Policy"] = "default-src 'self'"
return response
@modify_settings(MIDDLEWARE={"append": "django.contrib.admin.tests.CSPMiddleware"})
class AdminSeleniumTestCase(SeleniumTestCase, StaticLiveServerTestCase):
available_apps = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.sites",
]
def wait_until(self, callback, timeout=10):
"""
Block the execution of the tests until the specified callback returns a
value that is not falsy. This method can be called, for example, after
clicking a link or submitting a form. See the other public methods that
call this function for more details.
"""
from selenium.webdriver.support.wait import WebDriverWait
WebDriverWait(self.selenium, timeout).until(callback)
def wait_for_and_switch_to_popup(self, num_windows=2, timeout=10):
"""
Block until `num_windows` are present and are ready (usually 2, but can
be overridden in the case of pop-ups opening other pop-ups). Switch the
current window to the new pop-up.
"""
self.wait_until(lambda d: len(d.window_handles) == num_windows, timeout)
self.selenium.switch_to.window(self.selenium.window_handles[-1])
self.wait_page_ready()
def wait_for(self, css_selector, timeout=10):
"""
Block until a CSS selector is found on the page.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
self.wait_until(
ec.presence_of_element_located((By.CSS_SELECTOR, css_selector)), timeout
)
def wait_for_text(self, css_selector, text, timeout=10):
"""
Block until the text is found in the CSS selector.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
self.wait_until(
ec.text_to_be_present_in_element((By.CSS_SELECTOR, css_selector), text),
timeout,
)
def wait_for_value(self, css_selector, text, timeout=10):
"""
Block until the value is found in the CSS selector.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
self.wait_until(
ec.text_to_be_present_in_element_value(
(By.CSS_SELECTOR, css_selector), text
),
timeout,
)
def wait_until_visible(self, css_selector, timeout=10):
"""
Block until the element described by the CSS selector is visible.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
self.wait_until(
ec.visibility_of_element_located((By.CSS_SELECTOR, css_selector)), timeout
)
def wait_until_invisible(self, css_selector, timeout=10):
"""
Block until the element described by the CSS selector is invisible.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
self.wait_until(
ec.invisibility_of_element_located((By.CSS_SELECTOR, css_selector)), timeout
)
def wait_page_ready(self, timeout=10):
"""
Block until the page is ready.
"""
self.wait_until(
lambda driver: driver.execute_script("return document.readyState;")
== "complete",
timeout,
)
@contextmanager
def wait_page_loaded(self, timeout=10):
"""
Block until a new page has loaded and is ready.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
old_page = self.selenium.find_element(By.TAG_NAME, "html")
yield
# Wait for the next page to be loaded
self.wait_until(ec.staleness_of(old_page), timeout=timeout)
self.wait_page_ready(timeout=timeout)
def admin_login(self, username, password, login_url="/admin/"):
"""
Log in to the admin.
"""
from selenium.webdriver.common.by import By
self.selenium.get("%s%s" % (self.live_server_url, login_url))
username_input = self.selenium.find_element(By.NAME, "username")
username_input.send_keys(username)
password_input = self.selenium.find_element(By.NAME, "password")
password_input.send_keys(password)
login_text = _("Log in")
with self.wait_page_loaded():
self.selenium.find_element(
By.XPATH, '//input[@value="%s"]' % login_text
).click()
def select_option(self, selector, value):
"""
Select the <OPTION> with the value `value` inside the <SELECT> widget
identified by the CSS selector `selector`.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
select = Select(self.selenium.find_element(By.CSS_SELECTOR, selector))
select.select_by_value(value)
def deselect_option(self, selector, value):
"""
Deselect the <OPTION> with the value `value` inside the <SELECT> widget
identified by the CSS selector `selector`.
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
select = Select(self.selenium.find_element(By.CSS_SELECTOR, selector))
select.deselect_by_value(value)
def assertCountSeleniumElements(self, selector, count, root_element=None):
"""
Assert number of matches for a CSS selector.
`root_element` allow restriction to a pre-selected node.
"""
from selenium.webdriver.common.by import By
root_element = root_element or self.selenium
self.assertEqual(
len(root_element.find_elements(By.CSS_SELECTOR, selector)), count
)
def _assertOptionsValues(self, options_selector, values):
from selenium.webdriver.common.by import By
if values:
options = self.selenium.find_elements(By.CSS_SELECTOR, options_selector)
actual_values = []
for option in options:
actual_values.append(option.get_attribute("value"))
self.assertEqual(values, actual_values)
else:
# Prevent the `find_elements(By.CSS_SELECTOR, …)` call from blocking
# if the selector doesn't match any options as we expect it
# to be the case.
with self.disable_implicit_wait():
self.wait_until(
lambda driver: not driver.find_elements(
By.CSS_SELECTOR, options_selector
)
)
def assertSelectOptions(self, selector, values):
"""
Assert that the <SELECT> widget identified by `selector` has the
options with the given `values`.
"""
self._assertOptionsValues("%s > option" % selector, values)
def assertSelectedOptions(self, selector, values):
"""
Assert that the <SELECT> widget identified by `selector` has the
selected options with the given `values`.
"""
self._assertOptionsValues("%s > option:checked" % selector, values)
def has_css_class(self, selector, klass):
"""
Return True if the element identified by `selector` has the CSS class
`klass`.
"""
from selenium.webdriver.common.by import By
return (
self.selenium.find_element(
By.CSS_SELECTOR,
selector,
)
.get_attribute("class")
.find(klass)
!= -1
)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/tests.py | Python | mit | 8,524 |
import datetime
import decimal
import json
from collections import defaultdict
from django.core.exceptions import FieldDoesNotExist
from django.db import models, router
from django.db.models.constants import LOOKUP_SEP
from django.db.models.deletion import Collector
from django.forms.utils import pretty_name
from django.urls import NoReverseMatch, reverse
from django.utils import formats, timezone
from django.utils.hashable import make_hashable
from django.utils.html import format_html
from django.utils.regex_helper import _lazy_re_compile
from django.utils.text import capfirst
from django.utils.translation import ngettext
from django.utils.translation import override as translation_override
QUOTE_MAP = {i: "_%02X" % i for i in b'":/_#?;@&=+$,"[]<>%\n\\'}
UNQUOTE_MAP = {v: chr(k) for k, v in QUOTE_MAP.items()}
UNQUOTE_RE = _lazy_re_compile("_(?:%s)" % "|".join([x[1:] for x in UNQUOTE_MAP]))
class FieldIsAForeignKeyColumnName(Exception):
"""A field is a foreign key attname, i.e. <FK>_id."""
pass
def lookup_spawns_duplicates(opts, lookup_path):
"""
Return True if the given lookup path spawns duplicates.
"""
lookup_fields = lookup_path.split(LOOKUP_SEP)
# Go through the fields (following all relations) and look for an m2m.
for field_name in lookup_fields:
if field_name == "pk":
field_name = opts.pk.name
try:
field = opts.get_field(field_name)
except FieldDoesNotExist:
# Ignore query lookups.
continue
else:
if hasattr(field, "path_infos"):
# This field is a relation; update opts to follow the relation.
path_info = field.path_infos
opts = path_info[-1].to_opts
if any(path.m2m for path in path_info):
# This field is a m2m relation so duplicates must be
# handled.
return True
return False
def prepare_lookup_value(key, value, separator=","):
"""
Return a lookup value prepared to be used in queryset filtering.
"""
# if key ends with __in, split parameter into separate values
if key.endswith("__in"):
value = value.split(separator)
# if key ends with __isnull, special case '' and the string literals 'false' and '0'
elif key.endswith("__isnull"):
value = value.lower() not in ("", "false", "0")
return value
def quote(s):
"""
Ensure that primary key values do not confuse the admin URLs by escaping
any '/', '_' and ':' and similarly problematic characters.
Similar to urllib.parse.quote(), except that the quoting is slightly
different so that it doesn't get automatically unquoted by the web browser.
"""
return s.translate(QUOTE_MAP) if isinstance(s, str) else s
def unquote(s):
"""Undo the effects of quote()."""
return UNQUOTE_RE.sub(lambda m: UNQUOTE_MAP[m[0]], s)
def flatten(fields):
"""
Return a list which is a single level of flattening of the original list.
"""
flat = []
for field in fields:
if isinstance(field, (list, tuple)):
flat.extend(field)
else:
flat.append(field)
return flat
def flatten_fieldsets(fieldsets):
"""Return a list of field names from an admin fieldsets structure."""
field_names = []
for name, opts in fieldsets:
field_names.extend(flatten(opts["fields"]))
return field_names
def get_deleted_objects(objs, request, admin_site):
"""
Find all objects related to ``objs`` that should also be deleted. ``objs``
must be a homogeneous iterable of objects (e.g. a QuerySet).
Return a nested list of strings suitable for display in the
template with the ``unordered_list`` filter.
"""
try:
obj = objs[0]
except IndexError:
return [], {}, set(), []
else:
using = router.db_for_write(obj._meta.model)
collector = NestedObjects(using=using, origin=objs)
collector.collect(objs)
perms_needed = set()
def format_callback(obj):
model = obj.__class__
has_admin = model in admin_site._registry
opts = obj._meta
no_edit_link = "%s: %s" % (capfirst(opts.verbose_name), obj)
if has_admin:
if not admin_site._registry[model].has_delete_permission(request, obj):
perms_needed.add(opts.verbose_name)
try:
admin_url = reverse(
"%s:%s_%s_change"
% (admin_site.name, opts.app_label, opts.model_name),
None,
(quote(obj.pk),),
)
except NoReverseMatch:
# Change url doesn't exist -- don't display link to edit
return no_edit_link
# Display a link to the admin page.
return format_html(
'{}: <a href="{}">{}</a>', capfirst(opts.verbose_name), admin_url, obj
)
else:
# Don't display link to edit, because it either has no
# admin or is edited inline.
return no_edit_link
to_delete = collector.nested(format_callback)
protected = [format_callback(obj) for obj in collector.protected]
model_count = {
model._meta.verbose_name_plural: len(objs)
for model, objs in collector.model_objs.items()
}
return to_delete, model_count, perms_needed, protected
class NestedObjects(Collector):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.edges = {} # {from_instance: [to_instances]}
self.protected = set()
self.model_objs = defaultdict(set)
def add_edge(self, source, target):
self.edges.setdefault(source, []).append(target)
def collect(self, objs, source=None, source_attr=None, **kwargs):
for obj in objs:
if source_attr and not source_attr.endswith("+"):
related_name = source_attr % {
"class": source._meta.model_name,
"app_label": source._meta.app_label,
}
self.add_edge(getattr(obj, related_name), obj)
else:
self.add_edge(None, obj)
self.model_objs[obj._meta.model].add(obj)
try:
return super().collect(objs, source_attr=source_attr, **kwargs)
except models.ProtectedError as e:
self.protected.update(e.protected_objects)
except models.RestrictedError as e:
self.protected.update(e.restricted_objects)
def related_objects(self, related_model, related_fields, objs):
qs = super().related_objects(related_model, related_fields, objs)
return qs.select_related(
*[related_field.name for related_field in related_fields]
)
def _nested(self, obj, seen, format_callback):
if obj in seen:
return []
seen.add(obj)
children = []
for child in self.edges.get(obj, ()):
children.extend(self._nested(child, seen, format_callback))
if format_callback:
ret = [format_callback(obj)]
else:
ret = [obj]
if children:
ret.append(children)
return ret
def nested(self, format_callback=None):
"""
Return the graph as a nested list.
"""
seen = set()
roots = []
for root in self.edges.get(None, ()):
roots.extend(self._nested(root, seen, format_callback))
return roots
def can_fast_delete(self, *args, **kwargs):
"""
We always want to load the objects into memory so that we can display
them to the user in confirm page.
"""
return False
def model_format_dict(obj):
"""
Return a `dict` with keys 'verbose_name' and 'verbose_name_plural',
typically for use with string formatting.
`obj` may be a `Model` instance, `Model` subclass, or `QuerySet` instance.
"""
if isinstance(obj, (models.Model, models.base.ModelBase)):
opts = obj._meta
elif isinstance(obj, models.query.QuerySet):
opts = obj.model._meta
else:
opts = obj
return {
"verbose_name": opts.verbose_name,
"verbose_name_plural": opts.verbose_name_plural,
}
def model_ngettext(obj, n=None):
"""
Return the appropriate `verbose_name` or `verbose_name_plural` value for
`obj` depending on the count `n`.
`obj` may be a `Model` instance, `Model` subclass, or `QuerySet` instance.
If `obj` is a `QuerySet` instance, `n` is optional and the length of the
`QuerySet` is used.
"""
if isinstance(obj, models.query.QuerySet):
if n is None:
n = obj.count()
obj = obj.model
d = model_format_dict(obj)
singular, plural = d["verbose_name"], d["verbose_name_plural"]
return ngettext(singular, plural, n or 0)
def lookup_field(name, obj, model_admin=None):
opts = obj._meta
try:
f = _get_non_gfk_field(opts, name)
except (FieldDoesNotExist, FieldIsAForeignKeyColumnName):
# For non-field values, the value is either a method, property or
# returned via a callable.
if callable(name):
attr = name
value = attr(obj)
elif hasattr(model_admin, name) and name != "__str__":
attr = getattr(model_admin, name)
value = attr(obj)
else:
attr = getattr(obj, name)
if callable(attr):
value = attr()
else:
value = attr
f = None
else:
attr = None
value = getattr(obj, name)
return f, attr, value
def _get_non_gfk_field(opts, name):
"""
For historical reasons, the admin app relies on GenericForeignKeys as being
"not found" by get_field(). This could likely be cleaned up.
Reverse relations should also be excluded as these aren't attributes of the
model (rather something like `foo_set`).
"""
field = opts.get_field(name)
if (
field.is_relation
and
# Generic foreign keys OR reverse relations
((field.many_to_one and not field.related_model) or field.one_to_many)
):
raise FieldDoesNotExist()
# Avoid coercing <FK>_id fields to FK
if (
field.is_relation
and not field.many_to_many
and hasattr(field, "attname")
and field.attname == name
):
raise FieldIsAForeignKeyColumnName()
return field
def label_for_field(name, model, model_admin=None, return_attr=False, form=None):
"""
Return a sensible label for a field name. The name can be a callable,
property (but not created with @property decorator), or the name of an
object's attribute, as well as a model field. If return_attr is True, also
return the resolved attribute (which could be a callable). This will be
None if (and only if) the name refers to a field.
"""
attr = None
try:
field = _get_non_gfk_field(model._meta, name)
try:
label = field.verbose_name
except AttributeError:
# field is likely a ForeignObjectRel
label = field.related_model._meta.verbose_name
except FieldDoesNotExist:
if name == "__str__":
label = str(model._meta.verbose_name)
attr = str
else:
if callable(name):
attr = name
elif hasattr(model_admin, name):
attr = getattr(model_admin, name)
elif hasattr(model, name):
attr = getattr(model, name)
elif form and name in form.fields:
attr = form.fields[name]
else:
message = "Unable to lookup '%s' on %s" % (
name,
model._meta.object_name,
)
if model_admin:
message += " or %s" % model_admin.__class__.__name__
if form:
message += " or %s" % form.__class__.__name__
raise AttributeError(message)
if hasattr(attr, "short_description"):
label = attr.short_description
elif (
isinstance(attr, property)
and hasattr(attr, "fget")
and hasattr(attr.fget, "short_description")
):
label = attr.fget.short_description
elif callable(attr):
if attr.__name__ == "<lambda>":
label = "--"
else:
label = pretty_name(attr.__name__)
else:
label = pretty_name(name)
except FieldIsAForeignKeyColumnName:
label = pretty_name(name)
attr = name
if return_attr:
return (label, attr)
else:
return label
def help_text_for_field(name, model):
help_text = ""
try:
field = _get_non_gfk_field(model._meta, name)
except (FieldDoesNotExist, FieldIsAForeignKeyColumnName):
pass
else:
if hasattr(field, "help_text"):
help_text = field.help_text
return help_text
def display_for_field(value, field, empty_value_display):
from django.contrib.admin.templatetags.admin_list import _boolean_icon
if getattr(field, "flatchoices", None):
try:
return dict(field.flatchoices).get(value, empty_value_display)
except TypeError:
# Allow list-like choices.
flatchoices = make_hashable(field.flatchoices)
value = make_hashable(value)
return dict(flatchoices).get(value, empty_value_display)
# BooleanField needs special-case null-handling, so it comes before the
# general null test.
elif isinstance(field, models.BooleanField):
return _boolean_icon(value)
elif value is None:
return empty_value_display
elif isinstance(field, models.DateTimeField):
return formats.localize(timezone.template_localtime(value))
elif isinstance(field, (models.DateField, models.TimeField)):
return formats.localize(value)
elif isinstance(field, models.DecimalField):
return formats.number_format(value, field.decimal_places)
elif isinstance(field, (models.IntegerField, models.FloatField)):
return formats.number_format(value)
elif isinstance(field, models.FileField) and value:
return format_html('<a href="{}">{}</a>', value.url, value)
elif isinstance(field, models.JSONField) and value:
try:
return json.dumps(value, ensure_ascii=False, cls=field.encoder)
except TypeError:
return display_for_value(value, empty_value_display)
else:
return display_for_value(value, empty_value_display)
def display_for_value(value, empty_value_display, boolean=False):
from django.contrib.admin.templatetags.admin_list import _boolean_icon
if boolean:
return _boolean_icon(value)
elif value is None:
return empty_value_display
elif isinstance(value, bool):
return str(value)
elif isinstance(value, datetime.datetime):
return formats.localize(timezone.template_localtime(value))
elif isinstance(value, (datetime.date, datetime.time)):
return formats.localize(value)
elif isinstance(value, (int, decimal.Decimal, float)):
return formats.number_format(value)
elif isinstance(value, (list, tuple)):
return ", ".join(str(v) for v in value)
else:
return str(value)
class NotRelationField(Exception):
pass
def get_model_from_relation(field):
if hasattr(field, "path_infos"):
return field.path_infos[-1].to_opts.model
else:
raise NotRelationField
def reverse_field_path(model, path):
"""Create a reversed field path.
E.g. Given (Order, "user__groups"),
return (Group, "user__order").
Final field must be a related model, not a data field.
"""
reversed_path = []
parent = model
pieces = path.split(LOOKUP_SEP)
for piece in pieces:
field = parent._meta.get_field(piece)
# skip trailing data field if extant:
if len(reversed_path) == len(pieces) - 1: # final iteration
try:
get_model_from_relation(field)
except NotRelationField:
break
# Field should point to another model
if field.is_relation and not (field.auto_created and not field.concrete):
related_name = field.related_query_name()
parent = field.remote_field.model
else:
related_name = field.field.name
parent = field.related_model
reversed_path.insert(0, related_name)
return (parent, LOOKUP_SEP.join(reversed_path))
def get_fields_from_path(model, path):
"""Return list of Fields given path relative to model.
e.g. (ModelX, "user__groups__name") -> [
<django.db.models.fields.related.ForeignKey object at 0x...>,
<django.db.models.fields.related.ManyToManyField object at 0x...>,
<django.db.models.fields.CharField object at 0x...>,
]
"""
pieces = path.split(LOOKUP_SEP)
fields = []
for piece in pieces:
if fields:
parent = get_model_from_relation(fields[-1])
else:
parent = model
fields.append(parent._meta.get_field(piece))
return fields
def construct_change_message(form, formsets, add):
"""
Construct a JSON structure describing changes from a changed object.
Translations are deactivated so that strings are stored untranslated.
Translation happens later on LogEntry access.
"""
# Evaluating `form.changed_data` prior to disabling translations is required
# to avoid fields affected by localization from being included incorrectly,
# e.g. where date formats differ such as MM/DD/YYYY vs DD/MM/YYYY.
changed_data = form.changed_data
with translation_override(None):
# Deactivate translations while fetching verbose_name for form
# field labels and using `field_name`, if verbose_name is not provided.
# Translations will happen later on LogEntry access.
changed_field_labels = _get_changed_field_labels_from_form(form, changed_data)
change_message = []
if add:
change_message.append({"added": {}})
elif form.changed_data:
change_message.append({"changed": {"fields": changed_field_labels}})
if formsets:
with translation_override(None):
for formset in formsets:
for added_object in formset.new_objects:
change_message.append(
{
"added": {
"name": str(added_object._meta.verbose_name),
"object": str(added_object),
}
}
)
for changed_object, changed_fields in formset.changed_objects:
change_message.append(
{
"changed": {
"name": str(changed_object._meta.verbose_name),
"object": str(changed_object),
"fields": _get_changed_field_labels_from_form(
formset.forms[0], changed_fields
),
}
}
)
for deleted_object in formset.deleted_objects:
change_message.append(
{
"deleted": {
"name": str(deleted_object._meta.verbose_name),
"object": str(deleted_object),
}
}
)
return change_message
def _get_changed_field_labels_from_form(form, changed_data):
changed_field_labels = []
for field_name in changed_data:
try:
verbose_field_name = form.fields[field_name].label or field_name
except KeyError:
verbose_field_name = field_name
changed_field_labels.append(str(verbose_field_name))
return changed_field_labels
| castiel248/Convert | Lib/site-packages/django/contrib/admin/utils.py | Python | mit | 20,469 |
castiel248/Convert | Lib/site-packages/django/contrib/admin/views/__init__.py | Python | mit | 0 |
|
from django.apps import apps
from django.core.exceptions import FieldDoesNotExist, PermissionDenied
from django.http import Http404, JsonResponse
from django.views.generic.list import BaseListView
class AutocompleteJsonView(BaseListView):
"""Handle AutocompleteWidget's AJAX requests for data."""
paginate_by = 20
admin_site = None
def get(self, request, *args, **kwargs):
"""
Return a JsonResponse with search results as defined in
serialize_result(), by default:
{
results: [{id: "123" text: "foo"}],
pagination: {more: true}
}
"""
(
self.term,
self.model_admin,
self.source_field,
to_field_name,
) = self.process_request(request)
if not self.has_perm(request):
raise PermissionDenied
self.object_list = self.get_queryset()
context = self.get_context_data()
return JsonResponse(
{
"results": [
self.serialize_result(obj, to_field_name)
for obj in context["object_list"]
],
"pagination": {"more": context["page_obj"].has_next()},
}
)
def serialize_result(self, obj, to_field_name):
"""
Convert the provided model object to a dictionary that is added to the
results list.
"""
return {"id": str(getattr(obj, to_field_name)), "text": str(obj)}
def get_paginator(self, *args, **kwargs):
"""Use the ModelAdmin's paginator."""
return self.model_admin.get_paginator(self.request, *args, **kwargs)
def get_queryset(self):
"""Return queryset based on ModelAdmin.get_search_results()."""
qs = self.model_admin.get_queryset(self.request)
qs = qs.complex_filter(self.source_field.get_limit_choices_to())
qs, search_use_distinct = self.model_admin.get_search_results(
self.request, qs, self.term
)
if search_use_distinct:
qs = qs.distinct()
return qs
def process_request(self, request):
"""
Validate request integrity, extract and return request parameters.
Since the subsequent view permission check requires the target model
admin, which is determined here, raise PermissionDenied if the
requested app, model or field are malformed.
Raise Http404 if the target model admin is not configured properly with
search_fields.
"""
term = request.GET.get("term", "")
try:
app_label = request.GET["app_label"]
model_name = request.GET["model_name"]
field_name = request.GET["field_name"]
except KeyError as e:
raise PermissionDenied from e
# Retrieve objects from parameters.
try:
source_model = apps.get_model(app_label, model_name)
except LookupError as e:
raise PermissionDenied from e
try:
source_field = source_model._meta.get_field(field_name)
except FieldDoesNotExist as e:
raise PermissionDenied from e
try:
remote_model = source_field.remote_field.model
except AttributeError as e:
raise PermissionDenied from e
try:
model_admin = self.admin_site._registry[remote_model]
except KeyError as e:
raise PermissionDenied from e
# Validate suitability of objects.
if not model_admin.get_search_fields(request):
raise Http404(
"%s must have search_fields for the autocomplete_view."
% type(model_admin).__qualname__
)
to_field_name = getattr(
source_field.remote_field, "field_name", remote_model._meta.pk.attname
)
to_field_name = remote_model._meta.get_field(to_field_name).attname
if not model_admin.to_field_allowed(request, to_field_name):
raise PermissionDenied
return term, model_admin, source_field, to_field_name
def has_perm(self, request, obj=None):
"""Check if user has permission to access the related model."""
return self.model_admin.has_view_permission(request, obj=obj)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/views/autocomplete.py | Python | mit | 4,316 |
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.decorators import user_passes_test
def staff_member_required(
view_func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url="admin:login"
):
"""
Decorator for views that checks that the user is logged in and is a staff
member, redirecting to the login page if necessary.
"""
actual_decorator = user_passes_test(
lambda u: u.is_active and u.is_staff,
login_url=login_url,
redirect_field_name=redirect_field_name,
)
if view_func:
return actual_decorator(view_func)
return actual_decorator
| castiel248/Convert | Lib/site-packages/django/contrib/admin/views/decorators.py | Python | mit | 639 |
from datetime import datetime, timedelta
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import FieldListFilter
from django.contrib.admin.exceptions import (
DisallowedModelAdminLookup,
DisallowedModelAdminToField,
)
from django.contrib.admin.options import (
IS_POPUP_VAR,
TO_FIELD_VAR,
IncorrectLookupParameters,
)
from django.contrib.admin.utils import (
get_fields_from_path,
lookup_spawns_duplicates,
prepare_lookup_value,
quote,
)
from django.core.exceptions import (
FieldDoesNotExist,
ImproperlyConfigured,
SuspiciousOperation,
)
from django.core.paginator import InvalidPage
from django.db.models import Exists, F, Field, ManyToOneRel, OrderBy, OuterRef
from django.db.models.expressions import Combinable
from django.urls import reverse
from django.utils.http import urlencode
from django.utils.timezone import make_aware
from django.utils.translation import gettext
# Changelist settings
ALL_VAR = "all"
ORDER_VAR = "o"
PAGE_VAR = "p"
SEARCH_VAR = "q"
ERROR_FLAG = "e"
IGNORED_PARAMS = (ALL_VAR, ORDER_VAR, SEARCH_VAR, IS_POPUP_VAR, TO_FIELD_VAR)
class ChangeListSearchForm(forms.Form):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Populate "fields" dynamically because SEARCH_VAR is a variable:
self.fields = {
SEARCH_VAR: forms.CharField(required=False, strip=False),
}
class ChangeList:
search_form_class = ChangeListSearchForm
def __init__(
self,
request,
model,
list_display,
list_display_links,
list_filter,
date_hierarchy,
search_fields,
list_select_related,
list_per_page,
list_max_show_all,
list_editable,
model_admin,
sortable_by,
search_help_text,
):
self.model = model
self.opts = model._meta
self.lookup_opts = self.opts
self.root_queryset = model_admin.get_queryset(request)
self.list_display = list_display
self.list_display_links = list_display_links
self.list_filter = list_filter
self.has_filters = None
self.has_active_filters = None
self.clear_all_filters_qs = None
self.date_hierarchy = date_hierarchy
self.search_fields = search_fields
self.list_select_related = list_select_related
self.list_per_page = list_per_page
self.list_max_show_all = list_max_show_all
self.model_admin = model_admin
self.preserved_filters = model_admin.get_preserved_filters(request)
self.sortable_by = sortable_by
self.search_help_text = search_help_text
# Get search parameters from the query string.
_search_form = self.search_form_class(request.GET)
if not _search_form.is_valid():
for error in _search_form.errors.values():
messages.error(request, ", ".join(error))
self.query = _search_form.cleaned_data.get(SEARCH_VAR) or ""
try:
self.page_num = int(request.GET.get(PAGE_VAR, 1))
except ValueError:
self.page_num = 1
self.show_all = ALL_VAR in request.GET
self.is_popup = IS_POPUP_VAR in request.GET
to_field = request.GET.get(TO_FIELD_VAR)
if to_field and not model_admin.to_field_allowed(request, to_field):
raise DisallowedModelAdminToField(
"The field %s cannot be referenced." % to_field
)
self.to_field = to_field
self.params = dict(request.GET.items())
if PAGE_VAR in self.params:
del self.params[PAGE_VAR]
if ERROR_FLAG in self.params:
del self.params[ERROR_FLAG]
if self.is_popup:
self.list_editable = ()
else:
self.list_editable = list_editable
self.queryset = self.get_queryset(request)
self.get_results(request)
if self.is_popup:
title = gettext("Select %s")
elif self.model_admin.has_change_permission(request):
title = gettext("Select %s to change")
else:
title = gettext("Select %s to view")
self.title = title % self.opts.verbose_name
self.pk_attname = self.lookup_opts.pk.attname
def __repr__(self):
return "<%s: model=%s model_admin=%s>" % (
self.__class__.__qualname__,
self.model.__qualname__,
self.model_admin.__class__.__qualname__,
)
def get_filters_params(self, params=None):
"""
Return all params except IGNORED_PARAMS.
"""
params = params or self.params
lookup_params = params.copy() # a dictionary of the query string
# Remove all the parameters that are globally and systematically
# ignored.
for ignored in IGNORED_PARAMS:
if ignored in lookup_params:
del lookup_params[ignored]
return lookup_params
def get_filters(self, request):
lookup_params = self.get_filters_params()
may_have_duplicates = False
has_active_filters = False
for key, value in lookup_params.items():
if not self.model_admin.lookup_allowed(key, value):
raise DisallowedModelAdminLookup("Filtering by %s not allowed" % key)
filter_specs = []
for list_filter in self.list_filter:
lookup_params_count = len(lookup_params)
if callable(list_filter):
# This is simply a custom list filter class.
spec = list_filter(request, lookup_params, self.model, self.model_admin)
else:
field_path = None
if isinstance(list_filter, (tuple, list)):
# This is a custom FieldListFilter class for a given field.
field, field_list_filter_class = list_filter
else:
# This is simply a field name, so use the default
# FieldListFilter class that has been registered for the
# type of the given field.
field, field_list_filter_class = list_filter, FieldListFilter.create
if not isinstance(field, Field):
field_path = field
field = get_fields_from_path(self.model, field_path)[-1]
spec = field_list_filter_class(
field,
request,
lookup_params,
self.model,
self.model_admin,
field_path=field_path,
)
# field_list_filter_class removes any lookup_params it
# processes. If that happened, check if duplicates should be
# removed.
if lookup_params_count > len(lookup_params):
may_have_duplicates |= lookup_spawns_duplicates(
self.lookup_opts,
field_path,
)
if spec and spec.has_output():
filter_specs.append(spec)
if lookup_params_count > len(lookup_params):
has_active_filters = True
if self.date_hierarchy:
# Create bounded lookup parameters so that the query is more
# efficient.
year = lookup_params.pop("%s__year" % self.date_hierarchy, None)
if year is not None:
month = lookup_params.pop("%s__month" % self.date_hierarchy, None)
day = lookup_params.pop("%s__day" % self.date_hierarchy, None)
try:
from_date = datetime(
int(year),
int(month if month is not None else 1),
int(day if day is not None else 1),
)
except ValueError as e:
raise IncorrectLookupParameters(e) from e
if day:
to_date = from_date + timedelta(days=1)
elif month:
# In this branch, from_date will always be the first of a
# month, so advancing 32 days gives the next month.
to_date = (from_date + timedelta(days=32)).replace(day=1)
else:
to_date = from_date.replace(year=from_date.year + 1)
if settings.USE_TZ:
from_date = make_aware(from_date)
to_date = make_aware(to_date)
lookup_params.update(
{
"%s__gte" % self.date_hierarchy: from_date,
"%s__lt" % self.date_hierarchy: to_date,
}
)
# At this point, all the parameters used by the various ListFilters
# have been removed from lookup_params, which now only contains other
# parameters passed via the query string. We now loop through the
# remaining parameters both to ensure that all the parameters are valid
# fields and to determine if at least one of them spawns duplicates. If
# the lookup parameters aren't real fields, then bail out.
try:
for key, value in lookup_params.items():
lookup_params[key] = prepare_lookup_value(key, value)
may_have_duplicates |= lookup_spawns_duplicates(self.lookup_opts, key)
return (
filter_specs,
bool(filter_specs),
lookup_params,
may_have_duplicates,
has_active_filters,
)
except FieldDoesNotExist as e:
raise IncorrectLookupParameters(e) from e
def get_query_string(self, new_params=None, remove=None):
if new_params is None:
new_params = {}
if remove is None:
remove = []
p = self.params.copy()
for r in remove:
for k in list(p):
if k.startswith(r):
del p[k]
for k, v in new_params.items():
if v is None:
if k in p:
del p[k]
else:
p[k] = v
return "?%s" % urlencode(sorted(p.items()))
def get_results(self, request):
paginator = self.model_admin.get_paginator(
request, self.queryset, self.list_per_page
)
# Get the number of objects, with admin filters applied.
result_count = paginator.count
# Get the total number of objects, with no admin filters applied.
if self.model_admin.show_full_result_count:
full_result_count = self.root_queryset.count()
else:
full_result_count = None
can_show_all = result_count <= self.list_max_show_all
multi_page = result_count > self.list_per_page
# Get the list of objects to display on this page.
if (self.show_all and can_show_all) or not multi_page:
result_list = self.queryset._clone()
else:
try:
result_list = paginator.page(self.page_num).object_list
except InvalidPage:
raise IncorrectLookupParameters
self.result_count = result_count
self.show_full_result_count = self.model_admin.show_full_result_count
# Admin actions are shown if there is at least one entry
# or if entries are not counted because show_full_result_count is disabled
self.show_admin_actions = not self.show_full_result_count or bool(
full_result_count
)
self.full_result_count = full_result_count
self.result_list = result_list
self.can_show_all = can_show_all
self.multi_page = multi_page
self.paginator = paginator
def _get_default_ordering(self):
ordering = []
if self.model_admin.ordering:
ordering = self.model_admin.ordering
elif self.lookup_opts.ordering:
ordering = self.lookup_opts.ordering
return ordering
def get_ordering_field(self, field_name):
"""
Return the proper model field name corresponding to the given
field_name to use for ordering. field_name may either be the name of a
proper model field or the name of a method (on the admin or model) or a
callable with the 'admin_order_field' attribute. Return None if no
proper model field name can be matched.
"""
try:
field = self.lookup_opts.get_field(field_name)
return field.name
except FieldDoesNotExist:
# See whether field_name is a name of a non-field
# that allows sorting.
if callable(field_name):
attr = field_name
elif hasattr(self.model_admin, field_name):
attr = getattr(self.model_admin, field_name)
else:
attr = getattr(self.model, field_name)
if isinstance(attr, property) and hasattr(attr, "fget"):
attr = attr.fget
return getattr(attr, "admin_order_field", None)
def get_ordering(self, request, queryset):
"""
Return the list of ordering fields for the change list.
First check the get_ordering() method in model admin, then check
the object's default ordering. Then, any manually-specified ordering
from the query string overrides anything. Finally, a deterministic
order is guaranteed by calling _get_deterministic_ordering() with the
constructed ordering.
"""
params = self.params
ordering = list(
self.model_admin.get_ordering(request) or self._get_default_ordering()
)
if ORDER_VAR in params:
# Clear ordering and used params
ordering = []
order_params = params[ORDER_VAR].split(".")
for p in order_params:
try:
none, pfx, idx = p.rpartition("-")
field_name = self.list_display[int(idx)]
order_field = self.get_ordering_field(field_name)
if not order_field:
continue # No 'admin_order_field', skip it
if isinstance(order_field, OrderBy):
if pfx == "-":
order_field = order_field.copy()
order_field.reverse_ordering()
ordering.append(order_field)
elif hasattr(order_field, "resolve_expression"):
# order_field is an expression.
ordering.append(
order_field.desc() if pfx == "-" else order_field.asc()
)
# reverse order if order_field has already "-" as prefix
elif order_field.startswith("-") and pfx == "-":
ordering.append(order_field[1:])
else:
ordering.append(pfx + order_field)
except (IndexError, ValueError):
continue # Invalid ordering specified, skip it.
# Add the given query's ordering fields, if any.
ordering.extend(queryset.query.order_by)
return self._get_deterministic_ordering(ordering)
def _get_deterministic_ordering(self, ordering):
"""
Ensure a deterministic order across all database backends. Search for a
single field or unique together set of fields providing a total
ordering. If these are missing, augment the ordering with a descendant
primary key.
"""
ordering = list(ordering)
ordering_fields = set()
total_ordering_fields = {"pk"} | {
field.attname
for field in self.lookup_opts.fields
if field.unique and not field.null
}
for part in ordering:
# Search for single field providing a total ordering.
field_name = None
if isinstance(part, str):
field_name = part.lstrip("-")
elif isinstance(part, F):
field_name = part.name
elif isinstance(part, OrderBy) and isinstance(part.expression, F):
field_name = part.expression.name
if field_name:
# Normalize attname references by using get_field().
try:
field = self.lookup_opts.get_field(field_name)
except FieldDoesNotExist:
# Could be "?" for random ordering or a related field
# lookup. Skip this part of introspection for now.
continue
# Ordering by a related field name orders by the referenced
# model's ordering. Skip this part of introspection for now.
if field.remote_field and field_name == field.name:
continue
if field.attname in total_ordering_fields:
break
ordering_fields.add(field.attname)
else:
# No single total ordering field, try unique_together and total
# unique constraints.
constraint_field_names = (
*self.lookup_opts.unique_together,
*(
constraint.fields
for constraint in self.lookup_opts.total_unique_constraints
),
)
for field_names in constraint_field_names:
# Normalize attname references by using get_field().
fields = [
self.lookup_opts.get_field(field_name) for field_name in field_names
]
# Composite unique constraints containing a nullable column
# cannot ensure total ordering.
if any(field.null for field in fields):
continue
if ordering_fields.issuperset(field.attname for field in fields):
break
else:
# If no set of unique fields is present in the ordering, rely
# on the primary key to provide total ordering.
ordering.append("-pk")
return ordering
def get_ordering_field_columns(self):
"""
Return a dictionary of ordering field column numbers and asc/desc.
"""
# We must cope with more than one column having the same underlying sort
# field, so we base things on column numbers.
ordering = self._get_default_ordering()
ordering_fields = {}
if ORDER_VAR not in self.params:
# for ordering specified on ModelAdmin or model Meta, we don't know
# the right column numbers absolutely, because there might be more
# than one column associated with that ordering, so we guess.
for field in ordering:
if isinstance(field, (Combinable, OrderBy)):
if not isinstance(field, OrderBy):
field = field.asc()
if isinstance(field.expression, F):
order_type = "desc" if field.descending else "asc"
field = field.expression.name
else:
continue
elif field.startswith("-"):
field = field[1:]
order_type = "desc"
else:
order_type = "asc"
for index, attr in enumerate(self.list_display):
if self.get_ordering_field(attr) == field:
ordering_fields[index] = order_type
break
else:
for p in self.params[ORDER_VAR].split("."):
none, pfx, idx = p.rpartition("-")
try:
idx = int(idx)
except ValueError:
continue # skip it
ordering_fields[idx] = "desc" if pfx == "-" else "asc"
return ordering_fields
def get_queryset(self, request):
# First, we collect all the declared list filters.
(
self.filter_specs,
self.has_filters,
remaining_lookup_params,
filters_may_have_duplicates,
self.has_active_filters,
) = self.get_filters(request)
# Then, we let every list filter modify the queryset to its liking.
qs = self.root_queryset
for filter_spec in self.filter_specs:
new_qs = filter_spec.queryset(request, qs)
if new_qs is not None:
qs = new_qs
try:
# Finally, we apply the remaining lookup parameters from the query
# string (i.e. those that haven't already been processed by the
# filters).
qs = qs.filter(**remaining_lookup_params)
except (SuspiciousOperation, ImproperlyConfigured):
# Allow certain types of errors to be re-raised as-is so that the
# caller can treat them in a special way.
raise
except Exception as e:
# Every other error is caught with a naked except, because we don't
# have any other way of validating lookup parameters. They might be
# invalid if the keyword arguments are incorrect, or if the values
# are not in the correct type, so we might get FieldError,
# ValueError, ValidationError, or ?.
raise IncorrectLookupParameters(e)
# Apply search results
qs, search_may_have_duplicates = self.model_admin.get_search_results(
request,
qs,
self.query,
)
# Set query string for clearing all filters.
self.clear_all_filters_qs = self.get_query_string(
new_params=remaining_lookup_params,
remove=self.get_filters_params(),
)
# Remove duplicates from results, if necessary
if filters_may_have_duplicates | search_may_have_duplicates:
qs = qs.filter(pk=OuterRef("pk"))
qs = self.root_queryset.filter(Exists(qs))
# Set ordering.
ordering = self.get_ordering(request, qs)
qs = qs.order_by(*ordering)
if not qs.query.select_related:
qs = self.apply_select_related(qs)
return qs
def apply_select_related(self, qs):
if self.list_select_related is True:
return qs.select_related()
if self.list_select_related is False:
if self.has_related_field_in_list_display():
return qs.select_related()
if self.list_select_related:
return qs.select_related(*self.list_select_related)
return qs
def has_related_field_in_list_display(self):
for field_name in self.list_display:
try:
field = self.lookup_opts.get_field(field_name)
except FieldDoesNotExist:
pass
else:
if isinstance(field.remote_field, ManyToOneRel):
# <FK>_id field names don't require a join.
if field_name != field.get_attname():
return True
return False
def url_for_result(self, result):
pk = getattr(result, self.pk_attname)
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,
)
| castiel248/Convert | Lib/site-packages/django/contrib/admin/views/main.py | Python | mit | 23,813 |
"""
Form Widget classes specific to the Django admin site.
"""
import copy
import json
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.validators import URLValidator
from django.db.models import CASCADE, UUIDField
from django.urls import reverse
from django.urls.exceptions import NoReverseMatch
from django.utils.html import smart_urlquote
from django.utils.http import urlencode
from django.utils.text import Truncator
from django.utils.translation import get_language
from django.utils.translation import gettext as _
class FilteredSelectMultiple(forms.SelectMultiple):
"""
A SelectMultiple with a JavaScript filter interface.
Note that the resulting JavaScript assumes that the jsi18n
catalog has been loaded in the page
"""
class Media:
js = [
"admin/js/core.js",
"admin/js/SelectBox.js",
"admin/js/SelectFilter2.js",
]
def __init__(self, verbose_name, is_stacked, attrs=None, choices=()):
self.verbose_name = verbose_name
self.is_stacked = is_stacked
super().__init__(attrs, choices)
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
context["widget"]["attrs"]["class"] = "selectfilter"
if self.is_stacked:
context["widget"]["attrs"]["class"] += "stacked"
context["widget"]["attrs"]["data-field-name"] = self.verbose_name
context["widget"]["attrs"]["data-is-stacked"] = int(self.is_stacked)
return context
class AdminDateWidget(forms.DateInput):
class Media:
js = [
"admin/js/calendar.js",
"admin/js/admin/DateTimeShortcuts.js",
]
def __init__(self, attrs=None, format=None):
attrs = {"class": "vDateField", "size": "10", **(attrs or {})}
super().__init__(attrs=attrs, format=format)
class AdminTimeWidget(forms.TimeInput):
class Media:
js = [
"admin/js/calendar.js",
"admin/js/admin/DateTimeShortcuts.js",
]
def __init__(self, attrs=None, format=None):
attrs = {"class": "vTimeField", "size": "8", **(attrs or {})}
super().__init__(attrs=attrs, format=format)
class AdminSplitDateTime(forms.SplitDateTimeWidget):
"""
A SplitDateTime Widget that has some admin-specific styling.
"""
template_name = "admin/widgets/split_datetime.html"
def __init__(self, attrs=None):
widgets = [AdminDateWidget, AdminTimeWidget]
# Note that we're calling MultiWidget, not SplitDateTimeWidget, because
# we want to define widgets.
forms.MultiWidget.__init__(self, widgets, attrs)
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
context["date_label"] = _("Date:")
context["time_label"] = _("Time:")
return context
class AdminRadioSelect(forms.RadioSelect):
template_name = "admin/widgets/radio.html"
class AdminFileWidget(forms.ClearableFileInput):
template_name = "admin/widgets/clearable_file_input.html"
def url_params_from_lookup_dict(lookups):
"""
Convert the type of lookups specified in a ForeignKey limit_choices_to
attribute to a dictionary of query parameters
"""
params = {}
if lookups and hasattr(lookups, "items"):
for k, v in lookups.items():
if callable(v):
v = v()
if isinstance(v, (tuple, list)):
v = ",".join(str(x) for x in v)
elif isinstance(v, bool):
v = ("0", "1")[v]
else:
v = str(v)
params[k] = v
return params
class ForeignKeyRawIdWidget(forms.TextInput):
"""
A Widget for displaying ForeignKeys in the "raw_id" interface rather than
in a <select> box.
"""
template_name = "admin/widgets/foreign_key_raw_id.html"
def __init__(self, rel, admin_site, attrs=None, using=None):
self.rel = rel
self.admin_site = admin_site
self.db = using
super().__init__(attrs)
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
rel_to = self.rel.model
if rel_to in self.admin_site._registry:
# The related object is registered with the same AdminSite
related_url = reverse(
"admin:%s_%s_changelist"
% (
rel_to._meta.app_label,
rel_to._meta.model_name,
),
current_app=self.admin_site.name,
)
params = self.url_parameters()
if params:
related_url += "?" + urlencode(params)
context["related_url"] = related_url
context["link_title"] = _("Lookup")
# The JavaScript code looks for this class.
css_class = "vForeignKeyRawIdAdminField"
if isinstance(self.rel.get_related_field(), UUIDField):
css_class += " vUUIDField"
context["widget"]["attrs"].setdefault("class", css_class)
else:
context["related_url"] = None
if context["widget"]["value"]:
context["link_label"], context["link_url"] = self.label_and_url_for_value(
value
)
else:
context["link_label"] = None
return context
def base_url_parameters(self):
limit_choices_to = self.rel.limit_choices_to
if callable(limit_choices_to):
limit_choices_to = limit_choices_to()
return url_params_from_lookup_dict(limit_choices_to)
def url_parameters(self):
from django.contrib.admin.views.main import TO_FIELD_VAR
params = self.base_url_parameters()
params.update({TO_FIELD_VAR: self.rel.get_related_field().name})
return params
def label_and_url_for_value(self, value):
key = self.rel.get_related_field().name
try:
obj = self.rel.model._default_manager.using(self.db).get(**{key: value})
except (ValueError, self.rel.model.DoesNotExist, ValidationError):
return "", ""
try:
url = reverse(
"%s:%s_%s_change"
% (
self.admin_site.name,
obj._meta.app_label,
obj._meta.object_name.lower(),
),
args=(obj.pk,),
)
except NoReverseMatch:
url = "" # Admin not registered for target model.
return Truncator(obj).words(14), url
class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
"""
A Widget for displaying ManyToMany ids in the "raw_id" interface rather than
in a <select multiple> box.
"""
template_name = "admin/widgets/many_to_many_raw_id.html"
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
if self.rel.model in self.admin_site._registry:
# The related object is registered with the same AdminSite
context["widget"]["attrs"]["class"] = "vManyToManyRawIdAdminField"
return context
def url_parameters(self):
return self.base_url_parameters()
def label_and_url_for_value(self, value):
return "", ""
def value_from_datadict(self, data, files, name):
value = data.get(name)
if value:
return value.split(",")
def format_value(self, value):
return ",".join(str(v) for v in value) if value else ""
class RelatedFieldWidgetWrapper(forms.Widget):
"""
This class is a wrapper to a given widget to add the add icon for the
admin interface.
"""
template_name = "admin/widgets/related_widget_wrapper.html"
def __init__(
self,
widget,
rel,
admin_site,
can_add_related=None,
can_change_related=False,
can_delete_related=False,
can_view_related=False,
):
self.needs_multipart_form = widget.needs_multipart_form
self.attrs = widget.attrs
self.choices = widget.choices
self.widget = widget
self.rel = rel
# Backwards compatible check for whether a user can add related
# objects.
if can_add_related is None:
can_add_related = rel.model in admin_site._registry
self.can_add_related = can_add_related
# XXX: The UX does not support multiple selected values.
multiple = getattr(widget, "allow_multiple_selected", False)
self.can_change_related = not multiple and can_change_related
# XXX: The deletion UX can be confusing when dealing with cascading deletion.
cascade = getattr(rel, "on_delete", None) is CASCADE
self.can_delete_related = not multiple and not cascade and can_delete_related
self.can_view_related = not multiple and can_view_related
# so we can check if the related object is registered with this AdminSite
self.admin_site = admin_site
def __deepcopy__(self, memo):
obj = copy.copy(self)
obj.widget = copy.deepcopy(self.widget, memo)
obj.attrs = self.widget.attrs
memo[id(self)] = obj
return obj
@property
def is_hidden(self):
return self.widget.is_hidden
@property
def media(self):
return self.widget.media
def get_related_url(self, info, action, *args):
return reverse(
"admin:%s_%s_%s" % (info + (action,)),
current_app=self.admin_site.name,
args=args,
)
def get_context(self, name, value, attrs):
from django.contrib.admin.views.main import IS_POPUP_VAR, TO_FIELD_VAR
rel_opts = self.rel.model._meta
info = (rel_opts.app_label, rel_opts.model_name)
self.widget.choices = self.choices
related_field_name = self.rel.get_related_field().name
url_params = "&".join(
"%s=%s" % param
for param in [
(TO_FIELD_VAR, related_field_name),
(IS_POPUP_VAR, 1),
]
)
context = {
"rendered_widget": self.widget.render(name, value, attrs),
"is_hidden": self.is_hidden,
"name": name,
"url_params": url_params,
"model": rel_opts.verbose_name,
"can_add_related": self.can_add_related,
"can_change_related": self.can_change_related,
"can_delete_related": self.can_delete_related,
"can_view_related": self.can_view_related,
"model_has_limit_choices_to": self.rel.limit_choices_to,
}
if self.can_add_related:
context["add_related_url"] = self.get_related_url(info, "add")
if self.can_delete_related:
context["delete_related_template_url"] = self.get_related_url(
info, "delete", "__fk__"
)
if self.can_view_related or self.can_change_related:
context["view_related_url_params"] = f"{TO_FIELD_VAR}={related_field_name}"
context["change_related_template_url"] = self.get_related_url(
info, "change", "__fk__"
)
return context
def value_from_datadict(self, data, files, name):
return self.widget.value_from_datadict(data, files, name)
def value_omitted_from_data(self, data, files, name):
return self.widget.value_omitted_from_data(data, files, name)
def id_for_label(self, id_):
return self.widget.id_for_label(id_)
class AdminTextareaWidget(forms.Textarea):
def __init__(self, attrs=None):
super().__init__(attrs={"class": "vLargeTextField", **(attrs or {})})
class AdminTextInputWidget(forms.TextInput):
def __init__(self, attrs=None):
super().__init__(attrs={"class": "vTextField", **(attrs or {})})
class AdminEmailInputWidget(forms.EmailInput):
def __init__(self, attrs=None):
super().__init__(attrs={"class": "vTextField", **(attrs or {})})
class AdminURLFieldWidget(forms.URLInput):
template_name = "admin/widgets/url.html"
def __init__(self, attrs=None, validator_class=URLValidator):
super().__init__(attrs={"class": "vURLField", **(attrs or {})})
self.validator = validator_class()
def get_context(self, name, value, attrs):
try:
self.validator(value if value else "")
url_valid = True
except ValidationError:
url_valid = False
context = super().get_context(name, value, attrs)
context["current_label"] = _("Currently:")
context["change_label"] = _("Change:")
context["widget"]["href"] = (
smart_urlquote(context["widget"]["value"]) if value else ""
)
context["url_valid"] = url_valid
return context
class AdminIntegerFieldWidget(forms.NumberInput):
class_name = "vIntegerField"
def __init__(self, attrs=None):
super().__init__(attrs={"class": self.class_name, **(attrs or {})})
class AdminBigIntegerFieldWidget(AdminIntegerFieldWidget):
class_name = "vBigIntegerField"
class AdminUUIDInputWidget(forms.TextInput):
def __init__(self, attrs=None):
super().__init__(attrs={"class": "vUUIDField", **(attrs or {})})
# Mapping of lowercase language codes [returned by Django's get_language()] to
# language codes supported by select2.
# See django/contrib/admin/static/admin/js/vendor/select2/i18n/*
SELECT2_TRANSLATIONS = {
x.lower(): x
for x in [
"ar",
"az",
"bg",
"ca",
"cs",
"da",
"de",
"el",
"en",
"es",
"et",
"eu",
"fa",
"fi",
"fr",
"gl",
"he",
"hi",
"hr",
"hu",
"id",
"is",
"it",
"ja",
"km",
"ko",
"lt",
"lv",
"mk",
"ms",
"nb",
"nl",
"pl",
"pt-BR",
"pt",
"ro",
"ru",
"sk",
"sr-Cyrl",
"sr",
"sv",
"th",
"tr",
"uk",
"vi",
]
}
SELECT2_TRANSLATIONS.update({"zh-hans": "zh-CN", "zh-hant": "zh-TW"})
def get_select2_language():
lang_code = get_language()
supported_code = SELECT2_TRANSLATIONS.get(lang_code)
if supported_code is None and lang_code is not None:
# If 'zh-hant-tw' is not supported, try subsequent language codes i.e.
# 'zh-hant' and 'zh'.
i = None
while (i := lang_code.rfind("-", 0, i)) > -1:
if supported_code := SELECT2_TRANSLATIONS.get(lang_code[:i]):
return supported_code
return supported_code
class AutocompleteMixin:
"""
Select widget mixin that loads options from AutocompleteJsonView via AJAX.
Renders the necessary data attributes for select2 and adds the static form
media.
"""
url_name = "%s:autocomplete"
def __init__(self, field, admin_site, attrs=None, choices=(), using=None):
self.field = field
self.admin_site = admin_site
self.db = using
self.choices = choices
self.attrs = {} if attrs is None else attrs.copy()
self.i18n_name = get_select2_language()
def get_url(self):
return reverse(self.url_name % self.admin_site.name)
def build_attrs(self, base_attrs, extra_attrs=None):
"""
Set select2's AJAX attributes.
Attributes can be set using the html5 data attribute.
Nested attributes require a double dash as per
https://select2.org/configuration/data-attributes#nested-subkey-options
"""
attrs = super().build_attrs(base_attrs, extra_attrs=extra_attrs)
attrs.setdefault("class", "")
attrs.update(
{
"data-ajax--cache": "true",
"data-ajax--delay": 250,
"data-ajax--type": "GET",
"data-ajax--url": self.get_url(),
"data-app-label": self.field.model._meta.app_label,
"data-model-name": self.field.model._meta.model_name,
"data-field-name": self.field.name,
"data-theme": "admin-autocomplete",
"data-allow-clear": json.dumps(not self.is_required),
"data-placeholder": "", # Allows clearing of the input.
"lang": self.i18n_name,
"class": attrs["class"]
+ (" " if attrs["class"] else "")
+ "admin-autocomplete",
}
)
return attrs
def optgroups(self, name, value, attr=None):
"""Return selected options based on the ModelChoiceIterator."""
default = (None, [], 0)
groups = [default]
has_selected = False
selected_choices = {
str(v) for v in value if str(v) not in self.choices.field.empty_values
}
if not self.is_required and not self.allow_multiple_selected:
default[1].append(self.create_option(name, "", "", False, 0))
remote_model_opts = self.field.remote_field.model._meta
to_field_name = getattr(
self.field.remote_field, "field_name", remote_model_opts.pk.attname
)
to_field_name = remote_model_opts.get_field(to_field_name).attname
choices = (
(getattr(obj, to_field_name), self.choices.field.label_from_instance(obj))
for obj in self.choices.queryset.using(self.db).filter(
**{"%s__in" % to_field_name: selected_choices}
)
)
for option_value, option_label in choices:
selected = str(option_value) in value and (
has_selected is False or self.allow_multiple_selected
)
has_selected |= selected
index = len(default[1])
subgroup = default[1]
subgroup.append(
self.create_option(
name, option_value, option_label, selected_choices, index
)
)
return groups
@property
def media(self):
extra = "" if settings.DEBUG else ".min"
i18n_file = (
("admin/js/vendor/select2/i18n/%s.js" % self.i18n_name,)
if self.i18n_name
else ()
)
return forms.Media(
js=(
"admin/js/vendor/jquery/jquery%s.js" % extra,
"admin/js/vendor/select2/select2.full%s.js" % extra,
)
+ i18n_file
+ (
"admin/js/jquery.init.js",
"admin/js/autocomplete.js",
),
css={
"screen": (
"admin/css/vendor/select2/select2%s.css" % extra,
"admin/css/autocomplete.css",
),
},
)
class AutocompleteSelect(AutocompleteMixin, forms.Select):
pass
class AutocompleteSelectMultiple(AutocompleteMixin, forms.SelectMultiple):
pass
| castiel248/Convert | Lib/site-packages/django/contrib/admin/widgets.py | Python | mit | 19,195 |
castiel248/Convert | Lib/site-packages/django/contrib/admindocs/__init__.py | Python | mit | 0 |
|
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class AdminDocsConfig(AppConfig):
name = "django.contrib.admindocs"
verbose_name = _("Administrative Documentation")
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/apps.py | Python | mit | 216 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Charl du Plessis <cjdupless@gmail.com>, 2021
# F Wolff <friedel@translate.org.za>, 2019
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-08-23 10:57+0000\n"
"Last-Translator: Charl du Plessis <cjdupless@gmail.com>\n"
"Language-Team: Afrikaans (http://www.transifex.com/django/django/language/"
"af/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: af\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr "Administratiewe dokumentasie"
msgid "Home"
msgstr "Tuisblad"
msgid "Documentation"
msgstr "Dokumentasie"
msgid "Bookmarklets"
msgstr ""
msgid "Documentation bookmarklets"
msgstr ""
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr "Dokumentasie vir dié bladsy"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Neem jou van enige bladsy na die dokumentasie vir die vertooning wat daardie "
"bladsy genereer."
msgid "Tags"
msgstr ""
msgid "List of all the template tags and their functions."
msgstr "Lys van alle templaat tags en hulle funksies."
msgid "Filters"
msgstr ""
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
msgid "Models"
msgstr ""
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
msgid "Views"
msgstr ""
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Elke bladsy op die publieke werf word gegenereer deur 'n vertoning. Die "
"vertoning definiëer watter templaat word gebruik om die bladsy te genereer "
"en watter objekte is beskikbaar aan daardie templaat."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
msgid "Please install docutils"
msgstr "Installeer asseblief docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Die admin dokumentasie stelsel benodig Python se <a href=\"%(link)s"
"\">docutils</a> biblioteek."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Vra asseblief jou administrateurs om <a href=\"%(link)s\">docutils</a> te "
"installeer."
#, python-format
msgid "Model: %(name)s"
msgstr ""
msgid "Fields"
msgstr "Velde"
msgid "Field"
msgstr "Veld"
msgid "Type"
msgstr "Tipe"
msgid "Description"
msgstr "Beskrywing"
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr "Terug na Model dokumentasie"
msgid "Model documentation"
msgstr "Model dokumentasie"
msgid "Model groups"
msgstr "Model groepe"
msgid "Templates"
msgstr "Template"
#, python-format
msgid "Template: %(name)s"
msgstr "Templaat: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Templaat: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr ""
msgid "(does not exist)"
msgstr "(bestaan nie)"
msgid "Back to Documentation"
msgstr ""
msgid "Template filters"
msgstr ""
msgid "Template filter documentation"
msgstr ""
msgid "Built-in filters"
msgstr ""
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
msgid "Template tags"
msgstr ""
msgid "Template tag documentation"
msgstr ""
msgid "Built-in tags"
msgstr ""
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#, python-format
msgid "View: %(name)s"
msgstr ""
msgid "Context:"
msgstr ""
msgid "Templates:"
msgstr ""
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr ""
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr ""
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
msgid "tag:"
msgstr ""
msgid "filter:"
msgstr ""
msgid "view:"
msgstr ""
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr ""
msgid "model:"
msgstr ""
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr ""
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr ""
#, python-format
msgid "all %s"
msgstr "alle %s"
#, python-format
msgid "number of %s"
msgstr ""
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr ""
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/af/LC_MESSAGES/django.po | po | mit | 5,392 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Bashar Al-Abdulhadi, 2015-2016,2021
# Bashar Al-Abdulhadi, 2014
# Jannis Leidel <jannis@leidel.info>, 2011
# Muaaz Alsaied, 2020
# Ossama Khayat <okhayat@gmail.com>, 2012
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-10-15 21:25+0000\n"
"Last-Translator: Bashar Al-Abdulhadi\n"
"Language-Team: Arabic (http://www.transifex.com/django/django/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"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"
msgid "Administrative Documentation"
msgstr "الوثائق الإدارية"
msgid "Home"
msgstr "الرئيسية"
msgid "Documentation"
msgstr "الوثائق"
msgid "Bookmarklets"
msgstr "أوامر المفضلة"
msgid "Documentation bookmarklets"
msgstr "أوامر مفضلة الوثائق"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"لتثبيت أوامر المفضلة، اسحب الرابط إلى المواقع المفضلة في شريط الأدوات الخاص "
"بك، أو إضغط بزر الماوس الأيمن على الرابط وأضفه إلى قائمة المواقع المفضلة "
"الخاصة بك. الآن يمكنك اختيار أوامر المفضلة من أي صفحة في الموقع."
msgid "Documentation for this page"
msgstr "الوثائق لهذه الصفحة"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr "ينتقل بك من أي صفحة إلى وثائق العرض الذي أنشأ هذه الصفحة."
msgid "Tags"
msgstr "الوسوم"
msgid "List of all the template tags and their functions."
msgstr "قائمة بجميع وسوم القوالب ووظائفهم."
msgid "Filters"
msgstr "الفلاتر"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"المرشحات هي الإجراءات التي يمكن تطبيقها على المتغيرات في قالب لتغيير الناتج."
msgid "Models"
msgstr "النماذج"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"الموديلات هي وصف لجميع الكائنات في النظام والحقول المرتبطة بها. كل موديول "
"يحتوي على قائمة الحقول التي يمكن الوصول إليها كمتغيرات قالب"
msgid "Views"
msgstr "إستعراض"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"يتم إنشاء كل صفحة على الموقع علني من خلال عرض. يعرّف العرض الذي يستخدم كقالب "
"لتوليد الصفحة والتي هي الكائنات المتاحة لذلك القالب."
msgid "Tools for your browser to quickly access admin functionality."
msgstr "أدوات المتصفح لكي تتمكن من الوصول بسرعة وظائف المشرف."
msgid "Please install docutils"
msgstr "الرجاء تثبيت docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"نظام توثيقات المشرف يتطلب مكتبة بايثون <a href=\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr "الرجاء الطلب من مشرف النظام لتنصيب <a href=\"%(link)s\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "المودل: %(name)s"
msgid "Fields"
msgstr "الحقول"
msgid "Field"
msgstr "حقل"
msgid "Type"
msgstr "نوع"
msgid "Description"
msgstr "وصف"
msgid "Methods with arguments"
msgstr "طُرق بمُعطيات"
msgid "Method"
msgstr "الطريقة"
msgid "Arguments"
msgstr "مُعطيات"
msgid "Back to Model documentation"
msgstr "العودة إلى وثائق الموديول"
msgid "Model documentation"
msgstr "وثائق الموديول"
msgid "Model groups"
msgstr "مجموعات الموديول"
msgid "Templates"
msgstr "القوالب"
#, python-format
msgid "Template: %(name)s"
msgstr "قالب: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "قالب: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "البحث عن مسار القالب <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(غير موجود)"
msgid "Back to Documentation"
msgstr "العودة إلى الوثائق"
msgid "Template filters"
msgstr "مرشحات القالب"
msgid "Template filter documentation"
msgstr "وثائق مرشح القالب"
msgid "Built-in filters"
msgstr "المرشحات المدمجة"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"لإستخدام هذه المرشحات, الرجاء وضع <code>%(code)s</code> في القالب الخاص بك "
"قبل إستخدام المرشّح."
msgid "Template tags"
msgstr "وسوم القالب"
msgid "Template tag documentation"
msgstr "وثائق وسم القالب"
msgid "Built-in tags"
msgstr "المسوم المدمجة"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"لإستخدام هذه الوسوم, الرجاء وضع <code>%(code)s</code> في القالب الخاص بك قبل "
"إستخدام الوسم."
#, python-format
msgid "View: %(name)s"
msgstr "عرض: %(name)s"
msgid "Context:"
msgstr "السياق:"
msgid "Templates:"
msgstr "القوالب:"
msgid "Back to View documentation"
msgstr "العودة إلى وثائق الفيو"
msgid "View documentation"
msgstr "وثائق الفيو"
msgid "Jump to namespace"
msgstr "القفز إلى مساحة الاسم"
msgid "Empty namespace"
msgstr "مساحة إسم فارغة"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "العروض عبر مساحة الإسم %(name)s"
msgid "Views by empty namespace"
msgstr "العروض عبر مساحة الإسم الفارغة"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" عرض الخاصية: <code>%(full_name)s</code>. الإسم: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "وسم:"
msgid "filter:"
msgstr "مرشّح"
msgid "view:"
msgstr "عرض:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "البرنامج %(app_label)r غير موجود"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "النموذج %(model_name)r غير موجود في التطبيق %(app_label)r"
msgid "model:"
msgstr "نموذج:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "العنصر `%(app_label)s.%(data_type)s` المرتبط"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "عناصر `%(app_label)s.%(object_name)s` مرتبطة"
#, python-format
msgid "all %s"
msgstr "كل %s"
#, python-format
msgid "number of %s"
msgstr "عدد %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "يبدو أن %s ليس عنصر urlpattern"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/ar/LC_MESSAGES/django.po | po | mit | 8,052 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Jihad Bahmaid Al-Halki, 2022
# Riterix <infosrabah@gmail.com>, 2019
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2022-07-24 20:19+0000\n"
"Last-Translator: Jihad Bahmaid Al-Halki\n"
"Language-Team: Arabic (Algeria) (http://www.transifex.com/django/django/"
"language/ar_DZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ar_DZ\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"
msgid "Administrative Documentation"
msgstr "الوثائق الإدارية"
msgid "Home"
msgstr "الرئيسية"
msgid "Documentation"
msgstr "الوثائق"
msgid "Bookmarklets"
msgstr "أوامر المفضلة"
msgid "Documentation bookmarklets"
msgstr "أوامر مفضلة للوثائق"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"لتثبيت أوامر المفضلة، اسحب الرابط إلى المواقع المفضلة في شريط الأدوات الخاص "
"بك، أو إضغط بزر الماوس الأيمن على الرابط وأضفه إلى قائمة المواقع المفضلة "
"الخاصة بك. الآن يمكنك اختيار أوامر المفضلة من أي صفحة في الموقع."
msgid "Documentation for this page"
msgstr "الوثائق لهذه الصفحة"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr "ينتقل بك من أي صفحة إلى وثائق العرض الذي أنشأ هذه الصفحة."
msgid "Tags"
msgstr "الوسوم"
msgid "List of all the template tags and their functions."
msgstr "قائمة بجميع وسوم القوالب ووظائفهم."
msgid "Filters"
msgstr "الفلاتر"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"المرشحات هي الإجراءات التي يمكن تطبيقها على المتغيرات في قالب لتغيير الناتج."
msgid "Models"
msgstr "النماذج"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"الموديلات هي وصف لجميع الكائنات في النظام والحقول المرتبطة بها. كل موديول "
"يحتوي على قائمة الحقول التي يمكن الوصول إليها كمتغيرات قالب"
msgid "Views"
msgstr "إستعراض"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"يتم إنشاء كل صفحة على الموقع علني من خلال عرض. يعرّف العرض الذي يستخدم كقالب "
"لتوليد الصفحة والتي هي الكائنات المتاحة لذلك القالب."
msgid "Tools for your browser to quickly access admin functionality."
msgstr "أدوات المتصفح لكي تتمكن من الوصول بسرعة وظائف المشرف."
msgid "Please install docutils"
msgstr "الرجاء تثبيت docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"نظام إدارة التوثيق يحتاج إلى<a href=\"%(link)s\"> وثيقة</a>من مكتبة بايثون "
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"الرجاء الطلب من مشرف النظام لتنصيب <a href=\\\"%(link)s\\\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "المودل: %(name)s"
msgid "Fields"
msgstr "الحقول"
msgid "Field"
msgstr "حقل"
msgid "Type"
msgstr "نوع"
msgid "Description"
msgstr "وصف"
msgid "Methods with arguments"
msgstr "طرق بمعطيات"
msgid "Method"
msgstr "الطريقة"
msgid "Arguments"
msgstr "معطيات"
msgid "Back to Model documentation"
msgstr "العودة إلى وثائق الموديول"
msgid "Model documentation"
msgstr "وثائق الموديول"
msgid "Model groups"
msgstr "مجموعات الموديول"
msgid "Templates"
msgstr "القوالب"
#, python-format
msgid "Template: %(name)s"
msgstr "قالب: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "قالب: \\\"%(name)s\\\""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "البحث عن مسار القالب \\\"%(name)s\\\":"
msgid "(does not exist)"
msgstr "(غير موجود)"
msgid "Back to Documentation"
msgstr "العودة إلى الوثائق"
msgid "Template filters"
msgstr "مرشحات القالب"
msgid "Template filter documentation"
msgstr "وثائق مرشح القالب"
msgid "Built-in filters"
msgstr "المرشحات المدمجة"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"لإستخدام هذه المرشحات, الرجاء وضع <code>%(code)s</code> في القالب الخاص بك "
"قبل إستخدام المرشّح."
msgid "Template tags"
msgstr "وسوم القالب"
msgid "Template tag documentation"
msgstr "وثائق وسم القالب"
msgid "Built-in tags"
msgstr "المسوم المدمجة"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"لإستخدام هذه الوسوم, الرجاء وضع <code>%(code)s</code> في القالب الخاص بك قبل "
"إستخدام الوسم."
#, python-format
msgid "View: %(name)s"
msgstr "عرض: %(name)s"
msgid "Context:"
msgstr "السياق:"
msgid "Templates:"
msgstr "القوالب:"
msgid "Back to View documentation"
msgstr "العودة لـ : عرض الوثائق"
msgid "View documentation"
msgstr "عرض الوثائق"
msgid "Jump to namespace"
msgstr "القفز إلى مساحة الاسم"
msgid "Empty namespace"
msgstr "مساحة إسم فارغة"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "العروض عبر مساحة الإسم %(name)s"
msgid "Views by empty namespace"
msgstr "العروض عبر مساحة الإسم الفارغة"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" عرض الخاصية: <code>%(full_name)s</code>. الإسم: <code>%(url_name)s</code>."
"\\n\n"
msgid "tag:"
msgstr "وسم:"
msgid "filter:"
msgstr "مرشّح"
msgid "view:"
msgstr "عرض:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "البرنامج %(app_label)r غير موجود"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "النموذج %(model_name)r غير موجود في التطبيق %(app_label)r"
msgid "model:"
msgstr "نموذج:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "العنصر `%(app_label)s.%(data_type)s` المرتبط"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "عناصر `%(app_label)s.%(object_name)s` مرتبطة"
#, python-format
msgid "all %s"
msgstr "كل %s"
#, python-format
msgid "number of %s"
msgstr "عدد %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "يبدو أن %s ليس عنصر urlpattern"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/ar_DZ/LC_MESSAGES/django.po | po | mit | 7,985 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Ḷḷumex03 <tornes@opmbx.org>, 2014
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-19 16:49+0100\n"
"PO-Revision-Date: 2017-09-20 02:41+0000\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: Asturian (http://www.transifex.com/django/django/language/"
"ast/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ast\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr ""
msgid "Home"
msgstr ""
msgid "Documentation"
msgstr ""
msgid "Bookmarklets"
msgstr ""
msgid "Documentation bookmarklets"
msgstr ""
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr ""
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
msgid "Tags"
msgstr ""
msgid "List of all the template tags and their functions."
msgstr ""
msgid "Filters"
msgstr ""
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
msgid "Models"
msgstr ""
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
msgid "Views"
msgstr ""
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
msgid "Please install docutils"
msgstr ""
#, python-format
msgid ""
"The admin documentation system requires Python's <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
#, python-format
msgid "Model: %(name)s"
msgstr ""
msgid "Fields"
msgstr ""
msgid "Field"
msgstr "Campu"
msgid "Type"
msgstr "Triba"
msgid "Description"
msgstr "Descripción"
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr ""
msgid "Model documentation"
msgstr ""
msgid "Model groups"
msgstr ""
msgid "Templates"
msgstr ""
#, python-format
msgid "Template: %(name)s"
msgstr ""
#, python-format
msgid "Template: \"%(name)s\""
msgstr ""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template \"%(name)s\":"
msgstr ""
msgid "(does not exist)"
msgstr ""
msgid "Back to Documentation"
msgstr ""
msgid "Template filters"
msgstr ""
msgid "Template filter documentation"
msgstr ""
msgid "Built-in filters"
msgstr ""
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
msgid "Template tags"
msgstr ""
msgid "Template tag documentation"
msgstr ""
msgid "Built-in tags"
msgstr ""
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#, python-format
msgid "View: %(name)s"
msgstr ""
msgid "Context:"
msgstr ""
msgid "Templates:"
msgstr ""
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr ""
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr ""
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
msgid "tag:"
msgstr "marca:"
msgid "filter:"
msgstr "filtru:"
msgid "view:"
msgstr "vista:"
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr ""
msgid "model:"
msgstr "modelu:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr ""
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr ""
#, python-format
msgid "all %s"
msgstr ""
#, python-format
msgid "number of %s"
msgstr ""
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr ""
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/ast/LC_MESSAGES/django.po | po | mit | 4,578 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Ali Ismayilov <ali@ismailov.info>, 2011
# Nicat Məmmədov <n1c4t97@gmail.com>, 2022
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2022-07-24 20:19+0000\n"
"Last-Translator: Nicat Məmmədov <n1c4t97@gmail.com>\n"
"Language-Team: Azerbaijani (http://www.transifex.com/django/django/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"
msgid "Administrative Documentation"
msgstr "Administrativ Dokumentasiya"
msgid "Home"
msgstr "Ev"
msgid "Documentation"
msgstr "Sənədləşmə"
msgid "Bookmarklets"
msgstr "Əlfəcinciklər (Bookmarklets)"
msgid "Documentation bookmarklets"
msgstr "Sənədləşmə əlfəcincikləri (bookmarklets)"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr "Bu səhifənin sənədləşməsi"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr "Hər hansı səhifəni əmələ gətirən funksiyanın sənədləşməsini göstərir."
msgid "Tags"
msgstr ""
msgid "List of all the template tags and their functions."
msgstr ""
msgid "Filters"
msgstr "Filterlər"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
msgid "Models"
msgstr ""
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
msgid "Views"
msgstr ""
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
msgid "Please install docutils"
msgstr ""
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
#, python-format
msgid "Model: %(name)s"
msgstr ""
msgid "Fields"
msgstr ""
msgid "Field"
msgstr ""
msgid "Type"
msgstr ""
msgid "Description"
msgstr ""
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr ""
msgid "Model documentation"
msgstr ""
msgid "Model groups"
msgstr ""
msgid "Templates"
msgstr ""
#, python-format
msgid "Template: %(name)s"
msgstr ""
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr ""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr ""
msgid "(does not exist)"
msgstr "(mövcud deyil)"
msgid "Back to Documentation"
msgstr ""
msgid "Template filters"
msgstr ""
msgid "Template filter documentation"
msgstr ""
msgid "Built-in filters"
msgstr ""
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
msgid "Template tags"
msgstr ""
msgid "Template tag documentation"
msgstr ""
msgid "Built-in tags"
msgstr ""
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#, python-format
msgid "View: %(name)s"
msgstr ""
msgid "Context:"
msgstr ""
msgid "Templates:"
msgstr ""
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr ""
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr ""
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
msgid "tag:"
msgstr "teq:"
msgid "filter:"
msgstr "süzgəc:"
msgid "view:"
msgstr "baxış:"
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "%(model_name)r modelini %(app_label)r tətbiqetməsində tapa bilmədik"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "bağlı \"%(app_label)s.%(data_type)s\" obyekti"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "bağlı \"%(app_label)s.%(object_name)s\" obyektləri"
#, python-format
msgid "all %s"
msgstr "bütün %s"
#, python-format
msgid "number of %s"
msgstr "%s-in sayı"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s urlpattern obyekti deyil"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/az/LC_MESSAGES/django.po | po | mit | 5,100 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Viktar Palstsiuk <vipals@gmail.com>, 2014-2015
# znotdead <zhirafchik@gmail.com>, 2016,2019,2021
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-01-15 17:29+0000\n"
"Last-Translator: znotdead <zhirafchik@gmail.com>\n"
"Language-Team: Belarusian (http://www.transifex.com/django/django/language/"
"be/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: be\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"
msgid "Administrative Documentation"
msgstr "Адміністратыўная дакументацыя"
msgid "Home"
msgstr "Пачатак"
msgid "Documentation"
msgstr "Дакумэнтацыя"
msgid "Bookmarklets"
msgstr "Закладкі"
msgid "Documentation bookmarklets"
msgstr "Закладкі дакумэнтацыі"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"Каб паставіць закладку, перацягніце спасылку на паліцу закладак або "
"пстрыкніце па спасылцы праваю кнопкаю і дадайце яе да закладак. Цяпер можна "
"абраць закладку з якой пажадаеце бачыны."
msgid "Documentation for this page"
msgstr "Дакумэнтацыя па бачыне"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr "Накіроўвае з хоць-якое бачыны да прагляду, які стварае гэтую бачыну."
msgid "Tags"
msgstr "Цэтлікі"
msgid "List of all the template tags and their functions."
msgstr "Спіс усіх тэгаў шаблонаў і іх функцый."
msgid "Filters"
msgstr "Сіты"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Фільтры гэта дзеянні, якія могуць быць выкананы над пераменнымі ў шаблоне "
"каб змяніць вынік."
msgid "Models"
msgstr "Мадэлі"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Мадэлі - гэта апісанне ўсіх аб'ектаў у сістэме і іх асацыіраваныя палі. "
"Кожная мадэль мае спіс палёў, якія могуць быць даступны як пераменная шаблону"
msgid "Views"
msgstr "Прагляды"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Кожная бачына сайту генерыруеца праглядам. Прагляд вызначае які шаблон "
"выкарыстоўваць для генерацыі бачыны і якія аб'екты даступны для гэтага "
"шаблону."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Інструмент для вашага браўзэра для хуткага доступу да кіраўнічай "
"функцыянальнасці. "
msgid "Please install docutils"
msgstr "Калі ласка, усталюйце Docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Дакументацыя кіраўнічай сістэмы патрабуе бібліятэку Python <a href=\"%(link)s"
"\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Калі ласка, спытайцу вашых адміністратараў усталяваць <a href=\"%(link)s"
"\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "Мадэль: %(name)s"
msgid "Fields"
msgstr "Палі"
msgid "Field"
msgstr "Поле"
msgid "Type"
msgstr "Тып"
msgid "Description"
msgstr "Апісаньне"
msgid "Methods with arguments"
msgstr "Метад з аргументамі"
msgid "Method"
msgstr "Метад"
msgid "Arguments"
msgstr "Аргументы"
msgid "Back to Model documentation"
msgstr "Вярнуцца да дакументацыі мадэлі"
msgid "Model documentation"
msgstr "Дакументацыя мадэлі"
msgid "Model groups"
msgstr "Групы мадэлі"
msgid "Templates"
msgstr "Шаблёны"
#, python-format
msgid "Template: %(name)s"
msgstr "Шаблон: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Шаблон: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Шлях пошуку для шаблону <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(не існуе)"
msgid "Back to Documentation"
msgstr "Вярнуцца да дакументацыі"
msgid "Template filters"
msgstr "Фільтры шаблону"
msgid "Template filter documentation"
msgstr "Дакументацыя фільтраў шаблону"
msgid "Built-in filters"
msgstr "Убудаваныя фільтры"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"Каб карыстаць гэтыя фільтры, трэба памясціць <code>%(code)s</code> у ваш "
"шаблон перад тым як карыстаць гэты фільтр."
msgid "Template tags"
msgstr "Тэгі шаблону"
msgid "Template tag documentation"
msgstr "Дакументацыя тэгаў шаблону"
msgid "Built-in tags"
msgstr "Убудаваныя тэгі"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"Каб карыстаць гэтыя тэгі, трэба памясціць <code>%(code)s</code> у ваш "
"шаблон перад тым як карыстаць гэты тэг."
#, python-format
msgid "View: %(name)s"
msgstr "Прагляд: %(name)s"
msgid "Context:"
msgstr "Кантэкст:"
msgid "Templates:"
msgstr "Шаблоны:"
msgid "Back to View documentation"
msgstr "Вярнуцца да дакументацыі прагляду"
msgid "View documentation"
msgstr "Паглядзець дакументацыю"
msgid "Jump to namespace"
msgstr "Перайсці да прасторы імёнаў"
msgid "Empty namespace"
msgstr "Ачысціць прастору імёнаў"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Прагляды ў просторы імёнаў %(name)s"
msgid "Views by empty namespace"
msgstr "Прагляды ў пустым просторы імёнаў"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
"Функцыя прагляду: <code>%(full_name)s</code>. Імя: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "цэтлік:"
msgid "filter:"
msgstr "сіта:"
msgid "view:"
msgstr "прагляд:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Праграму %(app_label)r не знайшлі"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Мадэль %(model_name)r у праґраме «%(app_label)r» не знайшлі"
msgid "model:"
msgstr "мадэль:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "залежны аб’ект «%(app_label)s.%(data_type)s»"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "залежныя аб’екты «%(app_label)s.%(object_name)s»"
#, python-format
msgid "all %s"
msgstr "усе %s"
#, python-format
msgid "number of %s"
msgstr "колькасьць %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s не падобны да аб’екта «шаблён спасылкі» — «urlpattern»"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/be/LC_MESSAGES/django.po | po | mit | 8,728 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# arneatec <arneatec@gmail.com>, 2022
# Boris Chervenkov <office@sentido.bg>, 2012
# Jannis Leidel <jannis@leidel.info>, 2011
# Lyuboslav Petrov <petrov.lyuboslav@gmail.com>, 2014
# Todor Lubenov <tlubenov@gmail.com>, 2011,2015
# Venelin Stoykov <vkstoykov@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2022-05-25 07:05+0000\n"
"Last-Translator: arneatec <arneatec@gmail.com>, 2022\n"
"Language-Team: Bulgarian (http://www.transifex.com/django/django/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"
msgid "Administrative Documentation"
msgstr "Административна документация"
msgid "Home"
msgstr "Начало"
msgid "Documentation"
msgstr "Документация"
msgid "Bookmarklets"
msgstr "Bookmarklets"
msgid "Documentation bookmarklets"
msgstr "Bookmarklet-и за документация"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"За да инсталирате bookmarklet-и, задърпайте линка в лентата с отметки "
"(bookmarks toolbar), или щракнете с десния бутон и добавете линка в "
"отметките. Сега можете да изберете bookmarklet-а от която и да е страница на "
"сайта."
msgid "Documentation for this page"
msgstr "Документация за тази страница"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Препраща Ви от която и да е страница към документацията за изгледа, който я "
"е генерирал."
msgid "Tags"
msgstr "Тагове"
msgid "List of all the template tags and their functions."
msgstr "Списък на всички шаблонни тагове и техните функции."
msgid "Filters"
msgstr "Филтри"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Филтрите са действия, които могат да се използват върху променливи в даден "
"шаблон, за да променят изхода."
msgid "Models"
msgstr "Модели"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Моделите са описания на всички обекти в системата и свързаните с тях полета. "
"Всеки модел си има списък на полетата, които могат да бъдат достъпени както "
"шаблонни променливи"
msgid "Views"
msgstr "Изгледи"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Всяка страница на публичния сайт се генерира от изглед. Изгледът определя "
"кой шаблон се използва за генериране на страницата и кои обекти са на "
"разположение за този шаблон."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Инструменти за вашия браузър за бърз достъп до администраторската "
"функционалност."
msgid "Please install docutils"
msgstr "Моля инсталирайте docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a "
"href=\"%(link)s\">docutils</a> library."
msgstr ""
"Системата за администраторска документация изисква библиотеката за Python <a "
"href=\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Моля, помолете вашите администратори да инсталират <a "
"href=\"%(link)s\">docutils</a> ."
#, python-format
msgid "Model: %(name)s"
msgstr "Модел: %(name)s"
msgid "Fields"
msgstr "Полета"
msgid "Field"
msgstr "Поле"
msgid "Type"
msgstr "Тип"
msgid "Description"
msgstr "Описание"
msgid "Methods with arguments"
msgstr "Методи с аргументи"
msgid "Method"
msgstr "Метод"
msgid "Arguments"
msgstr "Аргументи"
msgid "Back to Model documentation"
msgstr " Върни се в документацията за модели"
msgid "Model documentation"
msgstr "Документация за модели"
msgid "Model groups"
msgstr "Групи на модела"
msgid "Templates"
msgstr "Шаблони"
#, python-format
msgid "Template: %(name)s"
msgstr "Шаблон: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Шаблон: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Път за търсене на шаблон <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(не съществува)"
msgid "Back to Documentation"
msgstr "Назад към Документацията"
msgid "Template filters"
msgstr "Шаблонни филтри"
msgid "Template filter documentation"
msgstr "Документация за шаблонни филтри"
msgid "Built-in filters"
msgstr "Вградени филтри"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"За да използвате тези филтри, сложете <code>%(code)s</code> във вашия "
"шаблон, преди да използвате филтъра."
msgid "Template tags"
msgstr "Шаблонни тагове"
msgid "Template tag documentation"
msgstr "Документация за Шаблонни тагове"
msgid "Built-in tags"
msgstr "Вградени тагове"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"За да използвате тези тагове, сложете <code>%(code)s</code> във вашия "
"шаблон, преди да използвате тага."
#, python-format
msgid "View: %(name)s"
msgstr "Изглед: %(name)s"
msgid "Context:"
msgstr "Контекст:"
msgid "Templates:"
msgstr "Шаблони:"
msgid "Back to View documentation"
msgstr "Обратно към документацията за Изглед"
msgid "View documentation"
msgstr "Документация за Изглед"
msgid "Jump to namespace"
msgstr "Прескочи към именни пространства"
msgid "Empty namespace"
msgstr "Празни именни пространства"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Изгледи по именни пространства %(name)s"
msgid "Views by empty namespace"
msgstr "Изгледи по празни именни пространства"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" Изглед функция: <code>%(full_name)s</code>. Име: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "таг:"
msgid "filter:"
msgstr "филтър:"
msgid "view:"
msgstr "изглед:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Приложението %(app_label)r не е намерено"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Моделът %(model_name)r не е намерен в приложение %(app_label)r"
msgid "model:"
msgstr "модел:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "свързания '%(app_label)s.%(data_type)s' обект"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "свързаните '%(app_label)s.%(object_name)s' обекти"
#, python-format
msgid "all %s"
msgstr "всички %s"
#, python-format
msgid "number of %s"
msgstr "брой %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s не прилича на обект от тип urlpattern"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/bg/LC_MESSAGES/django.po | po | mit | 8,989 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Anubhab Baksi, 2013
# Jannis Leidel <jannis@leidel.info>, 2011
# Tahmid Rafi <rafi.tahmid@gmail.com>, 2012
# Tahmid Rafi <rafi.tahmid@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-19 16:49+0100\n"
"PO-Revision-Date: 2017-09-19 16:40+0000\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: Bengali (http://www.transifex.com/django/django/language/"
"bn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bn\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr ""
msgid "Home"
msgstr "নীড়পাতা"
msgid "Documentation"
msgstr "সহায়িকা"
msgid "Bookmarklets"
msgstr "বুকমার্কলেট"
msgid "Documentation bookmarklets"
msgstr "সহায়িকা বুকমার্কলেট"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr "এই পাতার সহায়িকা"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr "যেকোন পাতা থেকে ভিউ সহায়িকাতে নিয়ে যান।"
msgid "Tags"
msgstr "ট্যাগগুলো"
msgid "List of all the template tags and their functions."
msgstr ""
msgid "Filters"
msgstr "ফিল্টারগুলো"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
msgid "Models"
msgstr "মডেলগুলো"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
msgid "Views"
msgstr "ভিউগুলো"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
msgid "Please install docutils"
msgstr "দয়া করে docutils ইনস্টল করুন"
#, python-format
msgid ""
"The admin documentation system requires Python's <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
#, python-format
msgid "Model: %(name)s"
msgstr "মডেল: %(name)s"
msgid "Fields"
msgstr ""
msgid "Field"
msgstr "ফিল্ড"
msgid "Type"
msgstr "টাইপ"
msgid "Description"
msgstr "বিবরন"
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr ""
msgid "Model documentation"
msgstr "মডেল ডকুমেন্টেশন"
msgid "Model groups"
msgstr "মডেল গ্রুপ"
msgid "Templates"
msgstr "টেমপ্লেটগুলো"
#, python-format
msgid "Template: %(name)s"
msgstr "টেমপ্লেট: %(name)s"
#, python-format
msgid "Template: \"%(name)s\""
msgstr "টেমপ্লেট: \"%(name)s\""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template \"%(name)s\":"
msgstr ""
msgid "(does not exist)"
msgstr ""
msgid "Back to Documentation"
msgstr "ডকুমেন্টেশনে ফেরত যান"
msgid "Template filters"
msgstr "টেমপ্লেট ফিল্টার"
msgid "Template filter documentation"
msgstr "টেমপ্লেট ফিল্টার ডকুমেন্টেশন"
msgid "Built-in filters"
msgstr "বিল্ট-ইন ফিল্টার"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
msgid "Template tags"
msgstr "টেমপ্লেট ট্যাগ"
msgid "Template tag documentation"
msgstr "টেমপ্লেট ট্যাগ ডকুমেন্টেশন"
msgid "Built-in tags"
msgstr "বিল্ট-ইন ট্যাগ"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#, python-format
msgid "View: %(name)s"
msgstr "ভিউ: %(name)s"
msgid "Context:"
msgstr ""
msgid "Templates:"
msgstr "টেমপ্লেটসমূহ:"
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr "ভিউ ডকুমেন্টেশন"
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr "ফাঁকা নেমস্পেস"
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
msgid "tag:"
msgstr "ট্যাগঃ"
msgid "filter:"
msgstr "ফিল্টারঃ"
msgid "view:"
msgstr "ভিউঃ"
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "%(app_label)r এ্যপে %(model_name)r মডেলটি পাওয়া যায়নি"
msgid "model:"
msgstr "মডেলঃ"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "`%(app_label)s.%(data_type)s` সম্পর্কিত অবজেক্ট"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "`%(app_label)s.%(object_name)s` সম্পর্কিত অবজেক্ট সমূহ"
#, python-format
msgid "all %s"
msgstr "সকল %s"
#, python-format
msgid "number of %s"
msgstr "%s সংখ্যা"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s ইউআরএল -এর মত নয়"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/bn/LC_MESSAGES/django.po | po | mit | 6,266 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Fulup <fulup.jakez@gmail.com>, 2012
# Irriep Nala Novram <allannkorh@yahoo.fr>, 2019
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-19 16:49+0100\n"
"PO-Revision-Date: 2019-03-12 14:33+0000\n"
"Last-Translator: Irriep Nala Novram <allannkorh@yahoo.fr>\n"
"Language-Team: Breton (http://www.transifex.com/django/django/language/br/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: br\n"
"Plural-Forms: nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !"
"=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n"
"%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > "
"19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 "
"&& n % 1000000 == 0) ? 3 : 4);\n"
msgid "Administrative Documentation"
msgstr ""
msgid "Home"
msgstr "Degemer"
msgid "Documentation"
msgstr "Teuliadoù"
msgid "Bookmarklets"
msgstr "Sinedoù"
msgid "Documentation bookmarklets"
msgstr ""
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr ""
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
msgid "Tags"
msgstr "Tikedennoù"
msgid "List of all the template tags and their functions."
msgstr ""
msgid "Filters"
msgstr "Siloù"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
msgid "Models"
msgstr ""
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
msgid "Views"
msgstr ""
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
msgid "Please install docutils"
msgstr ""
#, python-format
msgid ""
"The admin documentation system requires Python's <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
#, python-format
msgid "Model: %(name)s"
msgstr ""
msgid "Fields"
msgstr ""
msgid "Field"
msgstr ""
msgid "Type"
msgstr ""
msgid "Description"
msgstr ""
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr ""
msgid "Model documentation"
msgstr ""
msgid "Model groups"
msgstr ""
msgid "Templates"
msgstr ""
#, python-format
msgid "Template: %(name)s"
msgstr ""
#, python-format
msgid "Template: \"%(name)s\""
msgstr ""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template \"%(name)s\":"
msgstr ""
msgid "(does not exist)"
msgstr ""
msgid "Back to Documentation"
msgstr ""
msgid "Template filters"
msgstr ""
msgid "Template filter documentation"
msgstr ""
msgid "Built-in filters"
msgstr ""
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
msgid "Template tags"
msgstr ""
msgid "Template tag documentation"
msgstr ""
msgid "Built-in tags"
msgstr ""
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#, python-format
msgid "View: %(name)s"
msgstr ""
msgid "Context:"
msgstr ""
msgid "Templates:"
msgstr ""
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr ""
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr ""
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
msgid "tag:"
msgstr "baliz:"
msgid "filter:"
msgstr "sil:"
msgid "view:"
msgstr "gwel:"
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr ""
"Neket bet kavet ar patrom %(model_name)r e-barzh an arload %(app_label)r"
msgid "model:"
msgstr "patrom:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "an objed e liamm \"%(app_label)s.%(data_type)s\""
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "an objedoù e liamm \"%(app_label)s.%(object_name)s\""
#, python-format
msgid "all %s"
msgstr "an holl %s"
#, python-format
msgid "number of %s"
msgstr "niver a %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr ""
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/br/LC_MESSAGES/django.po | po | mit | 5,139 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Jannis Leidel <jannis@leidel.info>, 2011
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-19 16:49+0100\n"
"PO-Revision-Date: 2017-09-19 16:40+0000\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: Bosnian (http://www.transifex.com/django/django/language/"
"bs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bs\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"
msgid "Administrative Documentation"
msgstr ""
msgid "Home"
msgstr "Početna"
msgid "Documentation"
msgstr "Dokumentacija"
msgid "Bookmarklets"
msgstr "Bookmarkleti"
msgid "Documentation bookmarklets"
msgstr "Bookmarkleti dokumentacije"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr "Dokumentacija za ovu stranicu"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Vodi od bilo koje stranice do dokumentacije za pogled koji generiše tu "
"stranicu."
msgid "Tags"
msgstr ""
msgid "List of all the template tags and their functions."
msgstr ""
msgid "Filters"
msgstr ""
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
msgid "Models"
msgstr ""
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
msgid "Views"
msgstr ""
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
msgid "Please install docutils"
msgstr ""
#, python-format
msgid ""
"The admin documentation system requires Python's <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
#, python-format
msgid "Model: %(name)s"
msgstr ""
msgid "Fields"
msgstr ""
msgid "Field"
msgstr ""
msgid "Type"
msgstr ""
msgid "Description"
msgstr ""
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr ""
msgid "Model documentation"
msgstr ""
msgid "Model groups"
msgstr ""
msgid "Templates"
msgstr ""
#, python-format
msgid "Template: %(name)s"
msgstr ""
#, python-format
msgid "Template: \"%(name)s\""
msgstr ""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template \"%(name)s\":"
msgstr ""
msgid "(does not exist)"
msgstr ""
msgid "Back to Documentation"
msgstr ""
msgid "Template filters"
msgstr ""
msgid "Template filter documentation"
msgstr ""
msgid "Built-in filters"
msgstr ""
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
msgid "Template tags"
msgstr ""
msgid "Template tag documentation"
msgstr ""
msgid "Built-in tags"
msgstr ""
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#, python-format
msgid "View: %(name)s"
msgstr ""
msgid "Context:"
msgstr ""
msgid "Templates:"
msgstr ""
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr ""
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr ""
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
msgid "tag:"
msgstr "tag:"
msgid "filter:"
msgstr "filter:"
msgid "view:"
msgstr "pogled:"
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Model %(model_name)r nije pronađen u aplikaciji %(app_label)r"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "povezani objekti klase `%(app_label)s.%(data_type)s`"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "klase `%(app_label)s.%(object_name)s`"
#, python-format
msgid "all %s"
msgstr "svi povezani objekti %s"
#, python-format
msgid "number of %s"
msgstr "broj povezanih objekata %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s ne izgleda kao urlpattern objekat"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/bs/LC_MESSAGES/django.po | po | mit | 5,042 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# abraham.martin <abraham.martin@gmail.com>, 2014
# Antoni Aloy <aaloy@apsl.net>, 2014,2017,2021
# Carles Barrobés <carles@barrobes.com>, 2012
# Gil Obradors Via <gil.obradors@gmail.com>, 2019
# Jannis Leidel <jannis@leidel.info>, 2011
# Roger Pons <rogerpons@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-10-27 08:46+0000\n"
"Last-Translator: Antoni Aloy <aaloy@apsl.net>\n"
"Language-Team: Catalan (http://www.transifex.com/django/django/language/"
"ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr "Documentació Administrativa"
msgid "Home"
msgstr "Inici"
msgid "Documentation"
msgstr "Documentació"
msgid "Bookmarklets"
msgstr "'Bookmarklets'"
msgid "Documentation bookmarklets"
msgstr "'Bookmarklets' de documentació"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"Per instal·lar miniaplicacions enllaçades, arrossegueu l'enllaç a la vostra "
"barra de marcados, o feu clic dret a l'enllaç i afegiu-lo als vostres "
"marcadors. Ara podeu seleccionar la miniaplicació des de qualsevol pàgina "
"del lloc."
msgid "Documentation for this page"
msgstr "Documentació d'aquesta pàgina"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Us porta des de qualsevol pàgina a la documentació de la vista que la genera."
msgid "Tags"
msgstr "Etiquetes"
msgid "List of all the template tags and their functions."
msgstr "Llista d'etiquetes de plantilles i les seves funcions."
msgid "Filters"
msgstr "Filtres"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Els filtres són accions que poden ser aplicades a variables a una plantilla "
"per alterar la seva sortida."
msgid "Models"
msgstr "Models"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Els models són descripcions de tots els objectes del sistema i els seus "
"camps associats. Cada model té una llista de camps que són accessibles com "
"variables de la plantilla."
msgid "Views"
msgstr "Vistes"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Cada plana del lloc públic és generat per una vista (view). La vista "
"defineix quina plantilla es fa servir per generar la plana i quins objectes "
"estan disponibles a aquella plantilla."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Eines pel seu navegador per accedir ràpidament a la funcionalitat de l'admin."
msgid "Please install docutils"
msgstr "Si us plau instal·leu docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"El sistema d'administració de documentació requereix de la biblioteca de "
"Python <a href=\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Si us plau, demani als seus administradors la instal·lació de <a href="
"\"%(link)s\">docutils</a> ."
#, python-format
msgid "Model: %(name)s"
msgstr "Model: %(name)s"
msgid "Fields"
msgstr "Camps"
msgid "Field"
msgstr "Camp"
msgid "Type"
msgstr "Tipus"
msgid "Description"
msgstr "Descripció"
msgid "Methods with arguments"
msgstr "Mètodes amb arguments"
msgid "Method"
msgstr "Mètode"
msgid "Arguments"
msgstr "Arguments"
msgid "Back to Model documentation"
msgstr "Tornar a la documentació del Model"
msgid "Model documentation"
msgstr "Documentació del model"
msgid "Model groups"
msgstr "Grups de model"
msgid "Templates"
msgstr "Plantilles"
#, python-format
msgid "Template: %(name)s"
msgstr "Plantilla: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Plantilla: %(name)s"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Camí de cerca per la plantilla \"%(name)s\":"
msgid "(does not exist)"
msgstr "(no existeix)"
msgid "Back to Documentation"
msgstr "Tornar a la documentació"
msgid "Template filters"
msgstr "Filtres de plantilla"
msgid "Template filter documentation"
msgstr "Documentació dels filtres de plantilla"
msgid "Built-in filters"
msgstr "Filtres integrats"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"Per utilitzar aquests filtres, introdueixi <code>%(code)s</code> a la seva "
"plantilla abans d'utilitzar el filtre."
msgid "Template tags"
msgstr "Etiquetes de plantilles"
msgid "Template tag documentation"
msgstr "Documentació de les etiquetes de plantilla"
msgid "Built-in tags"
msgstr "Etiquetes integrades"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"Per utilitzar aquestes etiquetes, introdueix <code>%(code)s</code> a la teva "
"plantilla abans d'utilitzar l'etiqueta"
#, python-format
msgid "View: %(name)s"
msgstr "Vista: %(name)s"
msgid "Context:"
msgstr "Contexte:"
msgid "Templates:"
msgstr "Plantilles:"
msgid "Back to View documentation"
msgstr "Tornar a la documentació de les Vistes"
msgid "View documentation"
msgstr "Veure documentació"
msgid "Jump to namespace"
msgstr "Anar a l'espai de noms"
msgid "Empty namespace"
msgstr "Espai de noms buit"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Vistes de l'espai de noms %(name)s"
msgid "Views by empty namespace"
msgstr "Vistes per l'espai de noms buit"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
"Funció de la vista: <code>%(full_name)s</code> . Nom: <code>%(url_name)s</"
"code> .\n"
msgid "tag:"
msgstr "etiqueta:"
msgid "filter:"
msgstr "filtre:"
msgid "view:"
msgstr "vista:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Aplicació %(app_label)r no trobada"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "El model %(model_name)r no s'ha trobat a l'aplicació %(app_label)r"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "l'objecte relacionat `%(app_label)s.%(data_type)s`"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "objectes relacionats `%(app_label)s.%(object_name)s`"
#, python-format
msgid "all %s"
msgstr "tots %s"
#, python-format
msgid "number of %s"
msgstr "nombre de %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s no sembla ser un objecte 'urlpattern'"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/ca/LC_MESSAGES/django.po | po | mit | 7,396 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Bakhtawar Barzan, 2021
# kosar tofiq <kosar.belana@gmail.com>, 2020
# Swara <swara09@gmail.com>, 2022
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2023-04-24 20:19+0000\n"
"Last-Translator: Swara <swara09@gmail.com>, 2022\n"
"Language-Team: Central Kurdish (http://www.transifex.com/django/django/"
"language/ckb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ckb\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr "بەڵگەنامەکردنی کارگێڕی"
msgid "Home"
msgstr "ماڵەوە"
msgid "Documentation"
msgstr "بەڵگەنامەکردن"
msgid "Bookmarklets"
msgstr "ئاماژەکان"
msgid "Documentation bookmarklets"
msgstr "بەڵگەنامەکردنی ئاماژەکان"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"بۆ دامەزراندنی ئاماژەکان، بەستەرەکە ڕابکێشە بۆ سەر جێدۆزەکانت، یان کرتەی "
"ڕاست لەسەر بەستەرەکە بکە و زیادی بکە بۆ ئاماژەکانت. ئێستا دەتوانیت لە هەر "
"لاپەڕەیەک لە ماڵپەڕەکەدا ئاماژە هەڵبژێریت."
msgid "Documentation for this page"
msgstr "بەڵگەنامەکردن بۆ ئەم لاپەڕە"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"لە هەر لاپەڕەیەکەوە دەچێتەسەر بەڵگەنامەکان بۆ ئەو دیمەنەی کە ئەو لاپەڕەیە "
"دروست دەکات."
msgid "Tags"
msgstr "تاگەکان"
msgid "List of all the template tags and their functions."
msgstr "لیستی هەموو تاگەکانی ڕووکار و ئەرکەکانیان."
msgid "Filters"
msgstr "پاڵاوتنەکان"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"پاڵاوتنەکان ئەو کردارانەن کە دەتوانرێت بۆ گۆڕاوەکان لە ڕووکارێکدا "
"بەکاربهێنرێن بۆ گۆڕینی دەرچوێنراوەکە."
msgid "Models"
msgstr "مۆدیلەکان"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"مۆدێلەکان بریتین لە باسکردنی هەموو شتەکانی ناو سیستەمەکە و بوارە "
"پەیوەندیدارەکانیان. هەر مۆدێلێک لیستی خانەی هەیە کە دەتوانرێت وەک گۆڕاوەکانی "
"ڕووکار دەستی پێ بگات"
msgid "Views"
msgstr "دیمەنەکان"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"هەر لاپەڕەیەک لە پێگەی گشتیدا بە دیمەنێک دروست دەکرێت. دیمەنەکە ئەوە پێناسە "
"دەکات کە کام ڕووکار بۆ دروستکردنی لاپەڕەکە بەکاردەهێنرێت و کام ئۆبجێکت "
"بەردەستە بۆ ئەو ڕووکارە."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"ئامرازەکان بۆ وێبگەڕەکەت بۆ ئەوەی بە خێرایی دەستت بگات بە کاراییەکانی "
"بەڕێوەبەر."
msgid "Please install docutils"
msgstr "تکایە docutils دابمەزرێنە"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a "
"href=\"%(link)s\">docutils</a> library."
msgstr ""
"سیستەمی بەڵگەنامەکردنی بەڕێوەبەر پێویستی بە کتێبخانەی <a "
"href=\"%(link)s\">docutils</a> پایسۆن هەیە."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"تکایە پرسیار لە بەڕێوەبەرایەتی بکە بۆ دامەزراندنی <a "
"href=\"%(link)s\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "مۆدێل: %(name)s"
msgid "Fields"
msgstr "خانەکان"
msgid "Field"
msgstr "خانە"
msgid "Type"
msgstr "جۆر"
msgid "Description"
msgstr "باسکردن"
msgid "Methods with arguments"
msgstr "شێوازەکان و ئارگومێنتەکان"
msgid "Method"
msgstr "شێواز"
msgid "Arguments"
msgstr "ئارگومێنتەکان"
msgid "Back to Model documentation"
msgstr "گەڕانەوە بۆ بەڵگەنامەکردنی مۆدێل"
msgid "Model documentation"
msgstr "بەڵگەنامەی مۆدێل"
msgid "Model groups"
msgstr "گرووپەکانی مۆدێل"
msgid "Templates"
msgstr "ڕووکارەکان"
#, python-format
msgid "Template: %(name)s"
msgstr "ڕووکار: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "ڕووکاری: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "گەڕانی ڕێڕەو بۆ ڕووکاری <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(بوونی نیە)"
msgid "Back to Documentation"
msgstr "گەڕانەوە بۆ بەڵگەنامەکردن"
msgid "Template filters"
msgstr "پاڵاوتنەکانی ڕووکار"
msgid "Template filter documentation"
msgstr "بەڵگەنامەکردنی پاڵاوتنی ڕووکار"
msgid "Built-in filters"
msgstr "پاڵاوتنەکانی Built-in"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"بۆ بەکارهێنانی ئەم پاڵاوتنانە<code>%(code)s</code> لەناو ڕووکارەکەت دابنێ "
"پێش ئەوەی پاڵاوتن بەکاربهێنیت."
msgid "Template tags"
msgstr "تاگەکانی ڕووکار"
msgid "Template tag documentation"
msgstr "بەڵگەنامەکردنی تاگی ڕووکار"
msgid "Built-in tags"
msgstr "تاگەکانی Built-in"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"بۆ بەکارهێنانی ئەم تاگانە, <code>%(code)s</code> لەناو ڕووکارەکەت دابنێ پێش "
"ئەوەی تاگ بەکاربهێنیت."
#, python-format
msgid "View: %(name)s"
msgstr "دیمەن: %(name)s"
msgid "Context:"
msgstr "دەق:"
msgid "Templates:"
msgstr "ڕووکارەکان:"
msgid "Back to View documentation"
msgstr "گەڕانەوە بۆ بەڵگەنامەکردنی دیمەن"
msgid "View documentation"
msgstr "بەڵگەنامەکردنی دیمەن"
msgid "Jump to namespace"
msgstr "بازدان بۆ بۆشاییناو"
msgid "Empty namespace"
msgstr "بۆشاییناوی بەتاڵ"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "دیمەنەکان لەلایەن بۆشاییناو %(name)s"
msgid "Views by empty namespace"
msgstr "دیمەنەکان لایەن بۆشاییناوی بەتاڵەوە"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" کرداری دیمەن: <code>%(full_name)s</code>. ناو: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "تاگ:"
msgid "filter:"
msgstr "پاڵاوتن:"
msgid "view:"
msgstr "دیمەن:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "بەرنامەی %(app_label)r نەدۆزرایەوە"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "مۆدێلی %(model_name)r ناوتوانرێت لە ئاپی %(app_label)r بدۆزرێتەوە"
msgid "model:"
msgstr "مۆدێل:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "پەیوەستکراو `%(app_label)s. ئۆبجێکتی%(data_type)s`"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "پەیوەستکراوە `%(app_label)s. ئۆبجێکتی%(object_name)s`"
#, python-format
msgid "all %s"
msgstr "هەموو %s"
#, python-format
msgid "number of %s"
msgstr "ژمارە لە %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s بەگوێرەی شێوازی urlی ئۆبجێکتێک نیە"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/ckb/LC_MESSAGES/django.po | po | mit | 8,727 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Jannis Leidel <jannis@leidel.info>, 2011
# Vláďa Macek <macek@sandbox.cz>, 2012-2014
# Vláďa Macek <macek@sandbox.cz>, 2015-2016,2019,2021
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-03-18 23:13+0000\n"
"Last-Translator: Vláďa Macek <macek@sandbox.cz>\n"
"Language-Team: Czech (http://www.transifex.com/django/django/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=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n "
"<= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
msgid "Administrative Documentation"
msgstr "Dokumentace správy"
msgid "Home"
msgstr "Domů"
msgid "Documentation"
msgstr "Dokumentace"
msgid "Bookmarklets"
msgstr "Bookmarklety"
msgid "Documentation bookmarklets"
msgstr "Dokumentační bookmarklety"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"Pro nainstalování bookmarkletů, přetáhněte odkaz na vaše záložky "
"(„Oblíbené“), nebo klepněte pravým tlačítkem na odkaz a přidejte ho k vašim "
"záložkám. Nyní můžete zvolit bookmarklet z libovolné stránky jakéhokoli webu."
msgid "Documentation for this page"
msgstr "Dokumentace k této stránce"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Z libovolné stránky otevře dokumentaci pohledu (view), který generoval tuto "
"stránku."
msgid "Tags"
msgstr "Tagy"
msgid "List of all the template tags and their functions."
msgstr "Seznam všech šablonových tagů a jejich funkce."
msgid "Filters"
msgstr "Filtry"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Filtry jsou akce, které mohou být aplikovány na proměnné v šabloně za účelem "
"úpravy hodnoty."
msgid "Models"
msgstr "Modely"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Modely jsou popisy všech objektů v systému a jejich přidružených polí. Každý "
"model má seznam polí, které mohou být čteny jako proměnné v šablonách."
msgid "Views"
msgstr "Views"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Každá stránka na veřejném webu je generována pomocí pohledu. Pohled "
"definuje, která šablona bude použita ke generování stránky a které objekty "
"budou v šabloně k dispozici."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Nástroje pro prohlížeč k rychlému přístupu k funkcím administračního "
"rozhraní."
msgid "Please install docutils"
msgstr "Nainstalujte balík docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Dokumentační systém administračního rozhraní vyžaduje pythonskou knihovnu <a "
"href=\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Požádejte správce o instalaci balíku <a href=\"%(link)s\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "Model: %(name)s"
msgid "Fields"
msgstr "Pole"
msgid "Field"
msgstr "Pole"
msgid "Type"
msgstr "Typ"
msgid "Description"
msgstr "Popis"
msgid "Methods with arguments"
msgstr "Metody s argumenty"
msgid "Method"
msgstr "Metoda"
msgid "Arguments"
msgstr "Argumenty"
msgid "Back to Model documentation"
msgstr "Zpět na popis modelů"
msgid "Model documentation"
msgstr "Dokumentace modelů"
msgid "Model groups"
msgstr "Skupiny modelů"
msgid "Templates"
msgstr "Šablony"
#, python-format
msgid "Template: %(name)s"
msgstr "Šablona: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Šablona: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Vyhledávací cesta pro šablonu <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(neexistuje)"
msgid "Back to Documentation"
msgstr "Zpět na dokumentaci"
msgid "Template filters"
msgstr "Šablonové filtry"
msgid "Template filter documentation"
msgstr "Dokumentace šablonových filtrů"
msgid "Built-in filters"
msgstr "Vestavěné filtry"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"Chcete-li tyto filtry používat, vložte do šablony před místo použití kód "
"<code>%(code)s</code>."
msgid "Template tags"
msgstr "Šablonové tagy"
msgid "Template tag documentation"
msgstr "Dokumentace šablonových tagů"
msgid "Built-in tags"
msgstr "Vestavěné tagy"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"Chcete-li tyto tagy používat, vložte do šablony před místo použití kód <code>"
"%(code)s</code>."
#, python-format
msgid "View: %(name)s"
msgstr "Pohled: %(name)s"
msgid "Context:"
msgstr "Kontext:"
msgid "Templates:"
msgstr "Šablony:"
msgid "Back to View documentation"
msgstr "Zpět na popis pohledů"
msgid "View documentation"
msgstr "Dokumentace pohledů"
msgid "Jump to namespace"
msgstr "Přejít na jmenný prostor"
msgid "Empty namespace"
msgstr "Prázdný jmenný prostor"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Pohledy dle jmenného prostoru %(name)s"
msgid "Views by empty namespace"
msgstr "Pohledy dle prázdného jmenného prostoru"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
"Funkce pohledu: <code>%(full_name)s</code>. Název: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "tag:"
msgid "filter:"
msgstr "filtr:"
msgid "view:"
msgstr "pohled (view):"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Aplikace %(app_label)r nebyla nalezena"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Model %(model_name)r v aplikaci %(app_label)r nenalezen"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "související položka `%(app_label)s.%(data_type)s`"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "související položky `%(app_label)s.%(object_name)s`"
#, python-format
msgid "all %s"
msgstr "Vše: %s"
#, python-format
msgid "number of %s"
msgstr "Počet: %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "Objekt %s patrně není typu urlpattern."
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/cs/LC_MESSAGES/django.po | po | mit | 7,227 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Jannis Leidel <jannis@leidel.info>, 2011
# Maredudd ap Gwyndaf <maredudd@maredudd.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-19 16:49+0100\n"
"PO-Revision-Date: 2017-09-23 18:54+0000\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: Welsh (http://www.transifex.com/django/django/language/cy/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cy\n"
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != "
"11) ? 2 : 3;\n"
msgid "Administrative Documentation"
msgstr "Dogfennaeth Gweinyddol"
msgid "Home"
msgstr "Hafan"
msgid "Documentation"
msgstr "Dogfennaeth"
msgid "Bookmarklets"
msgstr "Nodau tudalen"
msgid "Documentation bookmarklets"
msgstr "Nodau tudalen dogfennaeth"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
msgid "Documentation for this page"
msgstr "Dogfennaeth y dudalen hon"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Cymerir chi o unrhyw dudalen i'r dogfennaeth am yr olwg sy'n creu'r dudalen "
"hwnnw."
msgid "Tags"
msgstr "Tagiau"
msgid "List of all the template tags and their functions."
msgstr "Rhestr o holl dagiau'r templad a'u swyddogaeth."
msgid "Filters"
msgstr "Hidlau"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Gweithredoedd yw hidlau sy'n gallu cael eu gosod ar newidynnau mewn templad "
"i newid yr allbwm."
msgid "Models"
msgstr "Modelau"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Mae modelau yn disgrifio pob gwrthrych yn y system a'u meysydd "
"cysylltiedig. Mae gan bob model restr o feysydd y gellir eu defnyddio fel "
"newidynnau templad"
msgid "Views"
msgstr "Golygon"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Mae pob tudalen ar y wefan gyhoeddus yn cael eu creu gan olwg. Mae'r golwg "
"yn diffunio pa templad i'w ddefnyddio i gynhyrchu'r dudalen a pa wrthrychau "
"sydd ar gael i'r templad."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Offer ar gyfer eich porwr i gael mynediad cyflym i swyddogaethau gweinyddwr."
msgid "Please install docutils"
msgstr "Gosodwch docutils"
#, python-format
msgid ""
"The admin documentation system requires Python's <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Mae'r system dogfennaeth gweinyddol angen llyfrgell <a href=\"%(link)s"
"\">docutils</a> Python."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr "Gofynnwch i'r gweinyddwr i osod <a href=\"%(link)s\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "Model: %(name)s"
msgid "Fields"
msgstr ""
msgid "Field"
msgstr "Maes"
msgid "Type"
msgstr "Math"
msgid "Description"
msgstr "Disgrifiad"
msgid "Methods with arguments"
msgstr ""
msgid "Method"
msgstr ""
msgid "Arguments"
msgstr ""
msgid "Back to Model documentation"
msgstr ""
msgid "Model documentation"
msgstr "Dogfennaeth model"
msgid "Model groups"
msgstr "Grwpiau model"
msgid "Templates"
msgstr "Templadau"
#, python-format
msgid "Template: %(name)s"
msgstr "Templad: %(name)s"
#, python-format
msgid "Template: \"%(name)s\""
msgstr "Templad: \"%(name)s\""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template \"%(name)s\":"
msgstr "Chwilio'r llwybr am dempled \"%(name)s\":"
msgid "(does not exist)"
msgstr "(nid yw'n bodoli)"
msgid "Back to Documentation"
msgstr "Nôl i Dogfennaeth"
msgid "Template filters"
msgstr "Hidlau templadau"
msgid "Template filter documentation"
msgstr "Dogfennaeth hidlau templadau"
msgid "Built-in filters"
msgstr "Hidlau mewnol"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"I ddefnyddio'r hildau, rhowch <code>%(code)s</code> yn eich templad cyn "
"defnyddio'r hidl."
msgid "Template tags"
msgstr "Tagiau templadau"
msgid "Template tag documentation"
msgstr "Dogfennaeth tag templad"
msgid "Built-in tags"
msgstr "Tagiau mewnol"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"I ddefnyddio'r tagiau rhowch <code>%(code)s</code> yn eich templad cyn "
"defnyddio'r tag."
#, python-format
msgid "View: %(name)s"
msgstr "Golwg: %(name)s"
msgid "Context:"
msgstr "Cyd-destun:"
msgid "Templates:"
msgstr "Templadau:"
msgid "Back to View documentation"
msgstr ""
msgid "View documentation"
msgstr "Dogfennaeth golygon"
msgid "Jump to namespace"
msgstr ""
msgid "Empty namespace"
msgstr ""
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
msgid "Views by empty namespace"
msgstr ""
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
"Gweld ffwythiant: <code>%(full_name)s</code>. Enw: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "tag:"
msgid "filter:"
msgstr "hidl:"
msgid "view:"
msgstr "golwg:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Ni ddarganfuwyd ap %(app_label)r"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Ni darganfyddwyd model %(model_name)r yn ap %(app_label)r"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "y gwrthrych `%(app_label)s.%(data_type)s` cysylltiedig"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "gwrthrychau `%(app_label)s.%(object_name)s` cysylltiedig"
#, python-format
msgid "all %s"
msgstr "pob %s"
#, python-format
msgid "number of %s"
msgstr "nifer o %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "nid yw %s yn ymweld i fod yn wrthrych urlpattern"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/cy/LC_MESSAGES/django.po | po | mit | 6,512 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Christian Joergensen <christian@gmta.info>, 2012
# Erik Ramsgaard Wognsen <r4mses@gmail.com>, 2021
# Erik Ramsgaard Wognsen <r4mses@gmail.com>, 2013,2015-2016,2019
# Jannis Leidel <jannis@leidel.info>, 2011
# valberg <valberg@orn.li>, 2014
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-01-15 18:23+0000\n"
"Last-Translator: Erik Ramsgaard Wognsen <r4mses@gmail.com>\n"
"Language-Team: Danish (http://www.transifex.com/django/django/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr "Administrationsdokumentation"
msgid "Home"
msgstr "Hjem"
msgid "Documentation"
msgstr "Dokumentation"
msgid "Bookmarklets"
msgstr "Bookmarklets"
msgid "Documentation bookmarklets"
msgstr "Dokumentations-bookmarklets"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"For at installere bookmarklets, skal du trække linket til din bogmærkelinje "
"eller højreklikke linket og tilføje det til dine bogmærker. Derefter kan du "
"vælge bookmarkletten fra enhver side på websitet."
msgid "Documentation for this page"
msgstr "Dokumentation for denne side"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Bringer dig fra en hvilken som helst side til dokumentationen for det view, "
"der genererer den pågældende side."
msgid "Tags"
msgstr "Mærker"
msgid "List of all the template tags and their functions."
msgstr "Liste af alle template tags og deres funktioner."
msgid "Filters"
msgstr "Filtre"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Filtre er handlinger, der kan anvendes på variabler i en skabelon for at "
"ændre outputtet."
msgid "Models"
msgstr "Modeller"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Modeller er beskrivelser af alle objekter i systemet, og deres tilhørende "
"felter. Hver model har en liste af felter som kan tilgås som en skabelon "
"variabel."
msgid "Views"
msgstr "Views"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Hver side på den offentlige side bliver genereret af et view. Viewet "
"definerer hvilken skabelon der bruges til at generere siden og hvilke "
"objekter er tilgængelige fra skabelonen."
msgid "Tools for your browser to quickly access admin functionality."
msgstr "Værktøjer for din browser til hurtig adgang til admin funktionalitet."
msgid "Please install docutils"
msgstr "Installer venligst docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Admin dokumentationssystemet kræver Pythons <a href=\"%(link)s\">docutils</"
"a> bibliotek."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Venligst spørg dine administratorer om at installere <a href=\"%(link)s"
"\">docutils</a> ."
#, python-format
msgid "Model: %(name)s"
msgstr "Model: %(name)s"
msgid "Fields"
msgstr "Felter"
msgid "Field"
msgstr "Felt"
msgid "Type"
msgstr "Type"
msgid "Description"
msgstr "Beskrivelse"
msgid "Methods with arguments"
msgstr "Metode med argumenter"
msgid "Method"
msgstr "Metode"
msgid "Arguments"
msgstr "Argumenter"
msgid "Back to Model documentation"
msgstr "Tilbage til modeldokumentationen"
msgid "Model documentation"
msgstr "Modeldokumentation"
msgid "Model groups"
msgstr "Modelgrupper"
msgid "Templates"
msgstr "Skabeloner"
#, python-format
msgid "Template: %(name)s"
msgstr "Skabelon: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Skabelon: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Søgesti for skabelon <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(eksisterer ikke)"
msgid "Back to Documentation"
msgstr "Tilbage til dokumentationen"
msgid "Template filters"
msgstr "Skabelonfiltre"
msgid "Template filter documentation"
msgstr "Skabelonfilterdokumentation"
msgid "Built-in filters"
msgstr "Indbyggede filtre"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"For at bruge disse filtre, indsæt <code>%(code)s</code> i din skabelon, før "
"du bruger filteret."
msgid "Template tags"
msgstr "Skabelon-tags"
msgid "Template tag documentation"
msgstr "Skabelon-tag-dokumentation"
msgid "Built-in tags"
msgstr "Indbyggede tags"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"For at bruge disse tags, indsæt <code>%(code)s</code> i din skabelon, før du "
"bruger tagget."
#, python-format
msgid "View: %(name)s"
msgstr "View: %(name)s"
msgid "Context:"
msgstr "Kontekst:"
msgid "Templates:"
msgstr "Skabeloner:"
msgid "Back to View documentation"
msgstr "Tilbage til View-dokumentationen"
msgid "View documentation"
msgstr "View dokumentation"
msgid "Jump to namespace"
msgstr "Hop til namespace"
msgid "Empty namespace"
msgstr "Tomt namespace"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Views efter namespace %(name)s"
msgid "Views by empty namespace"
msgstr "Views efter tomt namespace"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" View funktion: <code>%(full_name)s</code>. Navn: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "tag:"
msgid "filter:"
msgstr "filter:"
msgid "view:"
msgstr "view:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Applikation %(app_label)r blev ikke fundet"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Modellen %(model_name)r ikke fundet i applikationen %(app_label)r"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "det relaterede `%(app_label)s.%(data_type)s`-objekt"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "relaterede `%(app_label)s.%(object_name)s`-objekter"
#, python-format
msgid "all %s"
msgstr "alle %s"
#, python-format
msgid "number of %s"
msgstr "antal %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s ser ikke ud til at være et urlpattern-objekt"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/da/LC_MESSAGES/django.po | po | mit | 7,148 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Florian Apolloner <florian@apolloner.eu>, 2021
# Jannis Vajen, 2013
# Jannis Leidel <jannis@leidel.info>, 2013-2016,2020
# Jannis Vajen, 2016
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-11-28 17:15+0000\n"
"Last-Translator: Raphael Michel <mail@raphaelmichel.de>\n"
"Language-Team: German (http://www.transifex.com/django/django/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr "Administrative Dokumentation"
msgid "Home"
msgstr "Start"
msgid "Documentation"
msgstr "Dokumentation"
msgid "Bookmarklets"
msgstr "Bookmarklets"
msgid "Documentation bookmarklets"
msgstr "Dokumentations-Bookmarklets"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"Um die Bookmarklets zu installieren, muss dieser Link in die Browser-"
"Werkzeugleiste gezogen werden oder mittels rechter Maustaste in den "
"Bookmarks gespeichert werden. Danach können die Bookmarklets von jeder Seite "
"aufgerufen werden."
msgid "Documentation for this page"
msgstr "Dokumentation für diese Seite"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Springt von jeder Seite zu der Dokumentation für den View, der diese Seite "
"erzeugt."
msgid "Tags"
msgstr "Tags"
msgid "List of all the template tags and their functions."
msgstr "Alle Template-Tags und deren Funktionen auflisten."
msgid "Filters"
msgstr "Filter"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Filter sind Aktionen, die in Templates auf Variablen angewendet werden "
"können, um deren Ausgabe zu verändern."
msgid "Models"
msgstr "Modelle"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Modelle sind Beschreibungen aller Objekte und ihrer Felder, die sich im "
"System befinden. Jedes Model hat eine Reihe von Feldern, auf in Form von "
"Templatevariablen zugegriffen werden kann."
msgid "Views"
msgstr "Views"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Jede öffentliche Seite wird durch einen View generiert. Dieser View "
"definiert, welches Template genutzt wird, um die Seite zu generieren und "
"welche Objekte in dem jeweiligen Template zur Verfügung stehen."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Hilfsfunktionen für den Browser, um schnell auf den Administrationsbereich "
"zugreifen zu können."
msgid "Please install docutils"
msgstr "Bitte docutils installieren."
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Das Admin-Dokumentationssystem erfordert die Python-Bibliothek <a href="
"\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Bitte durch den/die Administrator/in <a href=\"%(link)s\">docutils</a> "
"installieren lassen."
#, python-format
msgid "Model: %(name)s"
msgstr "Model: %(name)s"
msgid "Fields"
msgstr "Felder"
msgid "Field"
msgstr "Feld"
msgid "Type"
msgstr "Klasse"
msgid "Description"
msgstr "Beschreibung"
msgid "Methods with arguments"
msgstr "Methode mit Argumenten"
msgid "Method"
msgstr "Methode"
msgid "Arguments"
msgstr "Argumente"
msgid "Back to Model documentation"
msgstr "Zurück zur Model-Dokumentation"
msgid "Model documentation"
msgstr "Model-Dokumentation"
msgid "Model groups"
msgstr "Model-Gruppen"
msgid "Templates"
msgstr "Templates"
#, python-format
msgid "Template: %(name)s"
msgstr "Template: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Template: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Suchpfade für Template <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(existiert nicht)"
msgid "Back to Documentation"
msgstr "Zurück zur Dokumentation"
msgid "Template filters"
msgstr "Template-Filter"
msgid "Template filter documentation"
msgstr "Template-Filter-Dokumentation"
msgid "Built-in filters"
msgstr "Mitgelieferte Filter"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"Um diese Filter zu nutzen, muss sich <code>%(code)s</code> vor Aufruf des "
"Filters im Template befinden."
msgid "Template tags"
msgstr "Template-Tags"
msgid "Template tag documentation"
msgstr "Template-Tag-Dokumentation"
msgid "Built-in tags"
msgstr "Mitgelieferte Tags"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"Um diese Tags zu nutzen, muss sich <code>%(code)s</code> vor Aufruf des Tags "
"im Template befinden."
#, python-format
msgid "View: %(name)s"
msgstr "View: %(name)s"
msgid "Context:"
msgstr "Kontext:"
msgid "Templates:"
msgstr "Templates:"
msgid "Back to View documentation"
msgstr "Zurück zur View-Dokumentation"
msgid "View documentation"
msgstr "View Dokumentation"
msgid "Jump to namespace"
msgstr "Zu Namespace springen"
msgid "Empty namespace"
msgstr "Leerer Namespace"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Views in Namespace %(name)s"
msgid "Views by empty namespace"
msgstr "Views ohne Namespace"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" View-Funktion: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "Tag:"
msgid "filter:"
msgstr "Filter:"
msgid "view:"
msgstr "View:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Anwendung %(app_label)r nicht gefunden"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Modell %(model_name)r wurde nicht in Anwendung %(app_label)r gefunden"
msgid "model:"
msgstr "Modell:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "Das verknüpfte `%(app_label)s.%(data_type)s` Objekt"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "verknüpfte `%(app_label)s.%(object_name)s` Objekte"
#, python-format
msgid "all %s"
msgstr "Alle %s"
#, python-format
msgid "number of %s"
msgstr "Anzahl von %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "%s ist scheinbar kein urlpattern-Objekt"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/de/LC_MESSAGES/django.po | po | mit | 7,180 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Michael Wolf <milupo@sorbzilla.de>, 2016,2020-2021
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-02-01 22:06+0000\n"
"Last-Translator: Michael Wolf <milupo@sorbzilla.de>\n"
"Language-Team: Lower Sorbian (http://www.transifex.com/django/django/"
"language/dsb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: dsb\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3);\n"
msgid "Administrative Documentation"
msgstr "Administratiwna dokumentacija"
msgid "Home"
msgstr "Startowy bok"
msgid "Documentation"
msgstr "Dokumentacija"
msgid "Bookmarklets"
msgstr "Skriptowe cytańske znamjenja"
msgid "Documentation bookmarklets"
msgstr "Skriptowe cytańske znamjenja dokumentacije"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"Aby skriptowe cytańske znamjenja instalěrował, śěgniśo wótkaz do swójeje "
"rědki cytańskich znamjenjow abo klikniśo z pšaweju tastu myški a pśidajśo "
"jen swójim cytańskim znamjenjam. Něnto móžośo skriptowe cytańske znamje z "
"drugego boka na sedle wubraś."
msgid "Documentation for this page"
msgstr "Dokumentacija za toś ten bok"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Zmóžnja wam, z někakego boka do dokumentacije naglěda skócyś, kótaryž twóri "
"ten bok."
msgid "Tags"
msgstr "Wobznamjenja"
msgid "List of all the template tags and their functions."
msgstr "Lisćina wšych pśedłogowych wobznamjenjow a jich funkcijow."
msgid "Filters"
msgstr "Filtry"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Filtry su akcije, kótarež daju se na wariable w pśedłoze nałožyś, aby wudaśe "
"změnili."
msgid "Models"
msgstr "Modele"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Modele su wopisanja wšych objektow w systemje a jich pśisłušnych pólow. "
"Kuždy model ma lisćinu pólow, na kótarež maju pśistup ako pśedłogowe "
"wariable."
msgid "Views"
msgstr "Naglědy"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Kuždy bok na zjawnem sedle twóri se pśez naglěd. Naglěd definěrujo, kótara "
"pśedłoga se wužywa, aby se bok napórał a kótare objekty su tej pśedłoze k "
"dispoziciji."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Rědy za waš wobglědowak za malsny pśistup na adminstratorowu funkcionalnosć."
msgid "Please install docutils"
msgstr "Pšosym instalěrujśo docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Administratorowy dokumentaciski system pomina se Pythonowu biblioteku <a "
"href=\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Pšosym pšosćo swóje administratory, <a href=\"%(link)s\">docutils</a> "
"instalěrowaś."
#, python-format
msgid "Model: %(name)s"
msgstr "Model: %(name)s"
msgid "Fields"
msgstr "Póla"
msgid "Field"
msgstr "Pólo"
msgid "Type"
msgstr "Typ"
msgid "Description"
msgstr "Wopisanje"
msgid "Methods with arguments"
msgstr "Metody z argumentami"
msgid "Method"
msgstr "Metoda"
msgid "Arguments"
msgstr "Argumenty"
msgid "Back to Model documentation"
msgstr "Slědk k modelowej dokumentaciji"
msgid "Model documentation"
msgstr "Modelowa dokumentacija"
msgid "Model groups"
msgstr "Modelowe kupki"
msgid "Templates"
msgstr "Pśedłogi"
#, python-format
msgid "Template: %(name)s"
msgstr "Pśedłoga: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Pśedłoga: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Pytańska sćažka za pśedłogu <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(njeeksistěrujo)"
msgid "Back to Documentation"
msgstr "Slědk k dokumentaciji"
msgid "Template filters"
msgstr "Pśedłogowe filtry"
msgid "Template filter documentation"
msgstr "Dokumentacija za pśedłogowe filtry"
msgid "Built-in filters"
msgstr "Zatwarjone filtry"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"Aby toś te filtry wužywał, zasajźćo <code>%(code)s</code> do wójeje "
"pśedłogi, nježli až wužywaśo filter."
msgid "Template tags"
msgstr "Pśedłogowe wobznamjenja"
msgid "Template tag documentation"
msgstr "Dokumentacija za pśedłogowe wobznamjenja"
msgid "Built-in tags"
msgstr "Zatworjone wobznamjenja"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"Aby toś te wobznamjenja wužywał, zasajźćo <code>%(code)s</code> do wójeje "
"pśedłogi, nježli až wužywaśo wobznamjenje."
#, python-format
msgid "View: %(name)s"
msgstr "Naglěd: %(name)s"
msgid "Context:"
msgstr "Kontekst:"
msgid "Templates:"
msgstr "Pśedłogi"
msgid "Back to View documentation"
msgstr "Slědk k naglědowej dokumentaciji"
msgid "View documentation"
msgstr "Naglědowa dokumentacija"
msgid "Jump to namespace"
msgstr "K mjenjowemu rumoju skócyś"
msgid "Empty namespace"
msgstr "Prozny mjenjowy rum"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Naglědy pó mjenjowem rumje %(name)s"
msgid "Views by empty namespace"
msgstr "Naglědy pó proznem mjenjowem rumje"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
" Naglědowa funkcija: <code>%(full_name)s</code>. Mě: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "wobznamjenje:"
msgid "filter:"
msgstr "filter:"
msgid "view:"
msgstr "naglěd:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Nałoženje %(app_label)r njenamakane"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr "Model %(model_name)r njejo se w nałoženju %(app_label)r namakał"
msgid "model:"
msgstr "model:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "pśisłušny objekt %(app_label)s.%(data_type)s“"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "pśisłušne objekty „%(app_label)s.%(object_name)s"
#, python-format
msgid "all %s"
msgstr "wšykne %s"
#, python-format
msgid "number of %s"
msgstr "ůicba %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "zda se, až %s njejo objekt urlpattern"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/dsb/LC_MESSAGES/django.po | po | mit | 7,332 |
# This file is distributed under the same license as the Django package.
#
# Translators:
# Dimitris Glezos <glezos@transifex.com>, 2011
# Fotis Athineos <fotis@transifex.com>, 2021
# Jannis Leidel <jannis@leidel.info>, 2011
# Nick Mavrakis <mavrakis.n@gmail.com>, 2016
# Pãnoș <panos.laganakos@gmail.com>, 2014
# Yorgos Pagles <y.pagles@gmail.com>, 2011
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2021-08-04 06:47+0000\n"
"Last-Translator: Fotis Athineos <fotis@transifex.com>\n"
"Language-Team: Greek (http://www.transifex.com/django/django/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: el\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Administrative Documentation"
msgstr "Διαχειριστική Τεκμηρίωση"
msgid "Home"
msgstr "Αρχική"
msgid "Documentation"
msgstr "Τεκμηρίωση"
msgid "Bookmarklets"
msgstr "Σελιδοδείκτες"
msgid "Documentation bookmarklets"
msgstr "Σελιδοδείκτες τεκμηρίωσης"
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
"Για την εγκατάσταση bookmarklets, σύρετε το link στην γραμμή εργαλείων των "
"bookmarks του browser σας ή δεξί-κλικ πάνω στο link και προσθέστε το στα "
"bookmarks. Τώρα μπορείτε να επιλέξετε το bookmarklet μέσα από κάθε σελίδα "
"του site."
msgid "Documentation for this page"
msgstr "Τεκμηρίωση για αυτήν τη σελίδα"
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
"Μεταπήδηση από οποιαδήποτε σελίδα στην τεκμηρίωση για το view που "
"δημιούργησε τη σελίδα αυτή."
msgid "Tags"
msgstr "Ετικέτες"
msgid "List of all the template tags and their functions."
msgstr "Λίστα όλωςν τον ετικετών περιγραμμάτων και των λειτουργιών τους."
msgid "Filters"
msgstr " Φίλτρα"
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
"Τα φίλτρα είναι ενέργειες που μπορούν να εφαρμοστούν σε μεταβλητές μέσα σε "
"ένα περίγραμμα για να αλλάξουν το αποτέλεσμα."
msgid "Models"
msgstr "Μοντέλα"
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
"Τα μοντέλα είναι περιγραφές όλωςν τον αντικειμένων στο σύστημα και των "
"συνδεδεμένων πεδίων. Κάθε μοντέλο έχει μια λίστα πεδιών που είναι προσβάσιμα "
"ως μεταβλητές περιγραμμάτων"
msgid "Views"
msgstr "Οπτικές"
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
"Κάθε σελίδα στη δημόσια ιστοσελίδα παράγεται από μια οπτική. Η οπτική ορίζει "
"ποιό περίγραμμα θα χρησιμοποιηθεί για να παραχθεί η σελίδα και ποιά "
"αντικείμενα είναι διαθέσιμα σε αυτό το περίγραμμα."
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
"Εργαλεία για το πρόγραμμα περιήγησης για γρήγορη πρόσβαση σε διαχειριστική "
"λειτουργικότητα. "
msgid "Please install docutils"
msgstr "Παρακαλώ εγκαταστείστε τα docutils"
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
"Το σύστημα διαχειριστικής τεκμηρίωσης απαιτεί την βιβλιοθήκη της Python <a "
"href=\"%(link)s\">docutils</a>."
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
"Παρακαλώ ζητήστε απο τον διαχειριστή σας να εγκαταστήσει τα <a href="
"\"%(link)s\">docutils</a>."
#, python-format
msgid "Model: %(name)s"
msgstr "Μοντέλο: %(name)s"
msgid "Fields"
msgstr "Πεδία"
msgid "Field"
msgstr "Πεδίο"
msgid "Type"
msgstr "Τύπος"
msgid "Description"
msgstr "Περιγραφή"
msgid "Methods with arguments"
msgstr "Μέθοδοι με ορίσματα"
msgid "Method"
msgstr "Μέθοδος"
msgid "Arguments"
msgstr "Ορίσματα"
msgid "Back to Model documentation"
msgstr "Πίσω στην τεκμηρίωση των Μοντέλων"
msgid "Model documentation"
msgstr "Τεκμηρίωση Μοντέλων"
msgid "Model groups"
msgstr "Ομάδες μοντέλου"
msgid "Templates"
msgstr "Περιγράμματα"
#, python-format
msgid "Template: %(name)s"
msgstr "Περίγραμμα: %(name)s"
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr "Περίγραμμα: <q>%(name)s</q>"
#. Translators: Search is not a verb here, it qualifies path (a search path)
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr "Αναζήτηση μονοπατιού για περίγραμμα <q>%(name)s</q>:"
msgid "(does not exist)"
msgstr "(δεν υπάρχει)"
msgid "Back to Documentation"
msgstr "Επιστροφή στην Τεκμηρίωση"
msgid "Template filters"
msgstr "Φίλτρα περιγραμμάτων"
msgid "Template filter documentation"
msgstr "Τεκμηρίωση φίλτρων περιγραμμάτων"
msgid "Built-in filters"
msgstr "Ενσωματωμένα φίλτρα"
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
"Για να χρησιμοποιήσετε αυτά τα φίλτρα, βάλτε <code>%(code)s</code> στο "
"περίγραμμα σας, προτού χρησιμοποιήσετε το φίλτρο."
msgid "Template tags"
msgstr "Ετικέτες περιγραμμάτων"
msgid "Template tag documentation"
msgstr "Τεκμηρίωση ετικετών περιγραμμάτων"
msgid "Built-in tags"
msgstr "Ενσωματωμένες ετικέτες"
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
"Για να χρησιμοποιήσετε αυτές τις ετικέτες, βάλτε <code>%(code)s</code> στο "
"περίγραμμα σας, προτού χρησιμοποιήσετε την ετικέτα."
#, python-format
msgid "View: %(name)s"
msgstr "Οπτική: %(name)s"
msgid "Context:"
msgstr "Πλαίσιο:"
msgid "Templates:"
msgstr "Περιγράμματα:"
msgid "Back to View documentation"
msgstr "Πίσω στην τεκμηρίωση του View"
msgid "View documentation"
msgstr "Προβολή Τεκμηρίωσης"
msgid "Jump to namespace"
msgstr "Μεταφερθείτε στο namespace"
msgid "Empty namespace"
msgstr "Άδειο namespace"
#, python-format
msgid "Views by namespace %(name)s"
msgstr "Οπτικές ανά namespace %(name)s"
msgid "Views by empty namespace"
msgstr "Οπτικές ανά κενό namespace"
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
"\n"
"Συνάρτηση οπτικής: <code>%(full_name)s</code>. Όνομα: <code>%(url_name)s</"
"code>.\n"
msgid "tag:"
msgstr "ετικέτα:"
msgid "filter:"
msgstr "φίλτρο:"
msgid "view:"
msgstr "προβολή:"
#, python-format
msgid "App %(app_label)r not found"
msgstr "Η εφαρμογή %(app_label)r δεν βρέθηκε"
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr ""
"Το μοντέλο %(model_name)r δεν μπορεί να βρεθεί στην εφαρμογή %(app_label)r"
msgid "model:"
msgstr "μοντέλο:"
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr "το συσχετισμένο `%(app_label)s.%(data_type)s` αντικείμενο"
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr "συσχετισμένα `%(app_label)s.%(object_name)s` αντικείμενα"
#, python-format
msgid "all %s"
msgstr "όλα %s"
#, python-format
msgid "number of %s"
msgstr "πλήθος number of %s"
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr "Το %s δε φαίνεται να είναι ένα αντικείμενο urlpattern"
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/el/LC_MESSAGES/django.po | po | mit | 9,320 |
# This file is distributed under the same license as the Django package.
#
msgid ""
msgstr ""
"Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
"Last-Translator: Django team\n"
"Language-Team: English <en@li.org>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: contrib/admindocs/apps.py:7
msgid "Administrative Documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:6
#: contrib/admindocs/templates/admin_doc/index.html:6
#: contrib/admindocs/templates/admin_doc/missing_docutils.html:6
#: contrib/admindocs/templates/admin_doc/model_detail.html:14
#: contrib/admindocs/templates/admin_doc/model_index.html:8
#: contrib/admindocs/templates/admin_doc/template_detail.html:6
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:7
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:7
#: contrib/admindocs/templates/admin_doc/view_detail.html:6
#: contrib/admindocs/templates/admin_doc/view_index.html:7
msgid "Home"
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:7
#: contrib/admindocs/templates/admin_doc/index.html:7
#: contrib/admindocs/templates/admin_doc/index.html:10
#: contrib/admindocs/templates/admin_doc/index.html:14
#: contrib/admindocs/templates/admin_doc/missing_docutils.html:7
#: contrib/admindocs/templates/admin_doc/missing_docutils.html:14
#: contrib/admindocs/templates/admin_doc/model_detail.html:15
#: contrib/admindocs/templates/admin_doc/model_index.html:9
#: contrib/admindocs/templates/admin_doc/template_detail.html:7
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:8
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:8
#: contrib/admindocs/templates/admin_doc/view_detail.html:7
#: contrib/admindocs/templates/admin_doc/view_index.html:8
msgid "Documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:8
#: contrib/admindocs/templates/admin_doc/index.html:29
msgid "Bookmarklets"
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:11
msgid "Documentation bookmarklets"
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:15
msgid ""
"To install bookmarklets, drag the link to your bookmarks toolbar, or right-"
"click the link and add it to your bookmarks. Now you can select the "
"bookmarklet from any page in the site."
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:22
msgid "Documentation for this page"
msgstr ""
#: contrib/admindocs/templates/admin_doc/bookmarklets.html:23
msgid ""
"Jumps you from any page to the documentation for the view that generates "
"that page."
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:17
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:9
msgid "Tags"
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:18
msgid "List of all the template tags and their functions."
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:20
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:9
msgid "Filters"
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:21
msgid ""
"Filters are actions which can be applied to variables in a template to alter "
"the output."
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:23
#: contrib/admindocs/templates/admin_doc/model_detail.html:16
#: contrib/admindocs/templates/admin_doc/model_index.html:10
#: contrib/admindocs/templates/admin_doc/model_index.html:14
msgid "Models"
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:24
msgid ""
"Models are descriptions of all the objects in the system and their "
"associated fields. Each model has a list of fields which can be accessed as "
"template variables"
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:26
#: contrib/admindocs/templates/admin_doc/view_detail.html:8
#: contrib/admindocs/templates/admin_doc/view_index.html:9
#: contrib/admindocs/templates/admin_doc/view_index.html:12
msgid "Views"
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:27
msgid ""
"Each page on the public site is generated by a view. The view defines which "
"template is used to generate the page and which objects are available to "
"that template."
msgstr ""
#: contrib/admindocs/templates/admin_doc/index.html:30
msgid "Tools for your browser to quickly access admin functionality."
msgstr ""
#: contrib/admindocs/templates/admin_doc/missing_docutils.html:10
msgid "Please install docutils"
msgstr ""
#: contrib/admindocs/templates/admin_doc/missing_docutils.html:17
#, python-format
msgid ""
"The admin documentation system requires Python’s <a href=\"%(link)s"
"\">docutils</a> library."
msgstr ""
#: contrib/admindocs/templates/admin_doc/missing_docutils.html:19
#, python-format
msgid ""
"Please ask your administrators to install <a href=\"%(link)s\">docutils</a>."
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:21
#, python-format
msgid "Model: %(name)s"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:30
msgid "Fields"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:35
msgid "Field"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:36
msgid "Type"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:37
#: contrib/admindocs/templates/admin_doc/model_detail.html:60
msgid "Description"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:53
msgid "Methods with arguments"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:58
msgid "Method"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:59
msgid "Arguments"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_detail.html:76
msgid "Back to Model documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_index.html:18
msgid "Model documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/model_index.html:43
msgid "Model groups"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_detail.html:8
msgid "Templates"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_detail.html:13
#, python-format
msgid "Template: %(name)s"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_detail.html:16
#, python-format
msgid "Template: <q>%(name)s</q>"
msgstr ""
#. Translators: Search is not a verb here, it qualifies path (a search path)
#: contrib/admindocs/templates/admin_doc/template_detail.html:19
#, python-format
msgid "Search path for template <q>%(name)s</q>:"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_detail.html:22
msgid "(does not exist)"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_detail.html:26
msgid "Back to Documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:12
msgid "Template filters"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:16
msgid "Template filter documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:22
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:43
msgid "Built-in filters"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_filter_index.html:23
#, python-format
msgid ""
"To use these filters, put <code>%(code)s</code> in your template before "
"using the filter."
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:12
msgid "Template tags"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:16
msgid "Template tag documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:22
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:43
msgid "Built-in tags"
msgstr ""
#: contrib/admindocs/templates/admin_doc/template_tag_index.html:23
#, python-format
msgid ""
"To use these tags, put <code>%(code)s</code> in your template before using "
"the tag."
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_detail.html:12
#, python-format
msgid "View: %(name)s"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_detail.html:23
msgid "Context:"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_detail.html:28
msgid "Templates:"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_detail.html:32
msgid "Back to View documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_index.html:16
msgid "View documentation"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_index.html:22
msgid "Jump to namespace"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_index.html:27
msgid "Empty namespace"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_index.html:40
#, python-format
msgid "Views by namespace %(name)s"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_index.html:42
msgid "Views by empty namespace"
msgstr ""
#: contrib/admindocs/templates/admin_doc/view_index.html:49
#, python-format
msgid ""
"\n"
" View function: <code>%(full_name)s</code>. Name: <code>%(url_name)s</"
"code>.\n"
msgstr ""
#: contrib/admindocs/views.py:72 contrib/admindocs/views.py:73
#: contrib/admindocs/views.py:75
msgid "tag:"
msgstr ""
#: contrib/admindocs/views.py:103 contrib/admindocs/views.py:104
#: contrib/admindocs/views.py:106
msgid "filter:"
msgstr ""
#: contrib/admindocs/views.py:162 contrib/admindocs/views.py:163
#: contrib/admindocs/views.py:165
msgid "view:"
msgstr ""
#: contrib/admindocs/views.py:192
#, python-format
msgid "App %(app_label)r not found"
msgstr ""
#: contrib/admindocs/views.py:196
#, python-format
msgid "Model %(model_name)r not found in app %(app_label)r"
msgstr ""
#: contrib/admindocs/views.py:201 contrib/admindocs/views.py:202
#: contrib/admindocs/views.py:217 contrib/admindocs/views.py:240
#: contrib/admindocs/views.py:245 contrib/admindocs/views.py:260
#: contrib/admindocs/views.py:301 contrib/admindocs/views.py:306
msgid "model:"
msgstr ""
#: contrib/admindocs/views.py:213
#, python-format
msgid "the related `%(app_label)s.%(data_type)s` object"
msgstr ""
#: contrib/admindocs/views.py:233 contrib/admindocs/views.py:293
#, python-format
msgid "related `%(app_label)s.%(object_name)s` objects"
msgstr ""
#: contrib/admindocs/views.py:240 contrib/admindocs/views.py:301
#, python-format
msgid "all %s"
msgstr ""
#: contrib/admindocs/views.py:245 contrib/admindocs/views.py:306
#, python-format
msgid "number of %s"
msgstr ""
#: contrib/admindocs/views.py:398
#, python-format
msgid "%s does not appear to be a urlpattern object"
msgstr ""
| castiel248/Convert | Lib/site-packages/django/contrib/admindocs/locale/en/LC_MESSAGES/django.po | po | mit | 10,688 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.