Modified the Application text change as changed the setting language.(only en-US... 15/92315/3 accepted/tizen/mobile/20161111.001955 accepted/tizen/mobile/20161114.004010 submit/tizen/20161110.072951 submit/tizen/20161111.015320 submit/tizen_3.0/20161110.072612 submit/tizen_3.0/20161111.014110 submit/tizen_3.0/20161114.090327
authorsegwon <segwon.han@samsung.com>
Fri, 14 Oct 2016 11:31:44 +0000 (20:31 +0900)
committersegwon <segwon.han@samsung.com>
Mon, 17 Oct 2016 02:53:46 +0000 (11:53 +0900)
Signed-off-by: segwon <segwon.han@samsung.com>
Change-Id: I58dd252fcbda8cf7c33ee75674fceac4321cf611

inc/language.h [new file with mode: 0644]
inc/main.h
packaging/d2d-conv-setting.spec
po/CMakeLists.txt
po/en_US.po
po/it_IT.po [deleted file]
po/ko_KR.po [new file with mode: 0644]
src/ui/setting_home.c
src/ui/setting_item_sign.c

diff --git a/inc/language.h b/inc/language.h
new file mode 100644 (file)
index 0000000..1150946
--- /dev/null
@@ -0,0 +1,4 @@
+#include <libintl.h>
+
+#define POWER_ON_SIGN_TEXT dgettext(PACKAGE, "CONV_SETTING_APP_POWER_ON")
+#define POWER_OFF_SIGN_TEXT dgettext(PACKAGE, "CONV_SETTING_APP_POWER_OFF")
\ No newline at end of file
index c0b73e4..ee78051 100644 (file)
@@ -8,6 +8,7 @@
 #include <dlog.h>
 #include <glib.h>
 #include "convergence.h"
+#include "language.h"
 
 #ifdef  LOG_TAG
 #undef  LOG_TAG
@@ -21,7 +22,8 @@ typedef enum state
        POWER_OFF = 0,
        POWER_ON,
        SCAN_START,
-       SCAN_STOP
+       SCAN_STOP,
+       CHANGE_LANGUAGE
 
 } state_e;
 
index fc07f77..dd57feb 100644 (file)
@@ -47,9 +47,8 @@ cp %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}/%{_datadir}/license/%{name}
 %files
 %defattr(-,root,root,-)
 %{_pkg_dir}/bin/*
-%{_pkg_dir}/res/*
 %{_pkg_dir}/shared/*
-%{_pkg_dir}/res/locale/*/LC_MESSAGES/*
+%{_datadir}/locale/*/LC_MESSAGES/*.mo
 %{TZ_SYS_RO_PACKAGES}/%{name}.xml
 %{_datadir}/license/%{name}
 %manifest %{name}.manifest
index 6e69f30..a432eee 100644 (file)
@@ -1,4 +1,4 @@
-SET(POFILES en_US.po it_IT.po)
+SET(POFILES en_US.po ko_KR.po)
 SET(MSGFMT "/usr/bin/msgfmt")
 
 FOREACH(pofile ${POFILES})
@@ -13,9 +13,8 @@ FOREACH(pofile ${POFILES})
                        DEPENDS ${absPofile}
        )
        INSTALL(FILES ${moFile}
-               DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PACKAGE}.mo)
+               DESTINATION /usr/share/locale/${lang}/LC_MESSAGES RENAME ${PACKAGE}.mo)
        SET(moFiles ${moFiles} ${moFile})
 ENDFOREACH(pofile)
 
-ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
-
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
\ No newline at end of file
index bc00f5c..30ee3fe 100644 (file)
@@ -1,20 +1,5 @@
-msgid "IDS_BUTTON_DESCRIPTION"
-msgstr "One finger double tap to activate"
+msgid "CONV_SETTING_APP_POWER_ON"
+msgstr "Now, you can experience a variety of convergence features! Please be aware that a remote device can launch an application on your device or access data in your application. A notice will appear when your device is accessed by remote devices. You can disable this feature by clicking the button again."
 
-msgid "IDS_BUTTON_NAME"
-msgstr "Button accessiblity name"
-
-msgid "IDS_GENLIST_GROUP_CHECKBOX_TICK_BOX"
-msgstr "Tick box for the entire group"
-
-msgid "IDS_INDEX_FASTSCROLL_DESCRIPTION"
-msgstr "Alphabetical index bar, Swipe right or left with one finger to select next or previous letter"
-
-msgid "Page %d of %d"
-msgstr "Page %d of %d"
-
-msgid "IDS_SLIDER_NAME"
-msgstr "Slider accessiblity name"
-
-msgid "IDS_FAVOURITE_NAME"
-msgstr "Favorite button"
+msgid "CONV_SETTING_APP_POWER_OFF"
+msgstr "You can experience a variety of convergence feature, if you enable TIZEN Convergence - an application on a separate device can be launched remotely, or communicate between applications on separate devices. Please be aware that remote device can launch an application on your device or access data in your application. A notice will appear when your device is accessed by remote devices."
\ No newline at end of file
diff --git a/po/it_IT.po b/po/it_IT.po
deleted file mode 100644 (file)
index bd54823..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-msgid "IDS_BUTTON_DESCRIPTION"
-msgstr "Un dito doppio tap per attivare"
-
-msgid "IDS_BUTTON_NAME"
-msgstr "Button nome di accessibilità"
-
diff --git a/po/ko_KR.po b/po/ko_KR.po
new file mode 100644 (file)
index 0000000..96e9465
--- /dev/null
@@ -0,0 +1,5 @@
+msgid "CONV_SETTING_APP_POWER_ON"
+msgstr "다양한 Convergence 기능을 경험할 수 있습니다! 단, 동일한 Wi-Fi 망 내 주변기기에서도 본 기기에 접근이 가능해지므로, 주변기기가 본 기기의 App을 실행하거나 data에 접근할 수도 있습니다. 주변기기 접근 시도 시 팝업창을 통해 이용자의 동의를 받아 본기능이 활성화 됩니다. 본 기능은 본 메뉴의 버튼을 다시 선택하여 끌 수 있습니다."
+
+msgid "CONV_SETTING_APP_POWER_OFF"
+msgstr "TIZEN Convergence 기능을 켜면, 동일한 Wi-Fi 망 내의 주변기기의 App을 실행하거나 App 간 통신이 가능하게 되며, 다양한 Convergence 기능을 경험할 수 있습니다. 단, 동일한 Wi-Fi 망 내 주변기기에서 주변기기가 본 기기의 App을 실행하거나 data에 접근을 요청할 수 있습니다."
\ No newline at end of file
index 9c35e64..9c5c1fb 100644 (file)
@@ -23,8 +23,33 @@ static Eina_Bool setting_menu_pop_cb(void *data, Elm_Object_Item *it)
        return EINA_FALSE;
 }
 
+static void app_language_changed(app_event_info_h event_info, void *user_data)
+{
+       char *language;
+
+       int ret = app_event_get_language(event_info, &language);
+       if (ret != APP_ERROR_NONE) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "app_event_get_language() failed. Err = %d.", ret);
+               return;
+       }
+
+       dlog_print(DLOG_ERROR, LOG_TAG, "language = %s.", language);
+
+       if (language != NULL) {
+               elm_language_set(language);
+               free(language);
+       }
+
+       dlog_print(DLOG_ERROR, LOG_TAG, "language = %s.", language);
+
+       state_change_event(CHANGE_LANGUAGE);
+}
+
 extern void create_setting_menu(Evas_Object *parent)
 {
+       app_event_handler_h handle = NULL;
+       ui_app_add_event_handler(&handle, APP_EVENT_LANGUAGE_CHANGED, app_language_changed, NULL);
+
        Evas_Object *background = elm_bg_add(parent);
        elm_object_content_set(parent, background);
        elm_bg_color_set(background, 255, 255, 255);
index cd07485..3356d85 100644 (file)
@@ -8,12 +8,21 @@ static void state_change_event_listener (state_e state)
        switch (state)
        {
                case POWER_ON :
-                       notice = "Now, you can experience a various Convergence features! Please be aware that a remote device can launch an application in your device or access a data in your application. A notice will be poped up when your device is accessed by the remote devices. You can disable this feature by touch the button again.";
+                       notice = POWER_ON_SIGN_TEXT;
                        elm_genlist_realized_items_update(sign_item);
                        break;
 
                case POWER_OFF :
-                       notice = "You can experience a various Convergence features, if you enable Tizen Convergence feature - an application in a different device can be launched remotely, or a communication between applications in different devices is supported. Please be aware that a remote device can launch an application in your device or access a data in your application. A notice will be poped up when your device is accessed by the remote devices.";
+                       notice = POWER_OFF_SIGN_TEXT;
+                       elm_genlist_realized_items_update(sign_item);
+                       break;
+
+               case CHANGE_LANGUAGE :
+                       if (get_convergence_power_state() == 1) {
+                               notice = POWER_ON_SIGN_TEXT;
+                       } else {
+                               notice = POWER_OFF_SIGN_TEXT;
+                       }
                        elm_genlist_realized_items_update(sign_item);
                        break;