Add toast feedback when resetting newsroom cache or change image placeholder in preferences

This commit is contained in:
Stephen Abello
2024-02-29 11:07:48 +01:00
parent d15a0a0070
commit 1a8de82be5
34 changed files with 37 additions and 1 deletions

View File

@@ -1623,6 +1623,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'UI:Newsroom:Preferences' => 'Nastavení novinek a upozornění',
'UI:Newsroom:ConfigurationLink' => 'Konfigurace',
'UI:Newsroom:ResetCache' => 'Resetuj cache',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Zobrazit zprávy od %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Zobrazit %1$s zpráv v menu %2$s',
));

View File

@@ -1614,6 +1614,7 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
'UI:Newsroom:Preferences' => 'Newsroom preferences~~',
'UI:Newsroom:ConfigurationLink' => 'Configuration~~',
'UI:Newsroom:ResetCache' => 'Reset cache~~',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~',
));

View File

@@ -1612,6 +1612,7 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'UI:Newsroom:Preferences' => 'Newsroom-Einstellungen',
'UI:Newsroom:ConfigurationLink' => 'Konfiguration',
'UI:Newsroom:ResetCache' => 'Cache zurücksetzen',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Nachrichten von %1$s anzeigen',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Zeigen Sie höchstens %1$s Beiträge im Menü (%2$s) an.',
));

View File

@@ -1710,6 +1710,7 @@ Dict::Add('EN US', 'English', 'English', array(
'UI:Newsroom:Preferences' => 'Newsroom preferences',
'UI:Newsroom:ConfigurationLink' => 'Configuration',
'UI:Newsroom:ResetCache' => 'Reset cache',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.',
));

View File

@@ -1631,6 +1631,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'UI:Newsroom:Preferences' => 'Preferencia de Notificaciones',
'UI:Newsroom:ConfigurationLink' => 'Configuración',
'UI:Newsroom:ResetCache' => 'Borrar caché',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Desplegar mensajes de %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Desplegar hasta %1$s mensajes en el menú %2$s.',
));

View File

@@ -1620,6 +1620,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
'UI:Newsroom:Preferences' => 'Préférences du centre d\'information',
'UI:Newsroom:ConfigurationLink' => 'Configuration',
'UI:Newsroom:ResetCache' => 'Ràz du cache',
'UI:Newsroom:ResetCache:Success:Message' => 'Le cache a été réinitialisé avec succès',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Afficher les messages de %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Afficher au plus %1$s messages dans le menu %2$s.',
));

View File

@@ -1615,6 +1615,7 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
'UI:Newsroom:Preferences' => 'Hírfolyam beállítások',
'UI:Newsroom:ConfigurationLink' => 'Konfiguráció',
'UI:Newsroom:ResetCache' => 'Gyorstár ürítése',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => '%1$s üzeneteinek megjelenítése',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Mutasson %1$s üzenetet a %2$s menüben.',
));

View File

@@ -1631,6 +1631,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
'UI:Newsroom:Preferences' => 'Preferenze Newsroom',
'UI:Newsroom:ConfigurationLink' => 'Configurazione',
'UI:Newsroom:ResetCache' => 'Resetta la cache',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Mostra messaggi da %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Mostra fino a %1$s messaggi nel menu %2$s.',

View File

@@ -1613,6 +1613,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'UI:Newsroom:Preferences' => 'Newsroom preferences~~',
'UI:Newsroom:ConfigurationLink' => 'Configuration~~',
'UI:Newsroom:ResetCache' => 'Reset cache~~',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~',
));

View File

@@ -1628,6 +1628,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
'UI:Newsroom:Preferences' => 'Voorkeuren voor Newsroom',
'UI:Newsroom:ConfigurationLink' => 'Configuratie',
'UI:Newsroom:ResetCache' => 'Maak cache leeg',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Bekijk berichten van %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Toon maximaal %1$s berichten in het %2$s menu.',
));

View File

@@ -1625,6 +1625,7 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
'UI:Newsroom:Preferences' => 'Preferencje newsroomu',
'UI:Newsroom:ConfigurationLink' => 'Konfiguracja',
'UI:Newsroom:ResetCache' => 'Zresetuj pamięć podręczną',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Wyświetl wiadomości od %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Wyświetlaj do %1$s wiadomiości w %2$s menu.',
));

View File

@@ -1625,6 +1625,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
'UI:Newsroom:Preferences' => 'Preferências da sala de notícias',
'UI:Newsroom:ConfigurationLink' => 'Configuração',
'UI:Newsroom:ResetCache' => 'Redefinir cache',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Exibir mensagens do(a) %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Exibir até %1$s mensagem(ns) no menu %2$s',
));

View File

@@ -1625,6 +1625,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'UI:Newsroom:Preferences' => 'Центр новостей',
'UI:Newsroom:ConfigurationLink' => 'Конфигурация',
'UI:Newsroom:ResetCache' => 'Сбросить кеш',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Показать сообщения от %1$s',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Отобразите не более %1$s сообщений в меню %2$s.',
));

View File

@@ -1617,6 +1617,7 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
'UI:Newsroom:Preferences' => 'Newsroom preferences~~',
'UI:Newsroom:ConfigurationLink' => 'Configuration~~',
'UI:Newsroom:ResetCache' => 'Reset cache~~',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~',
));

View File

@@ -1625,6 +1625,7 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
'UI:Newsroom:Preferences' => 'Newsroom preferences~~',
'UI:Newsroom:ConfigurationLink' => 'Configuration~~',
'UI:Newsroom:ResetCache' => 'Reset cache~~',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => 'Display messages from %1$s~~',
'UI:Newsroom:DisplayAtMost_X_Messages' => 'Display up to %1$s messages in the %2$s menu.~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scrollable~~',
'UI:Preferences:ChooseAPlaceholder' => 'User placeholder image~~',
'UI:Preferences:ChooseAPlaceholder+' => 'Choose a placeholder image that will be displayed if the contact linked to your user doesn\'t have one~~',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scrollable~~',
'UI:Preferences:ChooseAPlaceholder' => 'User placeholder image~~',
'UI:Preferences:ChooseAPlaceholder+' => 'Choose a placeholder image that will be displayed if the contact linked to your user doesn\'t have one~~',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'scrollbar',
'UI:Preferences:ChooseAPlaceholder' => 'Platzhalterbild für Profilbild',
'UI:Preferences:ChooseAPlaceholder+' => 'Nutzen Sie ein Platzhalterbild, das angezeigt wird, wenn der Kontakt, der mit dem User verlinkt ist, kein Profilbild gesetzt hat.',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -51,6 +51,7 @@ Dict::Add('EN US', 'English', 'English', array(
'UI:Preferences:General:Toasts:Top' => 'Top',
'UI:Preferences:ChooseAPlaceholder' => 'User placeholder image',
'UI:Preferences:ChooseAPlaceholder+' => 'Choose a placeholder image that will be displayed if the contact linked to your user doesn\'t have one',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated',
'UI:Preferences:Notifications' => 'Notifications',
'UI:Preferences:Notifications+' => 'Configure the notifications you want to receive <a href="%1$s">on this page</a>.',

View File

@@ -47,4 +47,5 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Desplazable',
'UI:Preferences:ChooseAPlaceholder' => 'Imagen de marcador de posición de usuario',
'UI:Preferences:ChooseAPlaceholder+' => 'Elija una imagen de marcador de posición que se mostrará si el contacto vinculado a su usuario no tiene uno',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('FR FR', 'French', 'Français', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Défilement',
'UI:Preferences:ChooseAPlaceholder' => 'Avatar de l\'utilisateur',
'UI:Preferences:ChooseAPlaceholder+' => 'Choisissez un avatar qui sera affiché si le contact associé à votre compte utilisateur n\'en possède pas',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Votre avatar a été mis à jour avec succès',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Görgethető',
'UI:Preferences:ChooseAPlaceholder' => 'Felhasználói helyettesítő kép',
'UI:Preferences:ChooseAPlaceholder+' => 'Válasszon ki egy helyettesítő képet, amely akkor jelenik meg, ha a kapcsolattartói beállításaiban még nem adott meg fényképet.',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,5 +47,5 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scorrevole',
'UI:Preferences:ChooseAPlaceholder' => 'Seleziona un\'immagine placeholder utente',
'UI:Preferences:ChooseAPlaceholder+' => 'Scegli un\'immagine placeholder che verrà visualizzata se il contatto associato al tuo utente non ne ha una',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scrollable~~',
'UI:Preferences:ChooseAPlaceholder' => 'User placeholder image~~',
'UI:Preferences:ChooseAPlaceholder+' => 'Choose a placeholder image that will be displayed if the contact linked to your user doesn\'t have one~~',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scrollbaar',
'UI:Preferences:ChooseAPlaceholder' => 'Gebruikersafbeelding placeholder',
'UI:Preferences:ChooseAPlaceholder+' => 'Kies een standaard afbeelding die getoond wordt als het contact gelinkt aan jouw gebruiker geen eigen afbeelding heeft.',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Przewijana',
'UI:Preferences:ChooseAPlaceholder' => 'Obraz zastępczy użytkownika',
'UI:Preferences:ChooseAPlaceholder+' => 'Wybierz obraz zastępczy, który będzie wyświetlany, jeśli kontakt powiązany z Twoim użytkownikiem go nie ma',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Rolável',
'UI:Preferences:ChooseAPlaceholder' => 'Avatar padrão do usuário',
'UI:Preferences:ChooseAPlaceholder+' => 'Escolha uma imagem padrão que será exibida caso o contato associado ao usuário não possuir nenhuma',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Прокручиваемая',
'UI:Preferences:ChooseAPlaceholder' => 'Аватар пользователя',
'UI:Preferences:ChooseAPlaceholder+' => 'Выберите аватар, который будет отображаться, если у связанного с вашей учетной записью контакта нет фотографии',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scrollable~~',
'UI:Preferences:ChooseAPlaceholder' => 'User placeholder image~~',
'UI:Preferences:ChooseAPlaceholder+' => 'Choose a placeholder image that will be displayed if the contact linked to your user doesn\'t have one~~',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => 'Scrollable~~',
'UI:Preferences:ChooseAPlaceholder' => 'User placeholder image~~',
'UI:Preferences:ChooseAPlaceholder+' => 'Choose a placeholder image that will be displayed if the contact linked to your user doesn\'t have one~~',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -47,4 +47,5 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'UI:Preferences:Tabs:Scrollable:Scrollable' => '可滚动',
'UI:Preferences:ChooseAPlaceholder' => '用户的默认头像',
'UI:Preferences:ChooseAPlaceholder+' => '选择一个占位图片, 将在用户联系人没有设定头像图片时显示',
'UI:Preferences:ChooseAPlaceholder:Success:Message' => 'Your placeholder image has been successfully updated~~',
));

View File

@@ -1709,6 +1709,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'UI:Newsroom:Preferences' => '消息选项',
'UI:Newsroom:ConfigurationLink' => '配置',
'UI:Newsroom:ResetCache' => '刷新缓存',
'UI:Newsroom:ResetCache:Success:Message' => 'Your newsroom cache has been successfully reset~~',
'UI:Newsroom:DisplayMessagesFor_Provider' => '显示来自%1$s的消息',
'UI:Newsroom:DisplayAtMost_X_Messages' => '在%2$s菜单中最多显示%1$s条消息.',
));

View File

@@ -363,6 +363,7 @@ $(function()
var sKey = this._makeCacheKey(idx);
localStorage.removeItem(sKey);
}
CombodoToast.OpenSuccessToast(Dict.S('UI:Newsroom:ResetCache:Success:Message'));
},
_makeCacheKey: function(idxProvider)
{

View File

@@ -434,6 +434,7 @@ JS
}
$sUserPicturePlaceHolderHtml .= '<a class="ibo-preferences--user-preferences--picture-placeholder--image'.$sAdditionalClass.'" data-image-name="'.$sUserPicture.'" data-role="ibo-preferences--user-preferences--picture-placeholder--image" href="#"> <img src="'.$sUserPicturesFolder.$sUserPicture.'"/> </a>';
}
$sUserPictureChangedSuccessMessage = Dict::S('UI:Preferences:ChooseAPlaceholder:Success:Message');
$oP->add_ready_script(
<<<JS
$('[data-role="ibo-preferences--user-preferences--picture-placeholder--image"]').on('click',function(){
@@ -458,6 +459,9 @@ $('[data-role="ibo-preferences--user-preferences--picture-placeholder--image"]')
// Update navigation menu
$('[data-role="ibo-navigation-menu--user-picture--image"]').attr('src', oData.data.image_url);
// Display success message
CombodoToast.OpenSuccessToast('{$sUserPictureChangedSuccessMessage}');
});
});
JS