Show correct notification message for single and multiple notifications. (#931)
Signed-off-by: Michael Herdt <Michael.Herdt2@bosch-si.com>
This commit is contained in:
@@ -8,14 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.ui.components;
|
package org.eclipse.hawkbit.ui.components;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
import org.eclipse.hawkbit.ui.push.EventContainer;
|
|
||||||
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
|
|
||||||
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import com.vaadin.event.FieldEvents.BlurEvent;
|
import com.vaadin.event.FieldEvents.BlurEvent;
|
||||||
import com.vaadin.navigator.View;
|
import com.vaadin.navigator.View;
|
||||||
import com.vaadin.server.FontAwesome;
|
import com.vaadin.server.FontAwesome;
|
||||||
@@ -26,6 +18,13 @@ import com.vaadin.ui.Label;
|
|||||||
import com.vaadin.ui.VerticalLayout;
|
import com.vaadin.ui.VerticalLayout;
|
||||||
import com.vaadin.ui.Window;
|
import com.vaadin.ui.Window;
|
||||||
import com.vaadin.ui.themes.ValoTheme;
|
import com.vaadin.ui.themes.ValoTheme;
|
||||||
|
import org.eclipse.hawkbit.ui.push.EventContainer;
|
||||||
|
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
|
||||||
|
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button which shows all notification in a popup.
|
* Button which shows all notification in a popup.
|
||||||
@@ -116,7 +115,8 @@ public class NotificationUnreadButton extends Button {
|
|||||||
private void createNotification(final VerticalLayout notificationsLayout,
|
private void createNotification(final VerticalLayout notificationsLayout,
|
||||||
final NotificationUnreadValue notificationUnreadValue) {
|
final NotificationUnreadValue notificationUnreadValue) {
|
||||||
final Label contentLabel = new Label(notificationUnreadValue.getUnreadNotifications() + " "
|
final Label contentLabel = new Label(notificationUnreadValue.getUnreadNotifications() + " "
|
||||||
+ i18n.getMessage(notificationUnreadValue.getUnreadNotificationMessageKey()));
|
+ i18n.getMessage(notificationUnreadValue.getUnreadNotificationMessageKey(),
|
||||||
|
notificationUnreadValue.getUnreadNotifications() > 1 ? "s" : ""));
|
||||||
notificationsLayout.addComponent(contentLabel);
|
notificationsLayout.addComponent(contentLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,18 +81,18 @@ header.action.delete=Delete
|
|||||||
header.status=Status
|
header.status=Status
|
||||||
|
|
||||||
# event container
|
# event container
|
||||||
target.created.event.container.notifcation.message=targets created
|
target.created.event.container.notifcation.message=target{0} created
|
||||||
target.deleted.event.container.notifcation.message=targets deleted
|
target.deleted.event.container.notifcation.message=target{0} deleted
|
||||||
distribution.created.event.container.notifcation.message=distribution sets created
|
distribution.created.event.container.notifcation.message=distribution set{0} created
|
||||||
distribution.deleted.event.container.notifcation.message=distribution sets deleted
|
distribution.deleted.event.container.notifcation.message=distribution set{0} deleted
|
||||||
target.tag.created.event.container.notifcation.message=target tags created
|
target.tag.created.event.container.notifcation.message=target tag{0} created
|
||||||
target.tag.deleted.event.container.notifcation.message=target tags deleted
|
target.tag.deleted.event.container.notifcation.message=target tag{0} deleted
|
||||||
target.tag.updated.event.container.notifcation.message=target tags changed
|
target.tag.updated.event.container.notifcation.message=target tag{0} changed
|
||||||
software.module.created.event.container.notifcation.message=software module created
|
software.module.created.event.container.notifcation.message=software module{0} created
|
||||||
software.module.deleted.event.container.notifcation.message=software module deleted
|
software.module.deleted.event.container.notifcation.message=software module{0} deleted
|
||||||
distribution.set.tag.created.event.container.notifcation.message=distribution set tags created
|
distribution.set.tag.created.event.container.notifcation.message=distribution set tag{0} created
|
||||||
distribution.set.tag.deleted.event.container.notifcation.message=distribution set tags deleted
|
distribution.set.tag.deleted.event.container.notifcation.message=distribution set tag{0} deleted
|
||||||
distribution.set.tag.updated.event.container.notifcation.message=distribution set tags changed
|
distribution.set.tag.updated.event.container.notifcation.message=distribution set tag{0} changed
|
||||||
|
|
||||||
# Captions prefix with - caption
|
# Captions prefix with - caption
|
||||||
caption.filter.by.type = Filter by type
|
caption.filter.by.type = Filter by type
|
||||||
|
|||||||
Reference in New Issue
Block a user