SET(VERSION "${VERSION_MAJOR}.0.0")
SET(EDJDIR "/usr/share/${PROJECT_NAME}/res/edje")
SET(IMGDIR "/usr/share/${PROJECT_NAME}/res/image")
+SET(LOCALEDIR "/usr/share/${PROJECT_NAME}/res/locale")
INCLUDE(FindPkgConfig)
pkg_check_modules(viewer_evas REQUIRED
ADD_DEFINITIONS("-DWIDGET_EVAS_RESOURCE_PD=\"gbar\"")
ADD_DEFINITIONS("-DWIDGET_EVAS_RESOURCE_LB=\"widget\"")
ADD_DEFINITIONS("-DWIDGET_EVAS_RESOURCE_IMG=\"widget,image\"")
+ADD_DEFINITIONS("-DWIDGET_EVAS_RESOURCE_PO=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/widget_viewer/include)
ADD_DEPENDENCIES(${PROJECT_NAME} widget_viewer_evas.edj)
INSTALL(FILES widget_viewer_evas.edj DESTINATION ${EDJDIR})
INSTALL(FILES unknown.png DESTINATION ${IMGDIR})
+
+ADD_SUBDIRECTORY(po)
--- /dev/null
+# for i18n
+
+SET(POFILES
+ ar.po
+ as.po
+ bn.po
+ bn_BD.po
+ en.po
+ en_PH.po
+ en_US.po
+ es_US.po
+ fa.po
+ fr.po
+ gu.po
+ hi.po
+ id.po
+ km.po
+ kn.po
+ ko_KR.po
+ lo.po
+ ml.po
+ mr.po
+ ms.po
+ my_ZG.po
+ ne.po
+ or.po
+ pa.po
+ pt_BR.po
+ pt_PT.po
+ ru_RU.po
+ si.po
+ ta.po
+ te.po
+ th.po
+ tl.po
+ tr_TR.po
+ ur.po
+ vi.po
+ zh_CN.po
+)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE(STATUS " ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "جاري التحميل ..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "يتعذر تحميل البيانات. انقر لإعادة المحاولة."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "লোড হৈ আছে..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ডাটা লোড কৰিবলৈ অক্ষম৷ পুনঃচেষ্টা কৰিবৰ বাবে টিপক।"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "লোড হচ্ছে..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "তথ্য লোড করতে অক্ষম৷ পুনরায় চেষ্টা করতে ট্যাপ করুন৷"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "লোড হচ্ছে..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "তথ্য লোড করা সম্ভব হয়নি। পুনরায় চেষ্টা করতে ট্যাপ করুন।"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Loading..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Unable to load data. Tap to retry."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Loading..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Unable to load data. Tap to retry."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Loading..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Unable to load data. Tap to retry."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Cargando..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "No es posible cargar los datos. Pulse para intentarlo de nuevo."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "در حال دانلود..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "بارگیری داده ممکن نیست. برای امتحان مجدد ضربه بزنید."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Chargement en cours."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Impossible de charger les données. Appuyez pour réessayer."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "લોડિંગ..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ડેટા લોડ કરવામાં અસમર્થ. ફરીથી પ્રયાસ કરવા માટે ટેપ કરો."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "लोड हो रहा है..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "डाटा लोड करने में अक्षम। फिर से प्रयास करने हेतु टैप करें।"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Meloading…"
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Tidak dapat memuat data. Ketuk untuk mencoba lagi."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "កំពុងផ្ទុក..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "មិនអាចផ្ទុកទិន្នន័យ។ ប៉ះដើម្បីសាកល្បងម្ដងទៀត។"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "ಲೋಡಿಂಗ್..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ಡೇಟಾ ಲೋಡ್ ಮಾಡಲು ಅಸಮರ್ಥ. ಮರುಪ್ರಯತ್ನಿಸಲು ಒತ್ತಿ."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "불러오는 중..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "데이터를 불러올 수 없습니다. 다시 시도하려면 누르세요."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "ກຳລັງໂຫຼດ..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ບໍ່ສາມາດໂຫຼດຂໍ້ມູນໄດ້. ເຄາະເພື່ອລອງໃໝ່."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "ലോഡ് ചെയ്യുന്നു..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ഡാറ്റ ലോഡുചെയ്യാന് കഴിയുന്നില്ല. വീണ്ടും ശ്രമിക്കുന്നതിന് ടാപ്പുചെയ്യുക"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "लोड होत आहे..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "डेटा लोड करण्यामध्ये अक्षम. पुनर्प्रयत्न करण्यासाठी टॅप करा."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Memuat…"
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Tidak dapat memuatkan data. Ketik untuk mencuba semula."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "အခ်က္အလက္ျဖည့္သြင္းေနပါသည္…"
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ေဒတာ တင္ရန္ မရႏိုင္ပါ။ ျပန္ၾကိဳးစားရန္ ႏွိပ္ပါ။"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "लोड हुँदै छ..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "डाटा लोड गर्न सकेन। पुन: प्रयास गर्नुहोस् मा ट्याप गर्नुहोस्।"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "ଲୋଡ୍ କରୁଛି..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ଡାଟା ଲୋଡ୍ କରିବାକୁ ଅସମର୍ଥ। ପୁନଃଚେଷ୍ଟା କରିବାକୁ ଟ୍ୟାପ୍ କରନ୍ତୁ।"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "ਲੋਡ ਹੋ ਰਿਹਾ ਹੈ..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ਡੈਟਾ ਨੂੰ ਲੋਡ ਕਰਨ ਵਿੱਚ ਅਸਮਰੱਥ। ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Carregando..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Não é possível carregar os dados. Toque para tentar novamente."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "A carregar..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Impossível carregar dados. Toque para tentar novamente."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Загрузка..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Не удалось загрузить данные. Коснитесь для повтора"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "ප්රෙව්ශනය කරමින්..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "දත්ත ප්රවේශනය කිරීමට නොහැකිය. යළි උත්සාහ කිරීමට තට්ටු කරන්න"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "லோடிங்..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "தரவை ஏற்ற இயலவில்லை. மீண்டும் முயலவென டேப் செய்க."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "లోడ్ అవుతోంది..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "డేటాను లోడ్ చేయడం సాధ్యం కాదు. మళ్లీ ప్రయత్నించడానికి ట్యాప్ చేయండి."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "โหลด..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ไม่สามารถโหลดข้อมูลได้ สัมผัสเพื่อลองอีกครั้ง"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Naglo-load..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Hindi ma-load ang data. I-tap upang subukang muli."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Yükleniyor..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Veri yüklenemiyor. Tekrar denemek için dokunun."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "لوڈنگ..."
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "ڈیٹا لوڈ کرنے سے قاصر۔ پھرکوشش کرنے کے لئے تھپتھپائیں۔"
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Đang tải…"
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "Không thể tải dữ liệu. Hãy chạm để thử lại."
+
--- /dev/null
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "载入中…"
+
+msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"
+msgstr "无法载入数据。轻敲以重试。"
+
#endif
#if !defined(T_)
-#define T_(str) dgettext(PACKAGE, str)
+#define T_(str) dgettext(PKGNAME, str)
#endif
#if !defined(N_)
DbgPrint("Overlay is disabled (%s)\n", data->widget_id);
}
- elm_object_part_text_set(overlay, "text", _("IDS_IDLE_POP_LOADING_ING"));
+ elm_object_part_text_set(overlay, "text", T_("IDS_ST_BODY_LOADING_ING"));
if (data->is.field.disable_text) {
elm_object_signal_emit(overlay, "disable", "text");
}
}
DbgPrint("Set overlay fault (%p) %s\n", data, data->widget_id);
- elm_object_part_text_set(overlay, "text", _("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"));
+ elm_object_part_text_set(overlay, "text", T_("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"));
elm_object_signal_emit(overlay, "enable", "text");
elm_object_signal_emit(data->widget_layout, "reset", "overlay");
elm_object_signal_emit(data->widget_layout, "enable", "overlay");
return WIDGET_ERROR_ALREADY_EXIST;
}
+ if (!bindtextdomain(PKGNAME, WIDGET_EVAS_RESOURCE_PO)) {
+ ErrPrint("bindtextdomain: %d\n", errno);
+ } else {
+ DbgPrint("%s - %s\n", PKGNAME, WIDGET_EVAS_RESOURCE_PO);
+ }
+
util_screen_size_get(&s_info.screen_width, &s_info.screen_height);
s_info.conf.field.render_animator = 0; // By default, use render animator for updating
}
}
- info = malloc(sizeof(*preview));
+ info = malloc(sizeof(struct preview_info));
if (!info) {
ErrPrint("malloc: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
styles {
style {
name: "info,text";
- base: "font=Tizen font_size=15 align=left color=#FFFFFF ellipsis=1.0 wrap=char";
+ base: "font=Tizen font_size=25 align=left color=#FFFFFF ellipsis=1.0 wrap=char";
tag: "br" "\n";
tag: "hilight" "+ font=Tizen:style=Bold";
tag: "b" "+ font=Tizen:style=Bold";
type: TEXTBLOCK;
description {
state: "default" 0.0;
- rel1 { relative: 0.0 0.3; }
- rel2 { relative: 0.0 0.6; }
+ rel1 { relative: 0.5 0.3; }
+ rel2 { relative: 0.5 0.6; }
color: 255 255 255 255;
color2: 0 0 0 255;
color3: 0 0 0 255;
+ fixed: 1 0;
+ align: 0.5 0.0;
+ min: 400 0;
text {
style: "info,text";
- text: "Hello";
+ text: "Information";
}
visible: 0;
}
return WIDGET_ERROR_NOT_EXIST;
}
- elm_box_unpack(s_info.box, s_info.ctx.widget);
-
tmp = widget_viewer_evas_get_widget_id(s_info.ctx.widget);
DbgPrint("Unload previous widget: %s\n", tmp);
widget_viewer_evas_set_permanent_delete(s_info.ctx.widget, EINA_TRUE);
+ elm_object_part_content_unset(s_info.layout, "widget");
evas_object_del(s_info.ctx.widget);
free(s_info.ctx.title);
free(s_info.ctx.content_info);
DbgPrint("Period updated: %s\n", buffer);
}
+static void update_message(const char *fmt, ...)
+{
+ if (!fmt) {
+ elm_object_signal_emit(s_info.layout, "hide", "message");
+ } else {
+ va_list ap;
+ char buffer[1024];
+
+ va_start(ap, fmt);
+ vsnprintf(buffer, sizeof(buffer) - 1, fmt, ap);
+ va_end(ap);
+
+ elm_object_part_text_set(s_info.layout, "message", buffer);
+ elm_object_signal_emit(s_info.layout, "show", "message");
+ ErrPrint("%s", buffer);
+ }
+}
+
+static void widget_create_aborted_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ update_message("Create aborted");
+}
+
static void widget_created_cb(void *data, Evas_Object *obj, void *event_info)
{
period_changed_cb(data, obj, NULL);
}
if (i == s_info.ctx.count_of_size_type) {
- ErrPrint("Supported size is not found\n");
- evas_object_resize(s_info.layout, s_info.w, s_info.h);
- evas_object_size_hint_min_set(s_info.layout, s_info.w, s_info.h);
- evas_object_size_hint_max_set(s_info.layout, s_info.w, s_info.h);
+ Evas_Object *rect;
+
+ rect = evas_object_rectangle_add(evas_object_evas_get(s_info.layout));
+ evas_object_resize(rect, s_info.w, s_info.h);
+ evas_object_size_hint_min_set(rect, s_info.w, s_info.h);
+ evas_object_color_set(rect, 100, 100, 100, 255);
+ evas_object_show(rect);
+ elm_object_part_content_set(s_info.layout, "widget", rect);
evas_object_show(s_info.layout);
- elm_object_part_text_set(s_info.layout, "message", "Supported size is not found");
- elm_object_signal_emit(s_info.layout, "show", "message");
+ update_message("Supported size is not found");
return WIDGET_ERROR_NOT_SUPPORTED;
}
- elm_object_signal_emit(s_info.layout, "hide", "message");
+ update_message(NULL);
DbgPrint("Found valid size[%X]: %dx%d\n", s_info.ctx.size_types[i], w, h);
s_info.ctx.widget = widget_viewer_evas_add_widget(s_info.win, widget_id, s_info.ctx.content_info, s_info.ctx.period);
if (!s_info.ctx.widget) {
- ErrPrint("Failed to create a new widget\n");
+ update_message("Failed to create a new widget");
return WIDGET_ERROR_FAULT;
}
evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_EXTRA_INFO_UPDATED, extra_updated_cb, NULL);
evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_PERIOD_CHANGED, period_changed_cb, NULL);
evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_created_cb, NULL);
+ evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_WIDGET_CREATE_ABORTED, widget_create_aborted_cb, NULL);
elm_object_part_text_set(s_info.layout, "widget,id", widget_id);
elm_object_part_content_set(s_info.layout, "widget", s_info.ctx.widget);