├── img ├── icon.png ├── sample-empty.png ├── sample-new.png ├── notifications.png ├── notifications-new.png ├── notifications-dark.png ├── notifications-grey.png ├── notifications-new-dark.png ├── notifications-new-grey.png ├── notifications.svg ├── notifications-dark.svg ├── notifications-grey.svg ├── notifications-new.svg ├── notifications-new-dark.svg └── notifications-new-grey.svg ├── vendor-bin ├── phan │ └── composer.json ├── phpstan │ └── composer.json ├── owncloud-codestyle │ └── composer.json ├── php_codesniffer │ └── composer.json └── behat │ └── composer.json ├── phpstan.neon ├── l10n ├── .tx │ └── config ├── zh_TW.json ├── zh-Hans.json ├── zh_CN.json ├── zh_HK.json ├── zh_TW.js ├── zh-Hans.js ├── zh_CN.js ├── zh_HK.js ├── ko.json ├── ja.json ├── ko.js ├── ja.js ├── nb_NO.json ├── nb_NO.js ├── he.json ├── he.js ├── en_GB.json ├── en_US.json ├── id.json ├── en_GB.js ├── en_US.js ├── id.js ├── th_TH.json ├── ug.json ├── th_TH.js ├── ar.json ├── eu.json ├── ia.json ├── ug.js ├── bg_BG.json ├── ar.js ├── sq.json ├── gl.json ├── eu.js ├── ia.js ├── mk.json ├── bg_BG.js ├── cs_CZ.json ├── sq.js ├── gl.js ├── hu_HU.json ├── tr.json ├── mk.js ├── nl.json ├── pt_PT.json ├── cs_CZ.js ├── pt_BR.json ├── is.json ├── tr.js ├── hu_HU.js ├── nl.js ├── pt_PT.js ├── pt_BR.js ├── is.js ├── it.json ├── it.js ├── es.json ├── es.js ├── el.json ├── de.json ├── de_DE.json ├── de_CH.json ├── fr.json ├── pl.json ├── el.js ├── de.js ├── de_DE.js ├── ru.json ├── de_CH.js ├── fr.js ├── ru_RU.json ├── pl.js ├── ru.js └── ru_RU.js ├── .php-cs-fixer.dist.php ├── templates ├── mail │ ├── plaintextmail.php │ └── htmlmail.php └── panels │ └── personal │ └── notifications.php ├── tests ├── unit │ ├── bootstrap.php │ ├── CapabilitiesTest.php │ ├── AppInfo │ │ └── RoutesTest.php │ ├── TestCase.php │ ├── Command │ │ └── RepairNotificationsTest.php │ ├── AppTest.php │ └── Configuration │ │ └── OptionsStorageTest.php └── acceptance │ ├── features │ ├── apiNotifications │ │ ├── delete-notifications.feature │ │ ├── statuscodes.feature │ │ └── email-notifications.feature │ ├── bootstrap │ │ └── bootstrap.php │ └── webUINotifications │ │ ├── displayAdminNotificationsOnWebUI.feature │ │ └── displayNotificationsOnWebUI.feature │ └── config │ └── behat.yml ├── composer.json ├── appinfo ├── Migrations │ ├── Version20170801152524.php │ ├── Version20180119080933.php │ ├── Version20180604132522.php │ └── Version20170801085340.php ├── info.xml ├── app.php └── routes.php ├── phpunit.xml ├── .gitignore ├── lib ├── Capabilities.php ├── Notifier.php ├── App.php ├── Command │ └── RepairNotifications.php ├── Panels │ └── Personal │ │ └── NotificationsPanel.php └── AppInfo │ └── Application.php ├── sonar-project.properties ├── CONTRIBUTING.md ├── README.md ├── js └── personal_settings.js ├── .github └── issue_template.md ├── CHANGELOG.md ├── composer.lock └── css └── styles.css /img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/icon.png -------------------------------------------------------------------------------- /img/sample-empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/sample-empty.png -------------------------------------------------------------------------------- /img/sample-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/sample-new.png -------------------------------------------------------------------------------- /img/notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/notifications.png -------------------------------------------------------------------------------- /img/notifications-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/notifications-new.png -------------------------------------------------------------------------------- /vendor-bin/phan/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phan/phan": "^5.4" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /img/notifications-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/notifications-dark.png -------------------------------------------------------------------------------- /img/notifications-grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/notifications-grey.png -------------------------------------------------------------------------------- /img/notifications-new-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/notifications-new-dark.png -------------------------------------------------------------------------------- /img/notifications-new-grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/notifications/HEAD/img/notifications-new-grey.png -------------------------------------------------------------------------------- /vendor-bin/phpstan/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpstan/phpstan": "^1.10" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor-bin/owncloud-codestyle/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "owncloud/coding-standard": "^4.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor-bin/php_codesniffer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "squizlabs/php_codesniffer": "^3.7" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | inferPrivatePropertyTypeFromConstructor: true 3 | bootstrapFiles: 4 | - %currentWorkingDirectory%/../../lib/base.php 5 | excludePaths: 6 | - %currentWorkingDirectory%/appinfo/Migrations/*.php 7 | ignoreErrors: 8 | -------------------------------------------------------------------------------- /l10n/.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | lang_map = ja_JP: ja 4 | 5 | [o:owncloud-org:p:owncloud:r:notifications] 6 | file_filter = /notifications.po 7 | source_file = templates/notifications.pot 8 | source_lang = en 9 | type = PO 10 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | setUsingCache(true) 7 | ->getFinder() 8 | ->exclude('l10n') 9 | ->exclude('vendor') 10 | ->exclude('vendor-bin') 11 | ->notPath('/^c3.php/') 12 | ->in(__DIR__); 13 | 14 | return $config; 15 | -------------------------------------------------------------------------------- /templates/mail/plaintextmail.php: -------------------------------------------------------------------------------- 1 | t('Hello,')); ?> 2 | 3 | 4 | 5 | 6 | 7 | 8 | t('See %s on %s for more information', [$_['serverUrl'], $theme->getName()])); ?> 9 | 10 | 11 | inc('plain.mail.footer', ['app' => 'core'])); ?> 12 | -------------------------------------------------------------------------------- /tests/unit/bootstrap.php: -------------------------------------------------------------------------------- 1 | addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); 9 | // load notification unit test classes 10 | \OC::$composerAutoloader->addPsr4('OCA\\Notifications\\Tests\\Unit\\', __DIR__, true); 11 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "owncloud/notifications", 3 | "config": { 4 | "platform": { 5 | "php": "7.3" 6 | }, 7 | "allow-plugins": { 8 | "bamarni/composer-bin-plugin": true 9 | } 10 | }, 11 | "require": {}, 12 | "require-dev": { 13 | "bamarni/composer-bin-plugin": "^1.8" 14 | }, 15 | "extra": { 16 | "bamarni-bin": { 17 | "bin-links": false 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /img/notifications.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /img/notifications-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /img/notifications-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /appinfo/Migrations/Version20170801152524.php: -------------------------------------------------------------------------------- 1 | getTable("{$prefix}notifications"); 15 | if ($table->hasColumn('icon')) { 16 | return; 17 | } 18 | $table->addColumn('icon', Type::STRING, ['length' => 4000, 'notNull' => false]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /appinfo/Migrations/Version20180119080933.php: -------------------------------------------------------------------------------- 1 | getTable("{$prefix}notifications"); 16 | $column = $table->getColumn('message'); 17 | $column->setNotnull(false); 18 | $column = $table->getColumn('link'); 19 | $column->setNotnull(false); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor-bin/behat/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "config" : { 3 | "platform": { 4 | "php": "7.4" 5 | } 6 | }, 7 | "require": { 8 | "behat/behat": "^3.13", 9 | "behat/mink": "1.7.1", 10 | "friends-of-behat/mink-extension": "^2.7", 11 | "behat/mink-selenium2-driver": "^1.5", 12 | "ciaranmcnulty/behat-stepthroughextension" : "dev-master", 13 | "rdx/behat-variables": "^1.2", 14 | "sensiolabs/behat-page-object-extension": "^2.3", 15 | "symfony/translation": "^5.4", 16 | "sabre/xml": "^2.2", 17 | "guzzlehttp/guzzle": "^7.7", 18 | "phpunit/phpunit": "^9.6", 19 | "helmich/phpunit-json-assert": "^3.4" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /appinfo/Migrations/Version20180604132522.php: -------------------------------------------------------------------------------- 1 | getTable("{$prefix}notifications"); 16 | $column = $table->getColumn('object_id'); 17 | if ($column->getType() === Type::getType(Type::INTEGER)) { 18 | $column->setType(Type::getType(Type::STRING)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /img/notifications-new.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /img/notifications-new-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /img/notifications-new-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/unit 15 | 16 | 17 | 18 | 19 | lib 20 | appinfo 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # just sane ignores 2 | .*.sw[po] 3 | *.bak 4 | *.BAK 5 | *~ 6 | *.orig 7 | *.class 8 | .cvsignore 9 | Thumbs.db 10 | *.py[co] 11 | _darcs/* 12 | CVS/* 13 | .svn/* 14 | RCS/* 15 | *.backup* 16 | 17 | # kdevelop 18 | .kdev 19 | *.kdev4 20 | *.kate-swp 21 | 22 | # Lokalize 23 | *lokalize* 24 | 25 | # eclipse 26 | .project 27 | .settings 28 | 29 | # netbeans 30 | nbproject 31 | 32 | # phpStorm 33 | .idea 34 | *.iml 35 | 36 | # geany 37 | *.geany 38 | 39 | # Cloud9IDE 40 | .settings.xml 41 | .c9revisions 42 | 43 | # vim ex mode 44 | .vimrc 45 | 46 | # Mac OS 47 | .DS_Store 48 | 49 | # WebFinger 50 | .well-known 51 | /.buildpath 52 | 53 | .php_cs.cache 54 | .php-cs-fixer.cache 55 | 56 | # Composer 57 | vendor/ 58 | vendor-bin/**/vendor 59 | vendor-bin/**/composer.lock 60 | 61 | # Tests - auto-generated files 62 | /tests/Unit/js/node_modules 63 | /tests/output 64 | /tests/acceptance/output 65 | .phpunit.result.cache 66 | 67 | build 68 | 69 | # SonarCloud scanner 70 | .scannerwork 71 | 72 | # Generated from .drone.star 73 | .drone.yml 74 | -------------------------------------------------------------------------------- /tests/acceptance/features/apiNotifications/delete-notifications.feature: -------------------------------------------------------------------------------- 1 | @api 2 | Feature: delete-notifications 3 | 4 | Background: 5 | Given user "Alice" has been created with default attributes and without skeleton files 6 | And using OCS API version "2" 7 | 8 | 9 | Scenario: Delete first notification 10 | When user "Alice" is sent a notification 11 | And user "Alice" is sent another notification 12 | And user "Alice" is sent another notification 13 | Then user "Alice" should have 3 notifications 14 | When user "Alice" deletes the first notification 15 | Then user "Alice" should have 2 notifications missing the first one 16 | 17 | 18 | Scenario: Delete last notification 19 | When user "Alice" is sent a notification 20 | And user "Alice" is sent another notification 21 | And user "Alice" is sent another notification 22 | Then user "Alice" should have 3 notifications 23 | When user "Alice" deletes the last notification 24 | Then user "Alice" should have 2 notifications missing the last one 25 | -------------------------------------------------------------------------------- /templates/panels/personal/notifications.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

t('Mail Notifications'));?>

4 | 5 |

t('You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:')); ?>

6 | 13 | 14 | 15 |

t('It was not possible to get your session. Please, try reloading the page or logout and login again')); ?>

16 | 17 |

t('To be able to receive mail notifications it is required to specify an email address for your account.')); ?>

18 |
19 | -------------------------------------------------------------------------------- /l10n/zh_TW.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "通知", 3 | "No notifications" : "無通知", 4 | "Dismiss" : "忽略", 5 | "Admin notifications" : "管理者通知", 6 | "Unknown user session. It is not possible to set the option" : "未知的用戶連線,無法設置選項。", 7 | "Option not supported" : "不支援的項目", 8 | "Saved" : "已儲存", 9 | "Incomplete data" : "資料不完整", 10 | "Do not notify via mail" : "不要透過郵件通知", 11 | "Notify only when an action is required" : "當需要執行動作時才通知", 12 | "Notify about all events" : "通知所有事件", 13 | "Choose an option" : "選擇一個選項", 14 | "Hello," : "嗨", 15 | "See %s on %s for more information" : "看%s上%s了解更多信息", 16 | "See %s on %s for more information" : "看%s上%s了解更多信息", 17 | "Mail Notifications" : "郵件通知", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以選擇需要以郵件方式通知的事件類型。有些事件類型只提供資訊,有些則需要採取行動(如接受/拒絕)。在下面選擇您的偏好:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "無法進行連線,請嘗試重新整理頁面或重新登入。", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "為了能夠接收郵件通知,需要為您的帳戶指定電子郵件地址。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /l10n/zh-Hans.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "通知", 3 | "No notifications" : "無通知", 4 | "Dismiss" : "忽略", 5 | "Admin notifications" : "管理者通知", 6 | "Unknown user session. It is not possible to set the option" : "未知的用户会话。无法设置该选项。", 7 | "Option not supported" : "不支援的項目", 8 | "Saved" : "已儲存", 9 | "Incomplete data" : "数据不完整", 10 | "Do not notify via mail" : "不要透過email通知", 11 | "Notify only when an action is required" : "當需要執行動作時才通知", 12 | "Notify about all events" : "通知所有事件", 13 | "Choose an option" : "選擇一個選項", 14 | "Hello," : "您好,", 15 | "See %s on %s for more information" : "看%s上%s了解更多信息", 16 | "See %s on %s for more information" : "看%s上%s了解更多信息", 17 | "Mail Notifications" : "郵件通知", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以选择通过邮件来通知您事件。 有些事件包含信息,有些则需要进行操作(如“接受”或“拒绝”)。 在下面选择您的偏好:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "无法获取您的会话。请尝试重新载入页面或注销后重新登录。", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "若要接收邮件通知,必须指定您账户的邮件地址。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /l10n/zh_CN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "通知", 3 | "No notifications" : "无通知", 4 | "Dismiss" : "忽略", 5 | "Admin notifications" : "管理员通知", 6 | "Unknown user session. It is not possible to set the option" : "未知的用户会话。无法设置该选项。", 7 | "Option not supported" : "不支持的选项", 8 | "Saved" : "已保存", 9 | "Incomplete data" : "数据不完整", 10 | "Do not notify via mail" : "不以邮件通知", 11 | "Notify only when an action is required" : "只有需要采取行动时通知", 12 | "Notify about all events" : "通知关于所有事件", 13 | "Choose an option" : "选择个选项", 14 | "Hello," : "你好,", 15 | "See %s on %s for more information" : "阅读%s上的%s获得更过信息", 16 | "See %s on %s for more information" : "阅读%s上的%s获得更多信息", 17 | "Mail Notifications" : "邮件通知", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以选择通过邮件来通知您事件。 有些事件包含信息,有些则需要进行操作(如“接受”或“拒绝”)。 在下面选择您的偏好:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "无法获取您的会话。请尝试重新载入页面或注销后重新登录。", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "若要接收邮件通知,必须指定您账户的邮件地址。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /l10n/zh_HK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "通知", 3 | "No notifications" : "無通知", 4 | "Dismiss" : "忽略", 5 | "Admin notifications" : "管理者通知", 6 | "Unknown user session. It is not possible to set the option" : "未知的用户会话。无法设置该选项。", 7 | "Option not supported" : "不支援的項目", 8 | "Saved" : "已儲存", 9 | "Incomplete data" : "数据不完整", 10 | "Do not notify via mail" : "不要透過email通知", 11 | "Notify only when an action is required" : "當需要執行動作時才通知", 12 | "Notify about all events" : "通知所有事件", 13 | "Choose an option" : "選擇一個選項", 14 | "Hello," : "您好,", 15 | "See %s on %s for more information" : "看%s上%s了解更多信息", 16 | "See %s on %s for more information" : "看%s上%s了解更多信息", 17 | "Mail Notifications" : "郵件通知", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以选择通过邮件来通知您事件。 有些事件包含信息,有些则需要进行操作(如“接受”或“拒绝”)。 在下面选择您的偏好:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "无法获取您的会话。请尝试重新载入页面或注销后重新登录。", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "若要接收邮件通知,必须指定您账户的邮件地址。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /tests/acceptance/features/bootstrap/bootstrap.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright Copyright (c) 2018 Artur Neumann info@jankaritech.com 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 10 | * License as published by the Free Software Foundation; either 11 | * version 3 of the License, or any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public 19 | * License along with this library. If not, see . 20 | * 21 | */ 22 | require_once __DIR__ . '/../../../../../../tests/acceptance/features/bootstrap/bootstrap.php'; 23 | 24 | $classLoader = new \Composer\Autoload\ClassLoader(); 25 | $classLoader->addPsr4("Page\\", __DIR__ . "/../lib", true); 26 | $classLoader->addPsr4( 27 | "", 28 | __DIR__ . "/../../../../../../tests/acceptance/features/bootstrap", 29 | true 30 | ); 31 | 32 | $classLoader->register(); 33 | -------------------------------------------------------------------------------- /l10n/zh_TW.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "通知", 5 | "No notifications" : "無通知", 6 | "Dismiss" : "忽略", 7 | "Admin notifications" : "管理者通知", 8 | "Unknown user session. It is not possible to set the option" : "未知的用戶連線,無法設置選項。", 9 | "Option not supported" : "不支援的項目", 10 | "Saved" : "已儲存", 11 | "Incomplete data" : "資料不完整", 12 | "Do not notify via mail" : "不要透過郵件通知", 13 | "Notify only when an action is required" : "當需要執行動作時才通知", 14 | "Notify about all events" : "通知所有事件", 15 | "Choose an option" : "選擇一個選項", 16 | "Hello," : "嗨", 17 | "See %s on %s for more information" : "看%s上%s了解更多信息", 18 | "See %s on %s for more information" : "看%s上%s了解更多信息", 19 | "Mail Notifications" : "郵件通知", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以選擇需要以郵件方式通知的事件類型。有些事件類型只提供資訊,有些則需要採取行動(如接受/拒絕)。在下面選擇您的偏好:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "無法進行連線,請嘗試重新整理頁面或重新登入。", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "為了能夠接收郵件通知,需要為您的帳戶指定電子郵件地址。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /tests/acceptance/config/behat.yml: -------------------------------------------------------------------------------- 1 | default: 2 | autoload: 3 | '': '%paths.base%/../features/bootstrap' 4 | 5 | suites: 6 | apiNotifications: 7 | paths: 8 | - '%paths.base%/../features/apiNotifications' 9 | contexts: 10 | - NotificationsContext: 11 | - NotificationsCoreContext: 12 | - EmailContext: 13 | - FeatureContext: &common_feature_context_params 14 | baseUrl: http://localhost:8080 15 | adminUsername: admin 16 | adminPassword: admin 17 | regularUserPassword: 123456 18 | ocPath: apps/testing/api/v1/occ 19 | 20 | webUINotifications: 21 | paths: 22 | - '%paths.base%/../features/webUINotifications' 23 | contexts: 24 | - NotificationsContext: 25 | - NotificationsCoreContext: 26 | - FeatureContext: *common_feature_context_params 27 | - WebUINotificationsContext: 28 | - WebUIGeneralContext: 29 | - WebUILoginContext: 30 | 31 | cliNotifications: 32 | paths: 33 | - '%paths.base%/../features/cliNotifications' 34 | contexts: 35 | - NotificationsContext: 36 | - NotificationsCoreContext: 37 | - FeatureContext: *common_feature_context_params 38 | - OccContext: 39 | 40 | extensions: 41 | Cjm\Behat\StepThroughExtension: ~ 42 | -------------------------------------------------------------------------------- /l10n/zh-Hans.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "通知", 5 | "No notifications" : "無通知", 6 | "Dismiss" : "忽略", 7 | "Admin notifications" : "管理者通知", 8 | "Unknown user session. It is not possible to set the option" : "未知的用户会话。无法设置该选项。", 9 | "Option not supported" : "不支援的項目", 10 | "Saved" : "已儲存", 11 | "Incomplete data" : "数据不完整", 12 | "Do not notify via mail" : "不要透過email通知", 13 | "Notify only when an action is required" : "當需要執行動作時才通知", 14 | "Notify about all events" : "通知所有事件", 15 | "Choose an option" : "選擇一個選項", 16 | "Hello," : "您好,", 17 | "See %s on %s for more information" : "看%s上%s了解更多信息", 18 | "See %s on %s for more information" : "看%s上%s了解更多信息", 19 | "Mail Notifications" : "郵件通知", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以选择通过邮件来通知您事件。 有些事件包含信息,有些则需要进行操作(如“接受”或“拒绝”)。 在下面选择您的偏好:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "无法获取您的会话。请尝试重新载入页面或注销后重新登录。", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "若要接收邮件通知,必须指定您账户的邮件地址。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /l10n/zh_CN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "通知", 5 | "No notifications" : "无通知", 6 | "Dismiss" : "忽略", 7 | "Admin notifications" : "管理员通知", 8 | "Unknown user session. It is not possible to set the option" : "未知的用户会话。无法设置该选项。", 9 | "Option not supported" : "不支持的选项", 10 | "Saved" : "已保存", 11 | "Incomplete data" : "数据不完整", 12 | "Do not notify via mail" : "不以邮件通知", 13 | "Notify only when an action is required" : "只有需要采取行动时通知", 14 | "Notify about all events" : "通知关于所有事件", 15 | "Choose an option" : "选择个选项", 16 | "Hello," : "你好,", 17 | "See %s on %s for more information" : "阅读%s上的%s获得更过信息", 18 | "See %s on %s for more information" : "阅读%s上的%s获得更多信息", 19 | "Mail Notifications" : "邮件通知", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以选择通过邮件来通知您事件。 有些事件包含信息,有些则需要进行操作(如“接受”或“拒绝”)。 在下面选择您的偏好:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "无法获取您的会话。请尝试重新载入页面或注销后重新登录。", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "若要接收邮件通知,必须指定您账户的邮件地址。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /l10n/zh_HK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "通知", 5 | "No notifications" : "無通知", 6 | "Dismiss" : "忽略", 7 | "Admin notifications" : "管理者通知", 8 | "Unknown user session. It is not possible to set the option" : "未知的用户会话。无法设置该选项。", 9 | "Option not supported" : "不支援的項目", 10 | "Saved" : "已儲存", 11 | "Incomplete data" : "数据不完整", 12 | "Do not notify via mail" : "不要透過email通知", 13 | "Notify only when an action is required" : "當需要執行動作時才通知", 14 | "Notify about all events" : "通知所有事件", 15 | "Choose an option" : "選擇一個選項", 16 | "Hello," : "您好,", 17 | "See %s on %s for more information" : "看%s上%s了解更多信息", 18 | "See %s on %s for more information" : "看%s上%s了解更多信息", 19 | "Mail Notifications" : "郵件通知", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "您可以选择通过邮件来通知您事件。 有些事件包含信息,有些则需要进行操作(如“接受”或“拒绝”)。 在下面选择您的偏好:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "无法获取您的会话。请尝试重新载入页面或注销后重新登录。", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "若要接收邮件通知,必须指定您账户的邮件地址。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /tests/unit/CapabilitiesTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Thomas Müller 5 | * 6 | * @copyright Copyright (c) 2016, ownCloud, Inc. 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Notifications\Tests\Unit; 24 | 25 | use OCA\Notifications\Capabilities; 26 | 27 | class CapabilitiesTest extends TestCase { 28 | public function testGetCapabilities() { 29 | $capabilities = new Capabilities(); 30 | 31 | $this->assertSame([ 32 | 'notifications' => [ 33 | 'ocs-endpoints' => [ 34 | 'list', 35 | 'get', 36 | 'delete', 37 | ], 38 | ], 39 | ], $capabilities->getCapabilities()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/Capabilities.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2016, ownCloud, Inc. 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Notifications; 23 | 24 | use OCP\Capabilities\ICapability; 25 | 26 | /** 27 | * Class Capabilities 28 | * 29 | * @package OCA\Notifications 30 | */ 31 | class Capabilities implements ICapability { 32 | /** 33 | * Return this classes capabilities 34 | * 35 | * @return array 36 | */ 37 | public function getCapabilities() { 38 | return [ 39 | 'notifications' => [ 40 | 'ocs-endpoints' => [ 41 | 'list', 42 | 'get', 43 | 'delete', 44 | ], 45 | ], 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /templates/mail/htmlmail.php: -------------------------------------------------------------------------------- 1 | 2 | 35 |
3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 |
  7 | <?php p($theme->getName()); ?> 8 |
 
  14 | t('Hello,')); ?> 15 |
16 | 17 | 18 |

19 | 20 | t('See %s on %s for more information', [$_['serverUrl'], $_['serverUrl'], $theme->getName()])); ?> 21 |
 
  27 | inc('html.mail.footer', ['app' => 'core'])); ?> 28 |
 
34 |
36 | -------------------------------------------------------------------------------- /tests/unit/AppInfo/RoutesTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Thomas Müller 5 | * 6 | * @copyright Copyright (c) 2016, ownCloud, Inc. 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Notifications\Tests\Unit\AppInfo; 24 | 25 | use OCA\Notifications\Tests\Unit\TestCase; 26 | 27 | /** 28 | * Class RoutesTest 29 | * 30 | * @group DB 31 | * @package OCA\Notifications\Tests\AppInfo 32 | */ 33 | class RoutesTest extends TestCase { 34 | public function testRoutes() { 35 | // Execute so we know that no error occurred 36 | include(__DIR__ . '/../../../appinfo/routes.php'); 37 | $this->assertTrue(true); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/acceptance/features/apiNotifications/statuscodes.feature: -------------------------------------------------------------------------------- 1 | @api 2 | Feature: statuscodes 3 | 4 | Background: 5 | Given user "Alice" has been created with default attributes and without skeleton files 6 | And as user "Alice" 7 | And using OCS API version "2" 8 | 9 | 10 | Scenario: Status code when reading notifications with notifiers and without notifications 11 | When the user sends HTTP method "GET" to OCS API endpoint "/apps/notifications/api/v1/notifications?format=json" 12 | Then the HTTP status code should be "200" 13 | And the list of notifications should have 0 entries 14 | 15 | 16 | Scenario: Status code when reading notifications with notifiers and notification 17 | Given user "Alice" has been sent a notification 18 | When the user sends HTTP method "GET" to OCS API endpoint "/apps/notifications/api/v1/notifications?format=json" 19 | Then the HTTP status code should be "200" 20 | And the list of notifications should have 1 entry 21 | 22 | 23 | Scenario: Status code when reading notifications with notifiers and notifications 24 | Given user "Alice" has been sent a notification 25 | And user "Alice" has been sent a notification 26 | And user "Alice" has been sent a notification 27 | When the user sends HTTP method "GET" to OCS API endpoint "/apps/notifications/api/v1/notifications?format=json" 28 | Then the HTTP status code should be "200" 29 | And the list of notifications should have 3 entries 30 | -------------------------------------------------------------------------------- /l10n/ko.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "알림", 3 | "No notifications" : "알림 없음", 4 | "Dismiss" : "닫기", 5 | "Admin notifications" : "관리자 알림", 6 | "Unknown user session. It is not possible to set the option" : "알 수 없는 사용자 세션입니다. 설정을 변경할 수 없습니다.", 7 | "Option not supported" : "옵션이 지원되지 않습니다.", 8 | "Saved" : "저장됨", 9 | "Incomplete data" : "손실 데이터", 10 | "Do not notify via mail" : "메일을 통해 알리지 않습니다.", 11 | "Notify only when an action is required" : "액션이 필요할 때에만 알립니다.", 12 | "Notify about all events" : "모든 이벤트에 대해 알림", 13 | "Choose an option" : "옵션 선택", 14 | "Hello," : "안녕하세요,", 15 | "See %s on %s for more information" : "%s (%s)에서 자세한 정보 보기", 16 | "See %s on %s for more information" : "%s에서 자세한 정보 보기", 17 | "Mail Notifications" : "메일 알림", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "메일을 통해 알림받을 이벤트를 선택할 수 있습니다. 일부 이벤트는 유용하고, 다른 이벤트는 액션(예: 수락/거절)을 필요로 합니다. 아래에서 당신이 선호하는 것을 고르세요.", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "세션을 불러올 수 없습니다. 페이지를 다시 로딩하거나 로그아웃 후 다시 로그인해주시기 바랍니다.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "메일 알림을 받으려면 계정의 이메일 주소를 지정해야 합니다." 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | notifications 4 | Notifications 5 | Notification system for internal events 6 | This application adds an internal notification system to an ownCloud instance. Notifications are triggered by apps like the Announcement Center or Custom Groups and displayed via a bell indicator in the WebUI as well as via the ownCloud clients. 7 | 8 | tools 9 | https://raw.githubusercontent.com/owncloud/promo/e1dd604d66b4c5f765579b4c160de3268169ea3c/ownCloud%20logo%20square.png 10 | 11 | AGPL 12 | Joas Schilling, Thomas Müller 13 | 0.6.0 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | https://github.com/owncloud/notifications 22 | https://github.com/owncloud/notifications/issues 23 | https://github.com/owncloud/notifications.git 24 | 25 | 26 | OCA\Notifications\Command\Generate 27 | OCA\Notifications\Command\RepairNotifications 28 | 29 | 30 | OCA\Notifications\Panels\Personal\NotificationsPanel 31 | 32 | 33 | 34 | 35 | 36 | true 37 | 38 | -------------------------------------------------------------------------------- /l10n/ja.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "通知", 3 | "No notifications" : "通知なし", 4 | "Dismiss" : "閉じる", 5 | "Admin notifications" : "管理者向けの通知", 6 | "Unknown user session. It is not possible to set the option" : "不明なユーザーセッションです。オプションを設定することはできません。", 7 | "Option not supported" : "サポートされていないオプションです", 8 | "Saved" : "保存されました", 9 | "Incomplete data" : "不正なデータです", 10 | "Do not notify via mail" : "メール通知しない", 11 | "Notify only when an action is required" : "アクションが必要な時にのみ通知する", 12 | "Notify about all events" : "すべてのイベントについて通知する", 13 | "Choose an option" : "オプションを選択してください", 14 | "Hello," : "こんにちは、", 15 | "See %s on %s for more information" : "詳細は %s ( %s 内)を参照してください", 16 | "See %s on %s for more information" : "詳細は %s (%s 内)を参照してください", 17 | "Mail Notifications" : "メール通知", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "メールでイベントについての通知を受け取ることができます。イベントの中には有益なものや、(受け入れ・拒否などの)アクションが必要なものがあります。以下より選択してください:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "あなたのセッションを取得できませんでした。ページをリロードするかログアウト後の再ログインを試してください", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "メール通知を受信するためには、アカウントのメールアドレスを設定する必要があります。" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /l10n/ko.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "알림", 5 | "No notifications" : "알림 없음", 6 | "Dismiss" : "닫기", 7 | "Admin notifications" : "관리자 알림", 8 | "Unknown user session. It is not possible to set the option" : "알 수 없는 사용자 세션입니다. 설정을 변경할 수 없습니다.", 9 | "Option not supported" : "옵션이 지원되지 않습니다.", 10 | "Saved" : "저장됨", 11 | "Incomplete data" : "손실 데이터", 12 | "Do not notify via mail" : "메일을 통해 알리지 않습니다.", 13 | "Notify only when an action is required" : "액션이 필요할 때에만 알립니다.", 14 | "Notify about all events" : "모든 이벤트에 대해 알림", 15 | "Choose an option" : "옵션 선택", 16 | "Hello," : "안녕하세요,", 17 | "See %s on %s for more information" : "%s (%s)에서 자세한 정보 보기", 18 | "See %s on %s for more information" : "%s에서 자세한 정보 보기", 19 | "Mail Notifications" : "메일 알림", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "메일을 통해 알림받을 이벤트를 선택할 수 있습니다. 일부 이벤트는 유용하고, 다른 이벤트는 액션(예: 수락/거절)을 필요로 합니다. 아래에서 당신이 선호하는 것을 고르세요.", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "세션을 불러올 수 없습니다. 페이지를 다시 로딩하거나 로그아웃 후 다시 로그인해주시기 바랍니다.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "메일 알림을 받으려면 계정의 이메일 주소를 지정해야 합니다." 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /l10n/ja.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "通知", 5 | "No notifications" : "通知なし", 6 | "Dismiss" : "閉じる", 7 | "Admin notifications" : "管理者向けの通知", 8 | "Unknown user session. It is not possible to set the option" : "不明なユーザーセッションです。オプションを設定することはできません。", 9 | "Option not supported" : "サポートされていないオプションです", 10 | "Saved" : "保存されました", 11 | "Incomplete data" : "不正なデータです", 12 | "Do not notify via mail" : "メール通知しない", 13 | "Notify only when an action is required" : "アクションが必要な時にのみ通知する", 14 | "Notify about all events" : "すべてのイベントについて通知する", 15 | "Choose an option" : "オプションを選択してください", 16 | "Hello," : "こんにちは、", 17 | "See %s on %s for more information" : "詳細は %s ( %s 内)を参照してください", 18 | "See %s on %s for more information" : "詳細は %s (%s 内)を参照してください", 19 | "Mail Notifications" : "メール通知", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "メールでイベントについての通知を受け取ることができます。イベントの中には有益なものや、(受け入れ・拒否などの)アクションが必要なものがあります。以下より選択してください:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "あなたのセッションを取得できませんでした。ページをリロードするかログアウト後の再ログインを試してください", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "メール通知を受信するためには、アカウントのメールアドレスを設定する必要があります。" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Organization and project keys are displayed in the right sidebar of the project homepage 2 | sonar.organization=owncloud-1 3 | sonar.projectKey=owncloud_notifications 4 | sonar.projectVersion=0.6.0 5 | sonar.host.url=https://sonarcloud.io 6 | 7 | # ===================================================== 8 | # Meta-data for the project 9 | # ===================================================== 10 | 11 | sonar.links.homepage=https://github.com/owncloud/notifications 12 | sonar.links.ci=https://drone.owncloud.com/owncloud/notifications/ 13 | sonar.links.scm=https://github.com/owncloud/notifications 14 | sonar.links.issue=https://github.com/owncloud/notifications/issues 15 | 16 | # ===================================================== 17 | # Properties that will be shared amongst all modules 18 | # ===================================================== 19 | 20 | # Just look in these directories for code 21 | sonar.sources=. 22 | sonar.inclusions=appinfo/**,lib/** 23 | 24 | # Pull Requests 25 | sonar.pullrequest.provider=GitHub 26 | sonar.pullrequest.github.repository=owncloud/notifications 27 | sonar.pullrequest.base=${env.SONAR_PULL_REQUEST_BASE} 28 | sonar.pullrequest.branch=${env.SONAR_PULL_REQUEST_BRANCH} 29 | sonar.pullrequest.key=${env.SONAR_PULL_REQUEST_KEY} 30 | 31 | # Properties specific to language plugins: 32 | sonar.php.coverage.reportPaths=results/clover-phpunit-php7.3-mariadb10.2.xml,results/clover-phpunit-php7.3-mysql8.0.xml,results/clover-phpunit-php7.3-postgres9.4.xml,results/clover-phpunit-php7.3-oracle.xml,results/clover-phpunit-php7.3-sqlite.xml 33 | sonar.javascript.lcov.reportPaths=results/lcov.info 34 | -------------------------------------------------------------------------------- /appinfo/app.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Tom Needham 5 | * 6 | * @copyright Copyright (c) 2016, ownCloud, Inc. 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | use OCP\Util; 24 | 25 | $application = new \OCA\Notifications\AppInfo\Application(); 26 | $application->setupConsumerAndNotifier(); 27 | $application->setupSymfonyEventListeners(); 28 | // Only display the app on index.php except for public shares 29 | $request = \OC::$server->getRequest(); 30 | if (\OC::$server->getUserSession() !== null && \OC::$server->getUserSession()->getUser() !== null 31 | && \substr($request->getScriptName(), 0 - \strlen('/index.php')) === '/index.php' 32 | && \substr($request->getPathInfo(), 0, \strlen('/s/')) !== '/s/' 33 | && \substr($request->getPathInfo(), 0, \strlen('/login')) !== '/login') { 34 | Util::addScript('notifications', 'app'); 35 | Util::addScript('notifications', 'notification'); 36 | Util::addStyle('notifications', 'styles'); 37 | } 38 | -------------------------------------------------------------------------------- /l10n/nb_NO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Varsler", 3 | "No notifications" : "ingen varsler", 4 | "Dismiss" : "Forkast", 5 | "Admin notifications" : "Admin varsler", 6 | "Unknown user session. It is not possible to set the option" : "Ukjent bruker økt. Det er ikke mulig å angi alternativet", 7 | "Option not supported" : "Valg ikke støttet", 8 | "Saved" : "Lagret", 9 | "Incomplete data" : "Ufullstendige data", 10 | "Do not notify via mail" : "Ikke varsle på mail", 11 | "Notify only when an action is required" : "Varsle kun når en handling er nødvendig", 12 | "Notify about all events" : "Varsle om alle handlinger", 13 | "Choose an option" : "Velg et alternativ", 14 | "Hello," : "Hallo,", 15 | "See %s on %s for more information" : "Se %s på %s for mer informasjon", 16 | "Mail Notifications" : "E-post Varsler", 17 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Du kan velge å bli varslet om hendelser via e-post. Noen hendelser er kun for informasjon, andre krever en handling (som godta / avvise). Velg din preferanse nedenfor:", 18 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Det var ikke mulig å finne økten din. Vennligst prøv å laste siden på nytt eller logg ut og inn igjen", 19 | "To be able to receive mail notifications it is required to specify an email address for your account." : "For å kunne motta e-postvarsler er det nødvendig å angi en e-postadresse for kontoen din." 20 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 21 | } -------------------------------------------------------------------------------- /l10n/nb_NO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Varsler", 5 | "No notifications" : "ingen varsler", 6 | "Dismiss" : "Forkast", 7 | "Admin notifications" : "Admin varsler", 8 | "Unknown user session. It is not possible to set the option" : "Ukjent bruker økt. Det er ikke mulig å angi alternativet", 9 | "Option not supported" : "Valg ikke støttet", 10 | "Saved" : "Lagret", 11 | "Incomplete data" : "Ufullstendige data", 12 | "Do not notify via mail" : "Ikke varsle på mail", 13 | "Notify only when an action is required" : "Varsle kun når en handling er nødvendig", 14 | "Notify about all events" : "Varsle om alle handlinger", 15 | "Choose an option" : "Velg et alternativ", 16 | "Hello," : "Hallo,", 17 | "See %s on %s for more information" : "Se %s på %s for mer informasjon", 18 | "Mail Notifications" : "E-post Varsler", 19 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Du kan velge å bli varslet om hendelser via e-post. Noen hendelser er kun for informasjon, andre krever en handling (som godta / avvise). Velg din preferanse nedenfor:", 20 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Det var ikke mulig å finne økten din. Vennligst prøv å laste siden på nytt eller logg ut og inn igjen", 21 | "To be able to receive mail notifications it is required to specify an email address for your account." : "For å kunne motta e-postvarsler er det nødvendig å angi en e-postadresse for kontoen din." 22 | }, 23 | "nplurals=2; plural=(n != 1);"); 24 | -------------------------------------------------------------------------------- /appinfo/Migrations/Version20170801085340.php: -------------------------------------------------------------------------------- 1 | hasTable("{$prefix}notifications")) { 13 | return; 14 | } 15 | 16 | $table = $schema->createTable("{$prefix}notifications"); 17 | $table->addColumn('notification_id', Type::INTEGER, ['autoincrement' => true]); 18 | $table->addColumn('app', Type::STRING, ['length' => 32]); 19 | $table->addColumn('user', Type::STRING, ['length' => 64]); 20 | $table->addColumn('timestamp', Type::INTEGER, ['default' => 0]); 21 | $table->addColumn('object_type', Type::STRING, ['length' => 64]); 22 | $table->addColumn('object_id', Type::STRING, ['length' => 64]); 23 | $table->addColumn('subject', Type::STRING, ['length' => 64]); 24 | $table->addColumn('subject_parameters', Type::TEXT, ['notNull' => false]); 25 | $table->addColumn('message', Type::STRING, ['length' => 64]); 26 | $table->addColumn('message_parameters', Type::TEXT, ['notNull' => false]); 27 | $table->addColumn('link', Type::STRING, ['length' => 4000]); 28 | $table->addColumn('actions', Type::TEXT, ['notNull' => false]); 29 | $table->addColumn('icon', Type::STRING, ['length' => 4000, 'notNull' => false]); 30 | 31 | $table->setPrimaryKey(['notification_id']); 32 | $table->addIndex(['app']); 33 | $table->addIndex(['user']); 34 | $table->addIndex(['timestamp']); 35 | $table->addIndex(['object_type', 'object_id']); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /l10n/he.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "התראות", 3 | "No notifications" : "אין התראות", 4 | "Dismiss" : "שחרור", 5 | "Admin notifications" : "הודעות מנהל", 6 | "Unknown user session. It is not possible to set the option" : "הפעלת המשתמש אינה ידועה. לא ניתן לשנות אפשרות זו", 7 | "Option not supported" : "האפשרות אינה נתמכת", 8 | "Saved" : "נשמר", 9 | "Incomplete data" : "נתונים חלקיים", 10 | "Do not notify via mail" : "לא להודיע בדוא״ל", 11 | "Notify only when an action is required" : "יש להודיע כאשר נדרשת פעולה", 12 | "Notify about all events" : "להודיע על כל האירועים", 13 | "Choose an option" : "בחר אפשרות", 14 | "Hello," : "שלום,", 15 | "See %s on %s for more information" : "מידע נוסף ב- %s מ- %s ", 16 | "See %s on %s for more information" : "מידע נוסף ב- %s מ- %s ", 17 | "Mail Notifications" : "הודעות בדוא״ל", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "ניתן לבחור לקבל הודעות על אירועים דרך דוא״ל. חלק מהאירועים נשלחים למטרות ידיעה בלבד, חלקם דורשים פעילות מסוימת (לאשר/לדחות). נא לבחור את ההעדפה שלך להלן:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "לא הייתה אפשרות לקבל את ההפעלה שלך. נא לנסות לטעון את העמוד מחדש או לצאת ולהיכנס שוב.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "כדי לקבל הודעות דוא״ל יש לציין כתובת דוא״ל לחשבון שלך." 21 | },"pluralForm" :"nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;" 22 | } -------------------------------------------------------------------------------- /lib/Notifier.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2017, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Notifications; 23 | 24 | use OCP\Notification\INotification; 25 | use OCP\Notification\INotifier; 26 | 27 | class Notifier implements INotifier { 28 | /** 29 | * @inheritdoc 30 | */ 31 | public function prepare(INotification $notification, $languageCode) { 32 | if ($notification->getApp() !== 'notifications') { 33 | throw new \InvalidArgumentException(); 34 | } 35 | if ($notification->getObjectType() !== 'admin-notification') { 36 | throw new \InvalidArgumentException(); 37 | } 38 | if ($notification->getMessage() === 'admin-notification') { 39 | $params = $notification->getMessageParameters(); 40 | if (isset($params[0]) && $params[0] !== '') { 41 | $notification->setParsedMessage($params[0]); 42 | } 43 | } 44 | $notification->setParsedSubject($notification->getSubjectParameters()[0]); 45 | return $notification; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /l10n/he.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "התראות", 5 | "No notifications" : "אין התראות", 6 | "Dismiss" : "שחרור", 7 | "Admin notifications" : "הודעות מנהל", 8 | "Unknown user session. It is not possible to set the option" : "הפעלת המשתמש אינה ידועה. לא ניתן לשנות אפשרות זו", 9 | "Option not supported" : "האפשרות אינה נתמכת", 10 | "Saved" : "נשמר", 11 | "Incomplete data" : "נתונים חלקיים", 12 | "Do not notify via mail" : "לא להודיע בדוא״ל", 13 | "Notify only when an action is required" : "יש להודיע כאשר נדרשת פעולה", 14 | "Notify about all events" : "להודיע על כל האירועים", 15 | "Choose an option" : "בחר אפשרות", 16 | "Hello," : "שלום,", 17 | "See %s on %s for more information" : "מידע נוסף ב- %s מ- %s ", 18 | "See %s on %s for more information" : "מידע נוסף ב- %s מ- %s ", 19 | "Mail Notifications" : "הודעות בדוא״ל", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "ניתן לבחור לקבל הודעות על אירועים דרך דוא״ל. חלק מהאירועים נשלחים למטרות ידיעה בלבד, חלקם דורשים פעילות מסוימת (לאשר/לדחות). נא לבחור את ההעדפה שלך להלן:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "לא הייתה אפשרות לקבל את ההפעלה שלך. נא לנסות לטעון את העמוד מחדש או לצאת ולהיכנס שוב.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "כדי לקבל הודעות דוא״ל יש לציין כתובת דוא״ל לחשבון שלך." 23 | }, 24 | "nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;"); 25 | -------------------------------------------------------------------------------- /appinfo/routes.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2016, ownCloud, Inc. 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | return [ 23 | 'ocs' => [ 24 | [ 25 | 'name' => 'Endpoint#listNotifications', 26 | 'url' => '/api/v1/notifications', 27 | 'verb' => 'GET' 28 | ], 29 | [ 30 | 'name' => 'Endpoint#getNotification', 31 | 'url' => '/api/v1/notifications/{id}', 32 | 'verb' => 'GET' 33 | ], 34 | [ 35 | 'name' => 'Endpoint#deleteNotification', 36 | 'url' => '/api/v1/notifications/{id}', 37 | 'verb' => 'DELETE' 38 | ], 39 | ], 40 | 41 | 'routes' => [ 42 | ['name' => 'NotificationOptions#getNotificationOptions', 'url' => '/settings/personal/notifications/options', 'verb' => 'GET'], 43 | ['name' => 'NotificationOptions#setNotificationOptions', 'url' => '/settings/personal/notifications/options', 'verb' => 'PUT'], 44 | ['name' => 'NotificationOptions#setNotificationOptionsPartial', 'url' => '/settings/personal/notifications/options', 'verb' => 'PATCH'], 45 | ], 46 | ]; 47 | -------------------------------------------------------------------------------- /l10n/en_GB.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notifications", 3 | "No notifications" : "No notifications", 4 | "Dismiss" : "Dismiss", 5 | "Admin notifications" : "Admin notifications", 6 | "Unknown user session. It is not possible to set the option" : "Unknown user session. It is not possible to set the option", 7 | "Option not supported" : "Option not supported", 8 | "Saved" : "Saved", 9 | "Incomplete data" : "Incomplete data", 10 | "Do not notify via mail" : "Do not notify via mail", 11 | "Notify only when an action is required" : "Notify only when an action is required", 12 | "Notify about all events" : "Notify about all events", 13 | "Choose an option" : "Choose an option", 14 | "Hello," : "Hello,", 15 | "See %s on %s for more information" : "See %s on %s for more information", 16 | "See %s on %s for more information" : "See %s on %s for more information", 17 | "Mail Notifications" : "Mail Notifications", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "It was not possible to get your session. Please, try reloading the page or logout and login again", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "To be able to receive mail notifications it is required to specify an email address for your account." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/en_US.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notifications", 3 | "No notifications" : "No notifications", 4 | "Dismiss" : "Dismiss", 5 | "Admin notifications" : "Admin notifications", 6 | "Unknown user session. It is not possible to set the option" : "Unknown user session. It is not possible to set the option", 7 | "Option not supported" : "Option not supported", 8 | "Saved" : "Saved", 9 | "Incomplete data" : "Incomplete data", 10 | "Do not notify via mail" : "Do not notify via mail", 11 | "Notify only when an action is required" : "Notify only when an action is required", 12 | "Notify about all events" : "Notify about all events", 13 | "Choose an option" : "Choose an option", 14 | "Hello," : "Hello,", 15 | "See %s on %s for more information" : "See %s on %s for more information", 16 | "See %s on %s for more information" : "See %s on %s for more information", 17 | "Mail Notifications" : "Mail Notifications", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "It was not possible to get your session. Please, try reloading the page or logout and login again", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "To be able to receive mail notifications it is required to specify an email address for your account." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/id.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notifikasi", 3 | "No notifications" : "Tidak ada notifikasi", 4 | "Dismiss" : "Buang", 5 | "Admin notifications" : "Notifikasi admin", 6 | "Unknown user session. It is not possible to set the option" : "Sesi pengguna tidak dikenal. Tidak dimungkinkan untuk mengatur opsi", 7 | "Option not supported" : "Opsi tidak didukung", 8 | "Saved" : "Disimpan", 9 | "Incomplete data" : "Data tidak lengkap", 10 | "Do not notify via mail" : "Jangan beritahu lewat email", 11 | "Notify only when an action is required" : "Beritahu hanya saat aksi diperlukan", 12 | "Notify about all events" : "Beritahu semua event", 13 | "Choose an option" : "Pilih opsi", 14 | "Hello," : "Halo,", 15 | "See %s on %s for more information" : "Lihat %s di %s untuk informasi lebih lanjut", 16 | "See %s on %s for more information" : "Kugat %s di %s untuk informasi lebih lanjut", 17 | "Mail Notifications" : "Pemberitahuan Mail", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Anda dapat memilih untuk diberitahu tentang event melalui email. Beberapa event informatif, lainnya membutuhkan aksi (seperti setuju/tidak setuju). Pilih preferensi berikut :", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Tidak dimungkinkan mendapatkan sesi anda. Coba reload halaman atau keluar dan masuk lagi", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Untuk menerima pemberitahuan lewat email, dibutuhkan alamat email untuk akun anda." 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /tests/acceptance/features/apiNotifications/email-notifications.feature: -------------------------------------------------------------------------------- 1 | @api @email 2 | Feature: notifications-content 3 | 4 | Background: 5 | Given user "Alice" has been created with default attributes and without skeleton files 6 | And using OCS API version "2" 7 | 8 | 9 | Scenario: Create notification 10 | When user "Alice" sets the email notification option to "always" using the API 11 | And user "Alice" is sent a notification with 12 | | app | notificationsacceptancetesting | 13 | | timestamp | 144958517 | 14 | | subject | Acceptance Testing | 15 | | link | https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ | 16 | | message | About Activities and Notifications in ownCloud | 17 | | object_type | blog | 18 | | object_id | 9483 | 19 | Then the email address "alice@example.org" should have received an email with the body containing 20 | """ 21 | Hello, 22 | About Activities and Notifications in ownCloud 23 | 24 | See https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ on ownCloud for more information 25 | """ 26 | And the email address "alice@example.org" should have received an email with the body containing 27 | """ 28 | See https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ on ownCloud for more information 29 | """ 30 | -------------------------------------------------------------------------------- /l10n/en_GB.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notifications", 5 | "No notifications" : "No notifications", 6 | "Dismiss" : "Dismiss", 7 | "Admin notifications" : "Admin notifications", 8 | "Unknown user session. It is not possible to set the option" : "Unknown user session. It is not possible to set the option", 9 | "Option not supported" : "Option not supported", 10 | "Saved" : "Saved", 11 | "Incomplete data" : "Incomplete data", 12 | "Do not notify via mail" : "Do not notify via mail", 13 | "Notify only when an action is required" : "Notify only when an action is required", 14 | "Notify about all events" : "Notify about all events", 15 | "Choose an option" : "Choose an option", 16 | "Hello," : "Hello,", 17 | "See %s on %s for more information" : "See %s on %s for more information", 18 | "See %s on %s for more information" : "See %s on %s for more information", 19 | "Mail Notifications" : "Mail Notifications", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "It was not possible to get your session. Please, try reloading the page or logout and login again", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "To be able to receive mail notifications it is required to specify an email address for your account." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/en_US.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notifications", 5 | "No notifications" : "No notifications", 6 | "Dismiss" : "Dismiss", 7 | "Admin notifications" : "Admin notifications", 8 | "Unknown user session. It is not possible to set the option" : "Unknown user session. It is not possible to set the option", 9 | "Option not supported" : "Option not supported", 10 | "Saved" : "Saved", 11 | "Incomplete data" : "Incomplete data", 12 | "Do not notify via mail" : "Do not notify via mail", 13 | "Notify only when an action is required" : "Notify only when an action is required", 14 | "Notify about all events" : "Notify about all events", 15 | "Choose an option" : "Choose an option", 16 | "Hello," : "Hello,", 17 | "See %s on %s for more information" : "See %s on %s for more information", 18 | "See %s on %s for more information" : "See %s on %s for more information", 19 | "Mail Notifications" : "Mail Notifications", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "It was not possible to get your session. Please, try reloading the page or logout and login again", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "To be able to receive mail notifications it is required to specify an email address for your account." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/id.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notifikasi", 5 | "No notifications" : "Tidak ada notifikasi", 6 | "Dismiss" : "Buang", 7 | "Admin notifications" : "Notifikasi admin", 8 | "Unknown user session. It is not possible to set the option" : "Sesi pengguna tidak dikenal. Tidak dimungkinkan untuk mengatur opsi", 9 | "Option not supported" : "Opsi tidak didukung", 10 | "Saved" : "Disimpan", 11 | "Incomplete data" : "Data tidak lengkap", 12 | "Do not notify via mail" : "Jangan beritahu lewat email", 13 | "Notify only when an action is required" : "Beritahu hanya saat aksi diperlukan", 14 | "Notify about all events" : "Beritahu semua event", 15 | "Choose an option" : "Pilih opsi", 16 | "Hello," : "Halo,", 17 | "See %s on %s for more information" : "Lihat %s di %s untuk informasi lebih lanjut", 18 | "See %s on %s for more information" : "Kugat %s di %s untuk informasi lebih lanjut", 19 | "Mail Notifications" : "Pemberitahuan Mail", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Anda dapat memilih untuk diberitahu tentang event melalui email. Beberapa event informatif, lainnya membutuhkan aksi (seperti setuju/tidak setuju). Pilih preferensi berikut :", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Tidak dimungkinkan mendapatkan sesi anda. Coba reload halaman atau keluar dan masuk lagi", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Untuk menerima pemberitahuan lewat email, dibutuhkan alamat email untuk akun anda." 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /l10n/th_TH.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "การแจ้งเตือน", 3 | "No notifications" : "ไม่มีการแจ้งเตือน", 4 | "Dismiss" : "ยกเลิก", 5 | "Admin notifications" : "การแจ้งเตือนสำหรับผู้ดูแลระบบ", 6 | "Unknown user session. It is not possible to set the option" : "ไม่รู้จักเซสชันผู้ใช้ ไม่สามารถตั้งค่าตัวเลือกได้", 7 | "Option not supported" : "ไม่รองรับตัวเลือก", 8 | "Saved" : "บันทึกแล้ว", 9 | "Incomplete data" : "ข้อมูลไม่สมบูรณ์", 10 | "Do not notify via mail" : "ไม่ต้องแจ้งเตือนผ่านทางอีเมล", 11 | "Notify only when an action is required" : "แจ้งเตือนเมื่อจำเป็นต้องมีการดำเนินการเท่านั้น", 12 | "Notify about all events" : "แจ้งเตือนเกี่ยวกับเหตุการณ์ทั้งหมด", 13 | "Choose an option" : "เลือกตัวเลือก", 14 | "Hello," : "สวัสดี,", 15 | "See %s on %s for more information" : "ดูข้อมูลเพิ่มเติมเกี่ยวกับ %s ได้ที่ %s ", 16 | "See %s on %s for more information" : "ดูข้อมูลเพิ่มเติมเกี่ยวกับ %s ได้ที่ %s", 17 | "Mail Notifications" : "การแจ้งเตือนทางอีเมล", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "คุณสามารถเลือกรับการแจ้งเตือนเกี่ยวกับกิจกรรมต่างๆผ่านทางอีเมลได้ กิจกรรมบางเหตุการณ์อาจจำเป็นต้องมีการดำเนินการ (เช่น ยอมรับ/ปฏิเสธ) ซึ่งสามารถตั้งค่าได้จากด้านล่างนี้:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "ไม่สามารถรับเซสชันของคุณได้ กรุณาลองโหลดเพจนี้ใหม่ หรือออกจากระบบและเข้าสู่ระบบใหม่อีกครั้ง", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "เพื่อให้สามารถรับการแจ้งเตือนทางอีเมลได้ คุณจำเป็นต้องระบุที่อยู่อีเมลสำหรับบัญชีของคุณ" 21 | },"pluralForm" :"nplurals=1; plural=0;" 22 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Submitting issues 2 | 3 | If you have questions about how to install or use ownCloud, please direct these to the [mailing list][mailinglist] or our [forum][forum]. We are also available on [IRC][irc]. 4 | 5 | ### Short version 6 | 7 | * The [**issue template can be found here**][template]. Please always use the issue template when reporting issues. 8 | 9 | ### Guidelines 10 | * Please search the existing issues first, it's likely that your issue was already reported or even fixed. 11 | - Go to one of the repositories, click "issues" and type any word in the top search/command bar. 12 | - You can also filter by appending e. g. "state:open" to the search string. 13 | - More info on [search syntax within github](https://help.github.com/articles/searching-issues) 14 | * This repository ([Notifications](https://github.com/owncloud/notifications/issues)) is *only* for issues within the ownCloud Announcement Center code. 15 | * __SECURITY__: Report any potential security bug to security@owncloud.com following our [security policy](https://owncloud.org/security/) instead of filing an issue in our bug tracker 16 | * Report the issue using our [template][template], it includes all the information we need to track down the issue. 17 | 18 | Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. 19 | 20 | [template]: https://raw.github.com/owncloud/core/master/issue_template.md 21 | [mailinglist]: https://mailman.owncloud.org/mailman/listinfo/owncloud 22 | [forum]: https://forum.owncloud.org/ 23 | [irc]: https://webchat.freenode.net/?channels=owncloud&uio=d4 24 | 25 | ### Contribute Code and translations 26 | Please check [core's contribution guidelines](https://github.com/owncloud/core/blob/master/CONTRIBUTING.md) for further information about contributing code and translations. 27 | -------------------------------------------------------------------------------- /l10n/ug.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "ئۇقتۇرۇشلار", 3 | "No notifications" : "ئەسكەرتىش يوق", 4 | "Dismiss" : "تاشلىۋەت", 5 | "Admin notifications" : "باشقۇرغۇچى ئۇقتۇرۇشى", 6 | "Unknown user session. It is not possible to set the option" : "يوچۇن ئىشلەتكۈچى ئەڭگىمە. تاللانمىنى بەلگىلىگىلى بولمىدى", 7 | "Option not supported" : "تاللانمىنى قوللىمايدۇ", 8 | "Saved" : "ساقلاندى", 9 | "Incomplete data" : "چالا سانلىق-مەلۇمات", 10 | "Do not notify via mail" : "خەتتە خەۋەر قىلمىسۇن", 11 | "Notify only when an action is required" : "پەقەت مەشغۇلات زۆرۈر بولغاندىلا ئۇقتۇرۇش قىلسۇن", 12 | "Notify about all events" : "بارلىق ئىشلارنى ئۇقتۇرۇش قىلىش", 13 | "Choose an option" : "تاللانما تاللا", 14 | "Hello," : "سالام،", 15 | "See %s on %s for more information" : "%s نىڭ تېخىمۇ كۆپ ئۇچۇرى ئۈچۈن %s نى كۆرۈڭ", 16 | "See %s on %s for more information" : "%s نىڭ تېخىمۇ كۆپ ئۇچۇرى ئۈچۈن %s نى كۆرۈڭ", 17 | "Mail Notifications" : "ئېلخەت ئۇقتۇرۇشى", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "سىز ھادىسىلەرنى ئېلىخەت ئارقىلىق ئۇقتۇرۇشنى تاللىيالايسىز. بەزى ھادىسىلەر بولسا مەلۇم قىلارلىق، بەزىلىرى بولسا مەشخۇلات تەلەپ قىلىدۇ (مەسىلەن قۇبۇل/رەت قىلىش). مايىللىقىڭىزنى تۆۋەندىن تاللاڭ:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "ئەڭگىمەگە ئېرىشىش مۇمكىن ئەمەس. بەتنى قايتا ئوقۇپ ئاندىن قايتا سىناڭ ياكى قايتا كىرىڭ.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "ئېلخەت ئۇقتۇرۇشىنى تاپشۇرۇش ئۈچۈن ھېساباتىڭىزغا بىر ئېلىخەت ئادىرىسنى بەلگىلىشىڭىز تەلەپ قىلىنىدۇ." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/th_TH.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "การแจ้งเตือน", 5 | "No notifications" : "ไม่มีการแจ้งเตือน", 6 | "Dismiss" : "ยกเลิก", 7 | "Admin notifications" : "การแจ้งเตือนสำหรับผู้ดูแลระบบ", 8 | "Unknown user session. It is not possible to set the option" : "ไม่รู้จักเซสชันผู้ใช้ ไม่สามารถตั้งค่าตัวเลือกได้", 9 | "Option not supported" : "ไม่รองรับตัวเลือก", 10 | "Saved" : "บันทึกแล้ว", 11 | "Incomplete data" : "ข้อมูลไม่สมบูรณ์", 12 | "Do not notify via mail" : "ไม่ต้องแจ้งเตือนผ่านทางอีเมล", 13 | "Notify only when an action is required" : "แจ้งเตือนเมื่อจำเป็นต้องมีการดำเนินการเท่านั้น", 14 | "Notify about all events" : "แจ้งเตือนเกี่ยวกับเหตุการณ์ทั้งหมด", 15 | "Choose an option" : "เลือกตัวเลือก", 16 | "Hello," : "สวัสดี,", 17 | "See %s on %s for more information" : "ดูข้อมูลเพิ่มเติมเกี่ยวกับ %s ได้ที่ %s ", 18 | "See %s on %s for more information" : "ดูข้อมูลเพิ่มเติมเกี่ยวกับ %s ได้ที่ %s", 19 | "Mail Notifications" : "การแจ้งเตือนทางอีเมล", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "คุณสามารถเลือกรับการแจ้งเตือนเกี่ยวกับกิจกรรมต่างๆผ่านทางอีเมลได้ กิจกรรมบางเหตุการณ์อาจจำเป็นต้องมีการดำเนินการ (เช่น ยอมรับ/ปฏิเสธ) ซึ่งสามารถตั้งค่าได้จากด้านล่างนี้:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "ไม่สามารถรับเซสชันของคุณได้ กรุณาลองโหลดเพจนี้ใหม่ หรือออกจากระบบและเข้าสู่ระบบใหม่อีกครั้ง", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "เพื่อให้สามารถรับการแจ้งเตือนทางอีเมลได้ คุณจำเป็นต้องระบุที่อยู่อีเมลสำหรับบัญชีของคุณ" 23 | }, 24 | "nplurals=1; plural=0;"); 25 | -------------------------------------------------------------------------------- /l10n/ar.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "الإشعارات", 3 | "No notifications" : "لا توجد اشعارات", 4 | "Dismiss" : "تجاهل", 5 | "Admin notifications" : "إشعارات المسؤول", 6 | "Unknown user session. It is not possible to set the option" : "جلسة مستخدم غير معروفة. لا يمكن تعيين الخيار", 7 | "Option not supported" : "الخيار غير مدعوم", 8 | "Saved" : "تم الحفظ", 9 | "Incomplete data" : "البيانات غير مكتملة", 10 | "Do not notify via mail" : "لا ترسل إشعارات عن طريق البريد الإلكتروني", 11 | "Notify only when an action is required" : "أبلغني في حالة ضرورة اتخاذ إجراء فقط", 12 | "Notify about all events" : "أبلغني بجميع الأحداث", 13 | "Choose an option" : "اختر خيارًا", 14 | "Hello," : "مرحبًا،", 15 | "See %s on %s for more information" : "اطلع على %s في %s لمزيد من المعلومات", 16 | "See %s on %s for more information" : "اطلع على %s في %s لمزيد من المعلومات", 17 | "Mail Notifications" : "إشعارات البريد", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "يمكنك اختيار إرسال الإشعار عن جميع الأحداث عبر البريد الإلكتروني. بعض الأحداث تكون إخبارية. وبعضها يتطلب اتخاذ اجراء (على سبيل المثال، القبول/الرفض). حدد تفضيلاتك أدناه:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "لا يمكن إجراء جلسة. يُرجى محاولة إعادة تحديث الصفحة أو تسجيل الخروج ثم تسجيل الدخول مرة أخرى", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "لتتمكن من استلام إشعارات البريد الإلكتروني يجب تحديد عنوان بريد إلكتروني لحسابك." 21 | },"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" 22 | } -------------------------------------------------------------------------------- /l10n/eu.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Jakinarazpenak", 3 | "No notifications" : "Jakinarazpenik ez", 4 | "Dismiss" : "Baztertu", 5 | "Admin notifications" : "Administrazio jakinarazpenak", 6 | "Unknown user session. It is not possible to set the option" : "Erabiltzaile saio ezezaguna. Ezin da aukera ezarri", 7 | "Option not supported" : "Aukera honek ez du euskarririk", 8 | "Saved" : "Gordeta", 9 | "Incomplete data" : "Osatu gabeko datuak", 10 | "Do not notify via mail" : "Ez jakinarazi email bidez", 11 | "Notify only when an action is required" : "Ekintzaren bat behar denean jakinarazi bakarrik", 12 | "Notify about all events" : "Jakinarazi gertaera guztiak", 13 | "Choose an option" : "Hautatu aukera bat", 14 | "Hello," : "Kaixo,", 15 | "See %s on %s for more information" : "Ikusi %s%s-en xehetasun gehiagorako", 16 | "See %s on %s for more information" : "Ikusi %s%s-en xehetasun gehiagorako", 17 | "Mail Notifications" : "Posta jakinarazpenak", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Gertaeren jakinarazpenak posta bidez jasotzea aukeratu dezakezu. Gertaera batzuk informatiboak dira, beste batzuk ekintzaren bat eskatzen dute (onartu/ez onartu bezala). Aukeratu zure hobespenak azpian:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Ezin izan da zure sesioa lortu. Saiatu orria birkargatzen edo saioa itxi eta saia hasi berriz ere.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Posta jakinarazpenak jasotzeko zure kontuaren posta helbidea zehaztu behar da." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/ia.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notificationes", 3 | "No notifications" : "Nulle notificationes", 4 | "Dismiss" : "Clauder", 5 | "Admin notifications" : "Notificationes admin", 6 | "Unknown user session. It is not possible to set the option" : "Session de usator incognite. Non es possibile definir le option", 7 | "Option not supported" : "Option non supportate", 8 | "Saved" : "Salveguardate", 9 | "Incomplete data" : "Datos incomplete", 10 | "Do not notify via mail" : "Non notificar via e-mail", 11 | "Notify only when an action is required" : "Notificar solmente quando un action es necessari", 12 | "Notify about all events" : "Notificar sur tote le eventos", 13 | "Choose an option" : "Elige un option", 14 | "Hello," : "Salute,", 15 | "See %s on %s for more information" : "Vide %s sur %s pro plus information", 16 | "See %s on %s for more information" : "Vide %s sur %s pro plus information", 17 | "Mail Notifications" : "Notificationes in e-mail", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Tu pote optar pro esser notificate sur eventos via e-mail. Alcun eventos es informative, alteres necessita un action (como acceptar/declinar). Elige tu preferentia:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Non esseva possibile acceder a tu session. Per favor, tenta recargar le pagina o clauder e re-aperir session", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Pro poter reciper notificationes in e-mail, es necessari specificar un adresse de e-mail pro tu conto." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/ug.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "ئۇقتۇرۇشلار", 5 | "No notifications" : "ئەسكەرتىش يوق", 6 | "Dismiss" : "تاشلىۋەت", 7 | "Admin notifications" : "باشقۇرغۇچى ئۇقتۇرۇشى", 8 | "Unknown user session. It is not possible to set the option" : "يوچۇن ئىشلەتكۈچى ئەڭگىمە. تاللانمىنى بەلگىلىگىلى بولمىدى", 9 | "Option not supported" : "تاللانمىنى قوللىمايدۇ", 10 | "Saved" : "ساقلاندى", 11 | "Incomplete data" : "چالا سانلىق-مەلۇمات", 12 | "Do not notify via mail" : "خەتتە خەۋەر قىلمىسۇن", 13 | "Notify only when an action is required" : "پەقەت مەشغۇلات زۆرۈر بولغاندىلا ئۇقتۇرۇش قىلسۇن", 14 | "Notify about all events" : "بارلىق ئىشلارنى ئۇقتۇرۇش قىلىش", 15 | "Choose an option" : "تاللانما تاللا", 16 | "Hello," : "سالام،", 17 | "See %s on %s for more information" : "%s نىڭ تېخىمۇ كۆپ ئۇچۇرى ئۈچۈن %s نى كۆرۈڭ", 18 | "See %s on %s for more information" : "%s نىڭ تېخىمۇ كۆپ ئۇچۇرى ئۈچۈن %s نى كۆرۈڭ", 19 | "Mail Notifications" : "ئېلخەت ئۇقتۇرۇشى", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "سىز ھادىسىلەرنى ئېلىخەت ئارقىلىق ئۇقتۇرۇشنى تاللىيالايسىز. بەزى ھادىسىلەر بولسا مەلۇم قىلارلىق، بەزىلىرى بولسا مەشخۇلات تەلەپ قىلىدۇ (مەسىلەن قۇبۇل/رەت قىلىش). مايىللىقىڭىزنى تۆۋەندىن تاللاڭ:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "ئەڭگىمەگە ئېرىشىش مۇمكىن ئەمەس. بەتنى قايتا ئوقۇپ ئاندىن قايتا سىناڭ ياكى قايتا كىرىڭ.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "ئېلخەت ئۇقتۇرۇشىنى تاپشۇرۇش ئۈچۈن ھېساباتىڭىزغا بىر ئېلىخەت ئادىرىسنى بەلگىلىشىڭىز تەلەپ قىلىنىدۇ." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/bg_BG.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Известия", 3 | "No notifications" : "Няма известия", 4 | "Dismiss" : "Отхвърляне", 5 | "Admin notifications" : "Администраторски известия", 6 | "Unknown user session. It is not possible to set the option" : "Неизвестна потребителска сесия. Не е възможно да се зададе опцията", 7 | "Option not supported" : "Неподдържана опция", 8 | "Saved" : "Запазено", 9 | "Incomplete data" : "Непълни данни", 10 | "Do not notify via mail" : "Без уведомяване чрез имейл", 11 | "Notify only when an action is required" : "Уведомяване, само когато е необходимо действие", 12 | "Notify about all events" : "Известяване за всички събития", 13 | "Choose an option" : "Изберете опция", 14 | "Hello," : "Здравейте,", 15 | "See %s on %s for more information" : "За повече информация вижте %s на %s", 16 | "See %s on %s for more information" : "За повече информация вижте %s на %s", 17 | "Mail Notifications" : "Известия по имейл", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Може да изберете да получавате известия за събития по имейл. Някои от тях са информативни, други изискват някакво действие (като приемане/отказ). Изберете според вашите предпочитания.", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Невъзможно е да се осъществи сесията ви. Моля, опитайте да презаредите страницата или да излезете и да влезете отново", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "За да можете да получавате известия за поща, е необходимо да посочите имейл адрес във вашия профил." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/ar.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "الإشعارات", 5 | "No notifications" : "لا توجد اشعارات", 6 | "Dismiss" : "تجاهل", 7 | "Admin notifications" : "إشعارات المسؤول", 8 | "Unknown user session. It is not possible to set the option" : "جلسة مستخدم غير معروفة. لا يمكن تعيين الخيار", 9 | "Option not supported" : "الخيار غير مدعوم", 10 | "Saved" : "تم الحفظ", 11 | "Incomplete data" : "البيانات غير مكتملة", 12 | "Do not notify via mail" : "لا ترسل إشعارات عن طريق البريد الإلكتروني", 13 | "Notify only when an action is required" : "أبلغني في حالة ضرورة اتخاذ إجراء فقط", 14 | "Notify about all events" : "أبلغني بجميع الأحداث", 15 | "Choose an option" : "اختر خيارًا", 16 | "Hello," : "مرحبًا،", 17 | "See %s on %s for more information" : "اطلع على %s في %s لمزيد من المعلومات", 18 | "See %s on %s for more information" : "اطلع على %s في %s لمزيد من المعلومات", 19 | "Mail Notifications" : "إشعارات البريد", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "يمكنك اختيار إرسال الإشعار عن جميع الأحداث عبر البريد الإلكتروني. بعض الأحداث تكون إخبارية. وبعضها يتطلب اتخاذ اجراء (على سبيل المثال، القبول/الرفض). حدد تفضيلاتك أدناه:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "لا يمكن إجراء جلسة. يُرجى محاولة إعادة تحديث الصفحة أو تسجيل الخروج ثم تسجيل الدخول مرة أخرى", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "لتتمكن من استلام إشعارات البريد الإلكتروني يجب تحديد عنوان بريد إلكتروني لحسابك." 23 | }, 24 | "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"); 25 | -------------------------------------------------------------------------------- /l10n/sq.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Njoftime", 3 | "No notifications" : "Pa njoftime", 4 | "Dismiss" : "Mos e merr parasysh", 5 | "Admin notifications" : "Njoftime përgjegjësi", 6 | "Unknown user session. It is not possible to set the option" : "Sesion përdoruesi të panjohur. S’është e mundur të caktohet mundësia", 7 | "Option not supported" : "Mundësi që s’mbulohet", 8 | "Saved" : "U ruajt", 9 | "Incomplete data" : "Të dhëna të paplota", 10 | "Do not notify via mail" : "Mos njofto me email", 11 | "Notify only when an action is required" : "Njofto vetëm kur lypset një veprim", 12 | "Notify about all events" : "Njofto mbi krejt veprimtaritë", 13 | "Choose an option" : "Zgjidhni një mundësi", 14 | "Hello," : "Tungjatjeta,", 15 | "See %s on %s for more information" : "Për më tepër hollësi, shihni %s te %s", 16 | "See %s on %s for more information" : "Për më tepër hollësi, shihni %s te %s", 17 | "Mail Notifications" : "Njoftime Me Email", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Mund të zgjidhni të njoftoheni me email për veprimtaritë. Disa veprimtari janë informative, të tjera lypin një veprim (b.f. pranoje/hidhe poshtë). Përzgjidhni më poshtë parapëlqimin tuaj:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "S’qe e mundur të merrej sesioni juaj. Ju lutemi, provoni ringarkimin e faqes, ose bëni daljen dhe hyni sërish", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Që të jeni në gjendje të merrni njoftime me email, lypset të përcaktoni një adresë email për llogarinë tuaj." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/gl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notificacións", 3 | "No notifications" : "Non hai notificacións", 4 | "Dismiss" : "Desbotar", 5 | "Admin notifications" : "Notificacións de administración", 6 | "Unknown user session. It is not possible to set the option" : "Sesión de usuario descoñecida. Non é posíbel estabelecer a opción.", 7 | "Option not supported" : "Opción non admitida", 8 | "Saved" : "Gardado", 9 | "Incomplete data" : "Datos incompletos", 10 | "Do not notify via mail" : "Non notificar por correo", 11 | "Notify only when an action is required" : "Notificar só cando se require unha acción", 12 | "Notify about all events" : "Notificar sobre todos os eventos", 13 | "Choose an option" : "Escolla unha opción", 14 | "Hello," : "Ola,", 15 | "See %s on %s for more information" : "Vexa %s en %s para obter máis información", 16 | "See %s on %s for more information" : "Vexa %s en %s para obter máis información ", 17 | "Mail Notifications" : "Notificacións por correo", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Pode escoller ser notificado sobre os eventos mediante o correo. Algúns eventos son informativos, outros requiren unha acción (como aceptar/declinar). Seleccione embaixo a súa preferencia:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Non foi posíbel obter a súa sesión. Tente cargar de novo a páxina ou saia e volva acceder.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para poder recibir notificacións por correo debe especificar un enderezo de correo para a súa conta." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/eu.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Jakinarazpenak", 5 | "No notifications" : "Jakinarazpenik ez", 6 | "Dismiss" : "Baztertu", 7 | "Admin notifications" : "Administrazio jakinarazpenak", 8 | "Unknown user session. It is not possible to set the option" : "Erabiltzaile saio ezezaguna. Ezin da aukera ezarri", 9 | "Option not supported" : "Aukera honek ez du euskarririk", 10 | "Saved" : "Gordeta", 11 | "Incomplete data" : "Osatu gabeko datuak", 12 | "Do not notify via mail" : "Ez jakinarazi email bidez", 13 | "Notify only when an action is required" : "Ekintzaren bat behar denean jakinarazi bakarrik", 14 | "Notify about all events" : "Jakinarazi gertaera guztiak", 15 | "Choose an option" : "Hautatu aukera bat", 16 | "Hello," : "Kaixo,", 17 | "See %s on %s for more information" : "Ikusi %s%s-en xehetasun gehiagorako", 18 | "See %s on %s for more information" : "Ikusi %s%s-en xehetasun gehiagorako", 19 | "Mail Notifications" : "Posta jakinarazpenak", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Gertaeren jakinarazpenak posta bidez jasotzea aukeratu dezakezu. Gertaera batzuk informatiboak dira, beste batzuk ekintzaren bat eskatzen dute (onartu/ez onartu bezala). Aukeratu zure hobespenak azpian:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Ezin izan da zure sesioa lortu. Saiatu orria birkargatzen edo saioa itxi eta saia hasi berriz ere.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Posta jakinarazpenak jasotzeko zure kontuaren posta helbidea zehaztu behar da." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/ia.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notificationes", 5 | "No notifications" : "Nulle notificationes", 6 | "Dismiss" : "Clauder", 7 | "Admin notifications" : "Notificationes admin", 8 | "Unknown user session. It is not possible to set the option" : "Session de usator incognite. Non es possibile definir le option", 9 | "Option not supported" : "Option non supportate", 10 | "Saved" : "Salveguardate", 11 | "Incomplete data" : "Datos incomplete", 12 | "Do not notify via mail" : "Non notificar via e-mail", 13 | "Notify only when an action is required" : "Notificar solmente quando un action es necessari", 14 | "Notify about all events" : "Notificar sur tote le eventos", 15 | "Choose an option" : "Elige un option", 16 | "Hello," : "Salute,", 17 | "See %s on %s for more information" : "Vide %s sur %s pro plus information", 18 | "See %s on %s for more information" : "Vide %s sur %s pro plus information", 19 | "Mail Notifications" : "Notificationes in e-mail", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Tu pote optar pro esser notificate sur eventos via e-mail. Alcun eventos es informative, alteres necessita un action (como acceptar/declinar). Elige tu preferentia:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Non esseva possibile acceder a tu session. Per favor, tenta recargar le pagina o clauder e re-aperir session", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Pro poter reciper notificationes in e-mail, es necessari specificar un adresse de e-mail pro tu conto." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/mk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Известувања", 3 | "No notifications" : "Нема известувања", 4 | "Dismiss" : "Отфрли", 5 | "Admin notifications" : "Известувања за администраторот", 6 | "Unknown user session. It is not possible to set the option" : "Непозната корисничка сесија. Не е можно да ја поставите опцијата", 7 | "Option not supported" : "Опцијата не е поддржана", 8 | "Saved" : "Снимено", 9 | "Incomplete data" : "Нецелосни податоци", 10 | "Do not notify via mail" : "Не известувај по Email", 11 | "Notify only when an action is required" : "Извести само кога е потребно акција", 12 | "Notify about all events" : "Извести за сите настани", 13 | "Choose an option" : "Избери...", 14 | "Hello," : "Здраво,", 15 | "See %s on %s for more information" : "Види %s на %s за повеќе информации", 16 | "See %s on %s for more information" : "Види %s на %s за повеќе информации", 17 | "Mail Notifications" : "Email Известувања", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Можете да изберете да бидете известени за настаните по Email. Некои настани се информативни, други бараат акција (како што се прифати/одби). Изберете ги вашите подесувања:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Не можеше да се добие во оваа сесија. Ве молиме, пробајте повторно да ја вчитате страницата или да се одјавите и повторно да се најавите", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "За да може да примате известувања по пошта, потребно е да одредите Email адреса за вашата сметка." 21 | },"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;" 22 | } -------------------------------------------------------------------------------- /l10n/bg_BG.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Известия", 5 | "No notifications" : "Няма известия", 6 | "Dismiss" : "Отхвърляне", 7 | "Admin notifications" : "Администраторски известия", 8 | "Unknown user session. It is not possible to set the option" : "Неизвестна потребителска сесия. Не е възможно да се зададе опцията", 9 | "Option not supported" : "Неподдържана опция", 10 | "Saved" : "Запазено", 11 | "Incomplete data" : "Непълни данни", 12 | "Do not notify via mail" : "Без уведомяване чрез имейл", 13 | "Notify only when an action is required" : "Уведомяване, само когато е необходимо действие", 14 | "Notify about all events" : "Известяване за всички събития", 15 | "Choose an option" : "Изберете опция", 16 | "Hello," : "Здравейте,", 17 | "See %s on %s for more information" : "За повече информация вижте %s на %s", 18 | "See %s on %s for more information" : "За повече информация вижте %s на %s", 19 | "Mail Notifications" : "Известия по имейл", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Може да изберете да получавате известия за събития по имейл. Някои от тях са информативни, други изискват някакво действие (като приемане/отказ). Изберете според вашите предпочитания.", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Невъзможно е да се осъществи сесията ви. Моля, опитайте да презаредите страницата или да излезете и да влезете отново", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "За да можете да получавате известия за поща, е необходимо да посочите имейл адрес във вашия профил." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/cs_CZ.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Upozornění", 3 | "No notifications" : "Žádné upozornění", 4 | "Dismiss" : "Zamítnout", 5 | "Admin notifications" : "Upozornění správce", 6 | "Unknown user session. It is not possible to set the option" : "Neznámá relace uživatele. Volbu nelze nastavit", 7 | "Option not supported" : "Volba není podporována", 8 | "Saved" : "Uloženo", 9 | "Incomplete data" : "Nekompletní data", 10 | "Do not notify via mail" : "Nepotvrzovat emailem", 11 | "Notify only when an action is required" : "Informovat pouze v případě, že je akce požadována", 12 | "Notify about all events" : "Informovat o všech událostech", 13 | "Choose an option" : "Vyberte možnost", 14 | "Hello," : "Ahoj,", 15 | "See %s on %s for more information" : "Přečti si %s na %s pro více informací", 16 | "See %s on %s for more information" : "Přečti si %s na %s pro více informací", 17 | "Mail Notifications" : "Emailové upozornění", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Můžete si vybrat upozornění na události prostřednictvím pošty. Některé události jsou informativní, jiné vyžadují akci (například přijetí / odmítnutí). Zvolte své preference níže:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Vaše přihlášená relace vypršela. Zkuste prosím znovu načíst stránku nebo se odhlásit a znovu přihlásit", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Chcete-li dostávat informace emailem, je nutné zadat emailovou adresu ve Vašem účtu." 21 | },"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;" 22 | } -------------------------------------------------------------------------------- /l10n/sq.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Njoftime", 5 | "No notifications" : "Pa njoftime", 6 | "Dismiss" : "Mos e merr parasysh", 7 | "Admin notifications" : "Njoftime përgjegjësi", 8 | "Unknown user session. It is not possible to set the option" : "Sesion përdoruesi të panjohur. S’është e mundur të caktohet mundësia", 9 | "Option not supported" : "Mundësi që s’mbulohet", 10 | "Saved" : "U ruajt", 11 | "Incomplete data" : "Të dhëna të paplota", 12 | "Do not notify via mail" : "Mos njofto me email", 13 | "Notify only when an action is required" : "Njofto vetëm kur lypset një veprim", 14 | "Notify about all events" : "Njofto mbi krejt veprimtaritë", 15 | "Choose an option" : "Zgjidhni një mundësi", 16 | "Hello," : "Tungjatjeta,", 17 | "See %s on %s for more information" : "Për më tepër hollësi, shihni %s te %s", 18 | "See %s on %s for more information" : "Për më tepër hollësi, shihni %s te %s", 19 | "Mail Notifications" : "Njoftime Me Email", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Mund të zgjidhni të njoftoheni me email për veprimtaritë. Disa veprimtari janë informative, të tjera lypin një veprim (b.f. pranoje/hidhe poshtë). Përzgjidhni më poshtë parapëlqimin tuaj:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "S’qe e mundur të merrej sesioni juaj. Ju lutemi, provoni ringarkimin e faqes, ose bëni daljen dhe hyni sërish", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Që të jeni në gjendje të merrni njoftime me email, lypset të përcaktoni një adresë email për llogarinë tuaj." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/gl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notificacións", 5 | "No notifications" : "Non hai notificacións", 6 | "Dismiss" : "Desbotar", 7 | "Admin notifications" : "Notificacións de administración", 8 | "Unknown user session. It is not possible to set the option" : "Sesión de usuario descoñecida. Non é posíbel estabelecer a opción.", 9 | "Option not supported" : "Opción non admitida", 10 | "Saved" : "Gardado", 11 | "Incomplete data" : "Datos incompletos", 12 | "Do not notify via mail" : "Non notificar por correo", 13 | "Notify only when an action is required" : "Notificar só cando se require unha acción", 14 | "Notify about all events" : "Notificar sobre todos os eventos", 15 | "Choose an option" : "Escolla unha opción", 16 | "Hello," : "Ola,", 17 | "See %s on %s for more information" : "Vexa %s en %s para obter máis información", 18 | "See %s on %s for more information" : "Vexa %s en %s para obter máis información ", 19 | "Mail Notifications" : "Notificacións por correo", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Pode escoller ser notificado sobre os eventos mediante o correo. Algúns eventos son informativos, outros requiren unha acción (como aceptar/declinar). Seleccione embaixo a súa preferencia:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Non foi posíbel obter a súa sesión. Tente cargar de novo a páxina ou saia e volva acceder.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para poder recibir notificacións por correo debe especificar un enderezo de correo para a súa conta." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/hu_HU.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Értesítések", 3 | "No notifications" : "Nincsenek értesítések", 4 | "Dismiss" : "Elutasít", 5 | "Admin notifications" : "Rendszergazdai értesítések", 6 | "Unknown user session. It is not possible to set the option" : "Ismeretlen felhasználói munkamenet. Nem lehet beállítani az opciót", 7 | "Option not supported" : "A beállítás nem támogatott", 8 | "Saved" : "Elmentve!", 9 | "Incomplete data" : "Hiányos adatok", 10 | "Do not notify via mail" : "Ne küldjön értesítést e-mailben", 11 | "Notify only when an action is required" : "Csak akkor értesítsen, ha egy műveletre van szükség", 12 | "Notify about all events" : "Értesítsen minden eseményről", 13 | "Choose an option" : "Válasszon egy lehetőséget", 14 | "Hello," : "Szia!", 15 | "See %s on %s for more information" : "Lásd %s itt: %s további információkért", 16 | "See %s on %s for more information" : "lásd %s itt: %s további információkért", 17 | "Mail Notifications" : "Levelezés értesítések", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Választhat, hogy értesítést kap az eseményekről postai úton. Egyes események tájékoztató jellegűek, mások akciót igényelnek (például elfogadják / elutasítják). Válassza ki az alábbi beállításokat:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Érvénytelen munkamenet. Kérjük, próbálja meg újratölteni az oldalt, vagy jelentkezzen ki, és jelentkezzen be újra", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "A levelezési értesítések fogadása esetén meg kell adni egy e-mail címet a fiókjához." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/tr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Bildirimler", 3 | "No notifications" : "Bildirim yok", 4 | "Dismiss" : "İptal et", 5 | "Admin notifications" : "Yönetici bildirimleri", 6 | "Unknown user session. It is not possible to set the option" : "Bilinmeyen kullanıcı oturumu. Seçimi kaydetmek mümkün değil", 7 | "Option not supported" : "Seçim desteklenmiyor", 8 | "Saved" : "Kaydedildi", 9 | "Incomplete data" : "Tamamlanmamış veri", 10 | "Do not notify via mail" : "E-posta ile bildirim gönderme", 11 | "Notify only when an action is required" : "Sadece bir işlem gerektiren durumlarda bildirim gönder", 12 | "Notify about all events" : "Tüm etkinlikler hakkında bildirim gönder", 13 | "Choose an option" : "Bir seçenek seçin", 14 | "Hello," : "Merhaba,", 15 | "See %s on %s for more information" : "Daha fazla bilgi için %s üzerinde %s bakın", 16 | "See %s on %s for more information" : "Daha fazla bilgi için %s üzerinde %s bakın", 17 | "Mail Notifications" : "E-posta Bildirimleri", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Etkinlikler hakkında e-posta bildirimleri almayı seçebilirsiniz. Bazı bildirimler sadece bilgilendirme amaçlı, bazıları ise bir işlem gerektirebilir (onaylama, redetme vb.) Tercihlerinizi aşağıdan belirleyin:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Oturumunuza ulaşılamadı. Lütfen sayfayı yeniden yüklemeyi deneyin ya da çıkış yapıp tekrar giriş yapın.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "E-posta bildirimlerini alabilmek için, hesabınızda bir e-posta adresi belirtilmiş olmalıdır." 21 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 22 | } -------------------------------------------------------------------------------- /l10n/mk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Известувања", 5 | "No notifications" : "Нема известувања", 6 | "Dismiss" : "Отфрли", 7 | "Admin notifications" : "Известувања за администраторот", 8 | "Unknown user session. It is not possible to set the option" : "Непозната корисничка сесија. Не е можно да ја поставите опцијата", 9 | "Option not supported" : "Опцијата не е поддржана", 10 | "Saved" : "Снимено", 11 | "Incomplete data" : "Нецелосни податоци", 12 | "Do not notify via mail" : "Не известувај по Email", 13 | "Notify only when an action is required" : "Извести само кога е потребно акција", 14 | "Notify about all events" : "Извести за сите настани", 15 | "Choose an option" : "Избери...", 16 | "Hello," : "Здраво,", 17 | "See %s on %s for more information" : "Види %s на %s за повеќе информации", 18 | "See %s on %s for more information" : "Види %s на %s за повеќе информации", 19 | "Mail Notifications" : "Email Известувања", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Можете да изберете да бидете известени за настаните по Email. Некои настани се информативни, други бараат акција (како што се прифати/одби). Изберете ги вашите подесувања:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Не можеше да се добие во оваа сесија. Ве молиме, пробајте повторно да ја вчитате страницата или да се одјавите и повторно да се најавите", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "За да може да примате известувања по пошта, потребно е да одредите Email адреса за вашата сметка." 23 | }, 24 | "nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"); 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notifications 2 | 3 | Notification backend and UI for the notification panel/icon. 4 | Used for notifications of other apps ([announcementcenter](https://github.com/owncloud/announcementcenter), [federatedfilesharing](https://github.com/owncloud/core/tree/master/apps/federatedfilesharing) etc.) 5 | 6 | ## QA metrics on master branch: 7 | 8 | [![Build Status](https://drone.owncloud.com/api/badges/owncloud/notifications/status.svg?branch=master)](https://drone.owncloud.com/owncloud/notifications) 9 | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=owncloud_notifications&metric=alert_status)](https://sonarcloud.io/dashboard?id=owncloud_notifications) 10 | [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=owncloud_notifications&metric=security_rating)](https://sonarcloud.io/dashboard?id=owncloud_notifications) 11 | [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=owncloud_notifications&metric=coverage)](https://sonarcloud.io/dashboard?id=owncloud_notifications) 12 | 13 | ## Screenshots 14 | 15 | ### No notifications (Sample) 16 | 17 | **Note:** 18 | In ownCloud 8.2 the app hides itself, when there is no app registered, 19 | that creates notifications. In this case the bell and the dropdown are not 20 | accessible. 21 | 22 | ![Build Status](img/sample-empty.png) 23 | 24 | ### New notifications (Sample) 25 | 26 | ![Build Status](img/sample-new.png) 27 | 28 | ## Notification workflow 29 | 30 | For information how to make your app interact with the notifications app, see 31 | [Sending and processing/"mark as read" notifications as an ownCloud App](https://github.com/owncloud/notifications/blob/master/docs/notification-workflow.md) 32 | in the wiki. 33 | 34 | If you want to present notifications as a client, see [Reading and deleting notifications as an ownCloud Client](https://github.com/owncloud/notifications/blob/master/docs/ocs-endpoint-v1.md). 35 | -------------------------------------------------------------------------------- /l10n/nl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Meldingen", 3 | "No notifications" : "Geen meldingen", 4 | "Dismiss" : "Terzijde leggen", 5 | "Admin notifications" : "Admin meldingen", 6 | "Unknown user session. It is not possible to set the option" : "Onbekende gebruikerssessie. Het is niet mogelijk om de optie in te stellen", 7 | "Option not supported" : "Optie niet ondersteund", 8 | "Saved" : "Bewaard", 9 | "Incomplete data" : "Onvolledige gegevens", 10 | "Do not notify via mail" : "Niet informeren via e-mail", 11 | "Notify only when an action is required" : "Alleen informeren wanneer er een actie vereist is", 12 | "Notify about all events" : "Informeer over alle gebeurtenissen", 13 | "Choose an option" : "Kies een optie", 14 | "Hello," : "Hallo,", 15 | "See %s on %s for more information" : "Zie %sop %s voor meer informatie ", 16 | "See %s on %s for more information" : "Zie %s op %s voor meer informatie", 17 | "Mail Notifications" : "E-mail notificatie", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "U kunt ervoor kiezen om per e-mail op de hoogte te worden gehouden van gebeurtenissen. Sommige gebeurtenissen zijn informatief, andere vereisen een actie (zoals accepteren / weigeren). Selecteer hieronder uw voorkeur:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Het was niet mogelijk om uw sessie te gebruiken. Probeer de pagina opnieuw te laden of volledig opnieuw uit en in te loggen", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Om e-mail notificaties te kunnen ontvangen, moet u een e-mailadres voor uw account opgeven." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/pt_PT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notificações", 3 | "No notifications" : "Sem notificações", 4 | "Dismiss" : "Rejeitar", 5 | "Admin notifications" : "Notificações de administrador", 6 | "Unknown user session. It is not possible to set the option" : "Sessão de utilizador desconhecida. Não é possível definir a opção", 7 | "Option not supported" : "Opção não suportada", 8 | "Saved" : "Guardada", 9 | "Incomplete data" : "Dados incompletos", 10 | "Do not notify via mail" : "Não notificar por correio eletrónico", 11 | "Notify only when an action is required" : "Notificar só quando uma ação for pedida", 12 | "Notify about all events" : "Notificar sobre todos os eventos", 13 | "Choose an option" : "Escolha uma opção", 14 | "Hello," : "Olá,", 15 | "See %s on %s for more information" : "Veja %s em %s para mais informações", 16 | "See %s on %s for more information" : "See %s on %sfor more information", 17 | "Mail Notifications" : "Notificações por Email", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Pode escolher ser notificado via email sobre eventos. Alguns eventos são informativos, outros requerem uma ação (como aceitar/declinar). Selecione abaixo a sua preferência: ", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Não foi possível obter a sua sessão. Por favor tente recarregar a página ou saia e entre novamente", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para pode receber notificações por email é requerido que especifique um endereço e email para a sua conta." 21 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 22 | } -------------------------------------------------------------------------------- /l10n/cs_CZ.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Upozornění", 5 | "No notifications" : "Žádné upozornění", 6 | "Dismiss" : "Zamítnout", 7 | "Admin notifications" : "Upozornění správce", 8 | "Unknown user session. It is not possible to set the option" : "Neznámá relace uživatele. Volbu nelze nastavit", 9 | "Option not supported" : "Volba není podporována", 10 | "Saved" : "Uloženo", 11 | "Incomplete data" : "Nekompletní data", 12 | "Do not notify via mail" : "Nepotvrzovat emailem", 13 | "Notify only when an action is required" : "Informovat pouze v případě, že je akce požadována", 14 | "Notify about all events" : "Informovat o všech událostech", 15 | "Choose an option" : "Vyberte možnost", 16 | "Hello," : "Ahoj,", 17 | "See %s on %s for more information" : "Přečti si %s na %s pro více informací", 18 | "See %s on %s for more information" : "Přečti si %s na %s pro více informací", 19 | "Mail Notifications" : "Emailové upozornění", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Můžete si vybrat upozornění na události prostřednictvím pošty. Některé události jsou informativní, jiné vyžadují akci (například přijetí / odmítnutí). Zvolte své preference níže:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Vaše přihlášená relace vypršela. Zkuste prosím znovu načíst stránku nebo se odhlásit a znovu přihlásit", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Chcete-li dostávat informace emailem, je nutné zadat emailovou adresu ve Vašem účtu." 23 | }, 24 | "nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"); 25 | -------------------------------------------------------------------------------- /l10n/pt_BR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notificações", 3 | "No notifications" : "Nenhuma notificação", 4 | "Dismiss" : "Dispensar", 5 | "Admin notifications" : "Notificações de administrador", 6 | "Unknown user session. It is not possible to set the option" : "Sessão de usuário desconhecida. Não é possível definir a opção", 7 | "Option not supported" : "Opção não suportada", 8 | "Saved" : "Salvo", 9 | "Incomplete data" : "Dados incompletos", 10 | "Do not notify via mail" : "Não notificar por correio", 11 | "Notify only when an action is required" : "Notificar apenas quando uma ação é necessária", 12 | "Notify about all events" : "Notificar sobre todas as alterações", 13 | "Choose an option" : "Escolha uma opção", 14 | "Hello," : "Olá,", 15 | "See %s on %s for more information" : "Veja %s em %s para mais informações", 16 | "See %s on %s for more information" : "See %s on %sfor more information", 17 | "Mail Notifications" : "Notificações de corrreio", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Você pode escolher ser notificado sobre eventos por correio. Alguns eventos são informativos, outros requerem uma ação (como aceitar / recusar). Selecione sua preferência abaixo:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Não foi possível obter sua sessão. Por favor, tente recarregar a página ou sair e faça o login novamente", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para poder receber notificações por correio, é necessário especificar um endereço de e-mail para sua conta." 21 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 22 | } -------------------------------------------------------------------------------- /l10n/is.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Tilkynningar", 3 | "No notifications" : "Engar tilkynningar", 4 | "Dismiss" : "Hafna", 5 | "Admin notifications" : "Tilkynningar kerfisstjóra", 6 | "Unknown user session. It is not possible to set the option" : "Óþekkt notandaseta. Það er ekki hægt að stilla valkostinn", 7 | "Option not supported" : "Valkostur ekki studdur", 8 | "Saved" : "Vistað", 9 | "Incomplete data" : "Ófullgerð gögn", 10 | "Do not notify via mail" : "Ekki láta vita með tölvupósti", 11 | "Notify only when an action is required" : "Aðeins láta vita þegar aðgerðar er krafist", 12 | "Notify about all events" : "Tilkynna um alla atburði", 13 | "Choose an option" : "Veldu einhvern valkost", 14 | "Hello," : "Halló,", 15 | "See %s on %s for more information" : "Skoðaðu %s á %s til að fá frekari upplýsingar", 16 | "See %s on %s for more information" : "Skoðaðu %s á %s til að fá frekari upplýsingar", 17 | "Mail Notifications" : "Tilkynningar í tölvupósti", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Þú getur valið að fá tilkynningar um atburði í tölvupósti. Sumir atburðir eru fróðlegir, aðrir krefjast viðbragða (eins og að samþykkja/hafna). Veldu það sem þér hugnast best hér fyrir neðan:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Það var ekki hægt að finna setuna þína. Endilega prófaðu að endurhlaða síðuna eða skráðu þig út og svo aftur inn", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Til að geta fengið tilkynningar í tölvupósti er nauðsynlegt að tilgreina tölvupóstfang fyrir notandaaðganginn þinn." 21 | },"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);" 22 | } -------------------------------------------------------------------------------- /l10n/tr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Bildirimler", 5 | "No notifications" : "Bildirim yok", 6 | "Dismiss" : "İptal et", 7 | "Admin notifications" : "Yönetici bildirimleri", 8 | "Unknown user session. It is not possible to set the option" : "Bilinmeyen kullanıcı oturumu. Seçimi kaydetmek mümkün değil", 9 | "Option not supported" : "Seçim desteklenmiyor", 10 | "Saved" : "Kaydedildi", 11 | "Incomplete data" : "Tamamlanmamış veri", 12 | "Do not notify via mail" : "E-posta ile bildirim gönderme", 13 | "Notify only when an action is required" : "Sadece bir işlem gerektiren durumlarda bildirim gönder", 14 | "Notify about all events" : "Tüm etkinlikler hakkında bildirim gönder", 15 | "Choose an option" : "Bir seçenek seçin", 16 | "Hello," : "Merhaba,", 17 | "See %s on %s for more information" : "Daha fazla bilgi için %s üzerinde %s bakın", 18 | "See %s on %s for more information" : "Daha fazla bilgi için %s üzerinde %s bakın", 19 | "Mail Notifications" : "E-posta Bildirimleri", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Etkinlikler hakkında e-posta bildirimleri almayı seçebilirsiniz. Bazı bildirimler sadece bilgilendirme amaçlı, bazıları ise bir işlem gerektirebilir (onaylama, redetme vb.) Tercihlerinizi aşağıdan belirleyin:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Oturumunuza ulaşılamadı. Lütfen sayfayı yeniden yüklemeyi deneyin ya da çıkış yapıp tekrar giriş yapın.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "E-posta bildirimlerini alabilmek için, hesabınızda bir e-posta adresi belirtilmiş olmalıdır." 23 | }, 24 | "nplurals=2; plural=(n > 1);"); 25 | -------------------------------------------------------------------------------- /l10n/hu_HU.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Értesítések", 5 | "No notifications" : "Nincsenek értesítések", 6 | "Dismiss" : "Elutasít", 7 | "Admin notifications" : "Rendszergazdai értesítések", 8 | "Unknown user session. It is not possible to set the option" : "Ismeretlen felhasználói munkamenet. Nem lehet beállítani az opciót", 9 | "Option not supported" : "A beállítás nem támogatott", 10 | "Saved" : "Elmentve!", 11 | "Incomplete data" : "Hiányos adatok", 12 | "Do not notify via mail" : "Ne küldjön értesítést e-mailben", 13 | "Notify only when an action is required" : "Csak akkor értesítsen, ha egy műveletre van szükség", 14 | "Notify about all events" : "Értesítsen minden eseményről", 15 | "Choose an option" : "Válasszon egy lehetőséget", 16 | "Hello," : "Szia!", 17 | "See %s on %s for more information" : "Lásd %s itt: %s további információkért", 18 | "See %s on %s for more information" : "lásd %s itt: %s további információkért", 19 | "Mail Notifications" : "Levelezés értesítések", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Választhat, hogy értesítést kap az eseményekről postai úton. Egyes események tájékoztató jellegűek, mások akciót igényelnek (például elfogadják / elutasítják). Válassza ki az alábbi beállításokat:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Érvénytelen munkamenet. Kérjük, próbálja meg újratölteni az oldalt, vagy jelentkezzen ki, és jelentkezzen be újra", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "A levelezési értesítések fogadása esetén meg kell adni egy e-mail címet a fiókjához." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/nl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Meldingen", 5 | "No notifications" : "Geen meldingen", 6 | "Dismiss" : "Terzijde leggen", 7 | "Admin notifications" : "Admin meldingen", 8 | "Unknown user session. It is not possible to set the option" : "Onbekende gebruikerssessie. Het is niet mogelijk om de optie in te stellen", 9 | "Option not supported" : "Optie niet ondersteund", 10 | "Saved" : "Bewaard", 11 | "Incomplete data" : "Onvolledige gegevens", 12 | "Do not notify via mail" : "Niet informeren via e-mail", 13 | "Notify only when an action is required" : "Alleen informeren wanneer er een actie vereist is", 14 | "Notify about all events" : "Informeer over alle gebeurtenissen", 15 | "Choose an option" : "Kies een optie", 16 | "Hello," : "Hallo,", 17 | "See %s on %s for more information" : "Zie %sop %s voor meer informatie ", 18 | "See %s on %s for more information" : "Zie %s op %s voor meer informatie", 19 | "Mail Notifications" : "E-mail notificatie", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "U kunt ervoor kiezen om per e-mail op de hoogte te worden gehouden van gebeurtenissen. Sommige gebeurtenissen zijn informatief, andere vereisen een actie (zoals accepteren / weigeren). Selecteer hieronder uw voorkeur:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Het was niet mogelijk om uw sessie te gebruiken. Probeer de pagina opnieuw te laden of volledig opnieuw uit en in te loggen", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Om e-mail notificaties te kunnen ontvangen, moet u een e-mailadres voor uw account opgeven." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/pt_PT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notificações", 5 | "No notifications" : "Sem notificações", 6 | "Dismiss" : "Rejeitar", 7 | "Admin notifications" : "Notificações de administrador", 8 | "Unknown user session. It is not possible to set the option" : "Sessão de utilizador desconhecida. Não é possível definir a opção", 9 | "Option not supported" : "Opção não suportada", 10 | "Saved" : "Guardada", 11 | "Incomplete data" : "Dados incompletos", 12 | "Do not notify via mail" : "Não notificar por correio eletrónico", 13 | "Notify only when an action is required" : "Notificar só quando uma ação for pedida", 14 | "Notify about all events" : "Notificar sobre todos os eventos", 15 | "Choose an option" : "Escolha uma opção", 16 | "Hello," : "Olá,", 17 | "See %s on %s for more information" : "Veja %s em %s para mais informações", 18 | "See %s on %s for more information" : "See %s on %sfor more information", 19 | "Mail Notifications" : "Notificações por Email", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Pode escolher ser notificado via email sobre eventos. Alguns eventos são informativos, outros requerem uma ação (como aceitar/declinar). Selecione abaixo a sua preferência: ", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Não foi possível obter a sua sessão. Por favor tente recarregar a página ou saia e entre novamente", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para pode receber notificações por email é requerido que especifique um endereço e email para a sua conta." 23 | }, 24 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 25 | -------------------------------------------------------------------------------- /tests/unit/TestCase.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Thomas Müller 5 | * 6 | * @copyright Copyright (c) 2016, ownCloud, Inc. 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Notifications\Tests\Unit; 24 | 25 | abstract class TestCase extends \Test\TestCase { 26 | /** @var array */ 27 | protected $services = []; 28 | 29 | /** 30 | * @param string $name 31 | * @param mixed $newService 32 | * @return bool 33 | */ 34 | public function overwriteService($name, $newService) { 35 | if (isset($this->services[$name])) { 36 | return false; 37 | } 38 | 39 | $this->services[$name] = \OC::$server->query($name); 40 | \OC::$server->registerService($name, function () use ($newService) { 41 | return $newService; 42 | }); 43 | 44 | return true; 45 | } 46 | 47 | /** 48 | * @param string $name 49 | * @return bool 50 | */ 51 | public function restoreService($name) { 52 | if (isset($this->services[$name])) { 53 | $oldService = $this->services[$name]; 54 | \OC::$server->registerService($name, function () use ($oldService) { 55 | return $oldService; 56 | }); 57 | 58 | unset($this->services[$name]); 59 | return true; 60 | } 61 | 62 | return false; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /l10n/pt_BR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notificações", 5 | "No notifications" : "Nenhuma notificação", 6 | "Dismiss" : "Dispensar", 7 | "Admin notifications" : "Notificações de administrador", 8 | "Unknown user session. It is not possible to set the option" : "Sessão de usuário desconhecida. Não é possível definir a opção", 9 | "Option not supported" : "Opção não suportada", 10 | "Saved" : "Salvo", 11 | "Incomplete data" : "Dados incompletos", 12 | "Do not notify via mail" : "Não notificar por correio", 13 | "Notify only when an action is required" : "Notificar apenas quando uma ação é necessária", 14 | "Notify about all events" : "Notificar sobre todas as alterações", 15 | "Choose an option" : "Escolha uma opção", 16 | "Hello," : "Olá,", 17 | "See %s on %s for more information" : "Veja %s em %s para mais informações", 18 | "See %s on %s for more information" : "See %s on %sfor more information", 19 | "Mail Notifications" : "Notificações de corrreio", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Você pode escolher ser notificado sobre eventos por correio. Alguns eventos são informativos, outros requerem uma ação (como aceitar / recusar). Selecione sua preferência abaixo:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Não foi possível obter sua sessão. Por favor, tente recarregar a página ou sair e faça o login novamente", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para poder receber notificações por correio, é necessário especificar um endereço de e-mail para sua conta." 23 | }, 24 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 25 | -------------------------------------------------------------------------------- /l10n/is.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Tilkynningar", 5 | "No notifications" : "Engar tilkynningar", 6 | "Dismiss" : "Hafna", 7 | "Admin notifications" : "Tilkynningar kerfisstjóra", 8 | "Unknown user session. It is not possible to set the option" : "Óþekkt notandaseta. Það er ekki hægt að stilla valkostinn", 9 | "Option not supported" : "Valkostur ekki studdur", 10 | "Saved" : "Vistað", 11 | "Incomplete data" : "Ófullgerð gögn", 12 | "Do not notify via mail" : "Ekki láta vita með tölvupósti", 13 | "Notify only when an action is required" : "Aðeins láta vita þegar aðgerðar er krafist", 14 | "Notify about all events" : "Tilkynna um alla atburði", 15 | "Choose an option" : "Veldu einhvern valkost", 16 | "Hello," : "Halló,", 17 | "See %s on %s for more information" : "Skoðaðu %s á %s til að fá frekari upplýsingar", 18 | "See %s on %s for more information" : "Skoðaðu %s á %s til að fá frekari upplýsingar", 19 | "Mail Notifications" : "Tilkynningar í tölvupósti", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Þú getur valið að fá tilkynningar um atburði í tölvupósti. Sumir atburðir eru fróðlegir, aðrir krefjast viðbragða (eins og að samþykkja/hafna). Veldu það sem þér hugnast best hér fyrir neðan:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Það var ekki hægt að finna setuna þína. Endilega prófaðu að endurhlaða síðuna eða skráðu þig út og svo aftur inn", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Til að geta fengið tilkynningar í tölvupósti er nauðsynlegt að tilgreina tölvupóstfang fyrir notandaaðganginn þinn." 23 | }, 24 | "nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"); 25 | -------------------------------------------------------------------------------- /l10n/it.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notifiche", 3 | "No notifications" : "Nessuna notifica", 4 | "Dismiss" : "Annulla", 5 | "Admin notifications" : "Notifiche amministrative", 6 | "Unknown user session. It is not possible to set the option" : "Sessione utente sconosciuta. Non è possibile impostare l'opzione", 7 | "Option not supported" : "Opzione non supportata", 8 | "Saved" : "Salvato", 9 | "Incomplete data" : "Dati incompleti", 10 | "Do not notify via mail" : "Non notificare tramite posta elettronica", 11 | "Notify only when an action is required" : "Notifica solo quando un'azione è richiesta", 12 | "Notify about all events" : "Notifiche per tutti gli eventi", 13 | "Choose an option" : "Scegli un'opzione", 14 | "Hello," : "Ciao,", 15 | "See %s on %s for more information" : "Vedi %s su %s per ulteriori informazioni", 16 | "See %s on %s for more information" : "Vedi %s su %s per ulteriori informazioni", 17 | "Mail Notifications" : "Notifiche di posta elettronica", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Puoi scegliere, se ricevere le notifiche via mail, per gli eventi.Alcuni eventi sono informativi, altri richiedono un azione (per esempio accetta/rifiuta). Seleziona la tua preferenza di seguito: ", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Non è stato possibile prendere la tua sessione. Per cortesia, prova a fare un refresh della pagina oppure esci e rientra.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Per poter ricevere le notifiche di posta è necessario specificare un indirizzo email per il tuo account." 21 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 22 | } -------------------------------------------------------------------------------- /l10n/it.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notifiche", 5 | "No notifications" : "Nessuna notifica", 6 | "Dismiss" : "Annulla", 7 | "Admin notifications" : "Notifiche amministrative", 8 | "Unknown user session. It is not possible to set the option" : "Sessione utente sconosciuta. Non è possibile impostare l'opzione", 9 | "Option not supported" : "Opzione non supportata", 10 | "Saved" : "Salvato", 11 | "Incomplete data" : "Dati incompleti", 12 | "Do not notify via mail" : "Non notificare tramite posta elettronica", 13 | "Notify only when an action is required" : "Notifica solo quando un'azione è richiesta", 14 | "Notify about all events" : "Notifiche per tutti gli eventi", 15 | "Choose an option" : "Scegli un'opzione", 16 | "Hello," : "Ciao,", 17 | "See %s on %s for more information" : "Vedi %s su %s per ulteriori informazioni", 18 | "See %s on %s for more information" : "Vedi %s su %s per ulteriori informazioni", 19 | "Mail Notifications" : "Notifiche di posta elettronica", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Puoi scegliere, se ricevere le notifiche via mail, per gli eventi.Alcuni eventi sono informativi, altri richiedono un azione (per esempio accetta/rifiuta). Seleziona la tua preferenza di seguito: ", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Non è stato possibile prendere la tua sessione. Per cortesia, prova a fare un refresh della pagina oppure esci e rientra.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Per poter ricevere le notifiche di posta è necessario specificare un indirizzo email per il tuo account." 23 | }, 24 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 25 | -------------------------------------------------------------------------------- /l10n/es.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notificaciones", 3 | "No notifications" : "No hay notificaciones", 4 | "Dismiss" : "Descartar", 5 | "Admin notifications" : "Notificaciones del administrador", 6 | "Unknown user session. It is not possible to set the option" : "Sesión de usuario desconocida. No es posible establecer la opción.", 7 | "Option not supported" : "Opción no soportada", 8 | "Saved" : "Guardado", 9 | "Incomplete data" : "Información incompleta", 10 | "Do not notify via mail" : "No notificar por correo electrónico", 11 | "Notify only when an action is required" : "Notificar solamente cuando se requiere una acción", 12 | "Notify about all events" : "Notificar acerca de todos los eventos", 13 | "Choose an option" : "Elige una opción", 14 | "Hello," : "Hola,", 15 | "See %s on %s for more information" : "Consulta %s en %s para más información", 16 | "See %s on %s for more information" : "Consulta %s en %s para más información", 17 | "Mail Notifications" : "Notificaciones por correo electrónico.", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Puedes elegir ser notificado acerca de eventos por medio de correo electrónico. Algunos eventos son informativos, otros requieren una acción (como aceptar/declinar). Selecciona tu preferencia abajo:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "No fue posible obtener tu sesión. Por favor, intenta recargar la página o sal y entra de nuevo.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para poder recibir notificaciones por correo electrónico se debe especificar una dirección de correo para tu cuenta." 21 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 22 | } -------------------------------------------------------------------------------- /l10n/es.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notificaciones", 5 | "No notifications" : "No hay notificaciones", 6 | "Dismiss" : "Descartar", 7 | "Admin notifications" : "Notificaciones del administrador", 8 | "Unknown user session. It is not possible to set the option" : "Sesión de usuario desconocida. No es posible establecer la opción.", 9 | "Option not supported" : "Opción no soportada", 10 | "Saved" : "Guardado", 11 | "Incomplete data" : "Información incompleta", 12 | "Do not notify via mail" : "No notificar por correo electrónico", 13 | "Notify only when an action is required" : "Notificar solamente cuando se requiere una acción", 14 | "Notify about all events" : "Notificar acerca de todos los eventos", 15 | "Choose an option" : "Elige una opción", 16 | "Hello," : "Hola,", 17 | "See %s on %s for more information" : "Consulta %s en %s para más información", 18 | "See %s on %s for more information" : "Consulta %s en %s para más información", 19 | "Mail Notifications" : "Notificaciones por correo electrónico.", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Puedes elegir ser notificado acerca de eventos por medio de correo electrónico. Algunos eventos son informativos, otros requieren una acción (como aceptar/declinar). Selecciona tu preferencia abajo:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "No fue posible obtener tu sesión. Por favor, intenta recargar la página o sal y entra de nuevo.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Para poder recibir notificaciones por correo electrónico se debe especificar una dirección de correo para tu cuenta." 23 | }, 24 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 25 | -------------------------------------------------------------------------------- /l10n/el.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Ειδοποιήσεις", 3 | "No notifications" : "Δεν υπάρχουν ειδοποιήσεις", 4 | "Dismiss" : "Αποδέσμευση", 5 | "Admin notifications" : "Ειδοποιήσεις διαχειριστή", 6 | "Unknown user session. It is not possible to set the option" : "Άγνωστη συνεδρία χρήστη. Δεν είναι δυνατή η ρύθμιση της επιλογής", 7 | "Option not supported" : "Μη υποστηριζόμενη επιλογή", 8 | "Saved" : "Αποθηκευμένο", 9 | "Incomplete data" : "Ελλιπή δεδομένα", 10 | "Do not notify via mail" : "Να μην γίνεται ειδοποίηση μέσω αλληλογραφίας", 11 | "Notify only when an action is required" : "Ειδοποίηση μόνο όταν απαιτείται κάποια ενέργεια", 12 | "Notify about all events" : "Ειδοποίηση για όλα τα συμβάντα", 13 | "Choose an option" : "Διάλεξε μια επιλογή", 14 | "Hello," : "Γεια σας,", 15 | "See %s on %s for more information" : "Δείτε %s στο %s για περισσότερες πληροφορίες", 16 | "See %s on %s for more information" : "Δείτε %s στο %s για περισσότερες πληροφορίες", 17 | "Mail Notifications" : "Ειδοποιήσεις αλληλογραφίας", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Μπορείτε να επιλέξετε να ειδοποιήστε για τα συμβάντα μέσω ηλεκτρονικού ταχυδρομείου. Ορισμένα συμβάντα είναι ενημερωτικά, άλλα απαιτούν κάποια ενέργεια (όπως την αποδοχή/απόρριψη). Επιλέξτε την προτίμησή σας παρακάτω:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Δεν ήταν δυνατό να αποκτήσετε τη συνεδρία σας. Παρακαλούμε δοκιμάστε ξανά τη φόρτωση της σελίδας ή αποσυνδεθείτε και συνδεθείτε ξανά", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Για να λαμβάνετε ειδοποιήσεις αλληλογραφίας, πρέπει να καθορίσετε μια διεύθυνση ηλεκτρονικού ταχυδρομείου για το λογαριασμό σας." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/de.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Benachrichtigungen", 3 | "No notifications" : "Keine Benachrichtigungen", 4 | "Dismiss" : "Ausblenden", 5 | "Admin notifications" : "Admin-Benachrichtigungen", 6 | "Unknown user session. It is not possible to set the option" : "Unbekannte Benutzer-Sitzung. Die Einstellung konnte nicht gesetzt werden. ", 7 | "Option not supported" : "Einstellung wird nicht unterstützt. ", 8 | "Saved" : "Gespeichert", 9 | "Incomplete data" : "Unvollständige Daten", 10 | "Do not notify via mail" : "Nicht per E-Mail benachrichtigen", 11 | "Notify only when an action is required" : "Nur benachrichtigen wenn Aktion notwendig ist", 12 | "Notify about all events" : "Über alle Ereignisse benachrichtigen", 13 | "Choose an option" : "Wähle eine Option", 14 | "Hello," : "Hallo,", 15 | "See %s on %s for more information" : "Siehe %s in %s für weitere Informationen", 16 | "See %s on %s for more information" : "Bitte %s auf %s ansehen, für weitere Informationen", 17 | "Mail Notifications" : "E-Mail-Benachrichtigungen", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Du kannst dich über Ereignisse per E-Mail benachrichtigen lassen. Einige davon sind informativ, andere erfordern eine Aktion (wie Annehmen oder Zurückweisen). Wähle deine Einstellungen hier:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Es war nicht möglich deine Sitzung zu identifizieren. Bitte lade die Seite neu oder melde dich erneut an.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Um Benachrichtigungen zu erhalten ist es notwendig eine E-Mail-Adresse für deinen Benutzerkonto anzugeben. Gehe zu deinen Einstellungen (Allgemein) um die Adresse einzutragen." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/de_DE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Benachrichtigungen", 3 | "No notifications" : "keine Benachrichtigungen", 4 | "Dismiss" : "Ausblenden", 5 | "Admin notifications" : "Admin Benachrichtigungen", 6 | "Unknown user session. It is not possible to set the option" : "Benutzer Session ist unbekannt. Es ist nicht möglich diese Option zu speichern.", 7 | "Option not supported" : "Option nicht unterstützt", 8 | "Saved" : "Gespeichert", 9 | "Incomplete data" : "Unvollständige Daten", 10 | "Do not notify via mail" : "Nicht per E-Mail benachrichtigen", 11 | "Notify only when an action is required" : "Nur informieren, wenn eine Aktion erforderlich ist", 12 | "Notify about all events" : "Über alle Ereignisse informieren", 13 | "Choose an option" : "Wählen Sie eine Option", 14 | "Hello," : "Hallo,", 15 | "See %s on %s for more information" : "Gehen Sie auf %s in %s für weitere Informationen", 16 | "See %s on %s for more information" : "Bitte %s auf %s ansehen, für weitere Informationen", 17 | "Mail Notifications" : "E-Mail Benachrichtigungen", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Sie können sich über Ereignisse per E-Mail benachrichtigen lassen. Manche Ereignisse sind rein informativ, andere hingegen erfordern ein manuelles Eingreifen (z.B. Annehmen/Ablehnen). Wählen Sie ihre gewünschte Einstellung:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Ihre Session konnte nicht ermittelt werden. Bitte versuchen Sie die Seite neu zu laden oder sich ab- und wieder anzumelden.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Es ist notwendig eine E-Mail-Adresse zu ihrem Konto hinzuzufügen, um Benachrichtigungen per E-Mail zu erhalten." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/de_CH.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Benachrichtigungen", 3 | "No notifications" : "Keine Benachrichtigungen", 4 | "Dismiss" : "Ausblenden", 5 | "Admin notifications" : "Admin-Benachrichtigungen", 6 | "Unknown user session. It is not possible to set the option" : "Unbekannte Benutzer-Sitzung. Die Einstellung konnte nicht gesetzt werden. ", 7 | "Option not supported" : "Einstellung wird nicht unterstützt. ", 8 | "Saved" : "Gespeichert", 9 | "Incomplete data" : "Unvollständige Daten", 10 | "Do not notify via mail" : "Nicht per E-Mail benachrichtigen", 11 | "Notify only when an action is required" : "Nur benachrichtigen wenn Aktion notwendig ist", 12 | "Notify about all events" : "Über alle Ereignisse benachrichtigen", 13 | "Choose an option" : "Wähle eine Option", 14 | "Hello," : "Hallo,", 15 | "See %s on %s for more information" : "Siehe %s in %s für weitere Informationen", 16 | "See %s on %s for more information" : "Bitte %s auf %s ansehen, für weitere Informationen", 17 | "Mail Notifications" : "E-Mail-Benachrichtigungen", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Du kannst dich über Ereignisse per E-Mail benachrichtigen lassen. Einige davon sind informativ, andere erfordern eine Aktion (wie Annehmen oder Zurückweisen). Wähle deine Einstellungen hier:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Es war nicht möglich deine Sitzung zu identifizieren. Bitte lade die Seite neu oder melde dich erneut an.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Um Benachrichtigungen zu erhalten ist es notwendig eine E-Mail-Adresse für deinen Benutzerkonto anzugeben. Gehe zu deinen Einstellungen (Allgemein) um die Adresse einzutragen." 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /l10n/fr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Notifications", 3 | "No notifications" : "Aucune notification", 4 | "Dismiss" : "Ignorer", 5 | "Admin notifications" : "Notifications administrateur", 6 | "Unknown user session. It is not possible to set the option" : "Session utilisateur inconnue. Il n'est pas possible de définir cette option.", 7 | "Option not supported" : "Option non supportée", 8 | "Saved" : "Enregistré", 9 | "Incomplete data" : "Données incomplètes", 10 | "Do not notify via mail" : "Ne pas notifier via courriel", 11 | "Notify only when an action is required" : "Notifier seulement quand une action est obligatoire", 12 | "Notify about all events" : "Notifier à propos de tous les évènements", 13 | "Choose an option" : "Choisir une option", 14 | "Hello," : "Bonjour,", 15 | "See %s on %s for more information" : "Voir %s sur %s pour plus d'informations", 16 | "See %s on %s for more information" : "Voir %s sur %s pour plus d'informations", 17 | "Mail Notifications" : "Notifications par courriel", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Vous pouvez choisir d'être notifié·e des événements par courriel. Certains événements sont informatifs, d'autres nécessitent une action (comme accepter/refuser). Sélectionnez vos préférences ci-dessous :", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Il n'est pas possible d'accéder à votre session. Merci d’essayer de recharger la page ou de vous déconnecter et vous reconnecter à nouveau.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Pour pouvoir recevoir des courriels, il est obligatoire de spécifier une adresse courriel pour votre compte" 21 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 22 | } -------------------------------------------------------------------------------- /l10n/pl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Powiadomienia", 3 | "No notifications" : "Brak powiadomień", 4 | "Dismiss" : "Anuluj", 5 | "Admin notifications" : "Powiadomienia administratora", 6 | "Unknown user session. It is not possible to set the option" : "Nieznana sesja użytkownika. Nie jest możliwe zapisanie ustawień.", 7 | "Option not supported" : "Opcja nie jest obsługiwana.", 8 | "Saved" : "Zapisano", 9 | "Incomplete data" : "Niekompletne dane", 10 | "Do not notify via mail" : "Nie wysyłaj powiadomień przez emaila", 11 | "Notify only when an action is required" : "Powiadamiaj mnie tylko, gdy jest wymagana akcja", 12 | "Notify about all events" : "Powiadamiaj o wszystkich aktywnościach", 13 | "Choose an option" : "Wybierz opcję", 14 | "Hello," : "Witaj,", 15 | "See %s on %s for more information" : "Zajrzyj do %s na %s aby uzyskać więcej informacji", 16 | "See %s on %s for more information" : "Zajrzyj do %s na %s aby uzyskać więcej informacji", 17 | "Mail Notifications" : "Powiadomienia emailowe", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Możesz być powiadamiany o wszystkich wydarzeniach przez email. Niektóre powiadomienia są informacyjne, inne wymagają akcji (np. akceptacja/odrzucenie). Ustaw swoje preferencje poniżej:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Pobranie Twojej sesji nie było możliwe. Proszę spróbuj przeładować stronę i zalogować się ponownie.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Aby otrzymywać powiadomienia emailowe, należy podać adres email Twojego konta." 21 | },"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);" 22 | } -------------------------------------------------------------------------------- /l10n/el.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Ειδοποιήσεις", 5 | "No notifications" : "Δεν υπάρχουν ειδοποιήσεις", 6 | "Dismiss" : "Αποδέσμευση", 7 | "Admin notifications" : "Ειδοποιήσεις διαχειριστή", 8 | "Unknown user session. It is not possible to set the option" : "Άγνωστη συνεδρία χρήστη. Δεν είναι δυνατή η ρύθμιση της επιλογής", 9 | "Option not supported" : "Μη υποστηριζόμενη επιλογή", 10 | "Saved" : "Αποθηκευμένο", 11 | "Incomplete data" : "Ελλιπή δεδομένα", 12 | "Do not notify via mail" : "Να μην γίνεται ειδοποίηση μέσω αλληλογραφίας", 13 | "Notify only when an action is required" : "Ειδοποίηση μόνο όταν απαιτείται κάποια ενέργεια", 14 | "Notify about all events" : "Ειδοποίηση για όλα τα συμβάντα", 15 | "Choose an option" : "Διάλεξε μια επιλογή", 16 | "Hello," : "Γεια σας,", 17 | "See %s on %s for more information" : "Δείτε %s στο %s για περισσότερες πληροφορίες", 18 | "See %s on %s for more information" : "Δείτε %s στο %s για περισσότερες πληροφορίες", 19 | "Mail Notifications" : "Ειδοποιήσεις αλληλογραφίας", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Μπορείτε να επιλέξετε να ειδοποιήστε για τα συμβάντα μέσω ηλεκτρονικού ταχυδρομείου. Ορισμένα συμβάντα είναι ενημερωτικά, άλλα απαιτούν κάποια ενέργεια (όπως την αποδοχή/απόρριψη). Επιλέξτε την προτίμησή σας παρακάτω:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Δεν ήταν δυνατό να αποκτήσετε τη συνεδρία σας. Παρακαλούμε δοκιμάστε ξανά τη φόρτωση της σελίδας ή αποσυνδεθείτε και συνδεθείτε ξανά", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Για να λαμβάνετε ειδοποιήσεις αλληλογραφίας, πρέπει να καθορίσετε μια διεύθυνση ηλεκτρονικού ταχυδρομείου για το λογαριασμό σας." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/de.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Benachrichtigungen", 5 | "No notifications" : "Keine Benachrichtigungen", 6 | "Dismiss" : "Ausblenden", 7 | "Admin notifications" : "Admin-Benachrichtigungen", 8 | "Unknown user session. It is not possible to set the option" : "Unbekannte Benutzer-Sitzung. Die Einstellung konnte nicht gesetzt werden. ", 9 | "Option not supported" : "Einstellung wird nicht unterstützt. ", 10 | "Saved" : "Gespeichert", 11 | "Incomplete data" : "Unvollständige Daten", 12 | "Do not notify via mail" : "Nicht per E-Mail benachrichtigen", 13 | "Notify only when an action is required" : "Nur benachrichtigen wenn Aktion notwendig ist", 14 | "Notify about all events" : "Über alle Ereignisse benachrichtigen", 15 | "Choose an option" : "Wähle eine Option", 16 | "Hello," : "Hallo,", 17 | "See %s on %s for more information" : "Siehe %s in %s für weitere Informationen", 18 | "See %s on %s for more information" : "Bitte %s auf %s ansehen, für weitere Informationen", 19 | "Mail Notifications" : "E-Mail-Benachrichtigungen", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Du kannst dich über Ereignisse per E-Mail benachrichtigen lassen. Einige davon sind informativ, andere erfordern eine Aktion (wie Annehmen oder Zurückweisen). Wähle deine Einstellungen hier:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Es war nicht möglich deine Sitzung zu identifizieren. Bitte lade die Seite neu oder melde dich erneut an.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Um Benachrichtigungen zu erhalten ist es notwendig eine E-Mail-Adresse für deinen Benutzerkonto anzugeben. Gehe zu deinen Einstellungen (Allgemein) um die Adresse einzutragen." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/de_DE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Benachrichtigungen", 5 | "No notifications" : "keine Benachrichtigungen", 6 | "Dismiss" : "Ausblenden", 7 | "Admin notifications" : "Admin Benachrichtigungen", 8 | "Unknown user session. It is not possible to set the option" : "Benutzer Session ist unbekannt. Es ist nicht möglich diese Option zu speichern.", 9 | "Option not supported" : "Option nicht unterstützt", 10 | "Saved" : "Gespeichert", 11 | "Incomplete data" : "Unvollständige Daten", 12 | "Do not notify via mail" : "Nicht per E-Mail benachrichtigen", 13 | "Notify only when an action is required" : "Nur informieren, wenn eine Aktion erforderlich ist", 14 | "Notify about all events" : "Über alle Ereignisse informieren", 15 | "Choose an option" : "Wählen Sie eine Option", 16 | "Hello," : "Hallo,", 17 | "See %s on %s for more information" : "Gehen Sie auf %s in %s für weitere Informationen", 18 | "See %s on %s for more information" : "Bitte %s auf %s ansehen, für weitere Informationen", 19 | "Mail Notifications" : "E-Mail Benachrichtigungen", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Sie können sich über Ereignisse per E-Mail benachrichtigen lassen. Manche Ereignisse sind rein informativ, andere hingegen erfordern ein manuelles Eingreifen (z.B. Annehmen/Ablehnen). Wählen Sie ihre gewünschte Einstellung:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Ihre Session konnte nicht ermittelt werden. Bitte versuchen Sie die Seite neu zu laden oder sich ab- und wieder anzumelden.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Es ist notwendig eine E-Mail-Adresse zu ihrem Konto hinzuzufügen, um Benachrichtigungen per E-Mail zu erhalten." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/ru.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Уведомления", 3 | "No notifications" : "Нет уведомлений", 4 | "Dismiss" : "Убрать", 5 | "Admin notifications" : "Уведомления администратора", 6 | "Unknown user session. It is not possible to set the option" : "Неизвестная пользовательская сессия. Невозможно установить опцию", 7 | "Option not supported" : "Опция не поддерживается", 8 | "Saved" : "Сохранено", 9 | "Incomplete data" : "Недостаточно данных", 10 | "Do not notify via mail" : "Не уведомлять посредством почты", 11 | "Notify only when an action is required" : "Уведомить только когда потребуется действие", 12 | "Notify about all events" : "Уведомлять обо всех событиях", 13 | "Choose an option" : "Выбирете опции", 14 | "Hello," : "Здравствуйте,", 15 | "See %s on %s for more information" : "Откройте %s на %s для более подробной инфрмации", 16 | "See %s on %s for more information" : "Откройте %s на %s для более подробной информации", 17 | "Mail Notifications" : "Почтовые уведомления", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Вы можете выбрать получать уведомления о событиях через почту. Некоторые события для информации, другие требуют совершения действия (например принять/отклонить). Выберите ваше предпочтение ниже:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Не удалось найти вашу сессию. Пожалуйста, попробуйте обновить страницу или перелогиниться.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Чтобы иметь возможность принимать почтовые уведомления, требуется указать адрес электронной почты для вашей учетной записи." 21 | },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" 22 | } -------------------------------------------------------------------------------- /l10n/de_CH.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Benachrichtigungen", 5 | "No notifications" : "Keine Benachrichtigungen", 6 | "Dismiss" : "Ausblenden", 7 | "Admin notifications" : "Admin-Benachrichtigungen", 8 | "Unknown user session. It is not possible to set the option" : "Unbekannte Benutzer-Sitzung. Die Einstellung konnte nicht gesetzt werden. ", 9 | "Option not supported" : "Einstellung wird nicht unterstützt. ", 10 | "Saved" : "Gespeichert", 11 | "Incomplete data" : "Unvollständige Daten", 12 | "Do not notify via mail" : "Nicht per E-Mail benachrichtigen", 13 | "Notify only when an action is required" : "Nur benachrichtigen wenn Aktion notwendig ist", 14 | "Notify about all events" : "Über alle Ereignisse benachrichtigen", 15 | "Choose an option" : "Wähle eine Option", 16 | "Hello," : "Hallo,", 17 | "See %s on %s for more information" : "Siehe %s in %s für weitere Informationen", 18 | "See %s on %s for more information" : "Bitte %s auf %s ansehen, für weitere Informationen", 19 | "Mail Notifications" : "E-Mail-Benachrichtigungen", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Du kannst dich über Ereignisse per E-Mail benachrichtigen lassen. Einige davon sind informativ, andere erfordern eine Aktion (wie Annehmen oder Zurückweisen). Wähle deine Einstellungen hier:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Es war nicht möglich deine Sitzung zu identifizieren. Bitte lade die Seite neu oder melde dich erneut an.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Um Benachrichtigungen zu erhalten ist es notwendig eine E-Mail-Adresse für deinen Benutzerkonto anzugeben. Gehe zu deinen Einstellungen (Allgemein) um die Adresse einzutragen." 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/fr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Notifications", 5 | "No notifications" : "Aucune notification", 6 | "Dismiss" : "Ignorer", 7 | "Admin notifications" : "Notifications administrateur", 8 | "Unknown user session. It is not possible to set the option" : "Session utilisateur inconnue. Il n'est pas possible de définir cette option.", 9 | "Option not supported" : "Option non supportée", 10 | "Saved" : "Enregistré", 11 | "Incomplete data" : "Données incomplètes", 12 | "Do not notify via mail" : "Ne pas notifier via courriel", 13 | "Notify only when an action is required" : "Notifier seulement quand une action est obligatoire", 14 | "Notify about all events" : "Notifier à propos de tous les évènements", 15 | "Choose an option" : "Choisir une option", 16 | "Hello," : "Bonjour,", 17 | "See %s on %s for more information" : "Voir %s sur %s pour plus d'informations", 18 | "See %s on %s for more information" : "Voir %s sur %s pour plus d'informations", 19 | "Mail Notifications" : "Notifications par courriel", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Vous pouvez choisir d'être notifié·e des événements par courriel. Certains événements sont informatifs, d'autres nécessitent une action (comme accepter/refuser). Sélectionnez vos préférences ci-dessous :", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Il n'est pas possible d'accéder à votre session. Merci d’essayer de recharger la page ou de vous déconnecter et vous reconnecter à nouveau.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Pour pouvoir recevoir des courriels, il est obligatoire de spécifier une adresse courriel pour votre compte" 23 | }, 24 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 25 | -------------------------------------------------------------------------------- /l10n/ru_RU.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Notifications" : "Уведомления", 3 | "No notifications" : "Нет уведомлений", 4 | "Dismiss" : "Убрать", 5 | "Admin notifications" : "Уведомления администратора", 6 | "Unknown user session. It is not possible to set the option" : "Неизвестная пользовательская сессия. Невозможно установить опцию", 7 | "Option not supported" : "Опция не поддерживается", 8 | "Saved" : "Сохранено", 9 | "Incomplete data" : "Недостаточно данных", 10 | "Do not notify via mail" : "Не уведомлять посредством почты", 11 | "Notify only when an action is required" : "Уведомить только когда потребуется действие", 12 | "Notify about all events" : "Уведомлять обо всех событиях", 13 | "Choose an option" : "Выбирете опции", 14 | "Hello," : "Здравствуйте,", 15 | "See %s on %s for more information" : "Откройте %s на %s для более подробной инфрмации", 16 | "See %s on %s for more information" : "Откройте %s на %s для более подробной информации", 17 | "Mail Notifications" : "Почтовые уведомления", 18 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Вы можете выбрать получать уведомления о событиях через почту. Некоторые события для информации, другие требуют совершения действия (например принять/отклонить). Выберите ваше предпочтение ниже:", 19 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Не удалось найти вашу сессию. Пожалуйста, попробуйте обновить страницу или перелогиниться.", 20 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Чтобы иметь возможность принимать почтовые уведомления, требуется указать адрес электронной почты для вашей учетной записи." 21 | },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" 22 | } -------------------------------------------------------------------------------- /l10n/pl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Powiadomienia", 5 | "No notifications" : "Brak powiadomień", 6 | "Dismiss" : "Anuluj", 7 | "Admin notifications" : "Powiadomienia administratora", 8 | "Unknown user session. It is not possible to set the option" : "Nieznana sesja użytkownika. Nie jest możliwe zapisanie ustawień.", 9 | "Option not supported" : "Opcja nie jest obsługiwana.", 10 | "Saved" : "Zapisano", 11 | "Incomplete data" : "Niekompletne dane", 12 | "Do not notify via mail" : "Nie wysyłaj powiadomień przez emaila", 13 | "Notify only when an action is required" : "Powiadamiaj mnie tylko, gdy jest wymagana akcja", 14 | "Notify about all events" : "Powiadamiaj o wszystkich aktywnościach", 15 | "Choose an option" : "Wybierz opcję", 16 | "Hello," : "Witaj,", 17 | "See %s on %s for more information" : "Zajrzyj do %s na %s aby uzyskać więcej informacji", 18 | "See %s on %s for more information" : "Zajrzyj do %s na %s aby uzyskać więcej informacji", 19 | "Mail Notifications" : "Powiadomienia emailowe", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Możesz być powiadamiany o wszystkich wydarzeniach przez email. Niektóre powiadomienia są informacyjne, inne wymagają akcji (np. akceptacja/odrzucenie). Ustaw swoje preferencje poniżej:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Pobranie Twojej sesji nie było możliwe. Proszę spróbuj przeładować stronę i zalogować się ponownie.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Aby otrzymywać powiadomienia emailowe, należy podać adres email Twojego konta." 23 | }, 24 | "nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"); 25 | -------------------------------------------------------------------------------- /l10n/ru.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Уведомления", 5 | "No notifications" : "Нет уведомлений", 6 | "Dismiss" : "Убрать", 7 | "Admin notifications" : "Уведомления администратора", 8 | "Unknown user session. It is not possible to set the option" : "Неизвестная пользовательская сессия. Невозможно установить опцию", 9 | "Option not supported" : "Опция не поддерживается", 10 | "Saved" : "Сохранено", 11 | "Incomplete data" : "Недостаточно данных", 12 | "Do not notify via mail" : "Не уведомлять посредством почты", 13 | "Notify only when an action is required" : "Уведомить только когда потребуется действие", 14 | "Notify about all events" : "Уведомлять обо всех событиях", 15 | "Choose an option" : "Выбирете опции", 16 | "Hello," : "Здравствуйте,", 17 | "See %s on %s for more information" : "Откройте %s на %s для более подробной инфрмации", 18 | "See %s on %s for more information" : "Откройте %s на %s для более подробной информации", 19 | "Mail Notifications" : "Почтовые уведомления", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Вы можете выбрать получать уведомления о событиях через почту. Некоторые события для информации, другие требуют совершения действия (например принять/отклонить). Выберите ваше предпочтение ниже:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Не удалось найти вашу сессию. Пожалуйста, попробуйте обновить страницу или перелогиниться.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Чтобы иметь возможность принимать почтовые уведомления, требуется указать адрес электронной почты для вашей учетной записи." 23 | }, 24 | "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); 25 | -------------------------------------------------------------------------------- /l10n/ru_RU.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "notifications", 3 | { 4 | "Notifications" : "Уведомления", 5 | "No notifications" : "Нет уведомлений", 6 | "Dismiss" : "Убрать", 7 | "Admin notifications" : "Уведомления администратора", 8 | "Unknown user session. It is not possible to set the option" : "Неизвестная пользовательская сессия. Невозможно установить опцию", 9 | "Option not supported" : "Опция не поддерживается", 10 | "Saved" : "Сохранено", 11 | "Incomplete data" : "Недостаточно данных", 12 | "Do not notify via mail" : "Не уведомлять посредством почты", 13 | "Notify only when an action is required" : "Уведомить только когда потребуется действие", 14 | "Notify about all events" : "Уведомлять обо всех событиях", 15 | "Choose an option" : "Выбирете опции", 16 | "Hello," : "Здравствуйте,", 17 | "See %s on %s for more information" : "Откройте %s на %s для более подробной инфрмации", 18 | "See %s on %s for more information" : "Откройте %s на %s для более подробной информации", 19 | "Mail Notifications" : "Почтовые уведомления", 20 | "You can choose to be notified about events via mail. Some events are informative, others require an action (like accept/decline). Select your preference below:" : "Вы можете выбрать получать уведомления о событиях через почту. Некоторые события для информации, другие требуют совершения действия (например принять/отклонить). Выберите ваше предпочтение ниже:", 21 | "It was not possible to get your session. Please, try reloading the page or logout and login again" : "Не удалось найти вашу сессию. Пожалуйста, попробуйте обновить страницу или перелогиниться.", 22 | "To be able to receive mail notifications it is required to specify an email address for your account." : "Чтобы иметь возможность принимать почтовые уведомления, требуется указать адрес электронной почты для вашей учетной записи." 23 | }, 24 | "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); 25 | -------------------------------------------------------------------------------- /js/personal_settings.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Juan Pablo Villafáñez 3 | * 4 | * @copyright Copyright (c) 2018, ownCloud GmbH 5 | * @license AGPL-3.0 6 | * 7 | * This code is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License, version 3, 9 | * as published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License, version 3, 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | (function(OC, OCA) { 22 | 23 | if (!OCA.Notifications) { 24 | OCA.Notifications = {}; 25 | } 26 | 27 | if (!OCA.Notifications.Settings) { 28 | OCA.Notifications.Settings = {}; 29 | } 30 | 31 | OCA.Notifications.Settings.Model = OC.Backbone.Model.extend({ 32 | url: function() { 33 | return OC.generateUrl('/apps/notifications/settings/personal/notifications/options'); 34 | }, 35 | 36 | parse: function(data) { 37 | return data.data.options; 38 | } 39 | }); 40 | })(OC, OCA); 41 | 42 | $(document).ready(function(){ 43 | var model = new OCA.Notifications.Settings.Model(); 44 | 45 | $('#email_sending_option').change(function(){ 46 | var $element = $(this); 47 | var changeMap = {}; 48 | changeMap[$element.prop('name')] = $element.val(); 49 | 50 | OC.msg.startSaving('#email_notifications .msg'); 51 | model.save(changeMap, {patch: true}).done(function(result){ 52 | OC.msg.finishedSuccess('#email_notifications .msg', result.data.message); 53 | }).fail(function(result){ 54 | OC.msg.finishedError('#email_notifications .msg', result.responseJSON.data.message); 55 | }); 56 | }).prop('disabled', true); 57 | 58 | model.fetch().always(function(){ 59 | $('#email_sending_option').prop('disabled', false); 60 | }); 61 | }); 62 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 8 | ### Steps to reproduce 9 | 1. 10 | 2. 11 | 3. 12 | 13 | ### Expected behaviour 14 | Tell us what should happen 15 | 16 | ### Actual behaviour 17 | Tell us what happens instead 18 | 19 | ### Server configuration 20 | **Operating system**: 21 | 22 | **Web server:** 23 | 24 | **Database:** 25 | 26 | **PHP version:** 27 | 28 | **ownCloud version:** (see ownCloud admin page) 29 | 30 | **Where did you install ownCloud from:** 31 | 32 | **Signing status (ownCloud 9.0 and above):** 33 | 34 | ``` 35 | Login as admin user into your ownCloud and access 36 | http://example.com/index.php/settings/integrity/failed 37 | paste the results here. 38 | ``` 39 | 40 | **List of activated apps:** 41 | 42 | ``` 43 | If you have access to your command line run e.g.: 44 | sudo -u www-data php occ app:list 45 | from within your ownCloud installation folder 46 | ``` 47 | 48 | **The content of config/config.php:** 49 | 50 | ``` 51 | If you have access to your command line run e.g.: 52 | sudo -u www-data php occ config:list system 53 | from within your ownCloud installation folder 54 | 55 | or 56 | 57 | Insert your config.php content here 58 | (Without the database password, passwordsalt and secret) 59 | ``` 60 | 61 | **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... 62 | 63 | ### Client configuration 64 | **Browser:** 65 | 66 | **Operating system:** 67 | 68 | ### Logs 69 | 70 | #### ownCloud log (data/owncloud.log) 71 | ``` 72 | Insert your ownCloud log here 73 | ``` 74 | 75 | #### Browser log 76 | ``` 77 | Insert your browser log here, this could for example include: 78 | 79 | a) The javascript console log 80 | b) The network log 81 | c) ... 82 | ``` 83 | -------------------------------------------------------------------------------- /lib/App.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2016, ownCloud, Inc. 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Notifications; 23 | 24 | use OCP\Notification\IApp; 25 | use OCP\Notification\INotification; 26 | use OCA\Notifications\Mailer\NotificationMailerAdapter; 27 | 28 | class App implements IApp { 29 | /** @var Handler */ 30 | protected $handler; 31 | 32 | /** @var NotificationMailerAdapter */ 33 | protected $mailerAdapter; 34 | 35 | public function __construct(Handler $handler, NotificationMailerAdapter $mailerAdapter) { 36 | $this->handler = $handler; 37 | $this->mailerAdapter = $mailerAdapter; 38 | } 39 | 40 | /** 41 | * @param INotification $notification 42 | * @throws \InvalidArgumentException When the notification is not valid 43 | * @since 8.2.0 44 | */ 45 | public function notify(INotification $notification) { 46 | $this->handler->add($notification); 47 | $this->mailerAdapter->sendMail($notification); 48 | } 49 | 50 | /** 51 | * @param INotification $notification 52 | * @return int 53 | * @since 8.2.0 54 | */ 55 | public function getCount(INotification $notification) { 56 | return $this->handler->count($notification); 57 | } 58 | 59 | /** 60 | * @param INotification $notification 61 | * @since 8.2.0 62 | */ 63 | public function markProcessed(INotification $notification) { 64 | $this->handler->delete($notification); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /tests/unit/Command/RepairNotificationsTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Jan Ackermann 5 | * 6 | * @copyright Copyright (c) 2021, ownCloud GmbH 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Notifications\Tests\Unit\Command; 24 | 25 | use OCA\Notifications\Command\Generate; 26 | use OCA\Notifications\Command\RepairNotifications; 27 | use OCA\Notifications\Handler; 28 | use OCA\Notifications\Tests\Unit\TestCase; 29 | use Symfony\Component\Console\Tester\CommandTester; 30 | 31 | class RepairNotificationsTest extends TestCase { 32 | /** @var Handler | \PHPUnit\Framework\MockObject\MockObject */ 33 | protected $handler; 34 | /** @var Generate */ 35 | protected $command; 36 | /** @var CommandTester */ 37 | protected $tester; 38 | 39 | protected function setUp(): void { 40 | parent::setUp(); 41 | 42 | $this->handler = $this->createMock(Handler::class); 43 | $this->command = new RepairNotifications($this->handler); 44 | $this->tester = new CommandTester($this->command); 45 | } 46 | 47 | public function testInvalidSubject() { 48 | $options = []; 49 | $input = ['subject' => 'test']; 50 | $response = $this->tester->execute($input, $options); 51 | $this->assertEquals(1, $response); 52 | } 53 | 54 | public function testRepairLinks() { 55 | $options = []; 56 | $input = ['subject' => RepairNotifications::$availableSubjects[0]]; 57 | 58 | $this->handler->expects($this->once())->method('removeBaseUrlFromAbsoluteLinks'); 59 | 60 | $response = $this->tester->execute($input, $options); 61 | $this->assertEquals(0, $response); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/Command/RepairNotifications.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Jan Ackermann 5 | * 6 | * @copyright Copyright (c) 2021, ownCloud GmbH 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Notifications\Command; 24 | 25 | use OCA\Notifications\Handler; 26 | use Symfony\Component\Console\Command\Command; 27 | use Symfony\Component\Console\Input\InputArgument; 28 | use Symfony\Component\Console\Input\InputInterface; 29 | use Symfony\Component\Console\Output\OutputInterface; 30 | 31 | class RepairNotifications extends Command { 32 | /** @var Handler */ 33 | protected $handler; 34 | 35 | public static $availableSubjects = [ 36 | 'relativeLinks' 37 | ]; 38 | 39 | /** 40 | * @param Handler $handler 41 | */ 42 | public function __construct(Handler $handler) { 43 | parent::__construct(); 44 | $this->handler = $handler; 45 | } 46 | 47 | protected function configure() { 48 | $this 49 | ->setName('notifications:repairNotifications') 50 | ->setDescription('Repair existing notifications') 51 | ->addArgument('subject', InputArgument::REQUIRED, 'Subject to repair') 52 | ; 53 | } 54 | 55 | /** 56 | * @param InputInterface $input 57 | * @param OutputInterface $output 58 | * @return int 59 | */ 60 | protected function execute(InputInterface $input, OutputInterface $output): int { 61 | $subject = $input->getArgument('subject'); 62 | 63 | if (!\in_array($subject, self::$availableSubjects)) { 64 | $output->writeln('Invalid subject'); 65 | return 1; 66 | } 67 | 68 | $updatedNotificationsCount = $this->handler->removeBaseUrlFromAbsoluteLinks(); 69 | 70 | $output->writeln("$updatedNotificationsCount notifications were updated"); 71 | return 0; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /tests/acceptance/features/webUINotifications/displayAdminNotificationsOnWebUI.feature: -------------------------------------------------------------------------------- 1 | @webUI @insulated @disablePreviews 2 | Feature: display notifications on the webUI 3 | 4 | As an administrator 5 | I want to see my notifications on the webUI 6 | So that I can know about reported system issues 7 | 8 | Background: 9 | Given the administrator has logged in using the webUI 10 | And using OCS API version "2" 11 | 12 | 13 | Scenario: Create notifications 14 | When the administrator is sent a notification with 15 | | app | notificationsacceptancetesting | 16 | | timestamp | 144958517 | 17 | | subject | Acceptance Testing | 18 | | link | https://owncloud.org/blog | 19 | | message | Notifications in ownCloud | 20 | | object_type | blog | 21 | | object_id | 9483 | 22 | And the administrator is sent a notification with 23 | | app | notificationsacceptancetesting | 24 | | timestamp | 144958517 | 25 | | subject | UI tests | 26 | | link | http://owncloud.org/ | 27 | | message | second notification | 28 | | object_type | blog | 29 | | object_id | 9484 | 30 | Then the user should see 2 notifications on the webUI with these details 31 | | title | link | message | user | 32 | | Acceptance Testing | https://owncloud.org/blog | Notifications in ownCloud | Alice | 33 | | UI tests | http://owncloud.org/ | second notification | Alice | 34 | 35 | 36 | Scenario: follow notifications link 37 | When the administrator is sent a notification with 38 | | app | notificationsacceptancetesting | 39 | | timestamp | 144958517 | 40 | | subject | Acceptance Testing | 41 | | link | %base_url%/index.php/settings/personal | 42 | | message | Settings of ownCloud | 43 | | object_type | blog | 44 | | object_id | 9483 | 45 | And the user follows the link of the first notification on the webUI 46 | Then the user should be redirected to a webUI page with the title "Settings - ownCloud" 47 | -------------------------------------------------------------------------------- /tests/acceptance/features/webUINotifications/displayNotificationsOnWebUI.feature: -------------------------------------------------------------------------------- 1 | @webUI @insulated @disablePreviews 2 | Feature: display notifications on the webUI 3 | 4 | As a user 5 | I want to see my notifications on the webUI 6 | So that I can stay informed 7 | 8 | Background: 9 | Given these users have been created without skeleton files: 10 | | username | 11 | | Alice | 12 | And the user has browsed to the login page 13 | And user "Alice" has logged in using the webUI 14 | And using OCS API version "2" 15 | 16 | 17 | Scenario: Create notifications 18 | When user "Alice" is sent a notification with 19 | | app | notificationsacceptancetesting | 20 | | timestamp | 144958517 | 21 | | subject | Acceptance Testing | 22 | | link | https://owncloud.org/blog | 23 | | message | Notifications in ownCloud | 24 | | object_type | blog | 25 | | object_id | 9483 | 26 | And user "Alice" is sent a notification with 27 | | app | notificationsacceptancetesting | 28 | | timestamp | 144958517 | 29 | | subject | UI tests | 30 | | link | http://owncloud.org/ | 31 | | message | second notification | 32 | | object_type | blog | 33 | | object_id | 9484 | 34 | Then the user should see 2 notifications on the webUI with these details 35 | | title | link | message | user | 36 | | Acceptance Testing | https://owncloud.org/blog | Notifications in ownCloud | Alice | 37 | | UI tests | http://owncloud.org/ | second notification | Alice | 38 | 39 | 40 | Scenario: follow notifications link 41 | When user "Alice" is sent a notification with 42 | | app | notificationsacceptancetesting | 43 | | timestamp | 144958517 | 44 | | subject | Acceptance Testing | 45 | | link | %base_url%/index.php/settings/personal | 46 | | message | Settings of ownCloud | 47 | | object_type | blog | 48 | | object_id | 9483 | 49 | And the user follows the link of the first notification on the webUI 50 | Then the user should be redirected to a webUI page with the title "Settings - ownCloud" 51 | -------------------------------------------------------------------------------- /tests/unit/AppTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Thomas Müller 5 | * 6 | * @copyright Copyright (c) 2016, ownCloud, Inc. 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Notifications\Tests\Unit; 24 | 25 | use OCP\Notification\INotification; 26 | use OCA\Notifications\App; 27 | use OCA\Notifications\Handler; 28 | use OCA\Notifications\Mailer\NotificationMailerAdapter; 29 | 30 | class AppTest extends TestCase { 31 | /** @var \OCA\Notifications\Handler|\PHPUnit\Framework\MockObject\MockObject */ 32 | protected $handler; 33 | 34 | /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject */ 35 | protected $notification; 36 | 37 | /** @var NotificationMailerAdapter|\PHPUnit\Framework\MockObject\MockObject */ 38 | protected $mailerAdapter; 39 | 40 | /** @var \OCA\Notifications\App */ 41 | protected $app; 42 | 43 | protected function setUp(): void { 44 | parent::setUp(); 45 | 46 | $this->handler = $this->getMockBuilder(Handler::class) 47 | ->disableOriginalConstructor() 48 | ->getMock(); 49 | 50 | $this->notification = $this->getMockBuilder(INotification::class) 51 | ->disableOriginalConstructor() 52 | ->getMock(); 53 | 54 | $this->mailerAdapter = $this->getMockBuilder(NotificationMailerAdapter::class) 55 | ->disableOriginalConstructor() 56 | ->getMock(); 57 | 58 | $this->app = new App( 59 | $this->handler, 60 | $this->mailerAdapter 61 | ); 62 | } 63 | 64 | public function testNotify() { 65 | $this->handler->expects($this->once()) 66 | ->method('add') 67 | ->with($this->notification); 68 | $this->mailerAdapter->expects($this->once()) 69 | ->method('sendMail') 70 | ->with($this->notification); 71 | 72 | $this->app->notify($this->notification); 73 | } 74 | 75 | public function testGetCount() { 76 | $this->handler->expects($this->once()) 77 | ->method('count') 78 | ->with($this->notification) 79 | ->willReturn(42); 80 | 81 | $this->assertSame(42, $this->app->getCount($this->notification)); 82 | } 83 | 84 | public function testMarkProcessed() { 85 | $this->handler->expects($this->once()) 86 | ->method('delete') 87 | ->with($this->notification); 88 | 89 | $this->app->markProcessed($this->notification); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). 6 | 7 | ## [0.6.0] - 2023-07-10 8 | 9 | ### Changed 10 | 11 | - [#376](https://github.com/owncloud/notifications/pull/376) - Always return an int from Symfony Command execute method #376 12 | 13 | 14 | ## [0.5.4] - 2021-06-30 15 | 16 | ### Fixed 17 | 18 | - Provide get/list api link resource as absolute url - [#342](https://github.com/owncloud/notifications/issues/342) 19 | 20 | ## [0.5.3] - 2021-06-21 21 | 22 | ### Added 23 | 24 | - Add command to repair notifications and properly handle mail sending … - [#333](https://github.com/owncloud/notifications/issues/333) 25 | - Add Mail sender name - [#338](https://github.com/owncloud/notifications/issues/338) 26 | 27 | ## [0.5.2] - 2020-07-15 28 | 29 | ### Fixed 30 | 31 | - Use language code to correctly translate mail body of notifications - [#322](https://github.com/owncloud/notifications/issues/322) 32 | 33 | ### Added 34 | 35 | - Add `Hello` as translatable string to the mail templates - [#320](https://github.com/owncloud/notifications/issues/320) 36 | 37 | ### Changed 38 | 39 | - Bump libraries 40 | 41 | ## [0.5.0] - 2019-04-25 42 | 43 | ### Added 44 | 45 | - Added bell icon in black - [#185](https://github.com/owncloud/notifications/pull/185) 46 | 47 | ### Changed 48 | 49 | - Drop php 5.6 - [#267](https://github.com/owncloud/notifications/issues/267) 50 | 51 | ### Fixes 52 | 53 | - Only set icon in case an icon is available - [#275](https://github.com/owncloud/notifications/issues/275) 54 | 55 | ## [0.4.1] 56 | 57 | ### Added 58 | 59 | - Notifications can now have an icon - [#104](https://github.com/owncloud/notifications/issues/104) 60 | - Added occ command to send notification to a user or a group - [#104](https://github.com/owncloud/notifications/issues/104) 61 | 62 | ### Fixed 63 | 64 | - Make sure buttons stays in place even with long messages - [#114](https://github.com/owncloud/notifications/issues/114) 65 | - Don't escape link text title - [#111](https://github.com/owncloud/notifications/issues/111) 66 | - Fix actions and escaping - [#109](https://github.com/owncloud/notifications/issues/109) 67 | - Move OCS calls to app framework - consumes less resources - [#98](https://github.com/owncloud/notifications/pull/98) 68 | - Don't use escaped message for browser notification - [#100](https://github.com/owncloud/notifications/pull/100) 69 | 70 | [Unreleased]: https://github.com/owncloud/notifications/compare/v0.6.0...master 71 | [0.6.0]: https://github.com/owncloud/notifications/compare/v0.5.4...v0.6.0 72 | [0.5.4]: https://github.com/owncloud/notifications/compare/v0.5.3...v0.5.4 73 | [0.5.3]: https://github.com/owncloud/notifications/compare/v0.5.2...v0.5.3 74 | [0.5.2]: https://github.com/owncloud/notifications/compare/v0.5.0...v0.5.2 75 | [0.5.0]: https://github.com/owncloud/notifications/compare/v0.4.1...v0.5.0 76 | [0.4.1]: https://github.com/owncloud/notifications/compare/v0.4.0...v0.4.1 77 | -------------------------------------------------------------------------------- /lib/Panels/Personal/NotificationsPanel.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2018, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Notifications\Panels\Personal; 23 | 24 | use OCP\Settings\ISettings; 25 | use OCP\Template; 26 | use OCP\IUserSession; 27 | use OCP\IL10N; 28 | use OCA\Notifications\Configuration\OptionsStorage; 29 | 30 | class NotificationsPanel implements ISettings { 31 | /** @var OptionsStorage */ 32 | private $optionsStorage; 33 | /** @var IUserSession */ 34 | private $userSession; 35 | /** @var IL10N */ 36 | private $l10n; 37 | 38 | public function __construct(OptionsStorage $optionsStorage, IUserSession $userSession, IL10N $l10n) { 39 | $this->optionsStorage = $optionsStorage; 40 | $this->userSession = $userSession; 41 | $this->l10n = $l10n; 42 | } 43 | public function getPanel() { 44 | $userObject = $this->userSession->getUser(); 45 | if ($userObject !== null) { 46 | $optionList = $this->optionsStorage->getOptions($userObject->getUID()); 47 | $emailSendingOption = $optionList['email_sending_option']; 48 | $possibleOptions = [ 49 | 'never' => [ 50 | 'visibleText' => (string)$this->l10n->t('Do not notify via mail'), 51 | 'selected' => false, 52 | ], 53 | 'action' => [ 54 | 'visibleText' => (string)$this->l10n->t('Notify only when an action is required'), 55 | 'selected' => false, 56 | ], 57 | 'always' => [ 58 | 'visibleText' => (string)$this->l10n->t('Notify about all events'), 59 | 'selected' => false, 60 | ], 61 | ]; 62 | 63 | if (!isset($possibleOptions[$emailSendingOption])) { 64 | $possibleOptions = \array_merge([ 65 | $emailSendingOption => [ 66 | 'visibleText' => (string)$this->l10n->t('Choose an option'), 67 | 'selected' => true, 68 | ], 69 | ], $possibleOptions); 70 | } 71 | $possibleOptions[$emailSendingOption]['selected'] = true; 72 | } else { 73 | $possibleOptions = []; 74 | } 75 | 76 | $tmpl = new Template('notifications', 'panels/personal/notifications'); 77 | $tmpl->assign('validUserObject', $userObject !== null); 78 | $tmpl->assign('possibleOptions', $possibleOptions); 79 | return $tmpl; 80 | } 81 | 82 | public function getPriority() { 83 | return 90; 84 | } 85 | 86 | public function getSectionID() { 87 | return 'general'; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "819b50c6324feefd3d58fc334cc43c45", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "bamarni/composer-bin-plugin", 12 | "version": "1.8.2", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/bamarni/composer-bin-plugin.git", 16 | "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", 21 | "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "composer-plugin-api": "^2.0", 26 | "php": "^7.2.5 || ^8.0" 27 | }, 28 | "require-dev": { 29 | "composer/composer": "^2.0", 30 | "ext-json": "*", 31 | "phpstan/extension-installer": "^1.1", 32 | "phpstan/phpstan": "^1.8", 33 | "phpstan/phpstan-phpunit": "^1.1", 34 | "phpunit/phpunit": "^8.5 || ^9.5", 35 | "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", 36 | "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", 37 | "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" 38 | }, 39 | "type": "composer-plugin", 40 | "extra": { 41 | "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin" 42 | }, 43 | "autoload": { 44 | "psr-4": { 45 | "Bamarni\\Composer\\Bin\\": "src" 46 | } 47 | }, 48 | "notification-url": "https://packagist.org/downloads/", 49 | "license": [ 50 | "MIT" 51 | ], 52 | "description": "No conflicts for your bin dependencies", 53 | "keywords": [ 54 | "composer", 55 | "conflict", 56 | "dependency", 57 | "executable", 58 | "isolation", 59 | "tool" 60 | ], 61 | "support": { 62 | "issues": "https://github.com/bamarni/composer-bin-plugin/issues", 63 | "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" 64 | }, 65 | "time": "2022-10-31T08:38:03+00:00" 66 | } 67 | ], 68 | "aliases": [], 69 | "minimum-stability": "stable", 70 | "stability-flags": [], 71 | "prefer-stable": false, 72 | "prefer-lowest": false, 73 | "platform": [], 74 | "platform-dev": [], 75 | "platform-overrides": { 76 | "php": "7.3" 77 | }, 78 | "plugin-api-version": "2.3.0" 79 | } 80 | -------------------------------------------------------------------------------- /lib/AppInfo/Application.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2016, ownCloud, Inc. 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Notifications\AppInfo; 23 | 24 | use OCA\Notifications\Capabilities; 25 | use OCA\Notifications\Controller\EndpointController; 26 | use OCA\Notifications\Handler; 27 | use OCA\Notifications\App as NotificationApp; 28 | use OCA\Notifications\Notifier; 29 | use OCP\AppFramework\App; 30 | use OCP\IContainer; 31 | use OCP\Notification\Events\RegisterConsumerEvent; 32 | use OCP\Notification\Events\RegisterNotifierEvent; 33 | use Symfony\Component\EventDispatcher\GenericEvent; 34 | 35 | class Application extends App { 36 | public function __construct(array $urlParams = []) { 37 | parent::__construct('notifications', $urlParams); 38 | $container = $this->getContainer(); 39 | 40 | $container->registerService('EndpointController', function (IContainer $c) { 41 | /** @var \OC\Server $server */ 42 | $server = $c->query('ServerContainer'); 43 | 44 | return new EndpointController( 45 | $c->query('AppName'), 46 | $server->getRequest(), 47 | new Handler( 48 | $server->getDatabaseConnection(), 49 | $server->getNotificationManager() 50 | ), 51 | $server->getNotificationManager(), 52 | $server->getConfig(), 53 | $server->getUserSession(), 54 | $server->getURLGenerator() 55 | ); 56 | }); 57 | 58 | $container->registerService('Capabilities', function (IContainer $c) { 59 | return new Capabilities(); 60 | }); 61 | $container->registerCapability('Capabilities'); 62 | } 63 | 64 | public function setupConsumerAndNotifier() { 65 | $container = $this->getContainer(); 66 | 67 | $dispatcher = $container->getServer()->getEventDispatcher(); 68 | 69 | $dispatcher->addListener(RegisterConsumerEvent::NAME, function (RegisterConsumerEvent $event) use ($container) { 70 | $event->registerNotificationConsumer($container->query(NotificationApp::class)); 71 | }); 72 | 73 | $dispatcher->addListener(RegisterNotifierEvent::NAME, function (RegisterNotifierEvent $event) use ($container) { 74 | $l10n = $container->getServer()->getL10N('notifications'); 75 | $event->registerNotifier($container->query(Notifier::class), 'notifications', $l10n->t('Admin notifications')); 76 | }); 77 | } 78 | 79 | public function setupSymfonyEventListeners() { 80 | $container = $this->getContainer(); 81 | 82 | $container->getServer()->getEventDispatcher()->addListener('user.afterdelete', function (GenericEvent $event) use ($container) { 83 | $handler = $container->query(Handler::class); 84 | 85 | $handler->deleteUserNotifications($event->getArgument('uid')); 86 | }); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | .notification { 2 | display: flex; 3 | padding: 15px; 4 | transition: background .125s; 5 | } 6 | 7 | .notification:not(:last-child) { 8 | border-bottom: 1px solid rgb(238, 238, 238); 9 | } 10 | 11 | .notification-container { 12 | background-color: white; 13 | display: none; 14 | position: absolute; 15 | right: 50px; 16 | top: 45px; 17 | width: 350px; 18 | min-height: 100px; 19 | max-height: 260px; 20 | border-radius: 0 0 3px 3px; 21 | border: 1px solid rgb(238, 238, 238);; 22 | } 23 | 24 | .notification-container .emptycontent h2 { 25 | font-weight: 300; 26 | font-size: 16px; 27 | } 28 | 29 | /* Fill width on mobile */ 30 | @media (max-width: 500px) { 31 | .notification-container { 32 | right: 5%; 33 | width: 90%; 34 | } 35 | } 36 | 37 | .notification { 38 | color: black; 39 | position: relative; 40 | } 41 | 42 | .notification .notification-empty { 43 | color: #999; 44 | } 45 | 46 | .notification > .notification-delete { 47 | position: absolute; 48 | top: 8px; 49 | right: 8px; 50 | opacity: 0.3; 51 | transition: opacity .25s; 52 | text-indent: -9999px; 53 | background-color: transparent; 54 | margin: 0; 55 | padding: 0; 56 | } 57 | 58 | .notification:not(:hover) > .notification-delete { 59 | opacity: 0; 60 | } 61 | 62 | .notification:hover { 63 | background-color: #f8f8f8; 64 | } 65 | 66 | .notification-delete:hover { 67 | opacity: 0.8 !important; 68 | cursor: pointer; 69 | } 70 | 71 | .notification-delete img, .notifications-button img { 72 | cursor: pointer; 73 | } 74 | 75 | .notifications-button { 76 | position: relative; 77 | float: right; 78 | width: 21px; 79 | height: 21px; 80 | display: block; 81 | border-radius: 50%; 82 | text-align: center; 83 | padding: 10px; 84 | opacity: 0.7; 85 | cursor: pointer; 86 | } 87 | .notifications-button.hasNotifications { 88 | opacity: 1 !important; 89 | } 90 | 91 | .notifications-button:hover { 92 | opacity: 1; 93 | } 94 | 95 | .notification .button { 96 | border: 1px solid rgba(240,240,240,.9) !important; 97 | padding: 0 10px; 98 | box-shadow: none; 99 | margin: 0; 100 | float: left; 101 | } 102 | 103 | .notification .notification-actions { 104 | float:right; 105 | padding: 0; 106 | } 107 | 108 | .notification .notification-actions:first-child { 109 | margin-left: auto; 110 | } 111 | 112 | .notification .notification-subject { 113 | display: inline-block; 114 | margin-right: 10px; 115 | font-weight: bold; 116 | } 117 | 118 | .notification .notification-icon { 119 | width: 32px; 120 | height: 32px; 121 | margin-right: 14px; 122 | } 123 | 124 | .notification .notification-content { 125 | overflow: hidden; 126 | } 127 | 128 | .notification .notification-title { 129 | color: #000; 130 | font-size: 12.8px; 131 | line-height: 20.48px; 132 | font-weight: 600; 133 | margin: 5px 0 10px; 134 | width: 270px; 135 | /*white-space: nowrap;*/ 136 | overflow: hidden; 137 | text-overflow: ellipsis; 138 | } 139 | 140 | .notification .notification-message { 141 | line-height: 20px; 142 | padding-bottom: 5px; 143 | width: 270px; 144 | /*white-space: nowrap;*/ 145 | overflow: hidden; 146 | text-overflow: ellipsis; 147 | } 148 | 149 | .notification-container { 150 | box-shadow: 0 1px 10px rgba(50, 50, 50, .7); 151 | overflow: auto; 152 | overflow-x: hidden; 153 | } 154 | 155 | .notifications .emptycontent { 156 | margin: 50px 0; 157 | } 158 | -------------------------------------------------------------------------------- /tests/unit/Configuration/OptionsStorageTest.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2018, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Notifications\Tests\Unit\Configuration; 23 | 24 | use OCP\IConfig; 25 | use OCA\Notifications\Configuration\OptionsStorage; 26 | 27 | class OptionsStorageTest extends \Test\TestCase { 28 | /** @var IConfig */ 29 | private $config; 30 | /** @var OptionsStorage */ 31 | private $optionsStorage; 32 | 33 | protected function setUp(): void { 34 | parent::setUp(); 35 | 36 | $this->config = $this->getMockBuilder(IConfig::class) 37 | ->disableOriginalConstructor() 38 | ->getMock(); 39 | 40 | $this->optionsStorage = new OptionsStorage($this->config); 41 | } 42 | 43 | public function testGetValidOptionValuesInfo() { 44 | $expected = [ 45 | 'email_sending_option' => [ 46 | 'values' => ['never', 'action', 'always'], 47 | 'default' => 'action', 48 | ], 49 | ]; 50 | $this->assertEquals($expected, $this->optionsStorage->getValidOptionValuesInfo()); 51 | } 52 | 53 | public function testGetOptions() { 54 | $this->config->method('getUserValue') 55 | ->will($this->returnValueMap([ 56 | ['user1', 'notifications', 'email_sending_option', 'action', 'randomValue'] 57 | ])); 58 | $expected = ['email_sending_option' => 'randomValue']; 59 | $this->assertEquals($expected, $this->optionsStorage->getOptions('user1')); 60 | } 61 | 62 | public function validOptionProvider() { 63 | return [ 64 | ['email_sending_option', 'never'], 65 | ['email_sending_option', 'action'], 66 | ['email_sending_option', 'always'], 67 | ]; 68 | } 69 | 70 | /** 71 | * @dataProvider validOptionProvider 72 | */ 73 | public function testSetOption($key, $value) { 74 | $this->assertTrue($this->optionsStorage->setOption('user1', $key, $value)); 75 | } 76 | 77 | public function invalidOptionProvider() { 78 | return [ 79 | ['email_sending_option', 'VALUEWRONG'], 80 | ['KEYWRONG', 'action'], 81 | ['KEYWRONG', 'VALUEWRONG'], 82 | ]; 83 | } 84 | 85 | /** 86 | * @dataProvider invalidOptionProvider 87 | */ 88 | public function testSetOptionWrong($key, $value) { 89 | $this->assertFalse($this->optionsStorage->setOption('user1', $key, $value)); 90 | } 91 | 92 | /** 93 | * @dataProvider invalidOptionProvider 94 | */ 95 | public function testIsOptionValid($key, $value) { 96 | $this->assertFalse($this->optionsStorage->isOptionValid($key, $value)); 97 | } 98 | 99 | public function testGetUserLanguage() { 100 | $this->config->method('getUserValue') 101 | ->will($this->returnValueMap([ 102 | ['user1', 'core', 'lang', null, 'de_DE'] 103 | ])); 104 | $this->assertEquals('de_DE', $this->optionsStorage->getUserLanguage('user1')); 105 | } 106 | } 107 | --------------------------------------------------------------------------------