apply STMS translation result to Privacy Monitor part in privacy-setting app 94/99494/2
authorKyoungyong Lee <k.y.lee@samsung.com>
Wed, 23 Nov 2016 05:41:18 +0000 (14:41 +0900)
committerKyoungyong Lee <k.y.lee@samsung.com>
Wed, 23 Nov 2016 05:49:08 +0000 (14:49 +0900)
Change-Id: I834a72092252bdf2a0345779a8361fd085a966fe

ui/include/privacy_setting.h
ui/src/privacy_guard_package_list_view.c

index 404d148c3e8e90bd5cc0ce3a4b6517f6c1b927c0..980be82e8d470cdb643bb57928b6825b973fb4a2 100644 (file)
@@ -30,8 +30,7 @@
 #include <app.h>
 
 #define PRIVACY_MENU_SETTING "IDS_ST_HEADER_PRIVACY_SETTINGS_ABB"
-//#define PRIVACY_MENU_MONITOR "IDS_ST_HEADER_PRIVACY_MONITOR"
-#define PRIVACY_MENU_MONITOR "Privacy monitor"
+#define PRIVACY_MENU_MONITOR "IDS_ST_HEADER_PRIVACY_MONITOR"
 
 struct app_data_s {
        Evas_Object *parent_layout;
index f01ad101b3e071cffb26b8f0b23f222deda3f215..aa350f1719e992fa0e52d81edc912ddbdbdca1c6 100644 (file)
@@ -63,7 +63,6 @@ static void _privacy_package_check_changed_cb(void *data, Evas_Object *obj, void
        pg_item_data_s *id = (pg_item_data_s*)data;
 
        LOGD("current policy: [%d]", id->status);
-
        int res = privacy_guard_client_update_monitor_policy(id->user_id, id->pkg_id, id->privacy_id, !id->status);
        log_if(res != PRIV_GUARD_ERROR_SUCCESS, 1, "privacy_guard_client_update_monitor_policy() is failed. [%d]", res);
        id->status = !id->status;
@@ -163,18 +162,10 @@ void create_privacy_guard_package_list_view(struct app_data_s* ad)
                evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
                evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-               // TOBE /////////////////////////////////////////////////////////////////////////////////
-               //elm_object_part_text_set(genlist, "elm.text", dgettext("privacy-setting", "IDS_ST_NPBODY_NO_APPS"));
-               //char* no_app_string_format = dgettext("privacy-setting", "IDS_ST_BODY_AFTER_YOU_DOWNLOAD_APPS_THAT_USE_PS_THEY_WILL_BE_SHOWN_HERE");
-               //char no_app_string[256];
-               //snprintf(no_app_string, sizeof(no_app_string), no_app_string_format, privacy_display);
-               /////////////////////////////////////////////////////////////////////////////////////////
-
-               // temp - SHOULD BE REPLACED TO ABOVE ONE ///////////////////////////////////////////////
-               elm_object_part_text_set(genlist, "elm.text", "No apps");
+               elm_object_part_text_set(genlist, "elm.text", dgettext("privacy-setting", "IDS_ST_NPBODY_NO_APPS"));
+               char* no_app_string_format = dgettext("privacy-setting", "IDS_ST_BODY_AFTER_YOU_DOWNLOAD_APPS_THAT_USE_PS_THEY_WILL_BE_SHOWN_HERE");
                char no_app_string[256];
-               snprintf(no_app_string, sizeof(no_app_string), "After you download apps that use %s, they will be shown here.", privacy_display);
-               /////////////////////////////////////////////////////////////////////////////////////////
+               snprintf(no_app_string, sizeof(no_app_string), no_app_string_format, privacy_display);
 
                elm_object_part_text_set(genlist, "elm.help.text", no_app_string);
                elm_layout_signal_emit(genlist, "align.center", "elm");
@@ -198,10 +189,10 @@ void create_privacy_guard_package_list_view(struct app_data_s* ad)
                pg_item_data_s *description_item = calloc(sizeof(pg_item_data_s), 1);
                description_item->index = 0;
 
-               char tmp[256] = {'\0',};
-               snprintf(tmp, sizeof(tmp), "<wrap=word><ellipsis=-1.0><font_size=35><color=#A9A9A9FF>The selected apps will be monitored for any attempts to violate your privacy.</color></font_size></ellipsis></wrap>");
-               //snprintf(tmp, sizeof(tmp), "<wrap=word><ellipsis=-1.0><font_size=35><color=#A9A9A9FF>%s</color></font_size></ellipsis></wrap>", dgettext("privacy-setting", "IDS_ST_BODY_THE_SELECTED_APPS_WILL_BE_MONITORED_FOR_ANY_ATTEMPTS_TO_VIOLATE_YOUR_PRIVACY"));
-               description_item->label = strdup(tmp);
+               // first line of the genlist will be filled with a description
+               char str_label[256] = {'\0',};
+               snprintf(str_label, sizeof(str_label), "<wrap=word><ellipsis=-1.0><font_size=35><color=#A9A9A9FF>%s</color></font_size></ellipsis></wrap>", dgettext("privacy-setting", "IDS_ST_BODY_THE_SELECTED_APPS_WILL_BE_MONITORED_FOR_ANY_ATTEMPTS_TO_VIOLATE_YOUR_PRIVACY"));
+               description_item->label = strdup(str_label);
 
                it = elm_genlist_item_append(genlist, itc, description_item, NULL, ELM_GENLIST_ITEM_NONE, _privacy_package_selected_cb, description_item);
                elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
@@ -211,7 +202,7 @@ void create_privacy_guard_package_list_view(struct app_data_s* ad)
                for (l = pg_data_list; l != NULL; l = l->next) {
                        pg_item_data_s *item = calloc(sizeof(pg_item_data_s), 1);
                        pg_data_s* data = (pg_data_s*)l->data;
-                       char temp[256] = {'\0',};
+                       char str_temp[256] = {'\0',};
                        char str_time[32] = {'\0',};
                        struct tm *timeinfo = NULL;
                        char *label = NULL;
@@ -240,18 +231,18 @@ void create_privacy_guard_package_list_view(struct app_data_s* ad)
                        }
 
                        // title.. (package label)
-                       snprintf(temp, sizeof(temp), "%s", label);
-                       item->label = strdup(temp);
+                       snprintf(str_temp, sizeof(str_temp), "%s", label);
+                       item->label = strdup(str_temp);
 
-                       // description - 13/08/2010 01:30 AM 21 time(s)
+                       // description - e.g.) 25/08/2010 01:30 PM 21 time(s)
                        if (data->time > 0) {
-                               LOGD("time : %d", data->time);
                                timeinfo = localtime(&data->time);
                                LOGD("time : %s", asctime(timeinfo));
                                strftime (str_time, 32, "%d/%m/%Y %I:%M %p", timeinfo);
-                               snprintf(temp, sizeof(temp), "<font_size=27>%s <font color=#3DB9CCFF>%d</font> time(s)</font_size>", str_time, data->count);
-                               //snprintf(temp, sizeof(temp), "<font_size=27>%s <font color=#3DB9CCFF>%d</font> %s</font_size>", str_time, data->count, dgettext("privacy-setting", "IDS_CLD_BODY_PD_TIMES"));
-                               item->description = strdup(temp);
+                               char *str_count = dgettext("privacy-setting", "IDS_CLD_BODY_PD_TIMES");
+                               snprintf(str_temp, sizeof(str_temp), str_count, data->count);
+                               snprintf(str_label, sizeof(str_label), "<font_size=27>%s <font color=#3DB9CCFF>%s</font></font_size>", str_time, str_temp);
+                               item->description = strdup(str_label);
                        } else {
                                item->description = NULL;
                        }