diff --git a/source/Ox.js b/source/Ox.js index 16d1ce97..675fbed3 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -37,7 +37,7 @@ } function getPath() { - var index, regexp = /Ox\.js(\?\d+|)$/, + var index, regexp = /Ox\.js(\?[\d\.]+|)$/, scripts = document.getElementsByTagName('script'), src; for (index = scripts.length - 1; index >= 0; index--) { src = scripts[index].src; diff --git a/source/Ox/js/Constants.js b/source/Ox/js/Constants.js index 8f88ca13..1fe2d45b 100644 --- a/source/Ox/js/Constants.js +++ b/source/Ox/js/Constants.js @@ -63,7 +63,8 @@ Ox.LOCALE_NAMES = { 'el': 'Ελληνικά', 'en': 'English', 'fr': 'Français', - 'hi': 'हिन्दी' + 'hi': 'हिन्दी', + 'tr': 'Türkçe' }; //@ Ox.LOCALES Locales per module Ox.LOCALES = {}; diff --git a/source/Ox/json/locale.tr.json b/source/Ox/json/locale.tr.json new file mode 100644 index 00000000..81c526bc --- /dev/null +++ b/source/Ox/json/locale.tr.json @@ -0,0 +1,89 @@ +{ + "%": "%", + ",": ",", + ".": ".", + "%A, %B %e, %Y": "%A, %B %e, %Y", + "%a, %b %e, %Y": "%a, %b %e, %Y", + "AD": "MS", + "AM": "", + "Apr": "", + "April": "Nisan", + "Aug": "", + "August": "Ağustos", + "BC": "MÖ", + "%B %e, %Y": "", + "%b %e, %Y": "", + "d": "g", + "day": "gün", + "days": "gün", + "days{2}": "gün", + "Dec": "", + "December": "Aralık", + "Fall": "Düşmek", + "Feb": "", + "February": "Şubat", + "Fri": "", + "Friday": "Cuma", + "h": "s", + "hour": "saat", + "hours": "saat", + "hours{2}": "saat", + "%I:%M %p": "", + "%I:%M:%S %p": "", + "Jan": "", + "January": "Ocak", + "Jul": "", + "July": "Temmuz", + "Jun": "", + "June": "Haziran", + "m": "d", + "Mar": "", + "March": "Mart", + "May": "Mayıs", + "%m/%d/%Y": "", + "%m/%d/%y": "", + "minute": "dakika", + "minutes": "dakika", + "minutes{2}": "dakika", + "Mon": "", + "Monday": "Pazartesi", + "nd": ".", + "nd{22}": ".", + "no": "hayır", + "Nov": "", + "November": "Kasım", + "Oct": "", + "October": "Ekim", + "PM": "", + "rd": ".", + "rd{23}": ".", + "s": "s", + "Sat": "", + "Saturday": "Cumartesi", + "second": "saniye", + "seconds": "saniye", + "seconds{2}": "saniye", + "Sep": "", + "September": "Eylül", + "Spring": "Bahar", + "st": ".", + "st{21}": ".", + "Summer": "Yaz", + "Sun": "", + "Sunday": "Pazar", + "th": ".", + "th{11}": ".", + "th{12}": ".", + "th{13}": ".", + "Thu": "", + "Thursday": "Perşembe", + "Tue": "", + "Tuesday": "Salı", + "Wed": "", + "Wednesday": "Çarşamba", + "Winter": "kış", + "y": "yy", + "year": "yıl", + "years": "yıl", + "years{2}": "yıl" +} diff --git a/source/UI/css/UI.css b/source/UI/css/UI.css index e6ea4dca..2b29ba4e 100644 --- a/source/UI/css/UI.css +++ b/source/UI/css/UI.css @@ -16,6 +16,9 @@ a:hover, .OxLink:hover { blockquote { margin: 0 1.5em 0 1.5em; } +html, body { + overscroll-behavior: none; +} body { margin: 0; cursor: default; @@ -2458,6 +2461,7 @@ Video font-size: 8px; line-height: 10px; text-align: center; + text-wrap: balance; text-overflow: ellipsis; text-shadow: rgba(0, 0, 0, 1) 1px 1px 1px; color: rgb(255, 255, 255); diff --git a/source/UI/css/theme.css b/source/UI/css/theme.css index 5c62887e..83ac746d 100644 --- a/source/UI/css/theme.css +++ b/source/UI/css/theme.css @@ -1188,8 +1188,10 @@ Scrollbars background: -webkit-linear-gradient(left, $buttonActiveGradient); } -body.$themeClass { - scrollbar-color: $bodyBorder $bodyBackground; +@supports not selector(::-webkit-scrollbar) { + body.$themeClass { + scrollbar-color: $bodyBorder $bodyBackground; + } } /* diff --git a/source/UI/js/Core/Element.js b/source/UI/js/Core/Element.js index 5e1ca456..df17ea0b 100644 --- a/source/UI/js/Core/Element.js +++ b/source/UI/js/Core/Element.js @@ -710,6 +710,7 @@ Ox.Focus.removeElement(this.oxid); this.self(_).unbindKeyboard(); this.$tooltip && this.$tooltip.remove(); + jQuery.cleanData(this.$element); delete Ox.$elements[this.oxid]; // If setElement($element) was used, delete $element too delete Ox.$elements[this.$element.oxid]; @@ -738,6 +739,7 @@ this.findElements().forEach(function($element) { $element.removeElement(false); }); + jQuery.cleanData(this.$element); this.$element.replaceWith($element); if ($element.$element) { // $element is Ox.Element this.$element = $element.$element; diff --git a/source/UI/js/Core/Event.js b/source/UI/js/Core/Event.js index 8df1650a..31c1fee8 100644 --- a/source/UI/js/Core/Event.js +++ b/source/UI/js/Core/Event.js @@ -438,7 +438,7 @@ Ox.forEach( Ox.makeObject(Ox.slice(arguments)), function(data, event) { - target.postMessage(JSON.stringify({ + target && target.postMessage(JSON.stringify({ data: data, event: event, target: isParent ? Ox.oxid : null diff --git a/source/UI/js/Core/Request.js b/source/UI/js/Core/Request.js index cadc6e5a..b5980252 100644 --- a/source/UI/js/Core/Request.js +++ b/source/UI/js/Core/Request.js @@ -25,6 +25,7 @@ Ox.Request = (function() { $element; return { + async: true, /*@ bindEvent Bind event @@ -139,6 +140,7 @@ Ox.Request = (function() { } else { pending[req] = true; $.ajax({ + async: Ox.Request.async, beforeSend: function(request) { var csrftoken = Ox.Cookies('csrftoken'); if (csrftoken) { diff --git a/source/UI/js/Form/ArrayEditable.js b/source/UI/js/Form/ArrayEditable.js index f361569d..11f62ff9 100644 --- a/source/UI/js/Form/ArrayEditable.js +++ b/source/UI/js/Form/ArrayEditable.js @@ -25,6 +25,7 @@ Ox.ArrayEditable = function(options, self) { var that = Ox.Element({}, self) .defaults({ clickLink: null, + confirmDeleteDialog: null, editable: true, format: null, getSortValue: null, @@ -116,23 +117,31 @@ Ox.ArrayEditable = function(options, self) { self.selected = getSelectedPosition(); - function deleteItem(id) { + function deleteItem(id, empty) { // it is possible to delete an (empty-value) item // by selecting another one id = id || self.options.selected; - var position = Ox.getIndexById(self.options.items, id) - if (self.options.editable) { - self.options.items.splice(position, 1); - renderItems(); - that.triggerEvent('delete', {id: id}); - self.editing = false; - if (self.options.selected == id) { - self.selected = -1; - self.options.selected = ''; - } else if (self.options.selected) { - self.selected = Ox.getIndexById(self.options.item, self.options.selected) + + (self.options.confirmDeleteDialog && !empty ? self.options.confirmDeleteDialog: Ox.noop)({ + items: Ox.isArray(id) ? id : [id], + }, function(result) { + if (self.options.editable) { + (Ox.isArray(id) ? id : [id]).forEach(id => { + var position = Ox.getIndexById(self.options.items, id) + self.options.items.splice(position, 1); + that.triggerEvent('delete', {id: id}); + }) + renderItems(); + self.editing = false; + if (self.options.selected == id) { + self.selected = -1; + self.options.selected = ''; + } else if (self.options.selected) { + self.selected = Ox.getIndexById(self.options.item, self.options.selected) + } } - } + }) + } function doubleclick(e) { @@ -146,12 +155,20 @@ Ox.ArrayEditable = function(options, self) { } } + function getId(position) { + return position > -1 ? self.options.items[position].id : ''; + } + function getSelectedId() { - return self.selected > -1 ? self.options.items[self.selected].id : ''; + return getId(self.selected); + } + + function getPosition(id) { + return Ox.getIndexById(self.options.items, id); } function getSelectedPosition() { - return Ox.getIndexById(self.options.items, self.options.selected); + return getPosition(self.options.selected); } function renderItems(blur) { @@ -267,6 +284,50 @@ Ox.ArrayEditable = function(options, self) { : that.triggerEvent('selectprevious'); } } + function toggleItem(idOrPosition) { + var id, position; + if (Ox.isString(idOrPosition)) { + id = idOrPosition + position = getPosition(id); + } else { + position = idOrPosition + id = getId(position); + } + if (!Ox.isArray(self.options.selected)) { + self.options.selected = [self.options.selected] + } + if (!Ox.isArray(self.selected)) { + self.selected = [self.selected] + } + if (!self.options.selected.includes(id)) { + var minPos, maxPos; + if (Ox.min(self.selected) > position) { + minPos = position + maxPos = Ox.min(self.selected) + } else { + minPos = Ox.max(self.selected) + 1 + maxPos = position + 1 + } + Ox.range(minPos, maxPos).forEach(pos => { + self.selected.push(pos) + self.options.selected.push(getId(pos)) + }) + + } + that.find('.OxSelected').removeClass('OxSelected').removeClass('OxMultiple'); + that.find('.OxGroup').removeClass('OxGroup') + if (self.options.selected.length == 1) { + self.options.selected = self.options.selected[0] + self.selected = self.selected[0] + self.$items[self.selected].addClass('OxSelected'); + self.options.highlightGroup && that.updateItemGroup() + } else { + Ox.forEach(self.selected, function(selected) { + self.$items[selected].addClass('OxSelected').addClass('OxMultiple'); + }) + } + triggerSelectEvent(); + } function selectItem(idOrPosition) { if (Ox.isString(idOrPosition)) { @@ -327,8 +388,14 @@ Ox.ArrayEditable = function(options, self) { position = $element.data('position'); // if clicked on an element if (position != self.selected) { - // select another item - selectItem(position); + if (e.shiftKey && self.selected != -1) { + // add/remove item from multiple selection + document.getSelection().removeAllRanges(); + toggleItem(position); + } else { + // select another item + selectItem(position); + } } else if (e.metaKey) { // or deselect current item selectNone(); @@ -370,7 +437,7 @@ Ox.ArrayEditable = function(options, self) { var item = Ox.getObjectById(self.options.items, id); Ox.Log('AE', 'submitItem', id, item) if (value === '') { - deleteItem(item.id); + deleteItem(item.id, true); } else { that.triggerEvent(item.value === value ? 'blur' : 'submit', { id: item.id, diff --git a/source/UI/js/Form/ButtonGroup.js b/source/UI/js/Form/ButtonGroup.js index c1c5ff5e..d8eb06ab 100644 --- a/source/UI/js/Form/ButtonGroup.js +++ b/source/UI/js/Form/ButtonGroup.js @@ -31,18 +31,29 @@ Ox.ButtonGroup = function(options, self) { .options(options || {}) .update({ value: function() { - // fixme: this doesn't work in cases where - // multiple buttons can be selected - var position = Ox.getIndexById( - self.options.buttons, self.options.value - ); - if (position > -1) { - self.$buttons[position].trigger('click'); - } else if (self.options.min == 0) { - self.$buttons.forEach(function($button, i) { - $button.options('value') && $button.trigger('click'); - }); + var positions = [], + values = Ox.makeArray(self.options.value); + + Ox.forEach(values, function(value) { + var position = Ox.getIndexById( + self.options.buttons, value + ); + + if (position > -1) { + positions.push(position); + } + }); + + if (positions.length < self.options.min) { + return; } + + Ox.forEach(self.$buttons, function(button, pos) { + var enabled = positions.indexOf(pos) > -1; + if (enabled !== button.value()) { + button.trigger('click'); + } + }); } }) .addClass( diff --git a/source/UI/js/Form/FormPanel.js b/source/UI/js/Form/FormPanel.js index b6b3409c..9eb7efe9 100644 --- a/source/UI/js/Form/FormPanel.js +++ b/source/UI/js/Form/FormPanel.js @@ -15,11 +15,18 @@ Ox.FormPanel = function(options, self) { var that = Ox.Element({}, self) .defaults({ form: [], - listSize: 256 + listSize: 256, + section: null }) - .options(options || {}); + .options(options || {}) + .update({ + section: setSection + }); - self.section = 0; + if (self.options.section === null) { + self.options.section = self.options.form[0].id; + } + self.section = Ox.getIndexById(self.options.form, self.options.section); self.sectionTitle = self.options.form[self.section].title; self.$list = Ox.TableList({ columns: [ @@ -62,7 +69,7 @@ Ox.FormPanel = function(options, self) { }), max: 1, min: 1, - selected: [self.options.form[0].id], + selected: [self.options.section], sort: [{key: 'id', operator: '+'}], unique: 'id', width: self.options.listSize @@ -70,7 +77,11 @@ Ox.FormPanel = function(options, self) { select: function(data) { self.$sections[self.section].hide(); self.section = Ox.getIndexById(self.options.form, data.ids[0]); + if (self.section == -1) { + self.section = 0 + } self.$sections[self.section].show(); + self.options.section = self.options.form[self.section].id; that.triggerEvent('select', {section: data.ids[0]}); } }); @@ -130,7 +141,18 @@ Ox.FormPanel = function(options, self) { }); }); - self.$sections[0].show(); + self.$sections[self.section].show(); + + function setSection() { + var id = self.options.section, + section = Ox.getIndexById(self.options.form, id); + if (section > -1 && self.section != section) { + self.$sections[self.section].hide(); + self.section = section; + self.$list.options('selected', [id]); + self.$sections[self.section].show(); + } + }; that.setElement(Ox.SplitPanel({ elements: [ @@ -191,13 +213,24 @@ Ox.FormPanel = function(options, self) { values values @*/ that.values = function() { - var values = {}; - self.options.form.forEach(function(section, i) { - values[section.id] = self.$forms[i].values(); - }); - return values; + if (arguments.length === 0) { + var values = {}; + self.options.form.forEach(function(section, i) { + values[section.id] = self.$forms[i].values(); + }); + return values; + } else { + var sections = arguments[0]; + + self.options.form.forEach(function(form, i) { + if (form.id in sections) { + self.$forms[i].values(sections[form.id]); + } + }); + } }; + return that; }; diff --git a/source/UI/js/List/List.js b/source/UI/js/List/List.js index b5421c02..0c0f9bb1 100644 --- a/source/UI/js/List/List.js +++ b/source/UI/js/List/List.js @@ -624,7 +624,7 @@ Ox.List = function(options, self) { } function getPageByPosition(pos) { - return Math.floor(pos / self.options.pageLength); + return Math.floor(pos / self.pageLength); } function getPageByScrollPosition(pos) { diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index 4b04dcd4..2284f36d 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -35,6 +35,7 @@ Ox.AnnotationFolder = function(options, self) { var that = Ox.Element({}, self) .defaults({ clickLink: null, + confirmDeleteDialog: null, collapsed: false, editable: false, highlight: '', @@ -281,6 +282,7 @@ Ox.AnnotationFolder = function(options, self) { } self.$annotations = Ox.ArrayEditable(Ox.extend({ clickLink: self.options.clickLink, + confirmDeleteDialog: self.options.confirmDeleteDialog, editable: self.options.editable, getSortValue: self.options.type == 'text' ? function(value) { @@ -579,26 +581,40 @@ Ox.AnnotationFolder = function(options, self) { function selectAnnotation(data) { if (self.loaded) { - var item = Ox.getObjectById(self.options.items, data.id); - self.options.selected = item ? data.id : ''; - if (self.widget) { - if (self.options.type == 'event') { - self.$calendar.options({ - selected: item && isDefined(item) ? item.event.id : '' - }) - .panToEvent(); - } else { - self.$map.options({ - selected: item && isDefined(item) ? item.place.id : '' - }) - .panToPlace(); + var extendedData; + if (Ox.isArray(data.id) && data.id.length) { + var items = data.id.map(id => { + return Ox.getObjectById(self.options.items, id); + }) + self.options.selected = data.id; + extendedData = Ox.extend(data, { + 'in': Ox.min(items.map(item => { return item["in"]; })), + out: Ox.max(items.map(item => { return item["out"]; })), + layer: self.options.id + }); + } else { + var item = Ox.getObjectById(self.options.items, data.id) + self.options.selected = item ? data.id : ''; + if (self.widget) { + if (self.options.type == 'event') { + self.$calendar.options({ + selected: item && isDefined(item) ? item.event.id : '' + }) + .panToEvent(); + } else { + self.$map.options({ + selected: item && isDefined(item) ? item.place.id : '' + }) + .panToPlace(); + } } + extendedData = Ox.extend(data, item ? { + 'in': item['in'], + out: item.out, + layer: self.options.id + } : {}); } - that.triggerEvent('select', Ox.extend(data, item ? { - 'in': item['in'], - out: item.out, - layer: self.options.id - } : {})); + that.triggerEvent('select', extendedData) } } diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index e93ea671..658dc9f4 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -48,9 +48,11 @@ Ox.AnnotationPanel = function(options, self) { .defaults({ calendarSize: 256, clickLink: null, + confirmDeleteDialog: null, editable: false, enableExport: false, enableImport: false, + enableTranscribe: false, highlight: '', highlightAnnotations: 'none', highlightLayer: '*', @@ -303,7 +305,11 @@ Ox.AnnotationPanel = function(options, self) { {}, {id: 'import', title: Ox._('Import Annotations...'), disabled: !self.options.enableImport}, {id: 'export', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport}, - ] + ].concat( + self.options.enableTranscribe ? [ + {id: 'transcribeaudio', title: Ox._('Transcribe Audio...')}, + ]: [] + ) ), maxWidth: 256, style: 'square', @@ -325,9 +331,9 @@ Ox.AnnotationPanel = function(options, self) { } else if (data.id == 'export') { that.triggerEvent('exportannotations'); } else if (data.id == 'find') { - that.triggerEvent('find', {value: value}); + that.triggerEvent('find', {value: Ox.decodeHTMLEntities(value)}); } else if (data.id == 'findannotations') { - that.triggerEvent('findannotations', {key: key, value: value}); + that.triggerEvent('findannotations', {key: key, value: Ox.decodeHTMLEntities(value)}); } else if (data.id == 'import') { that.triggerEvent('importannotations'); } else if (data.id == 'insert') { @@ -351,6 +357,8 @@ Ox.AnnotationPanel = function(options, self) { // ... } else if (data.id == 'showentityinfo') { that.triggerEvent('showentityinfo', annotation.entity); + } else if (data.id == 'transcribeaudio') { + that.triggerEvent('transcribeaudio'); } else if (data.id == 'undo') { // ... } @@ -371,6 +379,7 @@ Ox.AnnotationPanel = function(options, self) { self.$folder[index] = Ox.AnnotationFolder( Ox.extend({ clickLink: self.options.clickLink, + confirmDeleteDialog: self.options.confirmDeleteDialog, collapsed: !self.options.showLayers[layer.id], editable: self.options.editable, highlight: getHighlight(layer.id), diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index 5ce19326..3d52533a 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -61,11 +61,13 @@ Ox.VideoAnnotationPanel = function(options, self) { censoredIcon: '', censoredTooltip: '', clickLink: null, + confirmDeleteDialog: null, cuts: [], duration: 0, enableDownload: false, enableImport: false, enableExport: false, + enableTranscribe: false, enableSetPosterFrame: false, enableSubtitles: false, find: '', @@ -844,9 +846,11 @@ Ox.VideoAnnotationPanel = function(options, self) { autocomplete: self.options.autocomplete, calendarSize: self.options.annotationsCalendarSize, clickLink: self.options.clickLink, + confirmDeleteDialog: self.options.confirmDeleteDialog, editable: true, enableExport: self.options.enableExport, enableImport: self.options.enableImport, + enableTranscribe: self.options.enableTranscribe, highlight: self.options.find, highlightAnnotations: self.options.annotationsHighlight, highlightLayer: self.options.findLayer, @@ -949,6 +953,9 @@ Ox.VideoAnnotationPanel = function(options, self) { that.triggerEvent('showentityinfo', data); }, submit: submitAnnotation, + transcribeaudio: function() { + that.triggerEvent('transcribeaudio'); + }, toggle: toggleAnnotations, togglecalendar: function(data) { self.options.showAnnotationsCalendar = !data.collapsed; diff --git a/source/UI/json/locale.tr.json b/source/UI/json/locale.tr.json new file mode 100644 index 00000000..7f671f86 --- /dev/null +++ b/source/UI/json/locale.tr.json @@ -0,0 +1,281 @@ +{ + ", doubleclick to edit": ", düzenlemek için çift tıkla", + "Add": "Ekle", + "Add Files": "Dosya Ekle", + "Add Place": "Yer Ekle", + "Add a condition": "koşul ekle", + "Add a group of conditions": "Bir grup koşul ekle", + "Add column after": "Sonrasına sütun ekle", + "Add column before": "Önce sütun ekle", + "Add row above": "Üste satır ekle", + "Add row below": "Altına satır ekle", + "Add {0}": "{0} ekle", + "Adding...": "Ekleniyor..", + "All": "Tüm", + "Alternative Names": "Alternatif İsimler", + "Area": "Alan", + "At Current Position": "Mevcut Konumda", + "Blockquote": "Blok halinde alıntıla", + "Bold": "Kalın", + "Borough": "Mahalle", + "Building": "Bina", + "Bullets": "Madde İşaretleri", + "By Duration": "Süreye göre", + "By Position": "Pozisyona Göre", + "By Text": "Metne gore", + "Cancel": "İptal et", + "Cancel/Deselect": "İptal et/Seçimi kaldır", + "Cancelled": "İptal edildi", + "City": "Şehir", + "Clear": "Temizle", + "Clear Event": "Etkinliği temizle", + "Clear Place": "Yeri Temizle", + "Clearing...": "Temizleniyor", + "Click to hide": "gizlemek için tıklayın", + "Click to pan, doubleclick to zoom": "Kaydırmak için tıklayın, yakınlaştırmak için çift tıklayın", + "Click to select": "Seçmek için tıklayın", + "Click to select, doubleclick to edit": "Seçmek için tıklayın, düzenlemek için çift tıklayın", + "Click to show": "Göstermek için tıklayın", + "Close": "Kapat", + "Complete": "Tamamlandı", + "Country": "Ülke", + "Date": "Tarih", + "Date Created": "Oluşturulma Tarihi", + "Date Modified": "Değiştirilme Tarihi", + "Define": "Tanımla", + "Define Event": "Etkinlik Tanımla", + "Define Place": "Yer Tanımla", + "Delete Annotation": "Ek Açıklamayı Sil", + "Deselect": "Seçimi Kaldır", + "Deselect Annotation": "Ek Açıklamanın Seçimini Kaldır", + "Don't Shuffle": "Karıştırma", + "Done": "Bitti", + "Download": "İndir", + "Download Selection...": "Seçimi İndir...", + "Download Video...": "Video İndir", + "Drag to resize": "Yeniden boyutlandırmak için sürükleyin", + "Drag to resize or click to hide": "Yeniden boyutlandırmak için sürükleyin veya gizlemek için tıklayın", + "Drag to resize or click to toggle map": "eniden boyutlandırmak için sürükleyin veya haritayı değiştirmek için tıklayın", + "Duration": "Süre", + "East": "Doğu", + "Edit": "Kurgula", + "Edit Annotation": "Ek Açıklamayı Kurgula", + "Edit/Submit": "Kurgula/Gönder", + "Editing Options": "Kurgulama Seçenekleri", + "Embed Selection...": "Seçimi Yerleştir", + "End": "Son", + "Enter Fullscreen": "Tam Ekran Gir", + "Event": "Etkinlik", + "Events": "Etkinlikler", + "Examples...": "Örnekler...", + "Exit Fullscreen": "Tam Ekrandan Çık", + "Feature": "Özellik", + "Find": "Bul", + "Find in All {0}": "Tüm {0} İçinde Bul", + "Find in List": "Listede Bul", + "Find in This {0}": "Bu {0}'da Bul", + "Find on Map": "Haritada Bul", + "Find...": "Bul...", + "Find: All": "Bul: Tümü", + "Find: Alternative Names": "Bul: Alternatif İsimler", + "Find: Geoname": "Bul: Geoisim", + "Find: Name": "Bul: İsim", + "Flag": "Bayrak", + "Font Size": "Yazı Tipi Boyutu", + "Generating Documentation...": "Dokümantasyon Oluşturuyor...", + "Geoname": "Geo isim", + "Go One Frame Back": "Bir Kare Geri Git", + "Go One Frame Forward": "Bir Kare İleri Git", + "Go One Line Down": "Bir Satır Aşağı Git", + "Go One Line Up": "Bir Satır Yukarı Git", + "Go One Second Back": "Bir Saniye Geri Git", + "Go One Second Forward": "Bir Saniye İleriye Git", + "Go to First Frame": "İlk Kareye Git", + "Go to In Point": "Giriş Noktasına Git", + "Go to Last Frame": "Son Kareye Git", + "Go to Next Annotation": "Sonraki Açıklamaya Git", + "Go to Next Cut": "Sonraki Kesime Git", + "Go to Next Result": "Sonraki Sonuca Git", + "Go to Out Point": "Çıkış Noktasına Git", + "Go to Poster Frame": "Poster Çerçevesine Git", + "Go to Previous Annotation": "Önceki Ek Açıklamaya Git", + "Go to Previous Cut": "Önceki Kesmeye Git", + "Go to Previous Result": "Önceki Sonuca Git", + "Headline": "Başlık", + "Hide": "Sakla", + "Hide Controls": "Kontrolleri Gizle", + "Hide Labels": "Etiketleri Gizle", + "Home": "Ana Sayfa", + "Home Channel": "Ana Kanal", + "Image": "İmge", + "Import Annotations...": "Ek Açıklamaları İçe Aktar...", + "In Current Selection": "Mevcut Seçimde", + "Insert": "Ekle", + "Insert HTML": "HTML Ekle", + "Insert...": "Ekle...", + "Italic": "İtalik", + "Join Clip(s) at Cuts": "Klip(ler)i Kesimlerde Birleştir", + "Keyboard Shortcuts": "Klavye Kısayolları", + "Keyboard Shortcuts...": "Klavye Kısayolları...", + "Large": "Büyük", + "Large Player": "Büyük Oynatıcı", + "Larger": "Daha Büyük", + "Latitude": "Enlem", + "Limit to": "Sınırla", + "Linebreak": "Satır Sonu", + "Link": "Link", + "List": "Liste", + "Longitude": "Boylam", + "Make Clip(s) Static": "Klip(ler)i Statik Yap", + "Map Options": "Harita Seçenekleri", + "Match": "Eşleme", + "Matches": "Eşlemeler", + "Medium": "Orta", + "Monospace": "Monospace", + "Mute": "Sessiz", + "Mute/Unmute": "Sesi Kapat/Sesi Aç", + "Name": "İsim", + "New Event": "Yeni Etkinlik", + "New Place": "Yeni Yer", + "Next": "Sıradaki", + "Next Channel": "Yeni Kanal", + "Next Result": "Bir Sonraki Sonuç", + "No file selected": "Seçili dosya yok", + "No files selected": "Seçili dosya yok", + "North": "Kuzey", + "Numbers": "Sayılar", + "Open in New Tab": "Yeni Sekmede Aç", + "Options": "Seçenekler", + "Other": "Diğer", + "Paragraph": "Paragraf", + "Pause": "Durdur", + "Paused": "Durduruldu", + "Person": "Kişi", + "Place": "Yer", + "Place or Event": "Yer ya da Etkinlik", + "Play": "Oynat", + "Play Current Track": "Seçili Parçayı Çal", + "Play In to Out": "Giriş-Çıkış Arasında Oynat", + "Play Next Track": "Bir Sonraki Parçayı Çal", + "Play/Pause": "Başlat/Durdur", + "Previous": "Önceki", + "Previous Channel": "Önceki Kanal", + "Previous Result": "Önceki Sonuç", + "Region": "Bölge", + "Reload": "Yeniden Yükle", + "Remove": "Kaldır", + "Remove Event": "Etkinliği Kaldır", + "Remove File": "Dosyayı Kaldır", + "Remove Place": "Yeri Kaldır", + "Remove this column": "Bu sütunu kaldır", + "Remove this condition": "Bu koşulu kaldır", + "Remove this group of conditions": "Bu koşul grubunu kaldır ", + "Remove this row": "Bu satırı kaldır", + "Removing...": "Kaldırıyor...", + "Repeat All": "Hepsini Tekrarla", + "Repeat None": "Hiçbirini Tekrarlama", + "Repeat One": "Birini Tekrarla", + "Reset this condition": "Bu koşulu sıfırla", + "Resolution": "Çözünürlük", + "Restart": "Yeniden Başlat", + "Restore Defaults": "Varsayılanları Geri Yükle", + "Results": "Sonuçlar", + "Resume": "Devam Et", + "Right-to-Left": "Sağdan Sola", + "Run Tests": "Testleri Çalıştır", + "Save Changes": "Değişiklikleri Kaydet", + "Save as Smart List": "Akıllı Liste olarak Kaydet", + "Scale to Fill": "Doldurmak için Ölç", + "Scale to Fit": "Sığacak Şekilde Ölç", + "Scroll to Player": "Oyuncuya Kaydır", + "Select Current Annotation": "Geçerli Ek Açılamayı Seç", + "Select Current Cut": "Geçerli Kesimi Seç", + "Select File": "Dosya Seç", + "Select Next Annotation": "Sonraki Açıklamayı Seç", + "Select Previous Annotation": "Önceki Açıklamayı Seç", + "Set ": "Berlie", + "Set In Point": "Giriş Noktası Belirle", + "Set Out Point": "Çıkış Noktası Belirle", + "Set Poster Frame": "Poster Karesi Belirle", + "Settings": "Ayarlar", + "Show Annotations": "Ek Açıklamayı Göster", + "Show Controls": "Kontrol Çubuğunu Göster", + "Show Dates": "Tarihleri Göster", + "Show Labels": "Etiketleri Göster", + "Show Other": "Diğerini Göster", + "Show People": "İnsanları Göster", + "Show Places": "Yerleri Göster", + "Show Remaining Time": "Kalan Zamanı Göster", + "Show Subtitles": "Altyazıları Göster", + "Show Users": "Kullanıcıları Göster", + "Shuffle": "Karıştır", + "Small": "Küçük", + "Small Player": "Küçük Oynatıcı", + "Smaller": "Daha Küçük", + "Sort Annotations": "Ek Açıklamayı Düzenle", + "South": "Güney", + "Split Clip(s) at Cuts": "Klip(ler)i Kesimlerde Böl", + "Start": "Başlat", + "Street": "Sokak", + "Strike": "Üstünü Çiz", + "Subscript": "Alt Simge", + "Subtitles": "Altyazılar", + "Superscript": "Üst Simge", + "Switch Theme": "Temayı Değiştir", + "Timeline": "Zaman Çizelgesi", + "Title": "Başlık", + "Turn Volume Down": "Sesi Kıs", + "Turn Volume Up": "Sesi Aç", + "Type": "Tür", + "Underline": "Altını Çiz", + "Undo Changes": "Değişiklikleri Geri Al", + "Unmute": "Sesi Aç", + "Untitled": "İsimsiz", + "User": "Kullanıcı", + "Valid": "Geçerli", + "View": "Görüntüle", + "View Live": "Canlı Görüntüle", + "View Source": "Kaynağı Görüntüle", + "View as Grid": "Izgara Olarak Görüntüle", + "View as List": "Liste Olarak Görüntüle", + "Volume": "Ses Seviyesi", + "West": "Batı", + "add": "ekle", + "all": "hepsi", + "and": "ve", + "annotations": "ek açıklamalar", + "any": "herhangi", + "ascending": "artan", + "bracket": "parantez", + "contains": "içerir", + "descending": "azalan", + "does not contain": "içermez", + "does not end with": "ile bitmiyor", + "does not start with": "ile başlamaz", + "ends with": "ile biter", + "file": "dosya", + "files": "dosyalar", + "in": "içinde", + "is": "", + "is after": "sonra", + "is before": "önce", + "is between": "arasında", + "is greater than": "'den büyüktür", + "is less than": "daha azdır", + "is not": "değil", + "is not after": "sonra değil", + "is not before": "önce değil", + "is not between": "arasında değil", + "is not greater than": "daha büyük değil", + "is not less than": "daha az değil", + "items": "öğeler", + "of the following conditions": "aşağıdaki koşullardan", + "order": "sırala", + "sorted by": "göre sırala", + "starts with": "ile başla", + "unknown": "bilinmiyor", + "{0} Century": "Yüzyıl", + "{0} Century BC": "Yüzyıl MÖ", + "{0} Millennium": "{0} Milenyum", + "{0} Millennium BC": "MÖ {0} Milenyum" +} diff --git a/tools/build/build.py b/tools/build/build.py index 8accbd3d..ec3cc568 100755 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -80,13 +80,13 @@ def build_oxjs(downloads=False, geo=False): path = source_path + 'UI/svg/' for filename in [filename for filename in os.listdir(path) if not filename[0] in '._']: svg = read_text(path + filename) - svg = re.sub('\n\s*', '', svg) - svg = re.sub('', '', svg) + svg = re.sub(r'\n\s*', '', svg) + svg = re.sub(r'', '', svg) # end fix ui_images[filename[:-4]] = svg if filename.startswith('symbolLoading'): for theme in themes: - theme_svg = re.sub('#808080', format_hex(theme_data[theme]['symbolDefaultColor']), svg) + theme_svg = re.sub(r'#808080', format_hex(theme_data[theme]['symbolDefaultColor']), svg) write_file('%sUI/themes/%s/svg/%s' % (dev_path, theme, filename), theme_svg) write_file('%sUI/themes/%s/svg/%s' % (min_path, theme, filename), theme_svg) @@ -101,10 +101,10 @@ def build_oxjs(downloads=False, geo=False): and (geo or '/Geo/' not in path): # write copies in min path source = os.path.join(path, filename) - is_jquery = re.search('^jquery-[\d\.]+\.js$', filename) - is_jquery_min = re.search('^jquery-[\d\.]+\.min\.js$', filename) - is_jquery_plugin = re.search('^jquery\..*?\.js$', filename) - is_jsonc = re.search('\.jsonc$', filename) + is_jquery = re.search(r'^jquery-[\d\.]+\.js$', filename) + is_jquery_min = re.search(r'^jquery-[\d\.]+\.min\.js$', filename) + is_jquery_plugin = re.search(r'^jquery\..*?\.js$', filename) + is_jsonc = re.search(r'\.jsonc$', filename) if is_jquery or is_jquery_min: target = os.path.join(path.replace(source_path, min_path), 'jquery.js') else: @@ -113,7 +113,7 @@ def build_oxjs(downloads=False, geo=False): ui_files['dev'].append(target.replace(min_path, '')) ui_files['min'].append(target.replace(min_path, '')) if '/Ox/js/' not in source and '/UI/js/' not in source and not is_jquery: - if re.match('^Ox\..+\.js$', filename) or is_jsonc: + if re.match(r'^Ox\..+\.js$', filename) or is_jsonc: js = read_text(source) print('minifiy and write', filename, target) write_file(target, ox.js.minify(js, '' if is_jsonc else comment)) @@ -129,7 +129,7 @@ def build_oxjs(downloads=False, geo=False): if not is_jquery_min: write_link(link_source, link_target) # locales - match = re.search('/(\w+)/json/locale.(\w+).json', source) + match = re.search(r'/(\w+)/json/locale.(\w+).json', source) if match: module = match.group(1) locale = match.group(2) @@ -182,12 +182,12 @@ def build_oxjs(downloads=False, geo=False): if not js_dir + filename in sum(ox_files, []): ox_files[-1].append(js_dir + filename) js = re.sub( - 'Ox.LOCALES = \{\}', + r'Ox.LOCALES = \{\}', 'Ox.LOCALES = ' + json.dumps(locales, indent=4, sort_keys=True), js ) js = re.sub( - "Ox.VERSION = '([\d\.]+)'", + r"Ox.VERSION = '([\d\.]+)'", "Ox.VERSION = '%s'" % version, js ) @@ -238,7 +238,7 @@ def build_oxjs(downloads=False, geo=False): data = { # sum(list, []) is flatten 'documentation': sorted(sum(ox_files, [])) + sorted(list(filter( - lambda x: re.search('\.js$', x), + lambda x: re.search(r'\.js$', x), ui_files['dev'] )) + ['%s/%s.js' % (x, x) for x in ['Geo', 'Image', 'Unicode']]), 'examples': sorted(sum(map( @@ -250,7 +250,7 @@ def build_oxjs(downloads=False, geo=False): ) )), list(filter( - lambda x: not re.search('^[._]', x), + lambda x: not re.search(r'^[._]', x), os.listdir(root_path + 'examples/') )) ), [])) if os.path.exists(root_path + 'examples/') else (), @@ -264,7 +264,7 @@ def build_oxjs(downloads=False, geo=False): 'title': get_title(root_path + 'readme/' + x) }, filter( - lambda x: not re.search('^[._]', x) and re.search('\.html$', x), + lambda x: not re.search(r'^[._]', x) and re.search(r'\.html$', x), os.listdir(root_path + 'readme/') ) )) @@ -355,7 +355,7 @@ def parse_css(css, values): ) for vals in value] ) return string - return re.sub('\$(\w+)(\[\d+\])?', sub, css) + return re.sub(r'\$(\w+)(\[\d+\])?', sub, css) def read_file(file): print('reading', file)