summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-03 15:07:42 +0200
committerGitHub <noreply@github.com>2017-08-03 15:07:42 +0200
commitac4927809c2cf8d66c9f6aa84a7009b521a8d0d7 (patch)
treea2cec81b3b5da84a3462adff4e03a1f07ceb9321 /apps/updatenotification
parent7de9eb16d80d31162b5f3930daa45f8e0df45ccc (diff)
parentbb865a55febe7b712a0e6cc7e1e93034f60a0e8b (diff)
downloadnextcloud-server-ac4927809c2cf8d66c9f6aa84a7009b521a8d0d7.tar.gz
nextcloud-server-ac4927809c2cf8d66c9f6aa84a7009b521a8d0d7.zip
Merge branch 'master' into clean-settings-layout
Diffstat (limited to 'apps/updatenotification')
-rw-r--r--apps/updatenotification/css/admin.css3
-rw-r--r--apps/updatenotification/l10n/el.js5
-rw-r--r--apps/updatenotification/l10n/el.json5
-rw-r--r--apps/updatenotification/l10n/is.js1
-rw-r--r--apps/updatenotification/l10n/is.json1
-rw-r--r--apps/updatenotification/l10n/ja.js2
-rw-r--r--apps/updatenotification/l10n/ja.json2
-rw-r--r--apps/updatenotification/l10n/lt_LT.js21
-rw-r--r--apps/updatenotification/l10n/lt_LT.json21
-rw-r--r--apps/updatenotification/l10n/sq.js1
-rw-r--r--apps/updatenotification/l10n/sq.json1
-rw-r--r--apps/updatenotification/l10n/zh_CN.js1
-rw-r--r--apps/updatenotification/l10n/zh_CN.json1
-rw-r--r--apps/updatenotification/l10n/zh_TW.js6
-rw-r--r--apps/updatenotification/l10n/zh_TW.json6
-rw-r--r--apps/updatenotification/lib/Controller/AdminController.php12
-rw-r--r--apps/updatenotification/lib/Notification/Notifier.php2
-rw-r--r--apps/updatenotification/templates/admin.php49
-rw-r--r--apps/updatenotification/tests/Controller/AdminControllerTest.php16
19 files changed, 128 insertions, 28 deletions
diff --git a/apps/updatenotification/css/admin.css b/apps/updatenotification/css/admin.css
new file mode 100644
index 00000000000..59c8f056fbc
--- /dev/null
+++ b/apps/updatenotification/css/admin.css
@@ -0,0 +1,3 @@
+#oca_updatenotification_section p {
+ margin: 25px 0;
+}
diff --git a/apps/updatenotification/l10n/el.js b/apps/updatenotification/l10n/el.js
index bb8695e6781..189674aefb4 100644
--- a/apps/updatenotification/l10n/el.js
+++ b/apps/updatenotification/l10n/el.js
@@ -18,7 +18,10 @@ OC.L10N.register(
"Checked on %s" : "Ελέγχθηκε στις %s",
"Update channel:" : "Ενημέρωση καναλιού:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Μπορείτε πάντα να περάσετε σε νεότερη / πειραματική έκδοση. Αλλά ποτέ δεν μπορείτε να γυρίσετε πίσω σε πιο σταθερό κανάλι.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Σημειώστε ότι μετά από μια νέα διανομή μπορεί να περάσει λίγος καιρός πριν εμφανιστεί εδώ. Κυκλοφορούμε κατά διαστήματα νέες εκδόσεις στους χρήστες μας και κάποιες φορές παραλείπουμε κάποια έκδοση αν βρεθούν προβλήματα.",
"Notify members of the following groups about available updates:" : "Να ενημερωθούν τα μέλη των παρακάτω ομάδων σχετικά με τις διαθέσιμες ενημερώσεις:",
- "Only notification for app updates are available." : "Είναι μόνο διαθέσιμες οι ενημερώσεις για την εφαρμογή"
+ "Only notification for app updates are available." : "Είναι μόνο διαθέσιμες οι ενημερώσεις για την εφαρμογή",
+ "The selected update channel makes dedicated notifications for the server obsolete." : "Το συγκεκριμένο κανάλι ενημέρωσης καθιστά παρωχημένες τις ειδοποιήσεις που προορίζονται για τον διακομιστή.",
+ "The selected update channel does not support updates of the server." : "Το συγκεκριμένο κανάλι ενημέρωσης δεν υποστηρίζει ενημερώσεις διακομιστή."
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/updatenotification/l10n/el.json b/apps/updatenotification/l10n/el.json
index 388ee178778..f9ca81933e3 100644
--- a/apps/updatenotification/l10n/el.json
+++ b/apps/updatenotification/l10n/el.json
@@ -16,7 +16,10 @@
"Checked on %s" : "Ελέγχθηκε στις %s",
"Update channel:" : "Ενημέρωση καναλιού:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Μπορείτε πάντα να περάσετε σε νεότερη / πειραματική έκδοση. Αλλά ποτέ δεν μπορείτε να γυρίσετε πίσω σε πιο σταθερό κανάλι.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Σημειώστε ότι μετά από μια νέα διανομή μπορεί να περάσει λίγος καιρός πριν εμφανιστεί εδώ. Κυκλοφορούμε κατά διαστήματα νέες εκδόσεις στους χρήστες μας και κάποιες φορές παραλείπουμε κάποια έκδοση αν βρεθούν προβλήματα.",
"Notify members of the following groups about available updates:" : "Να ενημερωθούν τα μέλη των παρακάτω ομάδων σχετικά με τις διαθέσιμες ενημερώσεις:",
- "Only notification for app updates are available." : "Είναι μόνο διαθέσιμες οι ενημερώσεις για την εφαρμογή"
+ "Only notification for app updates are available." : "Είναι μόνο διαθέσιμες οι ενημερώσεις για την εφαρμογή",
+ "The selected update channel makes dedicated notifications for the server obsolete." : "Το συγκεκριμένο κανάλι ενημέρωσης καθιστά παρωχημένες τις ειδοποιήσεις που προορίζονται για τον διακομιστή.",
+ "The selected update channel does not support updates of the server." : "Το συγκεκριμένο κανάλι ενημέρωσης δεν υποστηρίζει ενημερώσεις διακομιστή."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/updatenotification/l10n/is.js b/apps/updatenotification/l10n/is.js
index f6b3825b56b..801b6f7c3fe 100644
--- a/apps/updatenotification/l10n/is.js
+++ b/apps/updatenotification/l10n/is.js
@@ -18,6 +18,7 @@ OC.L10N.register(
"Checked on %s" : "Athugað þann %s",
"Update channel:" : "Uppfærslurás:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Þú getur alltaf uppfært í nýrri útgáfu eða tilraunaútgáfurás. En þú getur aldrei niðurfært í stöðugri rás.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Athugaðu að það getur tekið nokkurn tíma áður en nýjar útgáfur birtast hér. Við dreifum útgáfum yfir tíma auk þess sem stundum er útgáfum sleppt ef í þeim finnast hnökrar.",
"Notify members of the following groups about available updates:" : "Tilkynna meðlimum eftirfarandi hópa um tiltækar uppfærslur:",
"Only notification for app updates are available." : "Eingöngu eru eru tiltækar tilkynningar fyrir uppfærslur forrita.",
"The selected update channel makes dedicated notifications for the server obsolete." : "Valda uppfærslurásin gerir úreltar sértækar tilkynningar fyrir vefþjóninn.",
diff --git a/apps/updatenotification/l10n/is.json b/apps/updatenotification/l10n/is.json
index c24c469b2f2..8ff7e4a004f 100644
--- a/apps/updatenotification/l10n/is.json
+++ b/apps/updatenotification/l10n/is.json
@@ -16,6 +16,7 @@
"Checked on %s" : "Athugað þann %s",
"Update channel:" : "Uppfærslurás:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Þú getur alltaf uppfært í nýrri útgáfu eða tilraunaútgáfurás. En þú getur aldrei niðurfært í stöðugri rás.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Athugaðu að það getur tekið nokkurn tíma áður en nýjar útgáfur birtast hér. Við dreifum útgáfum yfir tíma auk þess sem stundum er útgáfum sleppt ef í þeim finnast hnökrar.",
"Notify members of the following groups about available updates:" : "Tilkynna meðlimum eftirfarandi hópa um tiltækar uppfærslur:",
"Only notification for app updates are available." : "Eingöngu eru eru tiltækar tilkynningar fyrir uppfærslur forrita.",
"The selected update channel makes dedicated notifications for the server obsolete." : "Valda uppfærslurásin gerir úreltar sértækar tilkynningar fyrir vefþjóninn.",
diff --git a/apps/updatenotification/l10n/ja.js b/apps/updatenotification/l10n/ja.js
index 289eebe861e..90ee9342fa1 100644
--- a/apps/updatenotification/l10n/ja.js
+++ b/apps/updatenotification/l10n/ja.js
@@ -10,6 +10,7 @@ OC.L10N.register(
"Update to %1$s is available." : "%1$s への更新が利用可能です。",
"Update for %1$s to version %2$s is available." : "%1$s に対するバージョン %2$s へアップデートが利用可能です。",
"Update for {app} to version %s is available." : " {app} に対するバージョン %s へアップデートが利用可能です。",
+ "Update notification" : "通知を更新",
"A new version is available: %s" : "新しいバージョンが利用可能: %s",
"Open updater" : "アップデーターを開く",
"Download now" : "今すぐダウンロード",
@@ -17,6 +18,7 @@ OC.L10N.register(
"Checked on %s" : "%s に確認",
"Update channel:" : "アップデートチャンネル:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "開発版の新しいバージョンにアップデートできます。ただし、アップデート後は安定版にダウングレードできません。",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "新しいリリースの後、公開されるまでには時間がかかります。\n新しいバージョンを公開して配布しますが、問題が発見されたときにバージョンをスキップすることがあります。",
"Notify members of the following groups about available updates:" : "次のグループのメンバーに対してアップデートのメッセージが表示されます:",
"Only notification for app updates are available." : "アプリ更新情報があるときのみ通知する。",
"The selected update channel makes dedicated notifications for the server obsolete." : "選択した更新チャネルでは、廃止サーバーについて専用の通知を行います。",
diff --git a/apps/updatenotification/l10n/ja.json b/apps/updatenotification/l10n/ja.json
index fcead04da5b..c7e5c1bb449 100644
--- a/apps/updatenotification/l10n/ja.json
+++ b/apps/updatenotification/l10n/ja.json
@@ -8,6 +8,7 @@
"Update to %1$s is available." : "%1$s への更新が利用可能です。",
"Update for %1$s to version %2$s is available." : "%1$s に対するバージョン %2$s へアップデートが利用可能です。",
"Update for {app} to version %s is available." : " {app} に対するバージョン %s へアップデートが利用可能です。",
+ "Update notification" : "通知を更新",
"A new version is available: %s" : "新しいバージョンが利用可能: %s",
"Open updater" : "アップデーターを開く",
"Download now" : "今すぐダウンロード",
@@ -15,6 +16,7 @@
"Checked on %s" : "%s に確認",
"Update channel:" : "アップデートチャンネル:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "開発版の新しいバージョンにアップデートできます。ただし、アップデート後は安定版にダウングレードできません。",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "新しいリリースの後、公開されるまでには時間がかかります。\n新しいバージョンを公開して配布しますが、問題が発見されたときにバージョンをスキップすることがあります。",
"Notify members of the following groups about available updates:" : "次のグループのメンバーに対してアップデートのメッセージが表示されます:",
"Only notification for app updates are available." : "アプリ更新情報があるときのみ通知する。",
"The selected update channel makes dedicated notifications for the server obsolete." : "選択した更新チャネルでは、廃止サーバーについて専用の通知を行います。",
diff --git a/apps/updatenotification/l10n/lt_LT.js b/apps/updatenotification/l10n/lt_LT.js
index 6c22873bf1d..c999ea97edd 100644
--- a/apps/updatenotification/l10n/lt_LT.js
+++ b/apps/updatenotification/l10n/lt_LT.js
@@ -1,8 +1,25 @@
OC.L10N.register(
"updatenotification",
{
- "Updater" : "Atnaujinimo programa",
+ "Update notifications" : "Atnaujinimų pranešimai",
+ "Could not start updater, please try the manual update" : "Nepavyko paleisti atnaujinimo programos, prašome atnaujinimą rankiniu būdu",
+ "{version} is available. Get more information on how to update." : "Yra prieinama {version}. Gaukite daugiau informacijos apie tai kaip atnaujinti.",
+ "Channel updated" : "Kanalas atnaujintas",
+ "Please check the Nextcloud and server log files for errors." : "Prašome patikrinti Nextcloud ir serverio žurnalų įrašus apie galimas klaidas.",
+ "Update to %1$s is available." : "Yra prieinamas atnaujinimas į %1$s.",
+ "Update for %1$s to version %2$s is available." : "Yra prieinamas %1$s atnaujinimas į versiją %2$s.",
+ "Update for {app} to version %s is available." : "Galimas {app} atnaujinimas į %s versiją.",
+ "Update notification" : "Atnaujinimų pranešimai",
+ "A new version is available: %s" : "Yra prieinama nauja versija: %s",
+ "Open updater" : "Atverti atnaujinimo programą",
+ "Download now" : "Atsisiųsti dabar",
+ "Your version is up to date." : "Tavo versija yra naujausia.",
+ "Checked on %s" : "Tikrinta %s",
"Update channel:" : "Atnaujinimo kanalas:",
- "You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Visada galite atnaujinti į naujesnę versiją / bandomąjį kanalą. Bet niekada žeminti versijos ar pakeisti į stabilų kanalą."
+ "You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Visada galite atnaujinti į naujesnę versiją / eksperimentinį kanalą. Tačiau niekada negalite sendinti versijos ar persijungti į stabilų kanalą.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Atkreipkite dėmesį kad po naujos versijos išleidimo gali praeiti šiek tiek laiko kol ti bus matoma čia. Mes išleidžiame naujas versijas paskirstytai pagal laiką savo klientams, ir kartais praleidžiame atnaujinimus pastebėjus klaidas.",
+ "Notify members of the following groups about available updates:" : "Apie galimus atnaujinimus informuoti narius iš grupių:",
+ "Only notification for app updates are available." : "Galimi tik pranešimai apie programos atnaujinimus.",
+ "The selected update channel does not support updates of the server." : "Pasirinktas kanalas nepalaiko serverio atnaujinimų."
},
"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/updatenotification/l10n/lt_LT.json b/apps/updatenotification/l10n/lt_LT.json
index db24c0be43b..e6143665742 100644
--- a/apps/updatenotification/l10n/lt_LT.json
+++ b/apps/updatenotification/l10n/lt_LT.json
@@ -1,6 +1,23 @@
{ "translations": {
- "Updater" : "Atnaujinimo programa",
+ "Update notifications" : "Atnaujinimų pranešimai",
+ "Could not start updater, please try the manual update" : "Nepavyko paleisti atnaujinimo programos, prašome atnaujinimą rankiniu būdu",
+ "{version} is available. Get more information on how to update." : "Yra prieinama {version}. Gaukite daugiau informacijos apie tai kaip atnaujinti.",
+ "Channel updated" : "Kanalas atnaujintas",
+ "Please check the Nextcloud and server log files for errors." : "Prašome patikrinti Nextcloud ir serverio žurnalų įrašus apie galimas klaidas.",
+ "Update to %1$s is available." : "Yra prieinamas atnaujinimas į %1$s.",
+ "Update for %1$s to version %2$s is available." : "Yra prieinamas %1$s atnaujinimas į versiją %2$s.",
+ "Update for {app} to version %s is available." : "Galimas {app} atnaujinimas į %s versiją.",
+ "Update notification" : "Atnaujinimų pranešimai",
+ "A new version is available: %s" : "Yra prieinama nauja versija: %s",
+ "Open updater" : "Atverti atnaujinimo programą",
+ "Download now" : "Atsisiųsti dabar",
+ "Your version is up to date." : "Tavo versija yra naujausia.",
+ "Checked on %s" : "Tikrinta %s",
"Update channel:" : "Atnaujinimo kanalas:",
- "You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Visada galite atnaujinti į naujesnę versiją / bandomąjį kanalą. Bet niekada žeminti versijos ar pakeisti į stabilų kanalą."
+ "You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Visada galite atnaujinti į naujesnę versiją / eksperimentinį kanalą. Tačiau niekada negalite sendinti versijos ar persijungti į stabilų kanalą.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Atkreipkite dėmesį kad po naujos versijos išleidimo gali praeiti šiek tiek laiko kol ti bus matoma čia. Mes išleidžiame naujas versijas paskirstytai pagal laiką savo klientams, ir kartais praleidžiame atnaujinimus pastebėjus klaidas.",
+ "Notify members of the following groups about available updates:" : "Apie galimus atnaujinimus informuoti narius iš grupių:",
+ "Only notification for app updates are available." : "Galimi tik pranešimai apie programos atnaujinimus.",
+ "The selected update channel does not support updates of the server." : "Pasirinktas kanalas nepalaiko serverio atnaujinimų."
},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"
} \ No newline at end of file
diff --git a/apps/updatenotification/l10n/sq.js b/apps/updatenotification/l10n/sq.js
index 6f0b0683ef5..0aba2eb911a 100644
--- a/apps/updatenotification/l10n/sq.js
+++ b/apps/updatenotification/l10n/sq.js
@@ -18,6 +18,7 @@ OC.L10N.register(
"Checked on %s" : "Kontrolluar më %s",
"Update channel:" : "Kanal përditësimesh:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Mundeni përherë ta përditësoni me një version të ri / kanal eksperimental. Por nuk mund ta ulni kurrë versionin në një version më të qëndrueshëm.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Vini re se pas një lëshimi të ri mund të duhet pak kohë para se të shfaqet këtu. Ne hapim versione të reja të shpërndara me kalimin e kohës tek përdoruesit tanë dhe nganjëherë kalojmë një version kur gjenden çështjet.",
"Notify members of the following groups about available updates:" : "Njoftoji anëtarët e grupeve vijues për përditësime të gatshme:",
"Only notification for app updates are available." : "Vetëm njoftime për përditësime aplikacionesh janë të disponueshme.",
"The selected update channel makes dedicated notifications for the server obsolete." : "Kanali i zgjedhur i përditësimit i bën njoftimet për shërbyesin të papërdorshme.",
diff --git a/apps/updatenotification/l10n/sq.json b/apps/updatenotification/l10n/sq.json
index e013aa84452..a5f5f4a1c46 100644
--- a/apps/updatenotification/l10n/sq.json
+++ b/apps/updatenotification/l10n/sq.json
@@ -16,6 +16,7 @@
"Checked on %s" : "Kontrolluar më %s",
"Update channel:" : "Kanal përditësimesh:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Mundeni përherë ta përditësoni me një version të ri / kanal eksperimental. Por nuk mund ta ulni kurrë versionin në një version më të qëndrueshëm.",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "Vini re se pas një lëshimi të ri mund të duhet pak kohë para se të shfaqet këtu. Ne hapim versione të reja të shpërndara me kalimin e kohës tek përdoruesit tanë dhe nganjëherë kalojmë një version kur gjenden çështjet.",
"Notify members of the following groups about available updates:" : "Njoftoji anëtarët e grupeve vijues për përditësime të gatshme:",
"Only notification for app updates are available." : "Vetëm njoftime për përditësime aplikacionesh janë të disponueshme.",
"The selected update channel makes dedicated notifications for the server obsolete." : "Kanali i zgjedhur i përditësimit i bën njoftimet për shërbyesin të papërdorshme.",
diff --git a/apps/updatenotification/l10n/zh_CN.js b/apps/updatenotification/l10n/zh_CN.js
index b7e292cff7b..b3e6b4d7712 100644
--- a/apps/updatenotification/l10n/zh_CN.js
+++ b/apps/updatenotification/l10n/zh_CN.js
@@ -18,6 +18,7 @@ OC.L10N.register(
"Checked on %s" : "检查于 %s",
"Update channel:" : "更新通道:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "您可以随时更新到新版本 / 实验通道。但你永远不能降级到更稳定的通道。",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "请注意, 在新版本发布后, 它可能需要一段时间才能显示在这里。新版本发布后, 随着时间的推移, 当用户发现问题时我们可能会跳过一个版本。",
"Notify members of the following groups about available updates:" : "提醒一下组群的用户关于可用的更新:",
"Only notification for app updates are available." : "仅提醒应用更新就绪。",
"The selected update channel makes dedicated notifications for the server obsolete." : "被选中的升级通道将会通知未更新的服务器",
diff --git a/apps/updatenotification/l10n/zh_CN.json b/apps/updatenotification/l10n/zh_CN.json
index bee2c4f7ea1..f0c1eeb397b 100644
--- a/apps/updatenotification/l10n/zh_CN.json
+++ b/apps/updatenotification/l10n/zh_CN.json
@@ -16,6 +16,7 @@
"Checked on %s" : "检查于 %s",
"Update channel:" : "更新通道:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "您可以随时更新到新版本 / 实验通道。但你永远不能降级到更稳定的通道。",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "请注意, 在新版本发布后, 它可能需要一段时间才能显示在这里。新版本发布后, 随着时间的推移, 当用户发现问题时我们可能会跳过一个版本。",
"Notify members of the following groups about available updates:" : "提醒一下组群的用户关于可用的更新:",
"Only notification for app updates are available." : "仅提醒应用更新就绪。",
"The selected update channel makes dedicated notifications for the server obsolete." : "被选中的升级通道将会通知未更新的服务器",
diff --git a/apps/updatenotification/l10n/zh_TW.js b/apps/updatenotification/l10n/zh_TW.js
index a7e225e3413..3b0955f3ef9 100644
--- a/apps/updatenotification/l10n/zh_TW.js
+++ b/apps/updatenotification/l10n/zh_TW.js
@@ -5,8 +5,12 @@ OC.L10N.register(
"Could not start updater, please try the manual update" : "無法啟動更新程式,請嘗試手動更新",
"{version} is available. Get more information on how to update." : "{version} 釋出了,可以更新",
"Channel updated" : "頻道已更新",
+ "The update server could not be reached since %d days to check for new updates." : "更新伺服器在%d天前已經無法連線檢查更新",
+ "Please check the Nextcloud and server log files for errors." : "請確認伺服器log檔以查看錯誤。",
"Update to %1$s is available." : "更新版 %1$s 已經釋出",
"Update for %1$s to version %2$s is available." : "%1$s 到 %2$s 的更新已經釋出",
+ "Update for {app} to version %s is available." : "{app} 已有 %s 版本的更新",
+ "Update notification" : "更新通知",
"A new version is available: %s" : "新版本可用:%s",
"Open updater" : "打開更新程式",
"Download now" : "現在下載",
@@ -14,8 +18,10 @@ OC.L10N.register(
"Checked on %s" : "於 %s 檢查過",
"Update channel:" : "更新通道:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "您可以隨時更新至較新的版本 / 實驗通道,但您不能降版至更穩定的通道。",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "請注意,新版本釋出後,需要過一段時間才會在此顯示通知。隨著時間推進,我們為用戶推出了新的版本,有時候會在發現問題時跳過前一個版本更新。",
"Notify members of the following groups about available updates:" : "有可用更新時通知這些群組:",
"Only notification for app updates are available." : "僅提供應用程式更新的通知",
+ "The selected update channel makes dedicated notifications for the server obsolete." : "選擇的更新管道會導致伺服器專門的通知過期",
"The selected update channel does not support updates of the server." : "所選的更新頻道不提供伺服器軟體的更新"
},
"nplurals=1; plural=0;");
diff --git a/apps/updatenotification/l10n/zh_TW.json b/apps/updatenotification/l10n/zh_TW.json
index 7386d753e94..1acf5a387c0 100644
--- a/apps/updatenotification/l10n/zh_TW.json
+++ b/apps/updatenotification/l10n/zh_TW.json
@@ -3,8 +3,12 @@
"Could not start updater, please try the manual update" : "無法啟動更新程式,請嘗試手動更新",
"{version} is available. Get more information on how to update." : "{version} 釋出了,可以更新",
"Channel updated" : "頻道已更新",
+ "The update server could not be reached since %d days to check for new updates." : "更新伺服器在%d天前已經無法連線檢查更新",
+ "Please check the Nextcloud and server log files for errors." : "請確認伺服器log檔以查看錯誤。",
"Update to %1$s is available." : "更新版 %1$s 已經釋出",
"Update for %1$s to version %2$s is available." : "%1$s 到 %2$s 的更新已經釋出",
+ "Update for {app} to version %s is available." : "{app} 已有 %s 版本的更新",
+ "Update notification" : "更新通知",
"A new version is available: %s" : "新版本可用:%s",
"Open updater" : "打開更新程式",
"Download now" : "現在下載",
@@ -12,8 +16,10 @@
"Checked on %s" : "於 %s 檢查過",
"Update channel:" : "更新通道:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "您可以隨時更新至較新的版本 / 實驗通道,但您不能降版至更穩定的通道。",
+ "Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found." : "請注意,新版本釋出後,需要過一段時間才會在此顯示通知。隨著時間推進,我們為用戶推出了新的版本,有時候會在發現問題時跳過前一個版本更新。",
"Notify members of the following groups about available updates:" : "有可用更新時通知這些群組:",
"Only notification for app updates are available." : "僅提供應用程式更新的通知",
+ "The selected update channel makes dedicated notifications for the server obsolete." : "選擇的更新管道會導致伺服器專門的通知過期",
"The selected update channel does not support updates of the server." : "所選的更新頻道不提供伺服器軟體的更新"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php
index 0a867f1267c..fd68a6dd962 100644
--- a/apps/updatenotification/lib/Controller/AdminController.php
+++ b/apps/updatenotification/lib/Controller/AdminController.php
@@ -86,9 +86,8 @@ class AdminController extends Controller implements ISettings {
* @return TemplateResponse
*/
public function displayPanel() {
- $lastUpdateCheck = $this->dateTimeFormatter->formatDateTime(
- $this->config->getAppValue('core', 'lastupdatedat')
- );
+ $lastUpdateCheckTimestamp = $this->config->getAppValue('core', 'lastupdatedat');
+ $lastUpdateCheck = $this->dateTimeFormatter->formatDateTime($lastUpdateCheckTimestamp);
$channels = [
'daily',
@@ -106,15 +105,20 @@ class AdminController extends Controller implements ISettings {
$notifyGroups = json_decode($this->config->getAppValue('updatenotification', 'notify_groups', '["admin"]'), true);
+ $defaultUpdateServerURL = 'https://updates.nextcloud.com/server/';
+ $updateServerURL = $this->config->getSystemValue('updater.server.url', $defaultUpdateServerURL);
+
$params = [
'isNewVersionAvailable' => !empty($updateState['updateAvailable']),
+ 'isUpdateChecked' => $lastUpdateCheckTimestamp > 0,
'lastChecked' => $lastUpdateCheck,
'currentChannel' => $currentChannel,
'channels' => $channels,
'newVersionString' => (empty($updateState['updateVersion'])) ? '' : $updateState['updateVersion'],
'downloadLink' => (empty($updateState['downloadLink'])) ? '' : $updateState['downloadLink'],
'updaterEnabled' => (empty($updateState['updaterEnabled'])) ? false : $updateState['updaterEnabled'],
-
+ 'isDefaultUpdateServerURL' => $updateServerURL === $defaultUpdateServerURL,
+ 'updateServerURL' => $updateServerURL,
'notify_groups' => implode('|', $notifyGroups),
];
diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php
index e512825da04..2fc1d36b0cb 100644
--- a/apps/updatenotification/lib/Notification/Notifier.php
+++ b/apps/updatenotification/lib/Notification/Notifier.php
@@ -117,7 +117,7 @@ class Notifier implements INotifier {
}
$notification->setParsedSubject($l->t('Update for %1$s to version %2$s is available.', [$appName, $notification->getObjectId()]))
- ->setRichSubject($l->t('Update for {app} to version %s is available.', $notification->getObjectId()), [
+ ->setRichSubject($l->t('Update for {app} to version %s is available.', [$notification->getObjectId()]), [
'app' => [
'type' => 'app',
'id' => $notification->getObjectType(),
diff --git a/apps/updatenotification/templates/admin.php b/apps/updatenotification/templates/admin.php
index 369d4905a40..e09d19848e7 100644
--- a/apps/updatenotification/templates/admin.php
+++ b/apps/updatenotification/templates/admin.php
@@ -1,31 +1,50 @@
<?php
script('updatenotification', 'admin');
+ style('updatenotification', 'admin');
/** @var array $_ */
/** @var bool $isNewVersionAvailable */
$isNewVersionAvailable = $_['isNewVersionAvailable'];
/** @var string $newVersionString */
$newVersionString = $_['newVersionString'];
+ /** @var bool $isUpdateChecked */
+ $isUpdateChecked = $_['isUpdateChecked'];
/** @var string $lastCheckedDate */
$lastCheckedDate = $_['lastChecked'];
/** @var array $channels */
$channels = $_['channels'];
/** @var string $currentChannel */
$currentChannel = $_['currentChannel'];
+ /** @var string $updateServerURL */
+ $updateServerURL = $_['updateServerURL'];
+ /** @var bool $isDefaultUpdateServerURL */
+ $isDefaultUpdateServerURL = $_['isDefaultUpdateServerURL'];
?>
<form id="oca_updatenotification_section" class="followupsection">
- <?php if($isNewVersionAvailable === true) { ?>
- <strong><?php p($l->t('A new version is available: %s', [$newVersionString])); ?></strong>
- <?php if ($_['updaterEnabled']) { ?>
- <input type="button" id="oca_updatenotification_button" value="<?php p($l->t('Open updater')) ?>">
+ <p>
+ <?php if ($isNewVersionAvailable === true) { ?>
+ <strong><?php p($l->t('A new version is available: %s', [$newVersionString])); ?></strong>
+ <?php if ($_['updaterEnabled']) { ?>
+ <input type="button" id="oca_updatenotification_button" value="<?php p($l->t('Open updater')) ?>">
+ <?php } ?>
+ <?php if (!empty($_['downloadLink'])) { ?>
+ <a href="<?php p($_['downloadLink']); ?>" class="button<?php if ($_['updaterEnabled']) { p(' hidden'); } ?>"><?php p($l->t('Download now')) ?></a>
+ <?php } ?>
+ <?php } elseif (!$isUpdateChecked) { ?>
+ <?php p($l->t('The update check is not yet finished. Please refresh the page.')); ?>
+ <?php } else { ?>
+ <?php p($l->t('Your version is up to date.')); ?>
+ <span class="icon-info svg" title="<?php p($l->t('Checked on %s', [$lastCheckedDate])) ?>"></span>
<?php } ?>
- <?php if (!empty($_['downloadLink'])) { ?>
- <a href="<?php p($_['downloadLink']); ?>" class="button<?php if ($_['updaterEnabled']) { p(' hidden'); } ?>"><?php p($l->t('Download now')) ?></a>
+
+ <?php if (!$isDefaultUpdateServerURL) { ?>
+ <br />
+ <em>
+ <?php p($l->t("A non-default update server is in use to be checked for updates:")); ?>
+ <code><?php p($updateServerURL); ?></code>
+ </em>
<?php } ?>
- <?php } else { ?>
- <?php p($l->t('Your version is up to date.')); ?>
- <span class="icon-info svg" title="<?php p($l->t('Checked on %s', [$lastCheckedDate])) ?>"></span>
- <?php } ?>
+ </p>
<p>
<label for="release-channel"><?php p($l->t('Update channel:')) ?></label>
@@ -37,20 +56,16 @@
</option>
<?php } ?>
</select>
- <span id="channel_save_msg" class="msg"></span>
- </p>
- <p>
- <em><?php p($l->t('You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel.')); ?></em>
+ <span id="channel_save_msg" class="msg"></span><br />
+ <em><?php p($l->t('You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel.')); ?></em><br />
<em><?php p($l->t('Note that after a new release it can take some time before it shows up here. We roll out new versions spread out over time to our users and sometimes skip a version when issues are found.')); ?></em>
</p>
<p id="oca_updatenotification_groups">
- <br />
<?php p($l->t('Notify members of the following groups about available updates:')); ?>
- <input name="oca_updatenotification_groups_list" type="hidden" id="oca_updatenotification_groups_list" value="<?php p($_['notify_groups']) ?>" style="width: 400px">
+ <input name="oca_updatenotification_groups_list" type="hidden" id="oca_updatenotification_groups_list" value="<?php p($_['notify_groups']) ?>" style="width: 400px"><br />
<em class="<?php if (!in_array($currentChannel, ['daily', 'git'])) p('hidden'); ?>">
- <br />
<?php p($l->t('Only notification for app updates are available.')); ?>
<?php if ($currentChannel === 'daily') p($l->t('The selected update channel makes dedicated notifications for the server obsolete.')); ?>
<?php if ($currentChannel === 'git') p($l->t('The selected update channel does not support updates of the server.')); ?>
diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php
index 31e852a9e2e..ebf044abffd 100644
--- a/apps/updatenotification/tests/Controller/AdminControllerTest.php
+++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php
@@ -103,6 +103,11 @@ class AdminControllerTest extends TestCase {
['core', 'lastupdatedat', '', '12345'],
['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
]);
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->dateTimeFormatter
->expects($this->once())
->method('formatDateTime')
@@ -120,12 +125,15 @@ class AdminControllerTest extends TestCase {
$params = [
'isNewVersionAvailable' => true,
+ 'isUpdateChecked' => true,
'lastChecked' => 'LastCheckedReturnValue',
'currentChannel' => \OCP\Util::getChannel(),
'channels' => $channels,
'newVersionString' => '8.1.2',
'downloadLink' => 'https://downloads.nextcloud.org/server',
'updaterEnabled' => true,
+ 'isDefaultUpdateServerURL' => true,
+ 'updateServerURL' => 'https://updates.nextcloud.com/server/',
'notify_groups' => 'admin',
];
@@ -154,6 +162,11 @@ class AdminControllerTest extends TestCase {
['core', 'lastupdatedat', '', '12345'],
['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
]);
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->dateTimeFormatter
->expects($this->once())
->method('formatDateTime')
@@ -166,12 +179,15 @@ class AdminControllerTest extends TestCase {
$params = [
'isNewVersionAvailable' => false,
+ 'isUpdateChecked' => true,
'lastChecked' => 'LastCheckedReturnValue',
'currentChannel' => \OCP\Util::getChannel(),
'channels' => $channels,
'newVersionString' => '',
'downloadLink' => '',
'updaterEnabled' => 0,
+ 'isDefaultUpdateServerURL' => true,
+ 'updateServerURL' => 'https://updates.nextcloud.com/server/',
'notify_groups' => 'admin',
];