mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-10-22 17:05:44 +02:00
Merge branch '3.0' into 3
This commit is contained in:
commit
17f51bc921
@ -1,8 +1,9 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[silverstripe-externallinks.master]
|
||||
[o:silverstripe:p:silverstripe-externallinks:r:master]
|
||||
file_filter = lang/<lang>.yml
|
||||
source_file = lang/en.yml
|
||||
source_lang = en
|
||||
type = YML
|
||||
type = YML
|
||||
|
||||
|
2
client/dist/js/BrokenExternalLinksReport.js
vendored
2
client/dist/js/BrokenExternalLinksReport.js
vendored
@ -1 +1 @@
|
||||
!function(){"use strict";var t={311:function(t){t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,n),s.exports}!function(){var t=n(311);t.entwine("ss",(t=>{t(".external-links-report__create-report").entwine({PollTimeout:null,ButtonIsLoading:!1,onclick(t){t.preventDefault(),this.buttonLoading(),this.start()},onmatch(){this.poll()},start(){t(".external-links-report__report-progress").empty().text("Running report 0%"),t.ajax({url:"admin/externallinks/start",async:!0,timeout:3e3}),this.poll()},getButton(){return t(".external-links-report__create-report")},buttonLoading(){if(this.getButtonIsLoading())return;this.setButtonIsLoading(!0);const e=this.getButton();e.addClass("btn--loading loading"),e.attr("disabled",!0),e.is("button")&&(e.append(t('<div class="btn__loading-icon"><span class="btn__circle btn__circle--1" /><span class="btn__circle btn__circle--2" /><span class="btn__circle btn__circle--3" /></div>')),e.css(`${e.outerWidth()}px`))},buttonReset(){this.setButtonIsLoading(!1);const t=this.getButton();t.removeClass("btn--loading loading"),t.attr("disabled",!1),t.find(".btn__loading-icon").remove(),t.css("width","auto")},poll(){const e=this;this.buttonLoading(),t.ajax({url:"admin/externallinks/getJobStatus",async:!0,success(n){if(!n)return void e.buttonReset();const o=n.Completed?n.Completed:0,r=n.Total?n.Total:0;if("Completed"===n.Status)return t(".external-links-report__report-progress").text(`Report finished ${o}/${r}`),void e.buttonReset();if(o<r){const e=o/r*100;t(".external-links-report__report-progress").text(`Running report ${o}/${r} (${e.toFixed(2)}%)`)}null!==e.getPollTimeout()&&clearTimeout(e.getPollTimeout()),e.setPollTimeout(setTimeout((()=>{t(".external-links-report__create-report").poll()}),1e3))},error(t){"undefined"!=typeof console&&console.error(t)}})}})}))}()}();
|
||||
!function(){"use strict";var t={311:function(t){t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,n),s.exports}!function(){var t=n(311);t.entwine("ss",(t=>{t(".external-links-report__create-report").entwine({PollTimeout:null,ButtonIsLoading:!1,ReloadContent:!1,onclick(t){t.preventDefault(),this.buttonLoading(),this.start()},onmatch(){this.poll()},start(){const e=this;t(".external-links-report__report-progress").empty().text("Running report 0%"),t.ajax({url:"admin/externallinks/start",async:!0,timeout:3e3,success(){e.setReloadContent(!0),e.poll()},error(t){"undefined"!=typeof console&&console.error(t)}})},getButton(){return t(".external-links-report__create-report")},buttonLoading(){if(this.getButtonIsLoading())return;this.setButtonIsLoading(!0);const e=this.getButton();e.addClass("btn--loading loading"),e.attr("disabled",!0),e.is("button")&&(e.append(t('<div class="btn__loading-icon"><span class="btn__circle btn__circle--1" /><span class="btn__circle btn__circle--2" /><span class="btn__circle btn__circle--3" /></div>')),e.css(`${e.outerWidth()}px`))},buttonReset(){this.setButtonIsLoading(!1);const t=this.getButton();t.removeClass("btn--loading loading"),t.attr("disabled",!1),t.find(".btn__loading-icon").remove(),t.css("width","auto")},poll(){const e=this;this.buttonLoading(),t.ajax({url:"admin/externallinks/getJobStatus",async:!0,success(n){if(!n)return void e.buttonReset();const o=n.Completed?n.Completed:0,r=n.Total?n.Total:0;if("Completed"===n.Status)return e.getReloadContent()&&(t(".cms-container").loadPanel(document.location.href,null,{},!0,!1),e.setReloadContent(!1)),t(".external-links-report__report-progress").text(`Report finished ${o}/${r}`),void e.buttonReset();if(o<r){const e=o/r*100;t(".external-links-report__report-progress").text(`Running report ${o}/${r} (${e.toFixed(2)}%)`)}null!==e.getPollTimeout()&&clearTimeout(e.getPollTimeout()),e.setPollTimeout(setTimeout((()=>{t(".external-links-report__create-report").poll()}),1e3))},error(t){"undefined"!=typeof console&&(console.error(t),e.buttonReset())}})}})}))}()}();
|
@ -5,6 +5,7 @@
|
||||
$('.external-links-report__create-report').entwine({
|
||||
PollTimeout: null,
|
||||
ButtonIsLoading: false,
|
||||
ReloadContent: false,
|
||||
|
||||
onclick(e) {
|
||||
e.preventDefault();
|
||||
@ -19,6 +20,7 @@
|
||||
},
|
||||
|
||||
start() {
|
||||
const self = this;
|
||||
// initiate a new job
|
||||
$('.external-links-report__report-progress')
|
||||
.empty()
|
||||
@ -27,10 +29,17 @@
|
||||
$.ajax({
|
||||
url: 'admin/externallinks/start',
|
||||
async: true,
|
||||
timeout: 3000
|
||||
timeout: 3000,
|
||||
success() {
|
||||
self.setReloadContent(true);
|
||||
self.poll();
|
||||
},
|
||||
error(e) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.poll();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -103,6 +112,10 @@
|
||||
|
||||
// If complete status
|
||||
if (data.Status === 'Completed') {
|
||||
if (self.getReloadContent()) {
|
||||
$('.cms-container').loadPanel(document.location.href, null, {}, true, false);
|
||||
self.setReloadContent(false);
|
||||
}
|
||||
$('.external-links-report__report-progress')
|
||||
.text(`Report finished ${completed}/${total}`);
|
||||
|
||||
@ -130,6 +143,7 @@
|
||||
error(e) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(e);
|
||||
self.buttonReset();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
16
lang/fi.yml
Normal file
16
lang/fi.yml
Normal file
@ -0,0 +1,16 @@
|
||||
fi:
|
||||
SilverStripe\ExternalLinks\Jobs\CheckExternalLinksJob:
|
||||
TITLE: 'Tarkastettaan rikkinäiset ulkoiset linkit'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalLink:
|
||||
NOTAVAILABLE: 'Palvelin ei saatavilla'
|
||||
PLURALNAME: 'Rikkinäiset ulkoiset linkit'
|
||||
SINGULARNAME: 'Rikkinäinen ulkoinen linkki'
|
||||
UNKNOWNRESPONSE: 'Tuntematon vastauskoodi'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalPageTrack:
|
||||
PLURALNAME: 'Rikkinäiset ulkoisen sivun reitit'
|
||||
SINGULARNAME: 'Rikkinäinen ulkoisen sivun reitti'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalPageTrackStatus:
|
||||
SINGULARNAME: 'Rikkinäinen ulkoisen sivun reitin tila'
|
||||
SilverStripe\ExternalLinks\Reports\BrokenExternalLinksReport:
|
||||
EXTERNALBROKENLINKS: 'Raportti ulkoisista rikkinäisistä linkeistä'
|
||||
RUNREPORT: 'Luo uusi raportti'
|
@ -7,6 +7,7 @@ it:
|
||||
PLURALS:
|
||||
one: 'Un Link Esterno Orfano'
|
||||
other: '{count} Link Esterni Orfani'
|
||||
many: '{count} Link Esterni Orfani'
|
||||
SINGULARNAME: 'Link Esterno Orfano'
|
||||
UNKNOWNRESPONSE: 'Codice di Risposta Sconosciuto'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalPageTrack:
|
||||
@ -14,12 +15,14 @@ it:
|
||||
PLURALS:
|
||||
one: 'Una Traccia Pagina Esterna Orfana'
|
||||
other: '{count} Tracce Pagine Esterne Orfane'
|
||||
many: '{count} Tracce Pagine Esterne Orfane'
|
||||
SINGULARNAME: 'Traccia Pagina Esterna Orfana'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalPageTrackStatus:
|
||||
PLURALNAME: 'Stati Tracce Pagine Esterne Orfane'
|
||||
PLURALS:
|
||||
one: 'Uno Stato Traccia Pagina Esterna Orfana'
|
||||
other: '{count} Stati Tracce Pagine Esterne Orfane'
|
||||
many: '{count} Stati Tracce Pagine Esterne Orfane'
|
||||
SINGULARNAME: 'Stato Traccia Pagina Esterna Orfana'
|
||||
SilverStripe\ExternalLinks\Reports\BrokenExternalLinksReport:
|
||||
EXTERNALBROKENLINKS: 'Report link esterni orfani'
|
||||
|
16
lang/ru.yml
Normal file
16
lang/ru.yml
Normal file
@ -0,0 +1,16 @@
|
||||
ru:
|
||||
SilverStripe\ExternalLinks\Jobs\CheckExternalLinksJob:
|
||||
TITLE: 'Проверяю внешние ссылки'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalLink:
|
||||
NOTAVAILABLE: 'Сервер не доступен'
|
||||
PLURALNAME: 'Недоступные внешние ссылки'
|
||||
SINGULARNAME: 'Недоступная внешняя ссылка'
|
||||
UNKNOWNRESPONSE: 'Неизвестный ответ сервера'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalPageTrack:
|
||||
PLURALNAME: 'Внешнее отслеживание страниц нарушено'
|
||||
SINGULARNAME: 'Внешнее отслеживание страниц нарушено'
|
||||
SilverStripe\ExternalLinks\Model\BrokenExternalPageTrackStatus:
|
||||
SINGULARNAME: 'Внешнее отслеживание страниц нарушено'
|
||||
SilverStripe\ExternalLinks\Reports\BrokenExternalLinksReport:
|
||||
EXTERNALBROKENLINKS: 'Отчёт о неработающих внешних ссылках'
|
||||
RUNREPORT: 'Создать новый отчёт'
|
Loading…
Reference in New Issue
Block a user