From 335b2eda52b83d9fe500dfe46fde9d3ff6adefe9 Mon Sep 17 00:00:00 2001
From: plegall Απολαύστε το Piwigo 2.7 σας! Απολαύστε το Piwigo σας! ! Goditi il tuo Piwigo p>';
+$lang['first_contact_stp7'] = 'Ecco un riepilogo delle foto caricate. Vedi che Piwik stesso ha generato le miniature. È possibile:
Στο Piwigo, μπορείτε να προστατεύσετε τις αρχικές φωτογραφίες χρησιμοποιώντας την τοπική διαμόρφωση σας. Χρησιμοποιήστε τη μεταβλητή $conf[\'original_url_protection\']: από προεπιλογή είναι άδεια, μπορείτε να ορίσετε την τιμή σε "images" για να προστατευτούν μόνο οι εικόνες ή "all" για να προστατεύσετε όλους τους τύπους αρχείων πολυμέσων, το οποίο μπορεί να καταναλώνει πόρους ή ίσως απλά δεν λειτουργεί στο διακομιστή σας.
Αυτή η επιλογή δουλεύει σε δημόσιο και ιδιωτικό περιεχόμενο. Αυτή η επιλογή απαιτεί σήμερα να αρνηθείτε την πρόσβαση στους φακέλους /upload / και /galleries, χρησιμοποιώντας ένα αρχείο .htaccess (συνήθως ένα αρχείο κειμένου με "Deny from all" για το περιεχόμενο)ή ρυθμίσεις του διακομιστή.
Παρακαλείστε να σημειώσετε ότι τα ονόματα των αρχείων των φωτογραφιών που ανέβηκαν χρησιμοποιώντας άλλη μέθοδο εκτος του FTP είναι τυχαία, έτσι ώστε να είναι αδύνατον να μαντέψει: ότι το όνομα αρχείου και έτσι η διαδρομή προς την αρχική φωτογραφία μπορεί να γίνει γνωστή μόνο αν ο επισκέπτης έχει πρόσβαση σε αλλαγή μεγέθους εικόνας της φωτογραφίας, όπως η μικρογραφία. $conf[\'original_url_protection\'] και την παρεμπόδιση πρόσβασης στους φακέλους /upload και /galleries είναι για να αποφευχθεί αυτή η περίπτωση.';
$lang['privacy_stp21'] = 'Η λύσεις είναι:
Cominciamo con l\'aggiunta di foto!';
+$lang['first_contact_stp10'] = 'Ecco il link per accedere direttamente al "Cestino": questo è uno strumento per gli amministratori per scegliere facilmente le foto visibili nella parte pubblica, al fine di editarli in "Gestione dei lotti"
Tu puoi aggiungere foto al cestino sull\'area pubblica quando sei loggato come amministratore, oppure utilizzando l\'azione "Aggiungi al cestino" in "Gestione dei lotti".';
+$lang['first_contact_stp17'] = 'Qui è possibile impostare la foto come una miniatura di uno o più album. La foto non deve necessariamente essere associato all\'album o essere una sua miniatura. Se la foto è associato con l\'album, è ancora più semplice impostare come album miniatura dalla pagina pubblica.
(Suggerimento: se usi il plug "Admin Tools", è ancora più facile).';
+$lang['first_contact_stp20'] = 'Quando il mouse passa sopra un album, appaiono link e informazioni. Per cambiare la sua posizione trascina l\'album in alto od in basso , quindi puoi salvare o annullare l\'azione.';
+$lang['first_contact_stp21'] = 'La scheda successiva è una pagina in cui è possibile spostare qualsiasi album virtuale
La scheda "Permalink" serve ad impostare un particolare URL per un album
Ma se cerchi di modificare un album divi fare clic su "Modifica" dell\'album';
+$lang['first_contact_stp23'] = '"Blocco di un album" significa che solo gli amministratori saranno in grado di vedere che l\'album.
Molto utile quando si prepara l\'album prima della pubblicazione';
+$lang['first_contact_stp31'] = 'Adesso il banner, verrà visualizzato sulla parte superiore di ogni pagina. Come potete vedere, i tag HTML sono elencati qui. È inoltre possibile utilizzare "%gallery_title% tag" per visualizzare il titolo appena digitato in precedenza.';
+$lang['first_contact_stp33'] = 'Solo una parola sulla opzione "Impostazioni del cliente" serve per impostare le preferenze dei visitatori non registrati.
in Piwik "ospite" significa visitatore non registrato
Continuiamo con configurazione:. Fare clic su "Configurazione »Temi em>" oppure premere "Avanti".';
+$lang['first_contact_stp34'] = 'La scelta di un tema è il primo passo per personalizzare il tuo Piwigo. I Temi installati sono elencate qui
puoi attivare più di un tema. Gli utenti possono modificare il loro tema, scegliendo uno tra quelli abilitati qui, puoi configurarlo se è attiva la voce "Configurazione".';
+$lang['first_contact_stp35'] = 'Imposta il tuo tema preferito come tema di "default".';
+$lang['first_contact_stp37'] = 'Per installare nuovi temi, è possibile scaricarli direttamente dalla scheda "Aggiungi un tema". Sono mostrati solo i temi compatibili con la versione di Piwigo .
Scopriamo i plugins ora! Clicca sulla "Aggiungi un tema" em>';
+$lang['first_contact_stp38'] = 'I Plugin sono un modo molto semplice per personalizzare il vostro Piwigo. Si può fare quasi tutto ciò che si può immaginare, da piccole aggiunte di testo per completare le caratteristiche, come il plugin ( Community?????? ) che consente agli utenti non amministratori di ( caricare ??? )senza entrare nella parte di amministrazione.';
+$lang['first_contact_stp39'] = 'In questa prima pagina, sono elencati i plugin installati.
Nella parte superiore, sono elencati i plugin attivati, che sono attualmente in esecuzione.
nella parte inferiore, i plugin caricati ma disabilitati.
"Disattivare" un plugin significa che ogni traccia del plugin verrà rimossa (file, opzioni, ecc). Per la maggior parte dei plugin, la disattivazione terrà i dati registrati dal plugin.';
+$lang['first_contact_stp43'] = 'Questo tour è stato molto lungo, ma hai visto solo una piccola parte di quanto potente sia Piwigo. Tutto ha una fine, questa panoramica è finita.
È possibile esaminare più a fondo le caratteristiche di Piwigo con un altro tour o leggere la documentazione, sul sito piwigo.org.
Non dimenticare anche il collegamento Guida nell\'angolo superiore destro di qualsiasi pagina di amministrazione (?????)
Qui il filtro pre è già impostato su "Cestino", perché siamo venuti dalla pagina di upload.';
\ No newline at end of file
diff --git a/plugins/TakeATour/language/lv_LV/tour_privacy.lang.php b/plugins/TakeATour/language/lv_LV/tour_privacy.lang.php
index 480eabbb0..eafaf1773 100644
--- a/plugins/TakeATour/language/lv_LV/tour_privacy.lang.php
+++ b/plugins/TakeATour/language/lv_LV/tour_privacy.lang.php
@@ -27,3 +27,15 @@ $lang['privacy_stp12'] = 'Šajā lapā varat izvēlēties vai albūms būs pieej
$lang['privacy_stp14'] = 'Tad lietotājiem un lietotāju grupām var piešķirt tiesības, lai piekļūtu albūmam.';
$lang['privacy_stp14b'] = 'Svarīgs fakts: webmāsteri un administratori nav visvaroši publiskā daļā, bet tie var piekļūt ikvienam albūmam un fotogrāfijai administratora daļā.';
$lang['privacy_title14b'] = '';
+$lang['privacy_stp16'] = 'Līdzīgi kā datorā, varat atlasīt vairākus albūmus, izmantojot Shift un Control taustiņus, tad klikšķināt uz bultām, lai tos mainītu.
Tagad ļaujiet man iepazīstināt ar grupām.';
+$lang['privacy_stp6'] = 'Kad esat augšupielādējuši fotogrāfijas, turpat varat izmainīt arī šo foto Privātuma Pakāpi';
+$lang['privacy_stp18'] = 'Lai pārvaldītu asociācijas starp lietotāju grupām, doties uz Users »Manage lapu';
+$lang['privacy_stp24'] = 'Šis apskats ir beidzies. Izbaudiet Piwigo!
Hãy tiếp tục khám phá Piwigo 2.7!
Nếu bạn thích Piwigo và muốn hỗ trợ chúng tôi, bạn có thể đóng góp bằng cách giúp đỡ việc chuyển ngữ hay tài trợ,vv. Bấm vào đây để hỗ trợ chúng tôi Cám ơn!'; +$lang['2_7_0_stp4'] = 'Trang Tìm kiếm đã hoạt động trở lại: cho phép chọn các thuộc tính của từ khóa cần tìm, danh sách các tác giả tìm thấy trong cơ sở dữ liệu, tự điền danh sách các khóa, tự điền danh sách các album...'; +$lang['2_7_0_stp8'] = 'Dễ dàng xóa giỏ hình bằng một cú click chuột.'; +$lang['2_7_0_stp9'] = 'trình quản lý lô được bổ sung một bộ lọc có cú pháp tìm kiếm mạnh mẽ, giúp tìm kiếm ảnh theo ngày, từ khóa, kích thước, tên file hoặc tùy chọn tìm chính xác, VÀ/HOẶC, tạo nhóm và loại trừ. Bạn có thể đọc trong phần giúp đỡ để biết thêm chi tiết. Cú pháp này cũng được áp dụng cho phần Tìm kiếm nhanh trong menu tại Trang chủ.'; +$lang['2_7_0_title8'] = 'Xóa giỏ hình'; \ No newline at end of file diff --git a/plugins/TakeATour/main.inc.php b/plugins/TakeATour/main.inc.php index e41f2e5de..70ad19bf9 100644 --- a/plugins/TakeATour/main.inc.php +++ b/plugins/TakeATour/main.inc.php @@ -1,7 +1,7 @@ Date: Fri, 21 Nov 2014 12:03:26 +0000 Subject: [2.7] Language - plugin - prepare piwigo 2.7.2 git-svn-id: http://piwigo.org/svn/branches/2.7@30562 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/AdminTools/language/cs_CZ/plugin.lang.php | 6 +- plugins/AdminTools/language/et_EE/plugin.lang.php | 45 ++++++------ plugins/AdminTools/language/gl_ES/description.txt | 1 + plugins/AdminTools/language/gl_ES/index.php | 7 ++ plugins/AdminTools/language/gl_ES/plugin.lang.php | 39 +++++++++++ plugins/AdminTools/language/hu_HU/description.txt | 1 + plugins/AdminTools/language/vi_VN/plugin.lang.php | 5 +- plugins/AdminTools/main.inc.php | 2 +- .../TakeATour/language/bg_BG/tour_2_7_0.lang.php | 45 ++++++++++++ plugins/TakeATour/language/de_DE/plugin.lang.php | 4 +- .../TakeATour/language/de_DE/tour_2_7_0.lang.php | 10 +-- .../language/de_DE/tour_first_contact.lang.php | 66 +++++++++--------- .../TakeATour/language/de_DE/tour_privacy.lang.php | 44 ++++++------ .../language/el_GR/tour_first_contact.lang.php | 9 +++ .../TakeATour/language/el_GR/tour_privacy.lang.php | 9 ++- .../TakeATour/language/it_IT/tour_privacy.lang.php | 9 ++- .../TakeATour/language/lv_LV/tour_privacy.lang.php | 7 +- plugins/TakeATour/language/nb_NO/description.txt | 1 + plugins/TakeATour/language/nb_NO/plugin.lang.php | 4 +- .../TakeATour/language/nb_NO/tour_2_7_0.lang.php | 44 ++++++++++++ .../language/nb_NO/tour_first_contact.lang.php | 80 +++++++++++++++++++++ .../TakeATour/language/nb_NO/tour_privacy.lang.php | 66 ++++++++++++++++++ .../language/pl_PL/tour_first_contact.lang.php | 1 + plugins/TakeATour/language/pt_PT/description.txt | 2 +- plugins/TakeATour/language/pt_PT/plugin.lang.php | 5 ++ plugins/TakeATour/language/sl_SI/description.txt | 1 + plugins/TakeATour/language/sl_SI/plugin.lang.php | 17 +++-- .../TakeATour/language/sl_SI/tour_2_7_0.lang.php | 32 ++++++--- plugins/TakeATour/language/sr_RS/description.txt | 1 + plugins/TakeATour/language/sr_RS/index.php | 7 ++ plugins/TakeATour/language/sr_RS/plugin.lang.php | 36 ++++++++++ plugins/TakeATour/language/sv_SE/description.txt | 2 + plugins/TakeATour/language/sv_SE/plugin.lang.php | 8 ++- plugins/TakeATour/language/tr_TR/description.txt | 1 + .../TakeATour/language/tr_TR/tour_2_7_0.lang.php | 44 ++++++++++++ .../language/uk_UA/tour_first_contact.lang.php | 26 +++++++ plugins/TakeATour/language/vi_VN/plugin.lang.php | 4 +- .../language/vi_VN/tour_first_contact.lang.php | 81 ++++++++++++++++++++++ plugins/TakeATour/main.inc.php | 2 +- 39 files changed, 658 insertions(+), 116 deletions(-) create mode 100644 plugins/AdminTools/language/gl_ES/description.txt create mode 100644 plugins/AdminTools/language/gl_ES/index.php create mode 100644 plugins/AdminTools/language/gl_ES/plugin.lang.php create mode 100644 plugins/AdminTools/language/hu_HU/description.txt create mode 100644 plugins/TakeATour/language/bg_BG/tour_2_7_0.lang.php create mode 100644 plugins/TakeATour/language/nb_NO/description.txt create mode 100644 plugins/TakeATour/language/nb_NO/tour_2_7_0.lang.php create mode 100644 plugins/TakeATour/language/nb_NO/tour_first_contact.lang.php create mode 100644 plugins/TakeATour/language/nb_NO/tour_privacy.lang.php create mode 100644 plugins/TakeATour/language/sl_SI/description.txt create mode 100644 plugins/TakeATour/language/sr_RS/description.txt create mode 100644 plugins/TakeATour/language/sr_RS/index.php create mode 100644 plugins/TakeATour/language/sr_RS/plugin.lang.php create mode 100644 plugins/TakeATour/language/sv_SE/description.txt create mode 100644 plugins/TakeATour/language/tr_TR/description.txt create mode 100644 plugins/TakeATour/language/tr_TR/tour_2_7_0.lang.php create mode 100644 plugins/TakeATour/language/vi_VN/tour_first_contact.lang.php (limited to 'plugins') diff --git a/plugins/AdminTools/language/cs_CZ/plugin.lang.php b/plugins/AdminTools/language/cs_CZ/plugin.lang.php index 3c729b1bb..7b9e5bb58 100644 --- a/plugins/AdminTools/language/cs_CZ/plugin.lang.php +++ b/plugins/AdminTools/language/cs_CZ/plugin.lang.php @@ -13,4 +13,8 @@ $lang['Save visit in history'] = 'Ukládat návštevy do historie'; $lang['Show SQL queries'] = 'Zobrazit SQL queries'; $lang['View as'] = 'Zobrazit jako'; -?> \ No newline at end of file +$lang['Closed icon position'] = 'Poloha ikony pro zavření'; +$lang['Give access to quick edit to photo owners even if they are not admin'] = 'Udělit přístup do rychlé editace vlastníkům fotek i když nejsou admin'; +$lang['Open toolbar by default'] = 'Výchozí otevření panelu nástrojů'; +$lang['left'] = 'levý'; +$lang['right'] = 'pravý'; \ No newline at end of file diff --git a/plugins/AdminTools/language/et_EE/plugin.lang.php b/plugins/AdminTools/language/et_EE/plugin.lang.php index ef83600e1..1b2025bab 100755 --- a/plugins/AdminTools/language/et_EE/plugin.lang.php +++ b/plugins/AdminTools/language/et_EE/plugin.lang.php @@ -1,28 +1,28 @@ %s.'] = 'Näidetakse kui %s.'; +$lang['Viewing as %s.'] = 'Kuvatakse kui %s.'; $lang['View as'] = 'Näita kui'; $lang['Show SQL queries'] = 'Näita andmebaasi SQL-päringuid'; $lang['Saved'] = 'Salvestatud'; @@ -36,5 +36,4 @@ $lang['Open toolbar by default'] = 'Näita tööriistariba vaikimisi'; $lang['Debug template'] = 'Silumise mall'; $lang['Debug languages'] = 'Silumise keeled'; $lang['Combine JS&CSS'] = 'Kasuta nii JavaScripti kui CSS-i'; -$lang['Closed icon position'] = 'Suletud ikooni asukoht'; -?> \ No newline at end of file +$lang['Closed icon position'] = 'Suletud ikooni asukoht'; \ No newline at end of file diff --git a/plugins/AdminTools/language/gl_ES/description.txt b/plugins/AdminTools/language/gl_ES/description.txt new file mode 100644 index 000000000..96b307a5a --- /dev/null +++ b/plugins/AdminTools/language/gl_ES/description.txt @@ -0,0 +1 @@ +Faga algunha tarefa de administración das páxinas públicas. \ No newline at end of file diff --git a/plugins/AdminTools/language/gl_ES/index.php b/plugins/AdminTools/language/gl_ES/index.php new file mode 100644 index 000000000..ec6605317 --- /dev/null +++ b/plugins/AdminTools/language/gl_ES/index.php @@ -0,0 +1,7 @@ + diff --git a/plugins/AdminTools/language/gl_ES/plugin.lang.php b/plugins/AdminTools/language/gl_ES/plugin.lang.php new file mode 100644 index 000000000..3d4b718e6 --- /dev/null +++ b/plugins/AdminTools/language/gl_ES/plugin.lang.php @@ -0,0 +1,39 @@ +%s.'] = 'Vendo como %s.'; +$lang['left'] = 'esquerda'; +$lang['right'] = 'dereita'; +$lang['Closed icon position'] = 'Posición icona pechada'; +$lang['Combine JS&CSS'] = 'Combinar JS&CSS'; +$lang['Debug languages'] = 'Depurar idiomas'; +$lang['Debug template'] = 'Depurar modelo'; +$lang['Open toolbar by default'] = 'Abrir a barra de ferramentas predeterminada'; +$lang['Properties page'] = 'Páxina de propiedades'; \ No newline at end of file diff --git a/plugins/AdminTools/language/hu_HU/description.txt b/plugins/AdminTools/language/hu_HU/description.txt new file mode 100644 index 000000000..ef1ab553d --- /dev/null +++ b/plugins/AdminTools/language/hu_HU/description.txt @@ -0,0 +1 @@ +Néhány admin tevékenységet elláthatsz a publikus oldalról \ No newline at end of file diff --git a/plugins/AdminTools/language/vi_VN/plugin.lang.php b/plugins/AdminTools/language/vi_VN/plugin.lang.php index 2433b3a2e..80b501059 100755 --- a/plugins/AdminTools/language/vi_VN/plugin.lang.php +++ b/plugins/AdminTools/language/vi_VN/plugin.lang.php @@ -30,11 +30,10 @@ $lang['Save'] = 'Lưu'; $lang['Save visit in history'] = 'Lưu lượt xem trong lịch sử'; $lang['Show SQL queries'] = 'Hiển thị các truy vấn SQL'; $lang['View as'] = 'Xem dưới dạng'; -$lang['Viewing as %s.'] = 'Xem dưới dạng %s.'; +$lang['Viewing as %s.'] = 'Đang xem dưới dạng %s.'; $lang['Saved'] = 'Đã lưu'; $lang['Closed icon position'] = 'Vị trí biểu tượng đã đóng'; $lang['Give access to quick edit to photo owners even if they are not admin'] = 'Cho truy xuất để chỉnh sửa nhanh hình ảnh với cả người dùng không phải là quản trị viên'; $lang['Open toolbar by default'] = 'Mở thanh công cụ một cách mặc định'; $lang['left'] = 'trái'; -$lang['right'] = 'phải'; -?> \ No newline at end of file +$lang['right'] = 'phải'; \ No newline at end of file diff --git a/plugins/AdminTools/main.inc.php b/plugins/AdminTools/main.inc.php index 893a26208..2a9ea373c 100644 --- a/plugins/AdminTools/main.inc.php +++ b/plugins/AdminTools/main.inc.php @@ -1,7 +1,7 @@ Радвай се на вашето Piwigo 2.7! Ако ви допада, може да участвате и вие с помощ, превод или спонсорство...Натиснете тук за подкрепа. Благодарим!'; +$lang['2_7_0_stp9'] = 'В batch менажера е добавен филтър за търсене. Той идва с мощнен синтаксис за търсене на снимки по дати, тагове, размер и още опции за търсене като точно фраза, и/ипи, групиране или изключване.Може да прочетете подробностите в помощника след това. Същите екстри важат и за менюто "Бързо търсене".'; +$lang['2_7_0_stp4'] = 'Страницата за търсене е преработена: способности за търсене по дума, по списък от автори, автоматично завършва листа с тагове и списъка с албуми...'; +$lang['2_7_0_stp2b'] = 'Новата форма за качване в Piwigo 2.7 се базира на HTML5 и Flash, което означава по-добра съвместимост с модерните браузъри и добра работа и при по-бавна връзка. И с влачене и пускане работата с файлове ще е много по-лесна във вашия браузер.'; +$lang['2_7_0_stp2'] = 'Както виждате, нова подръзбираща се добавка е качена: "Преглед".Тази плъгин ви помага да видите новостите в тази версия на Piwigo. Тук са поместени и всички други прегледи.Freue dich über Piwigo 2.7!
Wenn dir Piwigo gefällt und du uns unterstützen möchtest, dann kannst du beim übersetzen helfen, etwas Spenden usw. Klicke hier um uns zu unterstützen '; -$lang['2_7_0_stp1'] = 'Hallo! Ich begleite dich, um Piwigo zu entdecken. Bitte folge meinen Anweisungen und klicke auf Weiter (oder benutze die Pfeile der Tastatur) zum navigieren. Wenn du auf andere Seiten gehst, wirst du danach auf die aktuelle Seite der Tour umgeleitet.'; -$lang['2_7_0_stp9'] = 'Ein Suchfilter wurde dem Batch Manager spendiert. Er verfügt über eine mächtige Syntax um Fotos nach Datum, Schlagworten, Größe, Dateinamen zu suchen. Optionen wie Exakt, Und/Oder, Gruppierung und Exkulpieren werden unterstützt. Du kannst später die detaillierte Hilfe hierzu lesen. Die gleiche Syntax gilt für die Schnellsuche auf der öffentlichen Seite im Menü.'; +$lang['2_7_0_stp1'] = 'Hallo! Ich begleite dich, um Piwigo zu entdecken. Bitte folge meinen Anweisungen und klicke auf Nächste (oder benutze die Pfeile der Tastatur) zum navigieren. Wenn du auf andere Seiten gehst, wirst du danach auf die aktuelle Seite der Tour umgeleitet.'; +$lang['2_7_0_stp9'] = 'Ein Suchfilter wurde der Stapelverarbeitung spendiert. Er verfügt über eine mächtige Syntax um Fotos nach Datum, Schlagworten, Größe, Dateinamen zu suchen. Optionen wie Exakt, Und/Oder, Gruppierung und Exkludieren werden unterstützt. Du kannst später die detaillierte Hilfe hierzu lesen. Die gleiche Syntax gilt für die Schnellsuche auf der öffentlichen Seite im Menü.'; $lang['2_7_0_stp7'] = 'Fotos in den Alben können nun Anhand des Datums der Fotoerstellung oder der Veröffentlichung sortiert werden.'; -$lang['2_7_0_stp2b'] = 'Das neue Formular zum Hochladen in Piwigo 2.7 basiert auf HTML5 anstelle von Flash, das bedeutet verbesserte Kompatibilität mit modernen Webbrowsern. Die Verlässlichkeit bei langsamen Internetverbindungen wurde erhöht und "Ziehen und Ablegen" ermöglicht das Auswählen von Fotos wesentlich einfacher vom Browser aus.'; +$lang['2_7_0_stp2b'] = 'Das neue Formular zum Hochladen in Piwigo 2.7 basiert auf HTML5 anstelle von Flash, das bedeutet verbesserte Kompatibilität mit modernen Webbrowsern. Die Verlässlichkeit bei langsamen Internetverbindungen wurde erhöht und die Funktion "Dateien hier hin ziehen" ermöglicht das hochladen von Fotos direkt über den Browser.'; $lang['2_7_0_title2b'] = 'Neues Formular zum Hochladen'; $lang['2_7_0_stp8'] = 'Einfacher Aktionslink um den Sammelkorb mit nur einem Klick zu leeren '; $lang['2_7_0_title8'] = 'Leere deinen Sammelkorb'; $lang['2_7_0_title7'] = 'Sortiere Alben nach Datum'; $lang['2_7_0_title9'] = 'Suchfilter'; -$lang['2_7_0_stp10'] = 'Ein Dateigröße-Filter wurde auch dem Batch Manager hinzugefügt. Man kann einen Bereich mit mindest und maximal Größen angeben.'; +$lang['2_7_0_stp10'] = 'Ein Dateigröße-Filter wurde der Stapelverarbeitung hinzugefügt. Man kann einen Bereich mit mindest und maximal Größen angeben.'; $lang['2_7_0_title10'] = 'Dateigröße-Filter'; \ No newline at end of file diff --git a/plugins/TakeATour/language/de_DE/tour_first_contact.lang.php b/plugins/TakeATour/language/de_DE/tour_first_contact.lang.php index c52a8fc92..7dadaec17 100644 --- a/plugins/TakeATour/language/de_DE/tour_first_contact.lang.php +++ b/plugins/TakeATour/language/de_DE/tour_first_contact.lang.php @@ -9,7 +9,7 @@ $lang['first_contact_title5'] = ''; $lang['first_contact_title6'] = ''; $lang['first_contact_title7'] = ''; $lang['first_contact_title8'] = ''; -$lang['first_contact_title9'] = 'Der Batch Manager'; +$lang['first_contact_title9'] = 'Die Stapelverarbeitung'; $lang['first_contact_title14'] = ''; $lang['first_contact_title16'] = ''; $lang['first_contact_title17'] = ''; @@ -18,59 +18,59 @@ $lang['first_contact_title23'] = ''; $lang['first_contact_title30'] = ''; $lang['first_contact_title31'] = ''; $lang['first_contact_title32'] = ''; -$lang['first_contact_title33'] = 'Gäste Einstellung'; +$lang['first_contact_title33'] = 'Einstellungen für Gäste'; $lang['first_contact_title34'] = 'Themen'; $lang['first_contact_title35'] = 'Themen'; $lang['first_contact_title37'] = 'Themen'; $lang['first_contact_title38'] = 'Plugins'; $lang['first_contact_title39'] = 'Plugins'; -$lang['first_contact_title4'] = 'Lass uns ein Foto hin zu fügen'; +$lang['first_contact_title4'] = 'Lass uns ein Foto hinzufügen'; $lang['first_contact_title40'] = ''; -$lang['first_contact_title15'] = 'Die Bearbeiten Seite eines Fotos'; +$lang['first_contact_title15'] = 'Die Eigenschaften-Seite eines Fotos'; $lang['first_contact_title18'] = 'Alben verwalten'; $lang['first_contact_title19'] = 'Alben verwalten'; $lang['first_contact_title20'] = 'Alben verwalten'; -$lang['first_contact_title21'] = 'Andere Tabs'; -$lang['first_contact_title22'] = 'Album bearbeiten Seite'; +$lang['first_contact_title21'] = 'Weitere Reiter'; +$lang['first_contact_title22'] = 'Album Eigenschaften-Seite'; $lang['first_contact_title28'] = 'Konfiguration'; -$lang['first_contact_title29'] = 'Konfiguration -> Optionen -> Allgemein'; -$lang['first_contact_title3'] = 'Foto Seite hin zu fügen'; +$lang['first_contact_title29'] = 'Konfiguration -> Optionen -> Haupteinstellungen'; +$lang['first_contact_title3'] = 'Foto Seite hinzufügen'; $lang['first_contact_title11'] = 'Wie bearbeite ich ein Foto'; -$lang['first_contact_stp8'] = 'Lass sie uns nun bearbeiten! Klicke auf den Link. Falls du ihn nicht siehst, klicke auf "Prev" um wenigstens 2 Fotos hin zu zu fügen'; +$lang['first_contact_stp8'] = 'Lass sie uns nun bearbeiten! Klicke auf den Link. Falls du ihn nicht siehst, klicke auf "Vorhergehende" um wenigstens 2 Fotos hinzu zu fügen'; $lang['first_contact_title1'] = 'Willkommen in deiner Piwigo Galerie'; -$lang['first_contact_stp29'] = 'Hier auf dieser ersten Seite stellst du die erforderlichen Basic Konfiguration deiner Galerie ein'; -$lang['first_contact_stp30'] = 'Las uns mit dem ändern des Titels beginnen'; -$lang['first_contact_stp32'] = 'Nun speichere deine Änderungen'; +$lang['first_contact_stp29'] = 'Hier auf dieser ersten Seite stellst du die erforderlichen Grundeinstellungen deiner Galerie ein'; +$lang['first_contact_stp30'] = 'Las uns mit dem ändern des Galerietitels beginnen'; +$lang['first_contact_stp32'] = 'Nun speichere deine Änderungen...'; $lang['first_contact_stp4'] = 'Zuerst wähle ein Album; erstelle eins falls noch nicht vorhanden'; $lang['first_contact_stp11'] = 'Von hier aus kannst du ein oder mehrere Fotos auswählen'; $lang['first_contact_stp15'] = 'Hier zum Beispiel, kann man alle Eigenschaften eines Fotos bearbeiten'; -$lang['first_contact_stp2'] = 'Der Link ist hier. Klicke "Next" zum weitermachen'; -$lang['first_contact_stp14'] = 'Wir sehen hier die Bearbeitungs-Seite eines Bildes. Dise Seite ist von hier aus erreichbar, aber auch von der Öffentlichen Bilder Seite, wenn du als Administrator angemeldet bist. Klicke auf "Bearbeiten" oder "nächste Seite"'; -$lang['first_contact_stp13'] = 'Du kannst Beschreibungen und mehr aus dem Batch Manager im Unit-Modus bearbeiten. Aber jetzt wollen wir im Global-Modus bleiben'; -$lang['first_contact_stp10'] = 'Hier ist der Link, um direkt auf dein Caddy zuzugreifen: Das ist ein Tool für Administratoren um auf einfache Weise Bilder zu einem Satz hinzuzufügen und im Batch Manager zu bearbeiten. Wenn du als Admin angemeldet bist, kannst du Fotos zum Caddy aus der öffentlichen Bilder Seite hinzufügen, oder die Aktion \ "Add to Caddy \" des Batch Manager benutzen.'; -$lang['first_contact_stp1'] = 'Hallo! Ich werde dein Führer sein, um Piwigo zu entdecken. Bitte folge meinen Anweisungen und klicke auf Weiter (oder benutze die Pfeile auf der Tastatur) zum navigieren. Wenn du beim Rundgang zur Verwaltungs-Seite gehst, wirst du danach auf die aktuelle Seite der Tour umgeleitet. Falls du stecken bleibst und die Tour nicht beenden kannst, gehe auf das Plugins » Mache eine Tour em> um die Tour zu beenden.Habe nun viel Spaß mit deinem Piwigo!
Wenn du Piwigo magst und unterstützen möchtest, kannst du gerne einen Beitrag leisten indem du hilfst Piwigo zu übersetzen und eine Spende tätigst usw. Klicke hier um zu helfen. Herzlichen Dank!'; $lang['privacy_stp22'] = 'Für erfahrene BenutzerΑπολαύστε το Piwigo σας!
Αν σας αρέσει το Piwigo και θέλετε να μας στηρίξετε, μπορείτε να συνεισφέρετε βοηθώντας στις μεταφράσεις, με δωρεά, κλπ c. Κάντε κλικ εδώ για να μας στηρίξετε . Ευχαριστώ!'; \ No newline at end of file +$lang['privacy_stp24'] = 'Αυτή η περιήγηση τελείωσε.Απολαύστε το Piwigo σας!
Αν σας αρέσει το Piwigo και θέλετε να μας στηρίξετε, μπορείτε να συνεισφέρετε βοηθώντας στις μεταφράσεις, με δωρεά, κλπ c. Κάντε κλικ εδώ για να μας στηρίξετε . Ευχαριστώ!'; +$lang['privacy_stp9'] = '... Και επιλέξτε την ενέργεια "Ποιος μπορεί να δει τις φωτογραφίες;». Τώρα μπορείτε να αλλάξετε το επίπεδο προστασίας των επιλεγμένων φωτογραφιών.Nyt din Piwigo!
'; +$lang['first_contact_stp6'] = 'Du ser at bildene blir oppført. Når du er klar klikk på knappen Start Opplastingen'; +$lang['first_contact_stp7'] = 'Her er en oppsummering av de opplastede bildene. Se at Piwigo har selv generert miniatyrbildene. Du kan:Nyt Din Piwigo!
Hvis du liker Piwigo og ønsker å støtte oss, kan du bidra ved å hjelpe med oversettelser, donere, etc. Klikk her for å støtte oss. Takk!'; +$lang['privacy_stp22'] = ' For avanserte brukereUživajte v Piwigo 2,7!
Če vam je všeč Piwigo in želite, da nas podpirate, lahko prispevate s pomočjo za prevode, donacijami, itd. Kliknite tukaj, da nas podpirate '; -$lang['2_7_0_stp1'] = 'Pozdravljeni! Jaz bom vaš vodič, da odkrijete Piwigo. Prosimo, da sledite mojim navodilom, in kliknite Naprej (ali uporabite puščice tipkovnici) za navigacijo. Če greste na drugo stran, boste preusmerjeni na trenutni strani Tura.'; +$lang['2_7_0_title1'] = 'Dobrodošli v Piwigo 2.7'; +$lang['2_7_0_stp2'] = 'Kot lahko vidite, je bil dodan nov privzet vtičnik: Oglejte si predstavitev. Ta vtičnik vam pomaga, da spoznate Piwigo. Tu so navedene vse razpoložljive predstavitve.Uživajte v Piwigo 2.7!
Če vam je všeč Piwigo in želite, podpreti naš projekt, lahko prispevate s pomočjo prevodov, donacijami, itd. Za podporo kliknite tukaj. Hvala! '; +$lang['2_7_0_stp1'] = 'Pozdravljeni! Jaz bom vaš vodič, pri spoznavanju Piwigo. Prosimo, da sledite mojim navodilom, in kliknite Naprej (ali uporabite puščice na tipkovnici) za navigacijo. Če greste na drugo stran, boste preusmerjeni na trenutno stran Predstavitve.'; +$lang['2_7_0_stp10'] = 'Dodan je bil tudi Filter velikosti datoteke v Skupinski urejevalnik. Izberete lahko razpon men min. in max vrednostjo.'; +$lang['2_7_0_stp9'] = 'Iskalni filter je bil dodan v Skupinski urejevalnik. Vsebuje mogočno sintakso za iskanje fotografij po datumu, oznakah, velikosti, imenu datoteke, pa tudi iskalne možnosti, kot natančno ujemanje, IN/ALI, grupiranje, izključitev...; Podrobno pomoč lahko preberete kasneje. Ista sintaksa velja za polje hitrega iskanja na meniju javne strani.'; +$lang['2_7_0_stp7'] = 'Sedaj lahko vaše albume razvrstite po datumu nastanka fotografij ali po datumu objave fotografij'; +$lang['2_7_0_stp8'] = 'Preprosta povezava za izpraznitev vaše košarice z enim klikom'; +$lang['2_7_0_stp2b'] = 'Nov obrazec za nalaganje slik v Piwigo 2.7 temelji na HTML5 namesto Flash obrazca, kar pomeni boljšo skladnost z modernimi brskalniki in večjo zanesljivost pri počasnih povezavah. Možnost povleci & spusti močno poenostavi izbor slik iz vašega računalnika, ki jih želite dodati v galerijo Piwigo.'; +$lang['2_7_0_title7'] = 'Razvrstitev albumov po datumu'; +$lang['2_7_0_title2b'] = 'Nov obrazec nalaganja'; +$lang['2_7_0_title10'] = 'Filter velikosti datoteke'; +$lang['2_7_0_title8'] = 'Izpraznite vašo košarico'; +$lang['2_7_0_title9'] = 'Iskalni filter'; \ No newline at end of file diff --git a/plugins/TakeATour/language/sr_RS/description.txt b/plugins/TakeATour/language/sr_RS/description.txt new file mode 100644 index 000000000..825435b8d --- /dev/null +++ b/plugins/TakeATour/language/sr_RS/description.txt @@ -0,0 +1 @@ +Посетите ваш Piwigo да откријете његове могућности. Овај додатак има више кратких обиласка кроз галерију, од оних за почетнике фо оних за напредне кориснике. \ No newline at end of file diff --git a/plugins/TakeATour/language/sr_RS/index.php b/plugins/TakeATour/language/sr_RS/index.php new file mode 100644 index 000000000..ec6605317 --- /dev/null +++ b/plugins/TakeATour/language/sr_RS/index.php @@ -0,0 +1,7 @@ + diff --git a/plugins/TakeATour/language/sr_RS/plugin.lang.php b/plugins/TakeATour/language/sr_RS/plugin.lang.php new file mode 100644 index 000000000..e7e57cc87 --- /dev/null +++ b/plugins/TakeATour/language/sr_RS/plugin.lang.php @@ -0,0 +1,36 @@ +Piwigo 2.7 \'nin tadını çıkarın!!
Eğer Piwigo\'yu beğendiyseniz ve bizi desteklemek istiyorsanız, çevirilerde bize yardımcı olarak, bağış yaparak katkıda bulunabilirsiniz. Bizi destekleme için buraya tıklayın Teşekkürler!'; +$lang['2_7_0_stp6'] = 'Albümleri, etiketleri vb toplamak için bulunan seçim kutuları kullanıcı dostu yenileri ile değişti. Test aşağıdadır:'; +$lang['2_7_0_stp10'] = 'Dosya boyutu filtresi küme yöneticisine de eklendi. Azami ve asgari olarak bir aralık seçebilirsiniz.'; +$lang['2_7_0_stp1'] = 'Merhaba! Piwigo\'yu keşfetmeniz için size ben rehberlik yapacağım. Lütfen benim talimatlarımı takip edin ve gezinmek için Sonraki (veya klavyenizdeki yön tuşlarını kullanın) simgesine tıklayın. Eğer başka bir sayfaya giderseniz, turun geçerli sayfasına yönlendirileceksiniz.'; +$lang['2_7_0_stp5'] = 'Tarihe ek olarak saat ve dakika kaydırma çubukları ile saati de ayarlayabilirsiniz.'; +$lang['2_7_0_stp9'] = 'Küme yöneticisine bir arama filtresi eklendi. Bu arama dizilimi, fotoğrafları tarihe, etiketlere, büyüklüğüne ve hatta kesin eşleşme, ve/veya seçimi, gruplama, gruptan hariç tutma gibi oldukça güçlü seçenkelere sahiptir. Detaylı bilgiyi daha sonra inceleyebilirsiniz. Aynı arama dizilimi herkese açık menüdeki hızlı arama bölümünden de kullanılabilir.'; \ No newline at end of file diff --git a/plugins/TakeATour/language/uk_UA/tour_first_contact.lang.php b/plugins/TakeATour/language/uk_UA/tour_first_contact.lang.php index f7cf26a7b..fb085c616 100644 --- a/plugins/TakeATour/language/uk_UA/tour_first_contact.lang.php +++ b/plugins/TakeATour/language/uk_UA/tour_first_contact.lang.php @@ -33,3 +33,29 @@ $lang['first_contact_title29'] = 'Налаштування->Опції->Голо $lang['first_contact_stp32'] = 'Тепер зберіжіть зміни'; $lang['first_contact_stp11'] = 'Таким чином, ви можете вибрати з звідси одну чи декілька фото'; $lang['first_contact_stp22'] = 'Подібно до зображень, тут ви можете редагувати властивості альбому'; +$lang['first_contact_stp29'] = 'Тут, на першій сторінці, ви встановите необхідну і базову конфігурацію вашої галереї.'; +$lang['first_contact_stp18'] = 'Давайте зараз подивимось як керувати альбомами. Натисніть на Альбоми » Керувати або натисніть Далі'; +$lang['first_contact_stp37'] = 'Щоб встановити нові теми, ви можете завантажити їх з вкладки \'Додати нову тему\'. Будуть відображені теми сумісні з вашою версією Piwigo.Приємного користування Piwigo!
'; +$lang['first_contact_stp5'] = 'Потім натисніть кнопку для вибору світлин на завантаження, чи просто перетягніть їх.'; +$lang['first_contact_stp6'] = 'Ви бачите список світлин. КОли будете готові клікніть на кнопку Почати Завантаження'; +$lang['first_contact_stp7'] = 'Ось сумарна інформація по завантаженим світлинам. Бачите, що Piwigo може сам генерувати мініатюри. Ви можете:Hãy khám phá piwigo của bạn
'; +$lang['first_contact_stp39'] = 'Trang đầu tiên. liệt kê các tiện ích đã được cài đặt.Goditi il tuo Piwigo!
Se ti piace Piwigo e vuoi supportarci, puoi contribuire aiutando per le traduzioni, donazioni, etc.. Clicca qui per supportarci. Grazie!'; +$lang['privacy_stp9'] = '... e selezionare l\'azione "Chi può vedere le foto?". Ora è possibile modificare il livello di privacy delle foto selezionate.Divirta-se com o seu Piwigo p>'; +$lang['first_contact_stp6'] = 'Você vê que as fotos foram listadas. Quando estiver pronto, clique no botão Iniciar carga.'; +$lang['first_contact_stp7'] = 'Aqui, um resumo das fotos carregadas. Veja que Piwigo gerou ele próprio as miniaturas. Você pode:
Приємного користування Piwigo!
'; +$lang['first_contact_stp43'] = 'Цей тур був довгий, але ви побачили лише маленьку частину з можливостей Piwigo. Все має кінець і цей огляд закінчено.Приємного користування Piwigo!
'; $lang['first_contact_stp5'] = 'Потім натисніть кнопку для вибору світлин на завантаження, чи просто перетягніть їх.'; -$lang['first_contact_stp6'] = 'Ви бачите список світлин. КОли будете готові клікніть на кнопку Почати Завантаження'; +$lang['first_contact_stp6'] = 'Ви бачите список світлин. Коли будете готові клікніть на кнопку Початок Завантаження'; $lang['first_contact_stp7'] = 'Ось сумарна інформація по завантаженим світлинам. Бачите, що Piwigo може сам генерувати мініатюри. Ви можете:Насолоджуйтесь Piwigo!
Якщо ви любите Piwigo і ви хочете підтримати нас, Ви можете внести свій внесок, допомогою з перекладом, жертвуючи і т.і. Натисніть тут, щоб підтримати нас. Дякуємо!'; +$lang['privacy_stp22'] = 'Для досвідчених користувачів' + // Absolutely positioned blinky cursor - '
' : "- - - -"), text, ""); - } - gutter.style.display = "none"; - gutterText.innerHTML = html.join(""); - var minwidth = String(lines.length).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = ""; - while (val.length + pad.length < minwidth) pad += "\u00a0"; - if (pad) firstNode.insertBefore(document.createTextNode(pad), firstNode.firstChild); - gutter.style.display = ""; - lineSpace.style.marginLeft = gutter.offsetWidth + "px"; - } - function updateCursor() { - var head = sel.inverted ? sel.from : sel.to; - var x = charX(head.line, head.ch) + "px", y = (head.line - showingFrom) * lineHeight() + "px"; - inputDiv.style.top = y; inputDiv.style.left = x; - if (posEq(sel.from, sel.to)) { - cursor.style.top = y; cursor.style.left = x; - cursor.style.display = ""; - } - else cursor.style.display = "none"; - } - - // Update the selection. Last two args are only used by - // updateLines, since they have to be expressed in the line - // numbers before the update. - function setSelection(from, to, oldFrom, oldTo) { - if (posEq(sel.from, from) && posEq(sel.to, to)) return; - var sh = shiftSelecting && clipPos(shiftSelecting); - if (posLess(to, from)) {var tmp = to; to = from; from = tmp;} - if (sh) { - if (posLess(sh, from)) from = sh; - else if (posLess(to, sh)) to = sh; - } - - var startEq = posEq(sel.to, to), endEq = posEq(sel.from, from); - if (posEq(from, to)) sel.inverted = false; - else if (startEq && !endEq) sel.inverted = true; - else if (endEq && !startEq) sel.inverted = false; - - // Some ugly logic used to only mark the lines that actually did - // see a change in selection as changed, rather than the whole - // selected range. - if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;} - if (posEq(from, to)) { - if (!posEq(sel.from, sel.to)) - changes.push({from: oldFrom, to: oldTo + 1}); - } - else if (posEq(sel.from, sel.to)) { - changes.push({from: from.line, to: to.line + 1}); - } - else { - if (!posEq(from, sel.from)) { - if (from.line < oldFrom) - changes.push({from: from.line, to: Math.min(to.line, oldFrom) + 1}); - else - changes.push({from: oldFrom, to: Math.min(oldTo, from.line) + 1}); - } - if (!posEq(to, sel.to)) { - if (to.line < oldTo) - changes.push({from: Math.max(oldFrom, from.line), to: oldTo + 1}); - else - changes.push({from: Math.max(from.line, oldTo), to: to.line + 1}); - } - } - sel.from = from; sel.to = to; - selectionChanged = true; - } - function setCursor(line, ch) { - var pos = clipPos({line: line, ch: ch || 0}); - setSelection(pos, pos); - } - - function clipLine(n) {return Math.max(0, Math.min(n, lines.length-1));} - function clipPos(pos) { - if (pos.line < 0) return {line: 0, ch: 0}; - if (pos.line >= lines.length) return {line: lines.length-1, ch: lines[lines.length-1].text.length}; - var ch = pos.ch, linelen = lines[pos.line].text.length; - if (ch == null || ch > linelen) return {line: pos.line, ch: linelen}; - else if (ch < 0) return {line: pos.line, ch: 0}; - else return pos; - } - - function scrollPage(down) { - var linesPerPage = Math.floor(wrapper.clientHeight / lineHeight()), head = sel.inverted ? sel.from : sel.to; - setCursor(head.line + (Math.max(linesPerPage - 1, 1) * (down ? 1 : -1)), head.ch); - } - function scrollEnd(top) { - setCursor(top ? 0 : lines.length - 1); - } - function selectAll() { - var endLine = lines.length - 1; - setSelection({line: 0, ch: 0}, {line: endLine, ch: lines[endLine].text.length}); - } - function selectWordAt(pos) { - var line = lines[pos.line].text; - var start = pos.ch, end = pos.ch; - while (start > 0 && /\w/.test(line.charAt(start - 1))) --start; - while (end < line.length - 1 && /\w/.test(line.charAt(end))) ++end; - setSelection({line: pos.line, ch: start}, {line: pos.line, ch: end}); - } - function handleEnter() { - replaceSelection("\n", "end"); - if (options.enterMode != "flat") - indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart"); - } - function handleTab(shift) { - shiftSelecting = null; - switch (options.tabMode) { - case "default": - return false; - case "indent": - for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, "smart"); - break; - case "classic": - if (posEq(sel.from, sel.to)) { - if (shift) indentLine(sel.from.line, "smart"); - else replaceSelection("\t", "end"); - break; - } - case "shift": - for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, shift ? "subtract" : "add"); - break; - } - return true; - } - - function indentLine(n, how) { - if (how == "smart") { - if (!mode.indent) how = "prev"; - else var state = getStateBefore(n); - } - - var line = lines[n], curSpace = line.indentation(), curSpaceString = line.text.match(/^\s*/)[0], indentation; - if (how == "prev") { - if (n) indentation = lines[n-1].indentation(); - else indentation = 0; - } - else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length)); - else if (how == "add") indentation = curSpace + options.indentUnit; - else if (how == "subtract") indentation = curSpace - options.indentUnit; - indentation = Math.max(0, indentation); - var diff = indentation - curSpace; - - if (!diff) { - if (sel.from.line != n && sel.to.line != n) return; - var indentString = curSpaceString; - } - else { - var indentString = "", pos = 0; - if (options.indentWithTabs) - for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} - while (pos < indentation) {++pos; indentString += " ";} - } - - replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length}); - } - - function loadMode() { - mode = CodeMirror.getMode(options, options.mode); - for (var i = 0, l = lines.length; i < l; ++i) - lines[i].stateAfter = null; - work = [0]; - } - function gutterChanged() { - var visible = options.gutter || options.lineNumbers; - gutter.style.display = visible ? "" : "none"; - if (visible) updateGutter(); - else lineDiv.parentNode.style.marginLeft = 0; - } - - function markText(from, to, className) { - from = clipPos(from); to = clipPos(to); - var accum = []; - function add(line, from, to, className) { - var line = lines[line], mark = line.addMark(from, to, className); - mark.line = line; - accum.push(mark); - } - if (from.line == to.line) add(from.line, from.ch, to.ch, className); - else { - add(from.line, from.ch, null, className); - for (var i = from.line + 1, e = to.line; i < e; ++i) - add(i, 0, null, className); - add(to.line, 0, to.ch, className); - } - changes.push({from: from.line, to: to.line + 1}); - return function() { - var start, end; - for (var i = 0; i < accum.length; ++i) { - var mark = accum[i], found = indexOf(lines, mark.line); - mark.line.removeMark(mark); - if (found > -1) { - if (start == null) start = found; - end = found; - } - } - if (start != null) changes.push({from: start, to: end + 1}); - }; - } - - function addGutterMarker(line, text, className) { - if (typeof line == "number") line = lines[clipLine(line)]; - line.gutterMarker = {text: text, style: className}; - updateGutter(); - return line; - } - function removeGutterMarker(line) { - if (typeof line == "number") line = lines[clipLine(line)]; - line.gutterMarker = null; - updateGutter(); - } - function setLineClass(line, className) { - if (typeof line == "number") { - var no = line; - line = lines[clipLine(line)]; - } - else { - var no = indexOf(lines, line); - if (no == -1) return null; - } - line.className = className; - changes.push({from: no, to: no + 1}); - return line; - } - - function lineInfo(line) { - if (typeof line == "number") { - var n = line; - line = lines[line]; - if (!line) return null; - } - else { - var n = indexOf(lines, line); - if (n == -1) return null; - } - var marker = line.gutterMarker; - return {line: n, text: line.text, markerText: marker && marker.text, markerClass: marker && marker.style}; - } - - // These are used to go from pixel positions to character - // positions, taking tabs into account. - function charX(line, pos) { - var text = lines[line].text, span = measure.firstChild; - if (text.lastIndexOf("\t", pos) == -1) return pos * charWidth(); - var old = span.firstChild.nodeValue; - try { - span.firstChild.nodeValue = text.slice(0, pos); - return span.offsetWidth; - } finally {span.firstChild.nodeValue = old;} - } - function charFromX(line, x) { - var text = lines[line].text, cw = charWidth(); - if (x <= 0) return 0; - if (text.indexOf("\t") == -1) return Math.min(text.length, Math.round(x / cw)); - var mspan = measure.firstChild, mtext = mspan.firstChild, old = mtext.nodeValue; - try { - mtext.nodeValue = text; - var from = 0, fromX = 0, to = text.length, toX = mspan.offsetWidth; - if (x > toX) return to; - for (;;) { - if (to - from <= 1) return (toX - x > x - fromX) ? from : to; - var middle = Math.ceil((from + to) / 2); - mtext.nodeValue = text.slice(0, middle); - var curX = mspan.offsetWidth; - if (curX > x) {to = middle; toX = curX;} - else {from = middle; fromX = curX;} - } - } finally {mtext.nodeValue = old;} - } - - function localCoords(pos, inLineWrap) { - var lh = lineHeight(), line = pos.line - (inLineWrap ? showingFrom : 0); - return {x: charX(pos.line, pos.ch), y: line * lh, yBot: (line + 1) * lh}; - } - function pageCoords(pos) { - var local = localCoords(pos, true), off = eltOffset(lineSpace); - return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot}; - } - - function lineHeight() { - var nlines = lineDiv.childNodes.length; - if (nlines) return lineDiv.offsetHeight / nlines; - else return measure.firstChild.offsetHeight || 1; - } - function charWidth() {return (measure.firstChild.offsetWidth || 320) / 40;} - function paddingTop() {return lineSpace.offsetTop;} - function paddingLeft() {return lineSpace.offsetLeft;} - - function posFromMouse(e, liberal) { - var off = eltOffset(lineSpace), - x = e.pageX() - off.left, - y = e.pageY() - off.top; - if (!liberal && e.target() != lineSpace.parentNode && !(e.target() == wrapper && y > (lines.length * lineHeight()))) - for (var n = e.target(); n != lineDiv && n != cursor; n = n.parentNode) - if (!n || n == wrapper) return null; - var line = showingFrom + Math.floor(y / lineHeight()); - return clipPos({line: line, ch: charFromX(clipLine(line), x)}); - } - function onContextMenu(e) { - var pos = posFromMouse(e); - if (!pos || window.opera) return; // Opera is difficult. - if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)) - setCursor(pos.line, pos.ch); - - var oldCSS = input.style.cssText; - input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.pageY() - 1) + - "px; left: " + (e.pageX() - 1) + "px; z-index: 1000; background: white; " + - "border-width: 0; outline: none; overflow: hidden;"; - var val = input.value = getSelection(); - input.focus(); - setSelRange(input, 0, val.length); - if (gecko) e.stop(); - leaveInputAlone = true; - setTimeout(function() { - if (input.value != val) operation(replaceSelection)(input.value, "end"); - input.style.cssText = oldCSS; - leaveInputAlone = false; - prepareInput(); - slowPoll(); - }, 50); - } - - // Cursor-blinking - function restartBlink() { - clearInterval(blinker); - var on = true; - cursor.style.visibility = ""; - blinker = setInterval(function() { - cursor.style.visibility = (on = !on) ? "" : "hidden"; - }, 650); - } - - var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; - function matchBrackets(autoclear) { - var head = sel.inverted ? sel.from : sel.to, line = lines[head.line], pos = head.ch - 1; - var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; - if (!match) return; - var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles; - for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2) - if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;} - - var stack = [line.text.charAt(pos)], re = /[(){}[\]]/; - function scan(line, from, to) { - if (!line.text) return; - var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur; - for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) { - var text = st[i]; - if (st[i+1] != null && st[i+1] != style) {pos += d * text.length; continue;} - for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) { - if (pos >= from && pos < to && re.test(cur = text.charAt(j))) { - var match = matching[cur]; - if (match.charAt(1) == ">" == forward) stack.push(cur); - else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false}; - else if (!stack.length) return {pos: pos, match: true}; - } - } - } - } - for (var i = head.line, e = forward ? Math.min(i + 50, lines.length) : Math.max(0, i - 50); i != e; i+=d) { - var line = lines[i], first = i == head.line; - var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length); - if (found) { - var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; - var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style), - two = markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style); - var clear = operation(function(){one(); two();}); - if (autoclear) setTimeout(clear, 800); - else bracketHighlighted = clear; - break; - } - } - } - - // Finds the line to start with when starting a parse. Tries to - // find a line with a stateAfter, so that it can start with a - // valid state. If that fails, it returns the line with the - // smallest indentation, which tends to need the least context to - // parse correctly. - function findStartLine(n) { - var minindent, minline; - for (var search = n, lim = n - 40; search > lim; --search) { - if (search == 0) return 0; - var line = lines[search-1]; - if (line.stateAfter) return search; - var indented = line.indentation(); - if (minline == null || minindent > indented) { - minline = search; - minindent = indented; - } - } - return minline; - } - function getStateBefore(n) { - var start = findStartLine(n), state = start && lines[start-1].stateAfter; - if (!state) state = startState(mode); - else state = copyState(mode, state); - for (var i = start; i < n; ++i) { - var line = lines[i]; - line.highlight(mode, state); - line.stateAfter = copyState(mode, state); - } - if (!lines[n].stateAfter) work.push(n); - return state; - } - function highlightWorker() { - var end = +new Date + options.workTime; - while (work.length) { - if (!lines[showingFrom].stateAfter) var task = showingFrom; - else var task = work.pop(); - if (task >= lines.length) continue; - var start = findStartLine(task), state = start && lines[start-1].stateAfter; - if (state) state = copyState(mode, state); - else state = startState(mode); - - for (var i = start, l = lines.length; i < l; ++i) { - var line = lines[i], hadState = line.stateAfter; - if (+new Date > end) { - work.push(i); - startWorker(options.workDelay); - changes.push({from: task, to: i}); - return; - } - var changed = line.highlight(mode, state); - line.stateAfter = copyState(mode, state); - if (hadState && !changed && line.text) break; - } - changes.push({from: task, to: i}); - } - } - function startWorker(time) { - if (!work.length) return; - highlight.set(time, operation(highlightWorker)); - } - - // Operations are used to wrap changes in such a way that each - // change won't have to update the cursor and display (which would - // be awkward, slow, and error-prone), but instead updates are - // batched and then all combined and executed at once. - function startOperation() { - updateInput = null; changes = []; textChanged = selectionChanged = false; - } - function endOperation() { - var reScroll = false; - if (selectionChanged) reScroll = !scrollCursorIntoView(); - if (changes.length) updateDisplay(changes); - else if (selectionChanged) updateCursor(); - if (reScroll) scrollCursorIntoView(); - if (selectionChanged) restartBlink(); - - // updateInput can be set to a boolean value to force/prevent an - // update. - if (!leaveInputAlone && (updateInput === true || (updateInput !== false && selectionChanged))) - prepareInput(); - - if (selectionChanged && options.onCursorActivity) - options.onCursorActivity(instance); - if (textChanged && options.onChange) - options.onChange(instance); - if (selectionChanged && options.matchBrackets) - setTimeout(operation(function() { - if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;} - matchBrackets(false); - }), 20); - } - var nestedOperation = 0; - function operation(f) { - return function() { - if (!nestedOperation++) startOperation(); - try {var result = f.apply(this, arguments);} - finally {if (!--nestedOperation) endOperation();} - return result; - }; - } - - function SearchCursor(query, pos, caseFold) { - this.atOccurrence = false; - if (caseFold == null) caseFold = typeof query == "string" && query == query.toLowerCase(); - - if (pos && typeof pos == "object") pos = clipPos(pos); - else pos = {line: 0, ch: 0}; - this.pos = {from: pos, to: pos}; - - // The matches method is filled in based on the type of query. - // It takes a position and a direction, and returns an object - // describing the next occurrence of the query, or null if no - // more matches were found. - if (typeof query != "string") // Regexp match - this.matches = function(reverse, pos) { - if (reverse) { - var line = lines[pos.line].text.slice(0, pos.ch), match = line.match(query), start = 0; - while (match) { - var ind = line.indexOf(match[0]); - start += ind; - line = line.slice(ind + 1); - var newmatch = line.match(query); - if (newmatch) match = newmatch; - else break; - } - } - else { - var line = lines[pos.line].text.slice(pos.ch), match = line.match(query), - start = match && pos.ch + line.indexOf(match[0]); - } - if (match) - return {from: {line: pos.line, ch: start}, - to: {line: pos.line, ch: start + match[0].length}, - match: match}; - }; - else { // String query - if (caseFold) query = query.toLowerCase(); - var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;}; - var target = query.split("\n"); - // Different methods for single-line and multi-line queries - if (target.length == 1) - this.matches = function(reverse, pos) { - var line = fold(lines[pos.line].text), len = query.length, match; - if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1) - : (match = line.indexOf(query, pos.ch)) != -1) - return {from: {line: pos.line, ch: match}, - to: {line: pos.line, ch: match + len}}; - }; - else - this.matches = function(reverse, pos) { - var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(lines[ln].text); - var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); - if (reverse ? offsetA >= pos.ch || offsetA != match.length - : offsetA <= pos.ch || offsetA != line.length - match.length) - return; - for (;;) { - if (reverse ? !ln : ln == lines.length - 1) return; - line = fold(lines[ln += reverse ? -1 : 1].text); - match = target[reverse ? --idx : ++idx]; - if (idx > 0 && idx < target.length - 1) { - if (line != match) return; - else continue; - } - var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); - if (reverse ? offsetB != line.length - match.length : offsetB != match.length) - return; - var start = {line: pos.line, ch: offsetA}, end = {line: ln, ch: offsetB}; - return {from: reverse ? end : start, to: reverse ? start : end}; - } - }; - } - } - - SearchCursor.prototype = { - findNext: function() {return this.find(false);}, - findPrevious: function() {return this.find(true);}, - - find: function(reverse) { - var self = this, pos = clipPos(reverse ? this.pos.from : this.pos.to); - function savePosAndFail(line) { - var pos = {line: line, ch: 0}; - self.pos = {from: pos, to: pos}; - self.atOccurrence = false; - return false; - } - - for (;;) { - if (this.pos = this.matches(reverse, pos)) { - this.atOccurrence = true; - return this.pos.match || true; - } - if (reverse) { - if (!pos.line) return savePosAndFail(0); - pos = {line: pos.line-1, ch: lines[pos.line-1].text.length}; - } - else { - if (pos.line == lines.length - 1) return savePosAndFail(lines.length); - pos = {line: pos.line+1, ch: 0}; - } - } - }, - - from: function() {if (this.atOccurrence) return copyPos(this.pos.from);}, - to: function() {if (this.atOccurrence) return copyPos(this.pos.to);} - }; - - return instance; - } // (end of function CodeMirror) - - // The default configuration options. - CodeMirror.defaults = { - value: "", - mode: null, - indentUnit: 2, - indentWithTabs: false, - tabMode: "classic", - enterMode: "indent", - electricChars: true, - onKeyEvent: null, - lineNumbers: false, - gutter: false, - firstLineNumber: 1, - readOnly: false, - onChange: null, - onCursorActivity: null, - onGutterClick: null, - onFocus: null, onBlur: null, onScroll: null, - matchBrackets: false, - workTime: 100, - workDelay: 200, - undoDepth: 40, - tabindex: null - }; - - // Known modes, by name and by MIME - var modes = {}, mimeModes = {}; - CodeMirror.defineMode = function(name, mode) { - if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; - modes[name] = mode; - }; - CodeMirror.defineMIME = function(mime, spec) { - mimeModes[mime] = spec; - }; - CodeMirror.getMode = function(options, spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) - spec = mimeModes[spec]; - if (typeof spec == "string") - var mname = spec, config = {}; - else - var mname = spec.name, config = spec; - var mfactory = modes[mname]; - if (!mfactory) { - if (window.console) console.warn("No mode " + mname + " found, falling back to plain text."); - return CodeMirror.getMode(options, "text/plain"); - } - return mfactory(options, config); - } - CodeMirror.listModes = function() { - var list = []; - for (var m in modes) - if (modes.propertyIsEnumerable(m)) list.push(m); - return list; - }; - CodeMirror.listMIMEs = function() { - var list = []; - for (var m in mimeModes) - if (mimeModes.propertyIsEnumerable(m)) list.push(m); - return list; - }; - - CodeMirror.fromTextArea = function(textarea, options) { - if (!options) options = {}; - options.value = textarea.value; - if (!options.tabindex && textarea.tabindex) - options.tabindex = textarea.tabindex; - - function save() {textarea.value = instance.getValue();} - if (textarea.form) { - // Deplorable hack to make the submit method do the right thing. - var rmSubmit = connect(textarea.form, "submit", save, true); - if (typeof textarea.form.submit == "function") { - var realSubmit = textarea.form.submit; - function wrappedSubmit() { - save(); - textarea.form.submit = realSubmit; - textarea.form.submit(); - textarea.form.submit = wrappedSubmit; - } - textarea.form.submit = wrappedSubmit; - } - } - - textarea.style.display = "none"; - var instance = CodeMirror(function(node) { - textarea.parentNode.insertBefore(node, textarea.nextSibling); - }, options); - instance.save = save; - instance.toTextArea = function() { - save(); - textarea.parentNode.removeChild(instance.getWrapperElement()); - textarea.style.display = ""; - if (textarea.form) { - rmSubmit(); - if (typeof textarea.form.submit == "function") - textarea.form.submit = realSubmit; - } - }; - return instance; - }; - - // Utility functions for working with state. Exported because modes - // sometimes need to do this. - function copyState(mode, state) { - if (state === true) return state; - if (mode.copyState) return mode.copyState(state); - var nstate = {}; - for (var n in state) { - var val = state[n]; - if (val instanceof Array) val = val.concat([]); - nstate[n] = val; - } - return nstate; - } - CodeMirror.startState = startState; - function startState(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; - } - CodeMirror.copyState = copyState; - - // The character stream used by a mode's parser. - function StringStream(string) { - this.pos = this.start = 0; - this.string = string; - } - StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == 0;}, - peek: function() {return this.string.charAt(this.pos);}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.start; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() {return countColumn(this.string, this.start);}, - indentation: function() {return countColumn(this.string);}, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - function cased(str) {return caseInsensitive ? str.toLowerCase() : str;} - if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } - else { - var match = this.string.slice(this.pos).match(pattern); - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);} - }; - - // Line objects. These hold state related to a line, including - // highlighting info (the styles array). - function Line(text, styles) { - this.styles = styles || [text, null]; - this.stateAfter = null; - this.text = text; - this.marked = this.gutterMarker = this.className = null; - } - Line.prototype = { - // Replace a piece of a line, keeping the styles around it intact. - replace: function(from, to, text) { - var st = [], mk = this.marked; - copyStyles(0, from, this.styles, st); - if (text) st.push(text, null); - copyStyles(to, this.text.length, this.styles, st); - this.styles = st; - this.text = this.text.slice(0, from) + text + this.text.slice(to); - this.stateAfter = null; - if (mk) { - var diff = text.length - (to - from), end = this.text.length; - function fix(n) {return n <= Math.min(to, to + diff) ? n : n + diff;} - for (var i = 0; i < mk.length; ++i) { - var mark = mk[i], del = false; - if (mark.from >= end) del = true; - else {mark.from = fix(mark.from); if (mark.to != null) mark.to = fix(mark.to);} - if (del || mark.from >= mark.to) {mk.splice(i, 1); i--;} - } - } - }, - // Split a line in two, again keeping styles intact. - split: function(pos, textBefore) { - var st = [textBefore, null]; - copyStyles(pos, this.text.length, this.styles, st); - return new Line(textBefore + this.text.slice(pos), st); - }, - addMark: function(from, to, style) { - var mk = this.marked, mark = {from: from, to: to, style: style}; - if (this.marked == null) this.marked = []; - this.marked.push(mark); - this.marked.sort(function(a, b){return a.from - b.from;}); - return mark; - }, - removeMark: function(mark) { - var mk = this.marked; - if (!mk) return; - for (var i = 0; i < mk.length; ++i) - if (mk[i] == mark) {mk.splice(i, 1); break;} - }, - // Run the given mode's parser over a line, update the styles - // array, which contains alternating fragments of text and CSS - // classes. - highlight: function(mode, state) { - var stream = new StringStream(this.text), st = this.styles, pos = 0, changed = false; - while (!stream.eol()) { - var style = mode.token(stream, state); - var substr = this.text.slice(stream.start, stream.pos); - stream.start = stream.pos; - if (pos && st[pos-1] == style) - st[pos-2] += substr; - else if (substr) { - if (!changed && st[pos] != substr || st[pos+1] != style) changed = true; - st[pos++] = substr; st[pos++] = style; - } - // Give up when line is ridiculously long - if (stream.pos > 5000) { - st[pos++] = this.text.slice(stream.pos); st[pos++] = null; - break; - } - } - if (st.length != pos) {st.length = pos; changed = true;} - return changed; - }, - // Fetch the parser token for a given character. Useful for hacks - // that want to inspect the mode state (say, for completion). - getTokenAt: function(mode, state, ch) { - var txt = this.text, stream = new StringStream(txt); - while (stream.pos < ch && !stream.eol()) { - stream.start = stream.pos; - var style = mode.token(stream, state); - } - return {start: stream.start, - end: stream.pos, - string: stream.current(), - className: style || null, - state: state}; - }, - indentation: function() {return countColumn(this.text);}, - // Produces an HTML fragment for the line, taking selection, - // marking, and highlighting into account. - getHTML: function(sfrom, sto, includePre) { - var html = []; - if (includePre) - html.push(this.className ? '': ""); - function span(text, style) { - if (!text) return; - if (style) html.push('', htmlEscape(text), ""); - else html.push(htmlEscape(text)); - } - var st = this.styles, allText = this.text, marked = this.marked; - if (sfrom == sto) sfrom = null; - - if (!allText) - span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null); - else if (!marked && sfrom == null) - for (var i = 0, e = st.length; i < e; i+=2) span(st[i], st[i+1]); - else { - var pos = 0, i = 0, text = "", style, sg = 0; - var markpos = -1, mark = null; - function nextMark() { - if (marked) { - markpos += 1; - mark = (markpos < marked.length) ? marked[markpos] : null; - } - } - nextMark(); - while (pos < allText.length) { - var upto = allText.length; - var extraStyle = ""; - if (sfrom != null) { - if (sfrom > pos) upto = sfrom; - else if (sto == null || sto > pos) { - extraStyle = " CodeMirror-selected"; - if (sto != null) upto = Math.min(upto, sto); - } - } - while (mark && mark.to != null && mark.to <= pos) nextMark(); - if (mark) { - if (mark.from > pos) upto = Math.min(upto, mark.from); - else { - extraStyle += " " + mark.style; - if (mark.to != null) upto = Math.min(upto, mark.to); - } - } - for (;;) { - var end = pos + text.length; - var apliedStyle = style; - if (extraStyle) apliedStyle = style ? style + extraStyle : extraStyle; - span(end > upto ? text.slice(0, upto - pos) : text, apliedStyle); - if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} - pos = end; - text = st[i++]; style = st[i++]; - } - } - if (sfrom != null && sto == null) span(" ", "CodeMirror-selected"); - } - if (includePre) html.push("
"); - return html.join(""); - } - }; - // Utility used by replace and split above - function copyStyles(from, to, source, dest) { - for (var i = 0, pos = 0, state = 0; pos < to; i+=2) { - var part = source[i], end = pos + part.length; - if (state == 0) { - if (end > from) dest.push(part.slice(from - pos, Math.min(part.length, to - pos)), source[i+1]); - if (end >= from) state = 1; - } - else if (state == 1) { - if (end > to) dest.push(part.slice(0, to - pos), source[i+1]); - else dest.push(part, source[i+1]); - } - pos = end; - } - } - - // The history object 'chunks' changes that are made close together - // and at almost the same time into bigger undoable units. - function History() { - this.time = 0; - this.done = []; this.undone = []; - } - History.prototype = { - addChange: function(start, added, old) { - this.undone.length = 0; - var time = +new Date, last = this.done[this.done.length - 1]; - if (time - this.time > 400 || !last || - last.start > start + added || last.start + last.added < start - last.added + last.old.length) - this.done.push({start: start, added: added, old: old}); - else { - var oldoff = 0; - if (start < last.start) { - for (var i = last.start - start - 1; i >= 0; --i) - last.old.unshift(old[i]); - last.added += last.start - start; - last.start = start; - } - else if (last.start < start) { - oldoff = start - last.start; - added += oldoff; - } - for (var i = last.added - oldoff, e = old.length; i < e; ++i) - last.old.push(old[i]); - if (last.added < added) last.added = added; - } - this.time = time; - } - }; - - // Event stopping compatibility wrapper. - function stopEvent() { - if (this.preventDefault) {this.preventDefault(); this.stopPropagation();} - else {this.returnValue = false; this.cancelBubble = true;} - } - // Ensure an event has a stop method. - function addStop(event) { - if (!event.stop) event.stop = stopEvent; - return event; - } - - // Event wrapper, exposing the few operations we need. - function Event(orig) {this.e = orig;} - Event.prototype = { - stop: function() {stopEvent.call(this.e);}, - target: function() {return this.e.target || this.e.srcElement;}, - button: function() { - if (this.e.which) return this.e.which; - else if (this.e.button & 1) return 1; - else if (this.e.button & 2) return 3; - else if (this.e.button & 4) return 2; - }, - pageX: function() { - if (this.e.pageX != null) return this.e.pageX; - else return this.e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; - }, - pageY: function() { - if (this.e.pageY != null) return this.e.pageY; - else return this.e.clientY + document.body.scrollTop + document.documentElement.scrollTop; - } - }; - - // Event handler registration. If disconnect is true, it'll return a - // function that unregisters the handler. - function connect(node, type, handler, disconnect) { - function wrapHandler(event) {handler(new Event(event || window.event));} - if (typeof node.addEventListener == "function") { - node.addEventListener(type, wrapHandler, false); - if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);}; - } - else { - node.attachEvent("on" + type, wrapHandler); - if (disconnect) return function() {node.detachEvent("on" + type, wrapHandler);}; - } - } - - function Delayed() {this.id = null;} - Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}}; - - // Some IE versions don't preserve whitespace when setting the - // innerHTML of a PRE tag. - var badInnerHTML = (function() { - var pre = document.createElement("pre"); - pre.innerHTML = " "; return !pre.innerHTML; - })(); - - var gecko = /gecko\/\d{7}/i.test(navigator.userAgent); - - var lineSep = "\n"; - // Feature-detect whether newlines in textareas are converted to \r\n - (function () { - var te = document.createElement("textarea"); - te.value = "foo\nbar"; - if (te.value.indexOf("\r") > -1) lineSep = "\r\n"; - }()); - - var tabSize = 8; - var mac = /Mac/.test(navigator.platform); - var movementKeys = {}; - for (var i = 35; i <= 40; ++i) - movementKeys[i] = movementKeys["c" + i] = true; - - // Counts the column offset in a string, taking tabs into account. - // Used mostly to find indentation. - function countColumn(string, end) { - if (end == null) { - end = string.search(/[^\s\u00a0]/); - if (end == -1) end = string.length; - } - for (var i = 0, n = 0; i < end; ++i) { - if (string.charAt(i) == "\t") n += tabSize - (n % tabSize); - else ++n; - } - return n; - } - - // Find the position of an element by following the offsetParent chain. - function eltOffset(node) { - var x = 0, y = 0, n2 = node; - for (var n = node; n; n = n.offsetParent) {x += n.offsetLeft; y += n.offsetTop;} - for (var n = node; n != document.body; n = n.parentNode) {x -= n.scrollLeft; y -= n.scrollTop;} - return {left: x, top: y}; - } - // Get a node's text content. - function eltText(node) { - return node.textContent || node.innerText || node.nodeValue || ""; - } - - // Operations on {line, ch} objects. - function posEq(a, b) {return a.line == b.line && a.ch == b.ch;} - function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);} - function copyPos(x) {return {line: x.line, ch: x.ch};} - - function htmlEscape(str) { - return str.replace(/[<&]/g, function(str) {return str == "&" ? "&" : "<";}); - } - - // Used to position the cursor after an undo/redo by finding the - // last edited character. - function editEnd(from, to) { - if (!to) return from ? from.length : 0; - if (!from) return to.length; - for (var i = from.length, j = to.length; i >= 0 && j >= 0; --i, --j) - if (from.charAt(i) != to.charAt(j)) break; - return j + 1; - } - - function indexOf(collection, elt) { - if (collection.indexOf) return collection.indexOf(elt); - for (var i = 0, e = collection.length; i < e; ++i) - if (collection[i] == elt) return i; - return -1; - } - - // See if "".split is the broken IE version, if so, provide an - // alternative way to split lines. - if ("\n\nb".split(/\n/).length != 3) - var splitLines = function(string) { - var pos = 0, nl, result = []; - while ((nl = string.indexOf("\n", pos)) > -1) { - result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl)); - pos = nl + 1; - } - result.push(string.slice(pos)); - return result; - }; - else - var splitLines = function(string){return string.split(/\r?\n/);}; - - // Sane model of finding and setting the selection in a textarea - if (window.getSelection) { - var selRange = function(te) { - try {return {start: te.selectionStart, end: te.selectionEnd};} - catch(e) {return null;} - }; - var setSelRange = function(te, start, end) { - try {te.setSelectionRange(start, end);} - catch(e) {} // Fails on Firefox when textarea isn't part of the document - }; - } - // IE model. Don't ask. - else { - var selRange = function(te) { - try {var range = document.selection.createRange();} - catch(e) {return null;} - if (!range || range.parentElement() != te) return null; - var val = te.value, len = val.length, localRange = te.createTextRange(); - localRange.moveToBookmark(range.getBookmark()); - var endRange = te.createTextRange(); - endRange.collapse(false); - - if (localRange.compareEndPoints("StartToEnd", endRange) > -1) - return {start: len, end: len}; - - var start = -localRange.moveStart("character", -len); - for (var i = val.indexOf("\r"); i > -1 && i < start; i = val.indexOf("\r", i+1), start++) {} - - if (localRange.compareEndPoints("EndToEnd", endRange) > -1) - return {start: start, end: len}; - - var end = -localRange.moveEnd("character", -len); - for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {} - return {start: start, end: end}; - }; - var setSelRange = function(te, start, end) { - var range = te.createTextRange(); - range.collapse(true); - var endrange = range.duplicate(); - var newlines = 0, txt = te.value; - for (var pos = txt.indexOf("\n"); pos > -1 && pos < start; pos = txt.indexOf("\n", pos + 1)) - ++newlines; - range.move("character", start - newlines); - for (; pos > -1 && pos < end; pos = txt.indexOf("\n", pos + 1)) - ++newlines; - endrange.move("character", end - newlines); - range.setEndPoint("EndToEnd", endrange); - range.select(); - }; - } - - CodeMirror.defineMode("null", function() { - return {token: function(stream) {stream.skipToEnd();}}; - }); - CodeMirror.defineMIME("text/plain", "null"); - - return CodeMirror; -})(); diff --git a/plugins/LocalFilesEditor/codemirror/lib/overlay.js b/plugins/LocalFilesEditor/codemirror/lib/overlay.js deleted file mode 100644 index c4cdf9fc8..000000000 --- a/plugins/LocalFilesEditor/codemirror/lib/overlay.js +++ /dev/null @@ -1,51 +0,0 @@ -// Utility function that allows modes to be combined. The mode given -// as the base argument takes care of most of the normal mode -// functionality, but a second (typically simple) mode is used, which -// can override the style of text. Both modes get to parse all of the -// text, but when both assign a non-null style to a piece of code, the -// overlay wins, unless the combine argument was true, in which case -// the styles are combined. - -CodeMirror.overlayParser = function(base, overlay, combine) { - return { - startState: function() { - return { - base: CodeMirror.startState(base), - overlay: CodeMirror.startState(overlay), - basePos: 0, baseCur: null, - overlayPos: 0, overlayCur: null - }; - }, - copyState: function(state) { - return { - base: CodeMirror.copyState(base, state.base), - overlay: CodeMirror.copyState(overlay, state.overlay), - basePos: state.basePos, baseCur: null, - overlayPos: state.overlayPos, overlayCur: null - }; - }, - - token: function(stream, state) { - if (stream.start == state.basePos) { - state.baseCur = base.token(stream, state.base); - state.basePos = stream.pos; - } - if (stream.start == state.overlayPos) { - stream.pos = stream.start; - state.overlayCur = overlay.token(stream, state.overlay); - state.overlayPos = stream.pos; - } - stream.pos = Math.min(state.basePos, state.overlayPos); - if (stream.eol()) state.basePos = state.overlayPos = 0; - - if (state.overlayCur == null) return state.baseCur; - if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur; - else return state.overlayCur; - }, - - indent: function(state, textAfter) { - return base.indent(state.base, textAfter); - }, - electricChars: base.electricChars - }; -}; diff --git a/plugins/LocalFilesEditor/codemirror/mode/clike/clike.css b/plugins/LocalFilesEditor/codemirror/mode/clike/clike.css deleted file mode 100644 index 21016d7b1..000000000 --- a/plugins/LocalFilesEditor/codemirror/mode/clike/clike.css +++ /dev/null @@ -1,6 +0,0 @@ -span.c-like-keyword {color: #90b;} -span.c-like-number {color: #291;} -span.c-like-comment {color: #a70;} -span.c-like-string {color: #a22;} -span.c-like-preprocessor {color: #049;} -span.c-like-var {color: #22b;} diff --git a/plugins/LocalFilesEditor/codemirror/mode/clike/clike.js b/plugins/LocalFilesEditor/codemirror/mode/clike/clike.js deleted file mode 100644 index 25bd79144..000000000 --- a/plugins/LocalFilesEditor/codemirror/mode/clike/clike.js +++ /dev/null @@ -1,181 +0,0 @@ -CodeMirror.defineMode("clike", function(config, parserConfig) { - var indentUnit = config.indentUnit, keywords = parserConfig.keywords, - cpp = parserConfig.useCPP, multiLineStrings = parserConfig.multiLineStrings, $vars = parserConfig.$vars; - var isOperatorChar = /[+\-*&%=<>!?|]/; - - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - - var type; - function ret(tp, style) { - type = tp; - return style; - } - - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") - return chain(stream, state, tokenString(ch)); - else if (/[\[\]{}\(\),;\:\.]/.test(ch)) - return ret(ch); - else if (ch == "#" && cpp && state.startOfLine) { - stream.skipToEnd(); - return ret("directive", "c-like-preprocessor"); - } - else if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/) - return ret("number", "c-like-number"); - } - else if (ch == "/") { - if (stream.eat("*")) { - return chain(stream, state, tokenComment); - } - else if (stream.eat("/")) { - stream.skipToEnd(); - return ret("comment", "c-like-comment"); - } - else { - stream.eatWhile(isOperatorChar); - return ret("operator"); - } - } - else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return ret("operator"); - } - else if ($vars && ch == "$") { - stream.eatWhile(/[\w\$_]/); - return ret("word", "c-like-var"); - } - else { - stream.eatWhile(/[\w\$_]/); - if (keywords && keywords.propertyIsEnumerable(stream.current())) return ret("keyword", "c-like-keyword"); - return ret("word", "c-like-word"); - } - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) {end = true; break;} - escaped = !escaped && next == "\\"; - } - if (end || !(escaped || multiLineStrings)) - state.tokenize = tokenBase; - return ret("string", "c-like-string"); - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "c-like-comment"); - } - - function Context(indented, column, type, align, prev) { - this.indented = indented; - this.column = column; - this.type = type; - this.align = align; - this.prev = prev; - } - - function pushContext(state, col, type) { - return state.context = new Context(state.indented, col, type, null, state.context); - } - function popContext(state) { - return state.context = state.context.prev; - } - - // Interface - - return { - startState: function(basecolumn) { - return { - tokenize: tokenBase, - context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), - indented: 0, - startOfLine: true - }; - }, - - token: function(stream, state) { - var ctx = state.context; - if (stream.sol()) { - if (ctx.align == null) ctx.align = false; - state.indented = stream.indentation(); - state.startOfLine = true; - } - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - if (type == "comment") return style; - if (ctx.align == null) ctx.align = true; - - if ((type == ";" || type == ":") && ctx.type == "statement") popContext(state); - else if (type == "{") pushContext(state, stream.column(), "}"); - else if (type == "[") pushContext(state, stream.column(), "]"); - else if (type == "(") pushContext(state, stream.column(), ")"); - else if (type == "}") { - if (ctx.type == "statement") ctx = popContext(state); - if (ctx.type == "}") ctx = popContext(state); - if (ctx.type == "statement") ctx = popContext(state); - } - else if (type == ctx.type) popContext(state); - else if (ctx.type == "}") pushContext(state, stream.column(), "statement"); - state.startOfLine = false; - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), ctx = state.context, closing = firstChar == ctx.type; - if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit); - else if (ctx.align) return ctx.column + (closing ? 0 : 1); - else return ctx.indented + (closing ? 0 : indentUnit); - }, - - electricChars: "{}" - }; -}); - -(function() { - function keywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var cKeywords = "auto if break int case long char register continue return default short do sizeof " + - "double static else struct entry switch extern typedef float union for unsigned " + - "goto while enum void const signed volatile"; - - CodeMirror.defineMIME("text/x-csrc", { - name: "clike", - useCPP: true, - keywords: keywords(cKeywords) - }); - CodeMirror.defineMIME("text/x-c++src", { - name: "clike", - useCPP: true, - keywords: keywords(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " + - "static_cast typeid catch false operator template typename class friend private " + - "this using const_cast inline public throw virtual delete mutable protected true " + - "wchar_t") - }); - CodeMirror.defineMIME("text/x-java", { - name: "clike", - keywords: keywords("abstract assert boolean break byte case catch char class const continue default " + - "do double else enum extends false final finally float for goto if implements import " + - "instanceof int interface long native new null package private protected public " + - "return short static strictfp super switch synchronized this throw throws transient " + - "true try void volatile while") - }); -}()); diff --git a/plugins/LocalFilesEditor/codemirror/mode/clike/index.html b/plugins/LocalFilesEditor/codemirror/mode/clike/index.html deleted file mode 100644 index 0836535d2..000000000 --- a/plugins/LocalFilesEditor/codemirror/mode/clike/index.html +++ /dev/null @@ -1,101 +0,0 @@ - - - -CodeMirror 2: C-like mode - - - - - - - - -CodeMirror 2: C-like mode
- -
Simple mode that tries to handle C-like languages as well as it
- can. Takes two configuration parameters: keywords
, an
- object whose property names are the keywords in the language,
- and useCPP
, which determines whether C preprocessor
- directives are recognized.
MIME types defined: text/x-csrc
- (C code), text/x-c++src
(C++
- code), text/x-java
(Java code).
MIME types defined: text/css
.
MIME types defined: text/x-diff
.