Skip to content

Commit

Permalink
Merge pull request MagicMirrorOrg#1383 from balassy/bugfix/updatenoti…
Browse files Browse the repository at this point in the history
…fication-localization

Making the word "commit" localizable in the UpdateNotification module message
  • Loading branch information
MichMich authored Sep 5, 2018
2 parents 6365c5c + ec44cb2 commit 5dbae7c
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 31 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Mixup between german and spanish translation for newsfeed.
- Fixed close dates to be absolute, if no configured in the config.js - module Calendar
- Fixed the UpdateNotification module message about new commits in the repository, so they can be correctly localized in singular and plural form.
- Fix for weatherforecast rainfall rounding [#1374](https://github.com/MichMich/MagicMirror/issues/1374)
- Fix calendar parsing issue for Midori on RasperryPi Zero w, related to issue #694.
- Fix weather city ID link in sample config
Expand Down
5 changes: 3 additions & 2 deletions modules/default/updatenotification/updatenotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ Module.register("updatenotification", {
icon.innerHTML = " ";
message.appendChild(icon);

var subtextHtml = this.translate("UPDATE_INFO", {
COMMIT_COUNT: this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits"),
var updateInfoKeyName = this.status.behind == 1 ? "UPDATE_INFO_SINGLE" : "UPDATE_INFO_MULTIPLE";
var subtextHtml = this.translate(updateInfoKeyName, {
COMMIT_COUNT: this.status.behind,
BRANCH_NAME: this.status.current
});

Expand Down
3 changes: 2 additions & 1 deletion tests/configs/data/TranslationTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² update available.",
"UPDATE_NOTIFICATION_MODULE": "Update available for MODULE_NAME module.",
"UPDATE_INFO": "The current installation is COMMIT_COUNT behind on the BRANCH_NAME branch."
"UPDATE_INFO_SINGLE": "The current installation is COMMIT_COUNT commit behind on the BRANCH_NAME branch.",
"UPDATE_INFO_MULTIPLE": "The current installation is COMMIT_COUNT commits behind on the BRANCH_NAME branch."
}
3 changes: 2 additions & 1 deletion tests/configs/data/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² update available.",
"UPDATE_NOTIFICATION_MODULE": "Update available for MODULE_NAME module.",
"UPDATE_INFO": "The current installation is COMMIT_COUNT behind on the BRANCH_NAME branch."
"UPDATE_INFO_SINGLE": "The current installation is COMMIT_COUNT commit behind on the BRANCH_NAME branch.",
"UPDATE_INFO_MULTIPLE": "The current installation is COMMIT_COUNT commits behind on the BRANCH_NAME branch."
}
3 changes: 2 additions & 1 deletion translations/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² update beskikbaar.",
"UPDATE_NOTIFICATION_MODULE": "Update beskikbaar vir {MODULE_NAME} module.",
"UPDATE_INFO": "Die huidige installasie is {COMMIT_COUNT} agter op die {BRANCH_NAME} branch."
"UPDATE_INFO_SINGLE": "Die huidige installasie is {COMMIT_COUNT} commit agter op die {BRANCH_NAME} branch.",
"UPDATE_INFO_MULTIPLE": "Die huidige installasie is {COMMIT_COUNT} commits agter op die {BRANCH_NAME} branch."
}
3 changes: 2 additions & 1 deletion translations/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "Налична актуализация за MagicMirror².",
"UPDATE_NOTIFICATION_MODULE": "Налична актуализация за {MODULE_NAME} модул.",
"UPDATE_INFO": "Текущата инсталация е изостанала с {COMMIT_COUNT} къмита на клон {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "Текущата инсталация е изостанала с {COMMIT_COUNT} commit къмита на клон {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Текущата инсталация е изостанала с {COMMIT_COUNT} commits къмита на клон {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² actualizació disponible.",
"UPDATE_NOTIFICATION_MODULE": "Disponible una actualizació per al mòdul {MODULE_NAME}.",
"UPDATE_INFO": "La teva instal·lació actual està {COMMIT_COUNT} canvis darrere de la branca {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "La teva instal·lació actual està {COMMIT_COUNT} commit canvis darrere de la branca {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "La teva instal·lació actual està {COMMIT_COUNT} commits canvis darrere de la branca {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "Dostupná aktualizace pro MagicMirror².",
"UPDATE_NOTIFICATION_MODULE": "Dostupná aktualizace pro modul {MODULE_NAME}.",
"UPDATE_INFO": "Současná instalace je na větvi {BRANCH_NAME} pozadu o {COMMIT_COUNT}."
"UPDATE_INFO_SINGLE": "Současná instalace je na větvi {BRANCH_NAME} pozadu o {COMMIT_COUNT} commit.",
"UPDATE_INFO_MULTIPLE": "Současná instalace je na větvi {BRANCH_NAME} pozadu o {COMMIT_COUNT} commits."
}
3 changes: 2 additions & 1 deletion translations/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² mwy diweddar yn barod.",
"UPDATE_NOTIFICATION_MODULE": "Mae diweddaraiad ar gyfer y modiwl {MODULE_NAME}.",
"UPDATE_INFO": "Mae'r fersiwn bresenol {COMMIT_COUNT} commit tu ôl i'r gangen {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "Mae'r fersiwn bresenol {COMMIT_COUNT} commit tu ôl i'r gangen {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Mae'r fersiwn bresenol {COMMIT_COUNT} commit tu ôl i'r gangen {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² opdatering tilgængelig.",
"UPDATE_NOTIFICATION_MODULE": "Opdatering tilgængelig for {MODULE_NAME} modulet.",
"UPDATE_INFO": "Den nuværende installation er {COMMIT_COUNT} bagud på {BRANCH_NAME} branch'en."
"UPDATE_INFO_SINGLE": "Den nuværende installation er {COMMIT_COUNT} commit bagud på {BRANCH_NAME} branch'en.",
"UPDATE_INFO_MULTIPLE": "Den nuværende installation er {COMMIT_COUNT} commits bagud på {BRANCH_NAME} branch'en."
}
3 changes: 2 additions & 1 deletion translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "Aktualisierung für MagicMirror² verfügbar.",
"UPDATE_NOTIFICATION_MODULE": "Aktualisierung für das {MODULE_NAME} Modul verfügbar.",
"UPDATE_INFO": "Die aktuelle Installation ist {COMMIT_COUNT} hinter dem {BRANCH_NAME} Branch.",
"UPDATE_INFO_SINGLE": "Die aktuelle Installation ist {COMMIT_COUNT} Commit hinter dem {BRANCH_NAME} Branch.",
"UPDATE_INFO_MULTIPLE": "Die aktuelle Installation ist {COMMIT_COUNT} Commits hinter dem {BRANCH_NAME} Branch.",

"FEELS": "Gefühlt"
}
3 changes: 2 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "MagicMirror² update available.",
"UPDATE_NOTIFICATION_MODULE": "Update available for {MODULE_NAME} module.",
"UPDATE_INFO": "The current installation is {COMMIT_COUNT} behind on the {BRANCH_NAME} branch.",
"UPDATE_INFO_SINGLE": "The current installation is {COMMIT_COUNT} commit behind on the {BRANCH_NAME} branch.",
"UPDATE_INFO_MULTIPLE": "The current installation is {COMMIT_COUNT} commits behind on the {BRANCH_NAME} branch.",

"FEELS": "Feels"
}
3 changes: 2 additions & 1 deletion translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "MagicMirror² actualización disponible.",
"UPDATE_NOTIFICATION_MODULE": "Disponible una actualización para el módulo {MODULE_NAME}.",
"UPDATE_INFO": "Tu actual instalación está {COMMIT_COUNT} cambios detrás de la rama {BRANCH_NAME}.",
"UPDATE_INFO_SINGLE": "Tu actual instalación está {COMMIT_COUNT} commit cambios detrás de la rama {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Tu actual instalación está {COMMIT_COUNT} commits cambios detrás de la rama {BRANCH_NAME}.",

"FEELS": "Sensación térmica de"
}
3 changes: 2 additions & 1 deletion translations/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@

"UPDATE_NOTIFICATION": "MagicMirror²´le uuendus saadaval.",
"UPDATE_NOTIFICATION_MODULE": "Uuendus saadaval {MODULE_NAME} moodulile.",
"UPDATE_INFO": "Praegune paigaldus on {COMMIT_COUNT} tagapool {BRANCH_NAME} harul."
"UPDATE_INFO_SINGLE": "Praegune paigaldus on {COMMIT_COUNT} commit tagapool {BRANCH_NAME} harul.",
"UPDATE_INFO_MULTIPLE": "Praegune paigaldus on {COMMIT_COUNT} commits tagapool {BRANCH_NAME} harul."
}
3 changes: 2 additions & 1 deletion translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "Une mise à jour de MagicMirror² est disponible",
"UPDATE_NOTIFICATION_MODULE": "Une mise à jour est disponible pour le module {MODULE_NAME} .",
"UPDATE_INFO": "L'installation actuelle est {COMMIT_COUNT} en retard sur la branche {BRANCH_NAME} .",
"UPDATE_INFO_SINGLE": "L'installation actuelle est {COMMIT_COUNT} commit en retard sur la branche {BRANCH_NAME} .",
"UPDATE_INFO_MULTIPLE": "L'installation actuelle est {COMMIT_COUNT} commits en retard sur la branche {BRANCH_NAME} .",

"FEELS": "Ressenti"
}
3 changes: 2 additions & 1 deletion translations/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "MagicMirror²-hoz frissítés érhető el.",
"UPDATE_NOTIFICATION_MODULE": "A {MODULE_NAME} modulhoz frissítés érhető el.",
"UPDATE_INFO": "A jelenlegi telepítés óta {COMMIT_COUNT} commit jelent meg a {BRANCH_NAME} ágon.",
"UPDATE_INFO_SINGLE": "A jelenlegi telepítés óta {COMMIT_COUNT} új commit jelent meg a {BRANCH_NAME} ágon.",
"UPDATE_INFO_MULTIPLE": "A jelenlegi telepítés óta {COMMIT_COUNT} új commit jelent meg a {BRANCH_NAME} ágon.",

"FEELS": "Érzet"
}
3 changes: 2 additions & 1 deletion translations/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "Memperbarui MagicMirror² tersedia.",
"UPDATE_NOTIFICATION_MODULE": "Memperbarui tersedia untuk modul {MODULE_NAME}.",
"UPDATE_INFO": "Instalasi saat ini tertinggal {COMMIT_COUNT} pada cabang {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "Instalasi saat ini tertinggal {COMMIT_COUNT} commit pada cabang {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Instalasi saat ini tertinggal {COMMIT_COUNT} commits pada cabang {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/is.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² uppfærsla í boði.",
"UPDATE_NOTIFICATION_MODULE": "Uppfærsla í boði fyrir {MODULE_NAME} module.",
"UPDATE_INFO": "Núverandi kerfi er {COMMIT_COUNT} á eftir {BRANCH_NAME} branchinu."
"UPDATE_INFO_SINGLE": "Núverandi kerfi er {COMMIT_COUNT} commit á eftir {BRANCH_NAME} branchinu.",
"UPDATE_INFO_MULTIPLE": "Núverandi kerfi er {COMMIT_COUNT} commits á eftir {BRANCH_NAME} branchinu."
}
3 changes: 2 additions & 1 deletion translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "E' disponibile un aggiornamento di MagicMirror².",
"UPDATE_NOTIFICATION_MODULE": "E' disponibile un aggiornamento del modulo {MODULE_NAME}.",
"UPDATE_INFO": "L'installazione è {COMMIT_COUNT} indietro rispetto all'attuale branch {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "L'installazione è {COMMIT_COUNT} commit indietro rispetto all'attuale branch {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "L'installazione è {COMMIT_COUNT} commits indietro rispetto all'attuale branch {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@

"UPDATE_NOTIFICATION": "새로운 MagicMirror² 업데이트가 있습니다.",
"UPDATE_NOTIFICATION_MODULE": "{MODULE_NAME} 모듈에서 사용 가능한 업데이트 입니다.",
"UPDATE_INFO": "설치할 {COMMIT_COUNT} 는 {BRANCH_NAME} 분기에 해당됩니다."
"UPDATE_INFO_SINGLE": "설치할 {COMMIT_COUNT} commit 는 {BRANCH_NAME} 분기에 해당됩니다.",
"UPDATE_INFO_MULTIPLE": "설치할 {COMMIT_COUNT} commits 는 {BRANCH_NAME} 분기에 해당됩니다."
}
3 changes: 2 additions & 1 deletion translations/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "MagicMirror²-oppdatering er tilgjengelig.",
"UPDATE_NOTIFICATION_MODULE": "Oppdatering tilgjengelig for modulen {MODULE_NAME}.",
"UPDATE_INFO": "Nåværende installasjon er {COMMIT_COUNT} bak {BRANCH_NAME} grenen.",
"UPDATE_INFO_SINGLE": "Nåværende installasjon er {COMMIT_COUNT} commit bak {BRANCH_NAME} grenen.",
"UPDATE_INFO_MULTIPLE": "Nåværende installasjon er {COMMIT_COUNT} commits bak {BRANCH_NAME} grenen.",

"FEELS": "Føles som"
}
3 changes: 2 additions & 1 deletion translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

"UPDATE_NOTIFICATION": "MagicMirror² update beschikbaar.",
"UPDATE_NOTIFICATION_MODULE": "Update beschikbaar voor {MODULE_NAME} module.",
"UPDATE_INFO": "De huidige installatie loopt {COMMIT_COUNT} achter op de {BRANCH_NAME} branch.",
"UPDATE_INFO_SINGLE": "De huidige installatie loopt {COMMIT_COUNT} commit achter op de {BRANCH_NAME} branch.",
"UPDATE_INFO_MULTIPLE": "De huidige installatie loopt {COMMIT_COUNT} commits achter op de {BRANCH_NAME} branch.",

"FEELS": "Gevoelstemperatuur"
}
3 changes: 2 additions & 1 deletion translations/nn.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

"UPDATE_NOTIFICATION": "MagicMirror² oppdatering er tilgjengeleg.",
"UPDATE_NOTIFICATION_MODULE": "Oppdatering tilgjengeleg for modulen {MODULE_NAME}.",
"UPDATE_INFO": "noverande installasjon er {COMMIT_COUNT} bak {BRANCH_NAME} greinen.",
"UPDATE_INFO_SINGLE": "noverande installasjon er {COMMIT_COUNT} commit bak {BRANCH_NAME} greinen.",
"UPDATE_INFO_MULTIPLE": "noverande installasjon er {COMMIT_COUNT} commits bak {BRANCH_NAME} greinen.",

"FEELS": "Kjenst som"
}
5 changes: 3 additions & 2 deletions translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

"UPDATE_NOTIFICATION": "Dostępna jest aktualizacja MagicMirror².",
"UPDATE_NOTIFICATION_MODULE": "Dostępna jest aktualizacja modułu {MODULE_NAME}.",
"UPDATE_INFO": "Zainstalowana wersja odbiega o {COMMIT_COUNT} commitów od gałęzi {BRANCH_NAME}.",

"UPDATE_INFO_SINGLE": "Zainstalowana wersja odbiega o {COMMIT_COUNT} commitów od gałęzi {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Zainstalowana wersja odbiega o {COMMIT_COUNT} commitów od gałęzi {BRANCH_NAME}.",

"FEELS": "Odczuwalna"
}
3 changes: 2 additions & 1 deletion translations/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@

"UPDATE_NOTIFICATION": "Nova atualização para MagicMirror disponível.",
"UPDATE_NOTIFICATION_MODULE": "Atualização para o módulo {MODULE_NAME} disponível.",
"UPDATE_INFO": "Sua versão atual é a {COMMIT_COUNT} dentro do seguinte branch {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "Sua versão atual é a {COMMIT_COUNT} commit dentro do seguinte branch {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Sua versão atual é a {COMMIT_COUNT} commits dentro do seguinte branch {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@

"UPDATE_NOTIFICATION": "Atualização do MagicMirror² disponível.",
"UPDATE_NOTIFICATION_MODULE": "Atualização para o módulo {MODULE_NAME} disponível.",
"UPDATE_INFO": "A instalação atual está {COMMIT_COUNT} atrasada no branch {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "A instalação atual está {COMMIT_COUNT} commit atrasada no branch {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "A instalação atual está {COMMIT_COUNT} commits atrasada no branch {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "Un update este disponibil pentru MagicMirror².",
"UPDATE_NOTIFICATION_MODULE": "Un update este disponibil pentru modulul {MODULE_NAME}.",
"UPDATE_INFO": "Există {COMMIT_COUNT} commit-uri noi pe branch-ul {BRANCH_NAME}."
"UPDATE_INFO_SINGLE": "Există {COMMIT_COUNT} commit-uri noi pe branch-ul {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Există {COMMIT_COUNT} commit-uri noi pe branch-ul {BRANCH_NAME}."
}
3 changes: 2 additions & 1 deletion translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@

"UPDATE_NOTIFICATION": "Есть обновление для MagicMirror².",
"UPDATE_NOTIFICATION_MODULE": "Есть обновление для {MODULE_NAME} модуля.",
"UPDATE_INFO": "Данная инсталляция позади {BRANCH_NAME} ветки на {COMMIT_COUNT} коммитов."
"UPDATE_INFO_SINGLE": "Данная инсталляция позади {BRANCH_NAME} commit ветки на {COMMIT_COUNT} коммитов.",
"UPDATE_INFO_MULTIPLE": "Данная инсталляция позади {BRANCH_NAME} commits ветки на {COMMIT_COUNT} коммитов."
}
3 changes: 2 additions & 1 deletion translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

"UPDATE_NOTIFICATION": "MagicMirror² uppdatering finns tillgänglig.",
"UPDATE_NOTIFICATION_MODULE": "Uppdatering finns tillgänglig av {MODULE_NAME} modulen.",
"UPDATE_INFO": "Denna installation ligger {COMMIT_COUNT} steg bakom {BRANCH_NAME} grenen.",
"UPDATE_INFO_SINGLE": "Denna installation ligger {COMMIT_COUNT} commit steg bakom {BRANCH_NAME} grenen.",
"UPDATE_INFO_MULTIPLE": "Denna installation ligger {COMMIT_COUNT} commits steg bakom {BRANCH_NAME} grenen.",

"FEELS": "Känns som"
}
3 changes: 2 additions & 1 deletion translations/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@

"UPDATE_NOTIFICATION": "MagicMirror² 有新的更新",
"UPDATE_NOTIFICATION_MODULE": "模块 {MODULE_NAME} 可更新",
"UPDATE_INFO": "当前已安装版本为 {COMMIT_COUNT} 落后于分支 {BRANCH_NAME} "
"UPDATE_INFO_SINGLE": "当前已安装版本为 {COMMIT_COUNT} commit 落后于分支 {BRANCH_NAME} ",
"UPDATE_INFO_MULTIPLE": "当前已安装版本为 {COMMIT_COUNT} commits 落后于分支 {BRANCH_NAME} "
}

0 comments on commit 5dbae7c

Please sign in to comment.