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;
|
||||
|
||||
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.navigator.View;
|
||||
import com.vaadin.server.FontAwesome;
|
||||
@@ -26,6 +18,13 @@ import com.vaadin.ui.Label;
|
||||
import com.vaadin.ui.VerticalLayout;
|
||||
import com.vaadin.ui.Window;
|
||||
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.
|
||||
@@ -116,7 +115,8 @@ public class NotificationUnreadButton extends Button {
|
||||
private void createNotification(final VerticalLayout notificationsLayout,
|
||||
final NotificationUnreadValue notificationUnreadValue) {
|
||||
final Label contentLabel = new Label(notificationUnreadValue.getUnreadNotifications() + " "
|
||||
+ i18n.getMessage(notificationUnreadValue.getUnreadNotificationMessageKey()));
|
||||
+ i18n.getMessage(notificationUnreadValue.getUnreadNotificationMessageKey(),
|
||||
notificationUnreadValue.getUnreadNotifications() > 1 ? "s" : ""));
|
||||
notificationsLayout.addComponent(contentLabel);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,18 +81,18 @@ header.action.delete=Delete
|
||||
header.status=Status
|
||||
|
||||
# event container
|
||||
target.created.event.container.notifcation.message=targets created
|
||||
target.deleted.event.container.notifcation.message=targets deleted
|
||||
distribution.created.event.container.notifcation.message=distribution sets created
|
||||
distribution.deleted.event.container.notifcation.message=distribution sets deleted
|
||||
target.tag.created.event.container.notifcation.message=target tags created
|
||||
target.tag.deleted.event.container.notifcation.message=target tags deleted
|
||||
target.tag.updated.event.container.notifcation.message=target tags changed
|
||||
software.module.created.event.container.notifcation.message=software module created
|
||||
software.module.deleted.event.container.notifcation.message=software module deleted
|
||||
distribution.set.tag.created.event.container.notifcation.message=distribution set tags created
|
||||
distribution.set.tag.deleted.event.container.notifcation.message=distribution set tags deleted
|
||||
distribution.set.tag.updated.event.container.notifcation.message=distribution set tags changed
|
||||
target.created.event.container.notifcation.message=target{0} created
|
||||
target.deleted.event.container.notifcation.message=target{0} deleted
|
||||
distribution.created.event.container.notifcation.message=distribution set{0} created
|
||||
distribution.deleted.event.container.notifcation.message=distribution set{0} deleted
|
||||
target.tag.created.event.container.notifcation.message=target tag{0} created
|
||||
target.tag.deleted.event.container.notifcation.message=target tag{0} deleted
|
||||
target.tag.updated.event.container.notifcation.message=target tag{0} changed
|
||||
software.module.created.event.container.notifcation.message=software module{0} created
|
||||
software.module.deleted.event.container.notifcation.message=software module{0} deleted
|
||||
distribution.set.tag.created.event.container.notifcation.message=distribution set tag{0} created
|
||||
distribution.set.tag.deleted.event.container.notifcation.message=distribution set tag{0} deleted
|
||||
distribution.set.tag.updated.event.container.notifcation.message=distribution set tag{0} changed
|
||||
|
||||
# Captions prefix with - caption
|
||||
caption.filter.by.type = Filter by type
|
||||
|
||||
Reference in New Issue
Block a user