diff options
Diffstat (limited to 'apps')
65 files changed, 588 insertions, 62 deletions
diff --git a/apps/comments/l10n/mn.js b/apps/comments/l10n/mn.js index da6921e833d..d2ce6c6c84a 100644 --- a/apps/comments/l10n/mn.js +++ b/apps/comments/l10n/mn.js @@ -2,7 +2,7 @@ OC.L10N.register( "comments", { "Comments" : "Сэтгэгдэл", - "Unknown user" : "Үл мэдэгдэх хэрэглэгч", + "Unknown user" : " хэрэглэгч", "New comment …" : "Шинэ сэтгэгдэл", "Delete comment" : "Сэтгэгдэл устгах", "Post" : "Нийтлэл", diff --git a/apps/comments/l10n/mn.json b/apps/comments/l10n/mn.json index ae7c93ad0ee..b4627751ae7 100644 --- a/apps/comments/l10n/mn.json +++ b/apps/comments/l10n/mn.json @@ -1,6 +1,6 @@ { "translations": { "Comments" : "Сэтгэгдэл", - "Unknown user" : "Үл мэдэгдэх хэрэглэгч", + "Unknown user" : " хэрэглэгч", "New comment …" : "Шинэ сэтгэгдэл", "Delete comment" : "Сэтгэгдэл устгах", "Post" : "Нийтлэл", diff --git a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php index ca8306e79a8..f9e1ab56876 100644 --- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php @@ -40,6 +40,7 @@ class AvatarHomeTest extends TestCase { private $avatarManager; public function setUp() { + parent::setUp(); $this->avatarManager = $this->createMock(IAvatarManager::class); $this->home = new AvatarHome(['uri' => 'principals/users/admin'], $this->avatarManager); } diff --git a/apps/encryption/l10n/pt_BR.js b/apps/encryption/l10n/pt_BR.js index be26930df63..f6cb6d56d3e 100644 --- a/apps/encryption/l10n/pt_BR.js +++ b/apps/encryption/l10n/pt_BR.js @@ -3,7 +3,7 @@ OC.L10N.register( { "Missing recovery key password" : "Está faltando a senha da chave de recuperação", "Please repeat the recovery key password" : "Por favor, repita a senha da chave de recuperação", - "Repeated recovery key password does not match the provided recovery key password" : "A senha repetida não corresponde à senha da chave de recuperação fornecida", + "Repeated recovery key password does not match the provided recovery key password" : "A senha repetida não corresponde com a senha da chave de recuperação fornecida", "Recovery key successfully enabled" : "Chave de recuperação habilitada com sucesso", "Could not enable recovery key. Please check your recovery key password!" : "Impossível habilitar a chave de recuperação. Por favor, verifique a senha da chave de recuperação!", "Recovery key successfully disabled" : "Chave de recuperação desabilitada com sucesso", diff --git a/apps/encryption/l10n/pt_BR.json b/apps/encryption/l10n/pt_BR.json index ba34cd8b017..c8816f81f10 100644 --- a/apps/encryption/l10n/pt_BR.json +++ b/apps/encryption/l10n/pt_BR.json @@ -1,7 +1,7 @@ { "translations": { "Missing recovery key password" : "Está faltando a senha da chave de recuperação", "Please repeat the recovery key password" : "Por favor, repita a senha da chave de recuperação", - "Repeated recovery key password does not match the provided recovery key password" : "A senha repetida não corresponde à senha da chave de recuperação fornecida", + "Repeated recovery key password does not match the provided recovery key password" : "A senha repetida não corresponde com a senha da chave de recuperação fornecida", "Recovery key successfully enabled" : "Chave de recuperação habilitada com sucesso", "Could not enable recovery key. Please check your recovery key password!" : "Impossível habilitar a chave de recuperação. Por favor, verifique a senha da chave de recuperação!", "Recovery key successfully disabled" : "Chave de recuperação desabilitada com sucesso", diff --git a/apps/federation/l10n/mn.js b/apps/federation/l10n/mn.js new file mode 100644 index 00000000000..31a2642784e --- /dev/null +++ b/apps/federation/l10n/mn.js @@ -0,0 +1,15 @@ +OC.L10N.register( + "federation", + { + "Added to the list of trusted servers" : "найдвартай серверийн жагсаалтанд нэмэх", + "Server is already in the list of trusted servers." : "сервер нь аль хэдийн найдвартай серверийн жагсаалтанд байна", + "No server to federate with found" : "Ямар ч холбооны сервер олдсонгүй ", + "Could not add server" : " сервер нэмж чадаагүй ", + "Federation" : "холбоо", + "Trusted servers" : "найдвартай сервер", + "Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Холбоо нь хэрэглэгчийн санг солилцох бусад найдвартай серверүүд уруу холбогдох боломжийг олгоно. Жишээ нь үүнийг холбооны хуваарилалт авто бүрэн гадны хэрэглэгчдэд ашиглаж болно", + "+ Add trusted server" : "+ найдвартай сервер нэмэх", + "Trusted server" : "найдвартай сервер", + "Add" : "нэмэх" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/federation/l10n/mn.json b/apps/federation/l10n/mn.json new file mode 100644 index 00000000000..7d5a13339c6 --- /dev/null +++ b/apps/federation/l10n/mn.json @@ -0,0 +1,13 @@ +{ "translations": { + "Added to the list of trusted servers" : "найдвартай серверийн жагсаалтанд нэмэх", + "Server is already in the list of trusted servers." : "сервер нь аль хэдийн найдвартай серверийн жагсаалтанд байна", + "No server to federate with found" : "Ямар ч холбооны сервер олдсонгүй ", + "Could not add server" : " сервер нэмж чадаагүй ", + "Federation" : "холбоо", + "Trusted servers" : "найдвартай сервер", + "Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Холбоо нь хэрэглэгчийн санг солилцох бусад найдвартай серверүүд уруу холбогдох боломжийг олгоно. Жишээ нь үүнийг холбооны хуваарилалт авто бүрэн гадны хэрэглэгчдэд ашиглаж болно", + "+ Add trusted server" : "+ найдвартай сервер нэмэх", + "Trusted server" : "найдвартай сервер", + "Add" : "нэмэх" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js index f04adcf1292..e53922ebb69 100644 --- a/apps/files/js/detailsview.js +++ b/apps/files/js/detailsview.js @@ -300,6 +300,16 @@ addDetailView: function(detailView) { this._detailFileInfoViews.push(detailView); this._dirty = true; + }, + + /** + * Returns an array with the added DetailFileInfoViews. + * + * @return Array<OCA.Files.DetailFileInfoView> an array with the added + * DetailFileInfoViews. + */ + getDetailViews: function() { + return [].concat(this._detailFileInfoViews); } }); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 919b4d38f86..b1e7c3f5f8c 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -3020,6 +3020,21 @@ if (this.breadcrumb) { this.breadcrumb.addDetailView(detailView); } + }, + + /** + * Returns the registered detail views. + * + * @return null|Array<OCA.Files.DetailFileInfoView> an array with the + * registered DetailFileInfoViews, or null if the details view + * is not enabled. + */ + getRegisteredDetailViews: function() { + if (this._detailsView) { + return this._detailsView.getDetailViews(); + } + + return null; } }; diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 26472e0766d..ea3063f6176 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -171,6 +171,8 @@ * Renders this details view */ render: function() { + this.trigger('pre-render'); + if (this.model) { var isFavorite = (this.model.get('tags') || []).indexOf(OC.TAG_FAVORITE) >= 0; this.$el.html(this.template({ @@ -209,6 +211,8 @@ this.$el.empty(); } this.delegateEvents(); + + this.trigger('post-render'); } }); diff --git a/apps/files/l10n/cs.js b/apps/files/l10n/cs.js index 7cc8ccce61d..14839f83ad9 100644 --- a/apps/files/l10n/cs.js +++ b/apps/files/l10n/cs.js @@ -65,6 +65,7 @@ OC.L10N.register( "Your storage is almost full ({usedSpacePercent}%)" : "Vaše úložiště je téměř plné ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["odpovídá '{filter}'","odpovídá '{filter}'","odpovídá '{filter}'"], "View in folder" : "Zobrazit v adresáři", + "Copied!" : "Zkopírováno!", "Copy direct link (only works for users who have access to this file/folder)" : "Zkopírovat přímý odkaz (funguje pouze pro uživatele, kteří mají přistup k tomuto souboru/adresáři)", "Path" : "Cesta", "_%n byte_::_%n bytes_" : ["%n bajt","%n bajty","%n bajtů"], diff --git a/apps/files/l10n/cs.json b/apps/files/l10n/cs.json index 6a43440a1f4..0c61e4b2932 100644 --- a/apps/files/l10n/cs.json +++ b/apps/files/l10n/cs.json @@ -63,6 +63,7 @@ "Your storage is almost full ({usedSpacePercent}%)" : "Vaše úložiště je téměř plné ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["odpovídá '{filter}'","odpovídá '{filter}'","odpovídá '{filter}'"], "View in folder" : "Zobrazit v adresáři", + "Copied!" : "Zkopírováno!", "Copy direct link (only works for users who have access to this file/folder)" : "Zkopírovat přímý odkaz (funguje pouze pro uživatele, kteří mají přistup k tomuto souboru/adresáři)", "Path" : "Cesta", "_%n byte_::_%n bytes_" : ["%n bajt","%n bajty","%n bajtů"], diff --git a/apps/files/l10n/es.js b/apps/files/l10n/es.js index bd2c0d53c3b..13bf5e5c371 100644 --- a/apps/files/l10n/es.js +++ b/apps/files/l10n/es.js @@ -65,6 +65,7 @@ OC.L10N.register( "Your storage is almost full ({usedSpacePercent}%)" : "Su almacenamiento está casi lleno ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["coincidencias '{filter}'","coincidencia '{filter}'"], "View in folder" : "Ver en carpeta", + "Copied!" : "¡Copiado!", "Copy direct link (only works for users who have access to this file/folder)" : "Copiae enlace directo (solo funciona para usuarios que tienen acceso a este archivo/carpeta)", "Path" : "Ruta", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], diff --git a/apps/files/l10n/es.json b/apps/files/l10n/es.json index 2168041a569..d05ad9e54fd 100644 --- a/apps/files/l10n/es.json +++ b/apps/files/l10n/es.json @@ -63,6 +63,7 @@ "Your storage is almost full ({usedSpacePercent}%)" : "Su almacenamiento está casi lleno ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["coincidencias '{filter}'","coincidencia '{filter}'"], "View in folder" : "Ver en carpeta", + "Copied!" : "¡Copiado!", "Copy direct link (only works for users who have access to this file/folder)" : "Copiae enlace directo (solo funciona para usuarios que tienen acceso a este archivo/carpeta)", "Path" : "Ruta", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], diff --git a/apps/files/l10n/es_MX.js b/apps/files/l10n/es_MX.js index 583665cd2a4..0d47ad06177 100644 --- a/apps/files/l10n/es_MX.js +++ b/apps/files/l10n/es_MX.js @@ -123,7 +123,7 @@ OC.L10N.register( "Upload too large" : "La carga es demasido grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Los archivos que está intentando cargar sobrepasan el tamaño máximo permitido para la carga de archivos en este servidor.", "No favorites yet" : "Aún no hay favoritos", - "Files and folders you mark as favorite will show up here" : "Los archivos y carpetas que marque como favortios se mostrarán aquí. ", + "Files and folders you mark as favorite will show up here" : "Los archivos y carpetas que marque como favoritos se mostrarán aquí. ", "Shared with you" : "Compartido con usted", "Shared with others" : "Compartido con otros", "Shared by link" : "Compartido por liga", diff --git a/apps/files/l10n/es_MX.json b/apps/files/l10n/es_MX.json index 2966aa4da9b..563fb294fbb 100644 --- a/apps/files/l10n/es_MX.json +++ b/apps/files/l10n/es_MX.json @@ -121,7 +121,7 @@ "Upload too large" : "La carga es demasido grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Los archivos que está intentando cargar sobrepasan el tamaño máximo permitido para la carga de archivos en este servidor.", "No favorites yet" : "Aún no hay favoritos", - "Files and folders you mark as favorite will show up here" : "Los archivos y carpetas que marque como favortios se mostrarán aquí. ", + "Files and folders you mark as favorite will show up here" : "Los archivos y carpetas que marque como favoritos se mostrarán aquí. ", "Shared with you" : "Compartido con usted", "Shared with others" : "Compartido con otros", "Shared by link" : "Compartido por liga", diff --git a/apps/files/l10n/it.js b/apps/files/l10n/it.js index 9c070a94f8a..665460d6c8e 100644 --- a/apps/files/l10n/it.js +++ b/apps/files/l10n/it.js @@ -65,6 +65,7 @@ OC.L10N.register( "Your storage is almost full ({usedSpacePercent}%)" : "Lo spazio di archiviazione è quasi pieno ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["corrispondono a '{filter}'","corrisponde a '{filter}'"], "View in folder" : "Visualizza nella cartella", + "Copied!" : "Copiato!", "Copy direct link (only works for users who have access to this file/folder)" : "Copia link diretto (funziona solo per utenti che hanno accesso a questo file / cartella)", "Path" : "Percorso", "_%n byte_::_%n bytes_" : ["%n byte","%n byte"], diff --git a/apps/files/l10n/it.json b/apps/files/l10n/it.json index 6fe1bcb0d73..23168a48199 100644 --- a/apps/files/l10n/it.json +++ b/apps/files/l10n/it.json @@ -63,6 +63,7 @@ "Your storage is almost full ({usedSpacePercent}%)" : "Lo spazio di archiviazione è quasi pieno ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["corrispondono a '{filter}'","corrisponde a '{filter}'"], "View in folder" : "Visualizza nella cartella", + "Copied!" : "Copiato!", "Copy direct link (only works for users who have access to this file/folder)" : "Copia link diretto (funziona solo per utenti che hanno accesso a questo file / cartella)", "Path" : "Percorso", "_%n byte_::_%n bytes_" : ["%n byte","%n byte"], diff --git a/apps/files/l10n/pt_BR.js b/apps/files/l10n/pt_BR.js index b70aa1b6efd..ba5246ffe7c 100644 --- a/apps/files/l10n/pt_BR.js +++ b/apps/files/l10n/pt_BR.js @@ -87,16 +87,16 @@ OC.L10N.register( "Moved by {user}" : "Movido por {user}", "\"remote user\"" : "\"usuário remoto\"", "You created {file}" : "Você criou o arquivo {file}", - "{user} created {file}" : "{user} criou o arquivo {file}", + "{user} created {file}" : "{user} criou {file}", "{file} was created in a public folder" : "O arquivo {file} foi criado em uma pasta pública", "You changed {file}" : "Você modificou o arquivo {file}", - "{user} changed {file}" : "{user} modificou o arquivo {file}", + "{user} changed {file}" : "{user} modificou {file}", "You deleted {file}" : "Você excluiu o arquivo {file}", "{user} deleted {file}" : "{user} excluiu o arquivo {file}", "You restored {file}" : "Você restaurou o arquivo {file}", - "{user} restored {file}" : "{user} restaurou o arquivo {file}", + "{user} restored {file}" : "{user} restaurou {file}", "You renamed {oldfile} to {newfile}" : "Você renomeou o arquivo {oldfile} para {newfile}", - "{user} renamed {oldfile} to {newfile}" : "{user} renomeou o arquivo {oldfile} para {newfile}", + "{user} renamed {oldfile} to {newfile}" : "{user} renomeou {oldfile} para {newfile}", "You moved {oldfile} to {newfile}" : "Você moveu o arquivo {oldfile} para {newfile}", "{user} moved {oldfile} to {newfile}" : "{user} moveu o arquivo {oldfile} para {newfile}", "A file has been added to or removed from your <strong>favorites</strong>" : "Um arquivo foi adicionado ou excluído de seus <strong>favoritos</strong>", diff --git a/apps/files/l10n/pt_BR.json b/apps/files/l10n/pt_BR.json index c25bf802cf7..b112e3fb7b1 100644 --- a/apps/files/l10n/pt_BR.json +++ b/apps/files/l10n/pt_BR.json @@ -85,16 +85,16 @@ "Moved by {user}" : "Movido por {user}", "\"remote user\"" : "\"usuário remoto\"", "You created {file}" : "Você criou o arquivo {file}", - "{user} created {file}" : "{user} criou o arquivo {file}", + "{user} created {file}" : "{user} criou {file}", "{file} was created in a public folder" : "O arquivo {file} foi criado em uma pasta pública", "You changed {file}" : "Você modificou o arquivo {file}", - "{user} changed {file}" : "{user} modificou o arquivo {file}", + "{user} changed {file}" : "{user} modificou {file}", "You deleted {file}" : "Você excluiu o arquivo {file}", "{user} deleted {file}" : "{user} excluiu o arquivo {file}", "You restored {file}" : "Você restaurou o arquivo {file}", - "{user} restored {file}" : "{user} restaurou o arquivo {file}", + "{user} restored {file}" : "{user} restaurou {file}", "You renamed {oldfile} to {newfile}" : "Você renomeou o arquivo {oldfile} para {newfile}", - "{user} renamed {oldfile} to {newfile}" : "{user} renomeou o arquivo {oldfile} para {newfile}", + "{user} renamed {oldfile} to {newfile}" : "{user} renomeou {oldfile} para {newfile}", "You moved {oldfile} to {newfile}" : "Você moveu o arquivo {oldfile} para {newfile}", "{user} moved {oldfile} to {newfile}" : "{user} moveu o arquivo {oldfile} para {newfile}", "A file has been added to or removed from your <strong>favorites</strong>" : "Um arquivo foi adicionado ou excluído de seus <strong>favoritos</strong>", diff --git a/apps/files/tests/js/detailsviewSpec.js b/apps/files/tests/js/detailsviewSpec.js index 26a16b31530..0f483728bff 100644 --- a/apps/files/tests/js/detailsviewSpec.js +++ b/apps/files/tests/js/detailsviewSpec.js @@ -35,6 +35,27 @@ describe('OCA.Files.DetailsView tests', function() { expect(detailsView.$el.find('.tabsContainer').length).toEqual(1); }); describe('file info detail view', function() { + it('returns registered view', function() { + var testView = new OCA.Files.DetailFileInfoView(); + var testView2 = new OCA.Files.DetailFileInfoView(); + detailsView.addDetailView(testView); + detailsView.addDetailView(testView2); + + detailViews = detailsView.getDetailViews(); + + expect(detailViews).toContain(testView); + expect(detailViews).toContain(testView2); + + // Modify array and check that registered detail views are not + // modified + detailViews.pop(); + detailViews.pop(); + + detailViews = detailsView.getDetailViews(); + + expect(detailViews).toContain(testView); + expect(detailViews).toContain(testView2); + }); it('renders registered view', function() { var testView = new OCA.Files.DetailFileInfoView(); var testView2 = new OCA.Files.DetailFileInfoView(); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 6b403e7fa85..b7ee9c8554e 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2116,10 +2116,12 @@ describe('OCA.Files.FileList tests', function() { beforeEach(function() { addTabStub = sinon.stub(OCA.Files.DetailsView.prototype, 'addTabView'); addDetailStub = sinon.stub(OCA.Files.DetailsView.prototype, 'addDetailView'); + getDetailsStub = sinon.stub(OCA.Files.DetailsView.prototype, 'getDetailViews'); }); afterEach(function() { addTabStub.restore(); addDetailStub.restore(); + getDetailsStub.restore(); }); it('forward the registered views to the underlying DetailsView', function() { fileList.destroy(); @@ -2133,6 +2135,19 @@ describe('OCA.Files.FileList tests', function() { // twice because the filelist already registers one by default expect(addDetailStub.calledTwice).toEqual(true); }); + it('forward getting the registered views to the underlying DetailsView', function() { + fileList.destroy(); + fileList = new OCA.Files.FileList($('#app-content-files'), { + detailsViewEnabled: true + }); + var expectedRegisteredDetailsView = []; + getDetailsStub.returns(expectedRegisteredDetailsView); + + var registeredDetailViews = fileList.getRegisteredDetailViews(); + + expect(getDetailsStub.calledOnce).toEqual(true); + expect(registeredDetailViews).toEqual(expectedRegisteredDetailsView); + }); it('does not error when registering panels when not details view configured', function() { fileList.destroy(); fileList = new OCA.Files.FileList($('#app-content-files'), { @@ -2144,6 +2159,17 @@ describe('OCA.Files.FileList tests', function() { expect(addTabStub.notCalled).toEqual(true); expect(addDetailStub.notCalled).toEqual(true); }); + it('returns null when getting the registered views when not details view configured', function() { + fileList.destroy(); + fileList = new OCA.Files.FileList($('#app-content-files'), { + detailsViewEnabled: false + }); + + var registeredDetailViews = fileList.getRegisteredDetailViews(); + + expect(getDetailsStub.notCalled).toEqual(true); + expect(registeredDetailViews).toBeNull(); + }); }); it('triggers file action when clicking on row if no details view configured', function() { fileList.destroy(); diff --git a/apps/oauth2/appinfo/info.xml b/apps/oauth2/appinfo/info.xml index ccddc9a8f71..fe8ce3a1289 100644 --- a/apps/oauth2/appinfo/info.xml +++ b/apps/oauth2/appinfo/info.xml @@ -15,6 +15,10 @@ <nextcloud min-version="13" max-version="13" /> </dependencies> + <dependencies> + <nextcloud min-version="12" max-version="12" /> + </dependencies> + <settings> <admin>OCA\OAuth2\Settings\Admin</admin> </settings> diff --git a/apps/oauth2/l10n/es.js b/apps/oauth2/l10n/es.js new file mode 100644 index 00000000000..4d2d3feac21 --- /dev/null +++ b/apps/oauth2/l10n/es.js @@ -0,0 +1,14 @@ +OC.L10N.register( + "oauth2", + { + "OAuth 2.0" : "OAuth 2.0", + "OAuth 2.0 clients" : "Clientes OAuth 2.0", + "OAuth 2.0 allows external services to request access to your %s." : "OAuth 2.0 permite a servicios externos pedir acceso a tu %s.", + "Name" : "Nombre", + "Redirection URI" : "URI de redirección", + "Client Identifier" : "Identificador de cliente", + "Secret" : "Secreto", + "Add client" : "Añadir cliente", + "Add" : "Añadir" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/oauth2/l10n/es.json b/apps/oauth2/l10n/es.json new file mode 100644 index 00000000000..03a08a143ec --- /dev/null +++ b/apps/oauth2/l10n/es.json @@ -0,0 +1,12 @@ +{ "translations": { + "OAuth 2.0" : "OAuth 2.0", + "OAuth 2.0 clients" : "Clientes OAuth 2.0", + "OAuth 2.0 allows external services to request access to your %s." : "OAuth 2.0 permite a servicios externos pedir acceso a tu %s.", + "Name" : "Nombre", + "Redirection URI" : "URI de redirección", + "Client Identifier" : "Identificador de cliente", + "Secret" : "Secreto", + "Add client" : "Añadir cliente", + "Add" : "Añadir" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/systemtags/js/filesplugin.js b/apps/systemtags/js/filesplugin.js index db97b91a072..fc2a227b5be 100644 --- a/apps/systemtags/js/filesplugin.js +++ b/apps/systemtags/js/filesplugin.js @@ -31,7 +31,30 @@ return; } - fileList.registerDetailView(new OCA.SystemTags.SystemTagsInfoView()); + var systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView(); + fileList.registerDetailView(systemTagsInfoView); + + _.each(fileList.getRegisteredDetailViews(), function(detailView) { + if (detailView instanceof OCA.Files.MainFileInfoDetailView) { + var systemTagsInfoViewToggleView = + new OCA.SystemTags.SystemTagsInfoViewToggleView({ + systemTagsInfoView: systemTagsInfoView + }); + systemTagsInfoViewToggleView.render(); + + // The toggle view element is detached before the + // MainFileInfoDetailView is rendered to prevent its event + // handlers from being removed. + systemTagsInfoViewToggleView.listenTo(detailView, 'pre-render', function() { + systemTagsInfoViewToggleView.$el.detach(); + }); + systemTagsInfoViewToggleView.listenTo(detailView, 'post-render', function() { + detailView.$el.find('.file-details').append(systemTagsInfoViewToggleView.$el); + }); + + return; + } + }); } }; diff --git a/apps/systemtags/js/merged.json b/apps/systemtags/js/merged.json index 0262077498a..632abf6777e 100644 --- a/apps/systemtags/js/merged.json +++ b/apps/systemtags/js/merged.json @@ -2,5 +2,6 @@ "app.js", "systemtagsfilelist.js", "filesplugin.js", - "systemtagsinfoview.js" + "systemtagsinfoview.js", + "systemtagsinfoviewtoggleview.js" ] diff --git a/apps/systemtags/js/systemtagsinfoview.js b/apps/systemtags/js/systemtagsinfoview.js index f98c4b046e4..1bf7287342f 100644 --- a/apps/systemtags/js/systemtagsinfoview.js +++ b/apps/systemtags/js/systemtagsinfoview.js @@ -37,8 +37,6 @@ */ _inputView: null, - _toggleHandle: null, - initialize: function(options) { var self = this; options = options || {}; @@ -60,9 +58,6 @@ this._inputView.on('select', this._onSelectTag, this); this._inputView.on('deselect', this._onDeselectTag, this); - - this._toggleHandle = $('<span>').addClass('tag-label').text(t('systemtags', 'Tags')); - this._toggleHandle.prepend($('<span>').addClass('icon icon-tag')); }, /** @@ -128,15 +123,15 @@ self._inputView.setData(appliedTags); if (appliedTags.length !== 0) { - self.$el.removeClass('hidden'); + self.show(); } else { - self.$el.addClass('hidden'); + self.hide(); } } }); } - this.$el.addClass('hidden'); + this.hide(); }, /** @@ -147,20 +142,26 @@ this.$el.append(this._inputView.$el); this._inputView.render(); + }, - $('#app-sidebar').find('.mainFileInfoView .file-details').append(this._toggleHandle); - this._toggleHandle.off('click'); - this._toggleHandle.on('click', function () { - self.$el.toggleClass('hidden'); - if (!self.$el.hasClass('hidden')) { - self.$el.find('.systemTagsInputField').select2('open'); - } - }); + isVisible: function() { + return !this.$el.hasClass('hidden'); + }, + + show: function() { + this.$el.removeClass('hidden'); + }, + + hide: function() { + this.$el.addClass('hidden'); + }, + + openDropdown: function() { + this.$el.find('.systemTagsInputField').select2('open'); }, remove: function() { this._inputView.remove(); - this._toggleHandle.remove(); } }); diff --git a/apps/systemtags/js/systemtagsinfoviewtoggleview.js b/apps/systemtags/js/systemtagsinfoviewtoggleview.js new file mode 100644 index 00000000000..13a48e49cfb --- /dev/null +++ b/apps/systemtags/js/systemtagsinfoviewtoggleview.js @@ -0,0 +1,103 @@ +/** + * + * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com) + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +(function(OCA) { + + var TEMPLATE = + '<span class="icon icon-tag"/>' + t('systemtags', 'Tags'); + + /** + * @class OCA.SystemTags.SystemTagsInfoViewToggleView + * @classdesc + * + * View to toggle the visibility of a SystemTagsInfoView. + * + * This toggle view must be explicitly rendered before it is used. + */ + var SystemTagsInfoViewToggleView = OC.Backbone.View.extend( + /** @lends OC.Backbone.View.prototype */ { + + tagName: 'span', + + className: 'tag-label', + + events: { + 'click': 'click' + }, + + /** + * @type OCA.SystemTags.SystemTagsInfoView + */ + _systemTagsInfoView: null, + + template: function(data) { + if (!this._template) { + this._template = Handlebars.compile(TEMPLATE); + } + return this._template(data); + }, + + /** + * Initialize this toggle view. + * + * The options must provide a systemTagsInfoView parameter that + * references the SystemTagsInfoView to associate to this toggle view. + */ + initialize: function(options) { + var self = this; + options = options || {}; + + this._systemTagsInfoView = options.systemTagsInfoView; + if (!this._systemTagsInfoView) { + throw 'Missing required parameter "systemTagsInfoView"'; + } + }, + + /** + * Toggles the visibility of the associated SystemTagsInfoView. + * + * When the systemTagsInfoView is shown its dropdown is also opened. + */ + click: function() { + if (this._systemTagsInfoView.isVisible()) { + this._systemTagsInfoView.hide(); + } else { + this._systemTagsInfoView.show(); + this._systemTagsInfoView.openDropdown(); + } + }, + + /** + * Renders this toggle view. + * + * @return OCA.SystemTags.SystemTagsInfoViewToggleView this object. + */ + render: function() { + this.$el.html(this.template()); + + return this; + }, + + }); + + OCA.SystemTags.SystemTagsInfoViewToggleView = SystemTagsInfoViewToggleView; + +})(OCA); diff --git a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js index 449dfd859d7..2f874688112 100644 --- a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js +++ b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js @@ -201,4 +201,50 @@ describe('OCA.SystemTags.SystemTagsInfoView tests', function() { }); }); + describe('visibility', function() { + it('reports visibility based on the "hidden" class name', function() { + view.$el.addClass('hidden'); + + expect(view.isVisible()).toBeFalsy(); + + view.$el.removeClass('hidden'); + + expect(view.isVisible()).toBeTruthy(); + }); + it('is not visible after rendering', function() { + view.render(); + + expect(view.isVisible()).toBeFalsy(); + }); + it('shows and hides the element', function() { + view.show(); + + expect(view.isVisible()).toBeTruthy(); + + view.hide(); + + expect(view.isVisible()).toBeFalsy(); + + view.show(); + + expect(view.isVisible()).toBeTruthy(); + }); + }); + describe('select2', function() { + var select2Stub; + + beforeEach(function() { + select2Stub = sinon.stub($.fn, 'select2'); + }); + afterEach(function() { + select2Stub.restore(); + }); + it('opens dropdown', function() { + view.openDropdown(); + + expect(select2Stub.calledOnce).toBeTruthy(); + expect(select2Stub.thisValues[0].selector).toEqual('.systemTagsInputField'); + expect(select2Stub.withArgs('open')).toBeTruthy(); + }); + }); }); diff --git a/apps/systemtags/tests/js/systemtagsinfoviewtoggleviewSpec.js b/apps/systemtags/tests/js/systemtagsinfoviewtoggleviewSpec.js new file mode 100644 index 00000000000..5e6c2c820e9 --- /dev/null +++ b/apps/systemtags/tests/js/systemtagsinfoviewtoggleviewSpec.js @@ -0,0 +1,93 @@ +/** + * + * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com) + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +describe('OCA.SystemTags.SystemTagsInfoViewToggleView', function () { + + var systemTagsInfoView; + var view; + + beforeEach(function() { + systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView(); + view = new OCA.SystemTags.SystemTagsInfoViewToggleView({ systemTagsInfoView: systemTagsInfoView }); + }); + + afterEach(function() { + view.remove(); + systemTagsInfoView.remove(); + }); + + describe('initialize', function() { + it('fails if a "systemTagsInfoView" parameter is not provided', function() { + var constructor = function() { + return new OCA.SystemTags.SystemTagsInfoViewToggleView({}); + } + + expect(constructor).toThrow(); + }); + }); + + describe('click on element', function() { + + var isVisibleStub; + var showStub; + var hideStub; + var openDropdownStub; + + beforeEach(function() { + isVisibleStub = sinon.stub(systemTagsInfoView, 'isVisible'); + showStub = sinon.stub(systemTagsInfoView, 'show'); + hideStub = sinon.stub(systemTagsInfoView, 'hide'); + openDropdownStub = sinon.stub(systemTagsInfoView, 'openDropdown'); + }); + + afterEach(function() { + isVisibleStub.restore(); + showStub.restore(); + hideStub.restore(); + openDropdownStub.restore(); + }); + + it('shows a not visible SystemTagsInfoView', function() { + isVisibleStub.returns(false); + + view.$el.click(); + + expect(isVisibleStub.calledOnce).toBeTruthy(); + expect(showStub.calledOnce).toBeTruthy(); + expect(openDropdownStub.calledOnce).toBeTruthy(); + expect(openDropdownStub.calledAfter(showStub)).toBeTruthy(); + expect(hideStub.notCalled).toBeTruthy(); + }); + + it('hides a visible SystemTagsInfoView', function() { + isVisibleStub.returns(true); + + view.$el.click(); + + expect(isVisibleStub.calledOnce).toBeTruthy(); + expect(hideStub.calledOnce).toBeTruthy(); + expect(showStub.notCalled).toBeTruthy(); + expect(openDropdownStub.notCalled).toBeTruthy(); + }); + + }); + +}); diff --git a/apps/theming/css/settings-admin.css b/apps/theming/css/settings-admin.css index ef3c9f68b27..43d68b709a0 100644 --- a/apps/theming/css/settings-admin.css +++ b/apps/theming/css/settings-admin.css @@ -42,6 +42,8 @@ form.uploadButton { right: 0px; visibility: visible; } +#theming input[type='text']:hover + .theme-undo, +#theming input[type='text'] + .theme-undo:hover, #theming input[type='text']:focus + .theme-undo, #theming input[type='text']:active + .theme-undo { visibility: visible; diff --git a/apps/theming/l10n/es.js b/apps/theming/l10n/es.js index ccb44c8334a..755f1ebcaaa 100644 --- a/apps/theming/l10n/es.js +++ b/apps/theming/l10n/es.js @@ -15,6 +15,7 @@ OC.L10N.register( "Theming" : "Tema", "Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Los temas hacen posible personalizar fácilmente la apariencia de tu instancia y los clientes soportados. Esto será visible para todos los usuarios.", "Name" : "Nombre", + "Reset to default" : "Vovler a configuración por defecto", "Web address" : "Dirección web", "Web address https://…" : "Dirección web https://", "Slogan" : "Eslogan", @@ -23,6 +24,7 @@ OC.L10N.register( "Upload new logo" : "Subir nuevo logo", "Login image" : "Imagen de inicio", "Upload new login background" : "Subir una nueva imagen de fondo", + "Remove background image" : "Eliminar imagen de fondo", "reset to default" : "restaurar a configuración inicial", "Log in image" : "Imagen de inicio" }, diff --git a/apps/theming/l10n/es.json b/apps/theming/l10n/es.json index 1eec75aa113..500f521989c 100644 --- a/apps/theming/l10n/es.json +++ b/apps/theming/l10n/es.json @@ -13,6 +13,7 @@ "Theming" : "Tema", "Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users." : "Los temas hacen posible personalizar fácilmente la apariencia de tu instancia y los clientes soportados. Esto será visible para todos los usuarios.", "Name" : "Nombre", + "Reset to default" : "Vovler a configuración por defecto", "Web address" : "Dirección web", "Web address https://…" : "Dirección web https://", "Slogan" : "Eslogan", @@ -21,6 +22,7 @@ "Upload new logo" : "Subir nuevo logo", "Login image" : "Imagen de inicio", "Upload new login background" : "Subir una nueva imagen de fondo", + "Remove background image" : "Eliminar imagen de fondo", "reset to default" : "restaurar a configuración inicial", "Log in image" : "Imagen de inicio" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/theming/l10n/mn.js b/apps/theming/l10n/mn.js index 70c6bc8be34..01cae027e6b 100644 --- a/apps/theming/l10n/mn.js +++ b/apps/theming/l10n/mn.js @@ -2,7 +2,7 @@ OC.L10N.register( "theming", { "Loading preview…" : "Урьдчилсан харагдцыг дуудаж байна...", - "Saved" : "Хадгалагдсан", + "Saved" : "Хадгалах", "Admin" : "Админ", "a safe home for all your data" : "Таны өгөгдлүүдийн аюулгүй гэр", "The given name is too long" : "Өгсөн нэр хэтэрхий урт байна", diff --git a/apps/theming/l10n/mn.json b/apps/theming/l10n/mn.json index 4a85ba3e322..eb21a08a7c0 100644 --- a/apps/theming/l10n/mn.json +++ b/apps/theming/l10n/mn.json @@ -1,6 +1,6 @@ { "translations": { "Loading preview…" : "Урьдчилсан харагдцыг дуудаж байна...", - "Saved" : "Хадгалагдсан", + "Saved" : "Хадгалах", "Admin" : "Админ", "a safe home for all your data" : "Таны өгөгдлүүдийн аюулгүй гэр", "The given name is too long" : "Өгсөн нэр хэтэрхий урт байна", diff --git a/apps/twofactor_backupcodes/l10n/es.js b/apps/twofactor_backupcodes/l10n/es.js index 77f1609fc55..868eae3c546 100644 --- a/apps/twofactor_backupcodes/l10n/es.js +++ b/apps/twofactor_backupcodes/l10n/es.js @@ -13,6 +13,7 @@ OC.L10N.register( "You created two-factor backup codes for your account" : "Has creado códigos de respaldo de dos pasos para tu cuenta", "Backup code" : "Código de respaldo", "Use backup code" : "Usar código de respaldo", + "Two factor backup codes" : "Códigos de respaldo de dos pasos", "Second-factor backup codes" : "Códigos de respaldo de dos-factores" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/twofactor_backupcodes/l10n/es.json b/apps/twofactor_backupcodes/l10n/es.json index e56d3efa074..c1de69ba37e 100644 --- a/apps/twofactor_backupcodes/l10n/es.json +++ b/apps/twofactor_backupcodes/l10n/es.json @@ -11,6 +11,7 @@ "You created two-factor backup codes for your account" : "Has creado códigos de respaldo de dos pasos para tu cuenta", "Backup code" : "Código de respaldo", "Use backup code" : "Usar código de respaldo", + "Two factor backup codes" : "Códigos de respaldo de dos pasos", "Second-factor backup codes" : "Códigos de respaldo de dos-factores" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/updatenotification/l10n/es.js b/apps/updatenotification/l10n/es.js index e23c829b5ae..e9b77b9ae46 100644 --- a/apps/updatenotification/l10n/es.js +++ b/apps/updatenotification/l10n/es.js @@ -10,6 +10,7 @@ OC.L10N.register( "Update to %1$s is available." : "Actualización a %1$s esta disponible.", "Update for %1$s to version %2$s is available." : "La actualización de %1$s a la versión %2$s está disponible.", "Update for {app} to version %s is available." : "Actualización de {app} a la versión %s disponible.", + "Update notification" : "Notificación de actualización", "A new version is available: %s" : "Hay una nueva versión disponible: %s", "Open updater" : "Abrir el actualizador", "Download now" : "Descargar ahora", diff --git a/apps/updatenotification/l10n/es.json b/apps/updatenotification/l10n/es.json index 81dc8adb319..fa54dc1154f 100644 --- a/apps/updatenotification/l10n/es.json +++ b/apps/updatenotification/l10n/es.json @@ -8,6 +8,7 @@ "Update to %1$s is available." : "Actualización a %1$s esta disponible.", "Update for %1$s to version %2$s is available." : "La actualización de %1$s a la versión %2$s está disponible.", "Update for {app} to version %s is available." : "Actualización de {app} a la versión %s disponible.", + "Update notification" : "Notificación de actualización", "A new version is available: %s" : "Hay una nueva versión disponible: %s", "Open updater" : "Abrir el actualizador", "Download now" : "Descargar ahora", diff --git a/apps/updatenotification/l10n/it.js b/apps/updatenotification/l10n/it.js index a6eed3435ff..21526ec5a3b 100644 --- a/apps/updatenotification/l10n/it.js +++ b/apps/updatenotification/l10n/it.js @@ -8,6 +8,7 @@ OC.L10N.register( "Update to %1$s is available." : "Aggiornamento a %1$s disponibile.", "Update for %1$s to version %2$s is available." : "È disponibile l'aggiornamento di %1$s alla versione %2$s.", "Update for {app} to version %s is available." : "È disponibile l'aggiornamento di {app} alla versione %s.", + "Update notification" : "Notifiche di aggiornamento", "A new version is available: %s" : "Una nuova versione è disponibile: %s", "Open updater" : "Apri strumento di aggiornamento", "Download now" : "Scarica ora", diff --git a/apps/updatenotification/l10n/it.json b/apps/updatenotification/l10n/it.json index 4eab414e170..dbb14ff185a 100644 --- a/apps/updatenotification/l10n/it.json +++ b/apps/updatenotification/l10n/it.json @@ -6,6 +6,7 @@ "Update to %1$s is available." : "Aggiornamento a %1$s disponibile.", "Update for %1$s to version %2$s is available." : "È disponibile l'aggiornamento di %1$s alla versione %2$s.", "Update for {app} to version %s is available." : "È disponibile l'aggiornamento di {app} alla versione %s.", + "Update notification" : "Notifiche di aggiornamento", "A new version is available: %s" : "Una nuova versione è disponibile: %s", "Open updater" : "Apri strumento di aggiornamento", "Download now" : "Scarica ora", diff --git a/apps/user_ldap/l10n/it.js b/apps/user_ldap/l10n/it.js index 23a117a3ca8..059d38ab183 100644 --- a/apps/user_ldap/l10n/it.js +++ b/apps/user_ldap/l10n/it.js @@ -103,10 +103,12 @@ OC.L10N.register( "Saving" : "Salvataggio", "Back" : "Indietro", "Continue" : "Continua", + "Please renew your password." : "Rinnova la tua password.", "An internal error occurred." : "Si è verificato un errore interno.", "Current password" : "Password attuale", "New password" : "Nuova password", "Renew password" : "Rinnova la password", + "Wrong password. Reset it?" : "Password errata. Vuoi reimpostarla?", "Wrong password." : "Password errata.", "Cancel" : "Annulla", "LDAP" : "LDAP", diff --git a/apps/user_ldap/l10n/it.json b/apps/user_ldap/l10n/it.json index 495292e4c24..3896e02f9c8 100644 --- a/apps/user_ldap/l10n/it.json +++ b/apps/user_ldap/l10n/it.json @@ -101,10 +101,12 @@ "Saving" : "Salvataggio", "Back" : "Indietro", "Continue" : "Continua", + "Please renew your password." : "Rinnova la tua password.", "An internal error occurred." : "Si è verificato un errore interno.", "Current password" : "Password attuale", "New password" : "Nuova password", "Renew password" : "Rinnova la password", + "Wrong password. Reset it?" : "Password errata. Vuoi reimpostarla?", "Wrong password." : "Password errata.", "Cancel" : "Annulla", "LDAP" : "LDAP", diff --git a/apps/user_ldap/l10n/pt_BR.js b/apps/user_ldap/l10n/pt_BR.js index 05abcf5b492..52e6033fb78 100644 --- a/apps/user_ldap/l10n/pt_BR.js +++ b/apps/user_ldap/l10n/pt_BR.js @@ -27,7 +27,7 @@ OC.L10N.register( "Select groups" : "Selecionar grupos", "Select object classes" : "Selecionar classes de objetos", "Please check the credentials, they seem to be wrong." : "Por favor verifique as credenciais, elas parecem erradas.", - "Please specify the port, it could not be auto-detected." : "Por favor especifique uma porta, pois ela não pôde ser detectada automaticamente.", + "Please specify the port, it could not be auto-detected." : "Por favor especifique um porto, pois ela não pôde ser detectada automaticamente.", "Base DN could not be auto-detected, please revise credentials, host and port." : "A Base DN não pôde ser detectada automaticamente, por favor revise as credenciais, host e porta.", "Could not detect Base DN, please enter it manually." : "Não foi possível detectar a Base DN, por favor entre manualmente.", "{nthServer}. Server" : "{nthServer}. Servidor", diff --git a/apps/user_ldap/l10n/pt_BR.json b/apps/user_ldap/l10n/pt_BR.json index 32a55a5ac7c..ef7a88a156c 100644 --- a/apps/user_ldap/l10n/pt_BR.json +++ b/apps/user_ldap/l10n/pt_BR.json @@ -25,7 +25,7 @@ "Select groups" : "Selecionar grupos", "Select object classes" : "Selecionar classes de objetos", "Please check the credentials, they seem to be wrong." : "Por favor verifique as credenciais, elas parecem erradas.", - "Please specify the port, it could not be auto-detected." : "Por favor especifique uma porta, pois ela não pôde ser detectada automaticamente.", + "Please specify the port, it could not be auto-detected." : "Por favor especifique um porto, pois ela não pôde ser detectada automaticamente.", "Base DN could not be auto-detected, please revise credentials, host and port." : "A Base DN não pôde ser detectada automaticamente, por favor revise as credenciais, host e porta.", "Could not detect Base DN, please enter it manually." : "Não foi possível detectar a Base DN, por favor entre manualmente.", "{nthServer}. Server" : "{nthServer}. Servidor", diff --git a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php index 2966180f5a1..9891a4f719d 100644 --- a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php +++ b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php @@ -105,7 +105,6 @@ abstract class AbstractIntegrationTest { /** * initializes an LDAP user manager instance - * @return Manager */ protected function initUserManager() { $this->userManager = new Manager( @@ -115,7 +114,8 @@ abstract class AbstractIntegrationTest { \OC::$server->getAvatarManager(), new \OCP\Image(), \OC::$server->getDatabaseConnection(), - \OC::$server->getUserManager() + \OC::$server->getUserManager(), + \OC::$server->getNotificationManager() ); } diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php index 2411a46d8ee..87c2e408424 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php @@ -117,6 +117,11 @@ class IntegrationTestAccessGroupsMatchFilter extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestAccessGroupsMatchFilter($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php index 55b2eabedc2..be35556111f 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php @@ -49,7 +49,7 @@ class IntegrationTestAttributeDetection extends AbstractIntegrationTest { $groupMapper->clear(); $this->access->setGroupMapper($groupMapper); - $userBackend = new User_LDAP($this->access, \OC::$server->getConfig()); + $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); $userManager = \OC::$server->getUserManager(); $userManager->clearBackends(); $userManager->registerBackend($userBackend); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php index f433930bd26..0eef5507538 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php @@ -23,6 +23,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib; +use OC\ServerNotAvailableException; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; @@ -64,7 +65,7 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest { protected function case1() { try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -85,7 +86,7 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest { 'ldap_backup_port' => '32123', ]); $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return true; } return false; @@ -106,13 +107,18 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest { 'ldap_backup_port' => '', ]); $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return true; } return false; } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestBackupServer($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php index 89ce764e51a..24476c9a868 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php @@ -29,6 +29,9 @@ use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; require_once __DIR__ . '/../Bootstrap.php'; class IntegrationTestBatchApplyUserAttributes extends AbstractIntegrationTest { + /** @var UserMapping */ + protected $mapping; + /** * prepares the LDAP environment and sets up a test configuration for * the LDAP backend. @@ -68,6 +71,11 @@ class IntegrationTestBatchApplyUserAttributes extends AbstractIntegrationTest { } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestBatchApplyUserAttributes($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php index 44b16aed6a1..f4fc0f189b4 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php @@ -23,6 +23,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib; +use OC\ServerNotAvailableException; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; @@ -68,7 +69,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return true; } return false; @@ -87,7 +88,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -106,7 +107,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -125,7 +126,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -144,7 +145,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -161,6 +162,11 @@ class IntegrationTestConnect extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestConnect($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php index eb4a0a5c9cf..ebbe2197504 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php @@ -61,6 +61,11 @@ class IntegrationTestCountUsersByLoginName extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestCountUsersByLoginName($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php index 25b7cf83f99..5dda79c2ec0 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php @@ -47,7 +47,7 @@ class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest { $this->mapping = new UserMapping(\OC::$server->getDatabaseConnection()); $this->mapping->clear(); $this->access->setUserMapper($this->mapping); - $this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); } /** @@ -74,6 +74,11 @@ class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest { } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestFetchUsersByLoginName($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php index 2f14b0d1c1b..44ee1c3bb5c 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php @@ -44,7 +44,7 @@ class IntegrationTestPaging extends AbstractIntegrationTest { require(__DIR__ . '/../setup-scripts/createExplicitUsers.php'); parent::init(); - $this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); } /** @@ -76,6 +76,11 @@ class IntegrationTestPaging extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestPaging($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php index 57c48fa18e0..9226c56ee89 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php @@ -23,10 +23,13 @@ namespace OCA\User_LDAP\Tests\Integration\Lib; +use OCA\User_LDAP\FilesystemHelper; +use OCA\User_LDAP\LogWrapper; use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; +use OCP\Image; require_once __DIR__ . '/../Bootstrap.php'; @@ -48,7 +51,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { $this->mapping = new UserMapping(\OC::$server->getDatabaseConnection()); $this->mapping->clear(); $this->access->setUserMapper($this->mapping); - $this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); } /** @@ -68,12 +71,13 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { protected function initUserManager() { $this->userManager = new LDAPUserManager( \OC::$server->getConfig(), - new \OCA\User_LDAP\FilesystemHelper(), - new \OCA\User_LDAP\LogWrapper(), + new FilesystemHelper(), + new LogWrapper(), \OC::$server->getAvatarManager(), - new \OCP\Image(), + new Image(), \OC::$server->getDatabaseConnection(), - \OC::$server->getUserManager() + \OC::$server->getUserManager(), + \OC::$server->getNotificationManager() ); } @@ -169,6 +173,11 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestUserHome($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php index 3fb5a67591b..1710f519158 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php @@ -25,9 +25,14 @@ namespace OCA\User_LDAP\Tests\Integration\Lib\User; +use OCA\User_LDAP\FilesystemHelper; +use OCA\User_LDAP\LogWrapper; +use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\User; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; +use OCA\User_LDAP\User_LDAP; +use OCP\Image; require_once __DIR__ . '/../../Bootstrap.php'; @@ -45,7 +50,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { $this->mapping = new UserMapping(\OC::$server->getDatabaseConnection()); $this->mapping->clear(); $this->access->setUserMapper($this->mapping); - $userBackend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); \OC_User::useBackend($userBackend); } @@ -123,12 +128,12 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { } protected function initUserManager() { - $this->userManager = new \OCA\User_LDAP\User\Manager( + $this->userManager = new Manager( \OC::$server->getConfig(), - new \OCA\User_LDAP\FilesystemHelper(), - new \OCA\User_LDAP\LogWrapper(), + new FilesystemHelper(), + new LogWrapper(), \OC::$server->getAvatarManager(), - new \OCP\Image(), + new Image(), \OC::$server->getDatabaseConnection(), \OC::$server->getUserManager(), \OC::$server->getNotificationManager() @@ -149,6 +154,11 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestUserAvatar($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php index 616bf410e04..886b0b46f0e 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php @@ -101,6 +101,11 @@ class IntegrationTestUserDisplayName extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestUserDisplayName($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/run-all.sh b/apps/user_ldap/tests/Integration/run-all.sh new file mode 100755 index 00000000000..02bab97e45f --- /dev/null +++ b/apps/user_ldap/tests/Integration/run-all.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +trigger_notification() { + which notify-send 1>/dev/null + if [[ $? == 1 ]] ; then + return + fi + export NOTIFY_USER=$SUDO_USER + export RESULT_STR=$1 + # does not work. just pipe result into a non-sudo cmd + su "$NOTIFY_USER" -c "notify-send -u normal -t 43200000 -a Nextcloud -i Nextcloud \"LDAP Integration tests $RESULT_STR\"" +} + +FILES_ROOT=($(ls -d -p Lib/* | grep -v "/$")) +FILES_USER=($(ls -d -p Lib/User/* | grep -v "/$")) +# TODO: Loop through dirs (and subdirs?) once there are more +TESTFILES=("${FILES_ROOT[@]}" "${FILES_USER[@]}") + +TESTCMD="./run-test.sh" + +echo "Running " ${#TESTFILES[@]} " tests" +for TESTFILE in "${TESTFILES[@]}" ; do + echo -n "Test: $TESTFILE… " + STATE=`$TESTCMD "$TESTFILE" | grep -c "Tests succeeded"` + if [ "$STATE" -eq 0 ] ; then + echo "failed!" + trigger_notification "failed" + exit 1 + fi + echo "succeeded" +done + +echo -e "\nAll tests succeeded" +trigger_notification "succeeded" diff --git a/apps/workflowengine/l10n/ca.js b/apps/workflowengine/l10n/ca.js index c8de2819b34..f2ff19972a5 100644 --- a/apps/workflowengine/l10n/ca.js +++ b/apps/workflowengine/l10n/ca.js @@ -59,6 +59,7 @@ OC.L10N.register( "Check %s is invalid" : "Comprovació %s no és vàlid", "Check #%s does not exist" : "Comprovació #%s no existeix", "Workflow" : "Flux de treball", + "Files workflow engine" : "Fitxers del motor de flux de treball", "Open documentation" : "Obrir documentació", "Add rule group" : "Afegeix una regla de grup", "Short rule description" : "Descripció breu de regla", diff --git a/apps/workflowengine/l10n/ca.json b/apps/workflowengine/l10n/ca.json index d142823c0bb..777ff20e3ca 100644 --- a/apps/workflowengine/l10n/ca.json +++ b/apps/workflowengine/l10n/ca.json @@ -57,6 +57,7 @@ "Check %s is invalid" : "Comprovació %s no és vàlid", "Check #%s does not exist" : "Comprovació #%s no existeix", "Workflow" : "Flux de treball", + "Files workflow engine" : "Fitxers del motor de flux de treball", "Open documentation" : "Obrir documentació", "Add rule group" : "Afegeix una regla de grup", "Short rule description" : "Descripció breu de regla", diff --git a/apps/workflowengine/l10n/de_DE.js b/apps/workflowengine/l10n/de_DE.js index 96b8e6b546b..92184e24819 100644 --- a/apps/workflowengine/l10n/de_DE.js +++ b/apps/workflowengine/l10n/de_DE.js @@ -3,7 +3,7 @@ OC.L10N.register( { "Saved" : "Gespeichert", "Saving failed:" : "Speichern fehlgeschlagen:", - "File MIME type" : "Datei MIME Typ", + "File MIME type" : "Datei MIME-Typ", "is" : "ist", "is not" : "ist nicht", "matches" : "passt zu", diff --git a/apps/workflowengine/l10n/de_DE.json b/apps/workflowengine/l10n/de_DE.json index 060b6c92e96..69a00cc8a9b 100644 --- a/apps/workflowengine/l10n/de_DE.json +++ b/apps/workflowengine/l10n/de_DE.json @@ -1,7 +1,7 @@ { "translations": { "Saved" : "Gespeichert", "Saving failed:" : "Speichern fehlgeschlagen:", - "File MIME type" : "Datei MIME Typ", + "File MIME type" : "Datei MIME-Typ", "is" : "ist", "is not" : "ist nicht", "matches" : "passt zu", diff --git a/apps/workflowengine/l10n/es.js b/apps/workflowengine/l10n/es.js index 8fa1d6dbd10..9fee87355a4 100644 --- a/apps/workflowengine/l10n/es.js +++ b/apps/workflowengine/l10n/es.js @@ -59,6 +59,7 @@ OC.L10N.register( "Check %s is invalid" : "Chequeo %s no es valido", "Check #%s does not exist" : "El chequeo #%s no existe", "Workflow" : "Flujo de trabajo", + "Files workflow engine" : "Motor de flujo de trabajo de archivos", "Open documentation" : "Documentación abierta", "Add rule group" : "Añadir regla al grupo", "Short rule description" : "Descripción de la regla corta", diff --git a/apps/workflowengine/l10n/es.json b/apps/workflowengine/l10n/es.json index d782e00360b..20f4fc8741a 100644 --- a/apps/workflowengine/l10n/es.json +++ b/apps/workflowengine/l10n/es.json @@ -57,6 +57,7 @@ "Check %s is invalid" : "Chequeo %s no es valido", "Check #%s does not exist" : "El chequeo #%s no existe", "Workflow" : "Flujo de trabajo", + "Files workflow engine" : "Motor de flujo de trabajo de archivos", "Open documentation" : "Documentación abierta", "Add rule group" : "Añadir regla al grupo", "Short rule description" : "Descripción de la regla corta", |