From: Semun Lee Date: Sat, 9 Jul 2016 07:16:22 +0000 (+0900) Subject: Use default text when translation fails X-Git-Tag: submit/tizen/20160711.014306^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80c5e233e490cf900fd5bb6f43409d437d77e5fe;p=platform%2Fcore%2Fapi%2Fnotification.git Use default text when translation fails Change-Id: I8a0de4626e8e7716488ad8e9bbc895fa8a2abfb1 Signed-off-by: Semun Lee --- diff --git a/src/notification.c b/src/notification.c index eb5a6eb1..2f6f00a7 100755 --- a/src/notification.c +++ b/src/notification.c @@ -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) {