Use default text when translation fails 25/79225/2 accepted/tizen/common/20160712.150342 accepted/tizen/ivi/20160711.031201 accepted/tizen/mobile/20160711.030756 accepted/tizen/tv/20160711.030704 accepted/tizen/wearable/20160711.030718 submit/tizen/20160711.014306
authorSemun Lee <sm79.lee@samsung.com>
Sat, 9 Jul 2016 07:16:22 +0000 (16:16 +0900)
committerSemun Lee <sm79.lee@samsung.com>
Mon, 11 Jul 2016 00:40:12 +0000 (09:40 +0900)
Change-Id: I8a0de4626e8e7716488ad8e9bbc895fa8a2abfb1
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
src/notification.c

index eb5a6eb..2f6f00a 100755 (executable)
@@ -527,9 +527,13 @@ EXPORT_API int notification_get_text(notification_h noti,
                        bindtextdomain(noti->domain, noti->dir);
 
                        get_str = dgettext(noti->domain, ret_val);
+                       if (get_str == ret_val) /* not found */
+                               get_str = NULL;
                } else if (ret_val != NULL) {
                        /* Get system string */
                        get_str = dgettext("sys_string", ret_val);
+                       if (get_str == ret_val) /* not found */
+                               get_str = NULL;
                } else {
                        get_str = NULL;
                }
@@ -543,6 +547,9 @@ EXPORT_API int notification_get_text(notification_h noti,
                bundle_get_str(b, buf_key, &get_str);
        }
 
+       if (get_str == NULL && ret_val != NULL)
+               get_str = ret_val; /* fallback for printing anything */
+
        check_type = type;
 
        if (get_str != NULL) {