SET(SLP_OPT_FLAGS "-O0")
## COMPILER FLAGS
-SET(SLP_COMPILER_FLAGS "-Wall -Wunused")
+SET(SLP_COMPILER_FLAGS "-Wall -Wunused -Wno-format -Wno-format-security")
## LINKER FLAGS
SET(SLP_LINKER_FLAGS "")
# FIND ALL SOURCE IN A SOURCE DIRECTORY
AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/src SRCS)
-#INCLUDE FILE
+#INCLUDE FILE
INCLUDE(CMakeLists.sub)
SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res")
+SET(LOCALEDIR "/usr/apps/org.tizen.screen-reader/res/locale")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
# Install Manifest File
INSTALL(FILES org.tizen.screen-reader.xml DESTINATION /opt/share/packages)
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/res/po)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/tests)
ADD_TEST(NAME smart_navi_tests COMMAND ${CMAKE_SOURCE_DIR}/tests/smart_navi_test_suite)
# END OF A FILE
#define LOGGER_H_
#include <Eina.h>
+#include <Elementary.h>
extern int _eina_log_dom;
#define LANGUAGE_NAME_SIZE 6
-#define MAX_REACHED ", maximum value reached"
-#define MIN_REACHED ", minimum value reached"
-#define MAX_POS_REACHED ", end of text reached"
-#define MIN_POS_REACHED ", begin of text reached"
-
#define HIGHLIGHT_CHANGED_SIG "object:state-change:highlighted"
#define VALUE_CHANGED_SIG "object:property-change:accessible-value"
#define CARET_MOVED_SIG "object:text-caret-moved"
BuildRequires: tts
BuildRequires: tts-devel
BuildRequires: vconf
+BuildRequires: gettext-tools
BuildRequires: pkgconfig(check)
BuildRequires: pkgconfig(capi-network-bluetooth)
BuildRequires: pkgconfig(tapi)
%manifest org.tizen.screen-reader.manifest
%{AppInstallPath}/bin/screen-reader
%{AppInstallPath}/res/icons/screen-reader.png
+%{AppInstallPath}/res/locale/*/LC_MESSAGES/*
/opt/share/packages/%{name}.xml
--- /dev/null
+SET(POFILES en_US.po)
+SET(MSGFMT "/usr/bin/msgfmt")
+
+MESSAGE(STATUS "po files ---")
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE(PO: " ${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_REACHED_MAX_VAL"
+msgstr ", maximum value reached"
+
+msgid "IDS_REACHED_MIN_VAL"
+msgstr ", minimum value reached"
+
+msgid "IDS_REACHED_MAX_POS"
+msgstr ", end of text reached"
+
+msgid "IDS_REACHED_MIN_POS"
+msgstr ", begin of text reached"
+
+msgid "IDS_NO_VALUE_INTERFACE"
+msgstr "No value interface present"
+
+msgid "IDS_NO_TEXT_INTERFACE"
+msgstr "No text interface present"
+
+msgid "IDS_REACHED_ITEMS_NOTIFICATION"
+msgstr "Visible items from %1$d to %2$d"
+
+msgid "IDS_TRAIT_PD_HOVERSEL"
+msgstr "Dropdown list. Showing %d items. Double tap to open the menu."
+
+msgid "IDS_TRAIT_GROUP_INDEX"
+msgstr "group index"
+
+msgid "IDS_TRAIT_GROUP_INDEX_EXPANDED"
+msgstr "Expandable list, Double tap to collapse"
+
+msgid "IDS_TRAIT_GROUP_INDEX_COLLAPSED"
+msgstr "Expandable list, Double tap to expand"
+
+msgid "IDS_TRAIT_MENU_ITEM_TAB_INDEX"
+msgstr "Tab %1$d of %2$d"
+
+msgid "IDS_TRAIT_TEXT_EDIT"
+msgstr "Double tap to edit"
+
+msgid "IDS_TRAIT_TEXT_EDIT_FOCUSED"
+msgstr "Editing, flick up and down to adjust position."
+
+msgid "IDS_TEXT_BEGIN"
+msgstr "Cursor is at the begining of text"
+
+msgid "IDS_TEXT_END"
+msgstr "Cursor is at the end of text"
+
+msgid "IDS_SYSTEM_CHARGING"
+msgstr "Battery charger connected"
+
+msgid "IDS_SYSTEM_NOT_CHARGING"
+msgstr "Battery charger disconnected"
+
+msgid "IDS_SYSTEM_SCREEN_ON"
+msgstr "Screen is on"
+
+msgid "IDS_SYSTEM_SCREEN_OFF"
+msgstr "Screen is off"
+
+msgid "IDS_SYSTEM_BATTERY_EMPTY"
+msgstr "Battery level is empty"
+
+msgid "IDS_SYSTEM_BATTERY_LOW"
+msgstr "Battery level is low"
+
+msgid "IDS_SYSTEM_BATTERY_HIGH"
+msgstr "Battery level is high"
+
+msgid "IDS_SYSTEM_BATTERY_FULL"
+msgstr "Battery level is full"
+
+msgid "IDS_SYSTEM_BATTERY_CRITICAL"
+msgstr "Battery level is critical"
+
+msgid "IDS_SYSTEM_BATTERY_INFO_CHARGING"
+msgstr "Charging."
+
+msgid "IDS_SYSTEM_BATTERY_INFO_BATTERY_STR"
+msgstr "Battery"
+
+msgid "IDS_SYSTEM_BATTERY_FULLY_CHARGED_STR"
+msgstr "Fully charged"
+
+msgid "IDS_SYSTEM_SIGNAL_STRENGTH"
+msgstr "Signal strength equals:"
+
+msgid "IDS_SYSTEM_SIGNAL_SIMCARD"
+msgstr "Simcard"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_LTE"
+msgstr "LTE"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_HSDPA"
+msgstr "HSDPA"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_3G"
+msgstr "3G"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_EDGE"
+msgstr "EDGE"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_25G"
+msgstr "2.5G"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_2G"
+msgstr "2G"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_SEARCHING"
+msgstr "Searching..."
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_EMERGENCY"
+msgstr "Emergency"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_NO_SERVICE"
+msgstr "No service"
+
+msgid "IDS_SYSTEM_NETWORK_SERVICE_UNKNOWN"
+msgstr "Unknown"
+
+msgid "IDS_SYSTEM_NETWORK_TYPE_WIFI"
+msgstr "Wi fi"
+
+msgid "IDS_SYSTEM_WIFI_SIGNAL_GOOD"
+msgstr "Good"
+
+msgid "IDS_SYSTEM_WIFI_SIGNAL_MEDIUM"
+msgstr "Medium"
+
+msgid "IDS_SYSTEM_WIFI_SIGNAL_WEAK"
+msgstr "Weak"
+
+msgid "IDS_SYSTEM_WIFI_SIGNAL_POOR"
+msgstr "Poor"
+
+msgid "IDS_SYSTEM_WIFI_SIGNAL_NO_SIGNAL"
+msgstr "No signal"
+
+msgid "IDS_SYSTEM_NOTIFICATIONS_UNREAD_0"
+msgstr "No event"
+
+msgid "IDS_SYSTEM_NOTIFICATIONS_UNREAD_1"
+msgstr "1 notification unread"
+
+msgid "IDS_SYSTEM_NOTIFICATIONS_UNREAD_MANY"
+msgstr "Notifications unread"
+
+msgid "IDS_SYSTEM_BT_BLUETOOTH_OFF"
+msgstr "Bluetooth off"
+
+msgid "IDS_SYSTEM_BT_NO_DEVICES_CONNECTED"
+msgstr "Nothing connected"
+
+msgid "IDS_SYSTEM_BT_DEVICES_CONNECTED_COUNT"
+msgstr "Devices connected"
};
ops.data = get_pointer_to_service_data_struct();
- return appcore_efl_main("Smart Navigation", &argc, &argv, &ops);
+ return appcore_efl_main("screen-reader", &argc, &argv, &ops);
}
#define TTS_MAX_TEXT_SIZE 2000
#define GESTURE_LIMIT 10
-#define HOVERSEL_TRAIT "Dropdown list. Showing %d items. Double tap to open the menu."
-#define GROUP_INDEX_TRAIT "group index"
-#define MENU_ITEM_TAB_INDEX "Tab %d of %d"
-#define GROUP_INDEX_EXPANDED "Expandable list, Double tap to collapse"
-#define GROUP_INDEX_COLLAPSED "Expandable list, Double tap to expand"
-#define TEXT_EDIT "Double tap to edit"
-#define TEXT_EDIT_FOCUSED "Editing, flick up and down to adjust position."
-#define TEXT_BEGIN "Cursor is at the begining of text"
-#define TEXT_END "Cursor is at the end of text"
-
#define DEBUG_MODE
#define GERROR_CHECK(error)\
strncat(ret, role_name, sizeof(ret) - strlen(ret) - 1);
strncat(ret, ", ", sizeof(ret) - strlen(ret) - 1);
if (atspi_state_set_contains(state_set, ATSPI_STATE_FOCUSED))
- strncat(ret, TEXT_EDIT_FOCUSED, sizeof(ret) - strlen(ret) - 1);
+ strncat(ret, _("IDS_TRAIT_TEXT_EDIT_FOCUSED"), sizeof(ret) - strlen(ret) - 1);
else
- strncat(ret, TEXT_EDIT, sizeof(ret) - strlen(ret) - 1);
+ strncat(ret, _("IDS_TRAIT_TEXT_EDIT"), sizeof(ret) - strlen(ret) - 1);
free(role_name);
}
else if (role == ATSPI_ROLE_MENU_ITEM)
int children_count = atspi_accessible_get_child_count(parent, NULL);
int index = atspi_accessible_get_index_in_parent(obj, NULL);
char tab_index[MENU_ITEM_TAB_INDEX_SIZE];
- snprintf(tab_index, MENU_ITEM_TAB_INDEX_SIZE, MENU_ITEM_TAB_INDEX, index+1, children_count);
+ snprintf(tab_index, MENU_ITEM_TAB_INDEX_SIZE, _("IDS_TRAIT_MENU_ITEM_TAB_INDEX"), index+1, children_count);
strncat(ret, tab_index, sizeof(ret) - strlen(ret) - 1);
}
else if (role == ATSPI_ROLE_GLASS_PANE)
AtspiAccessible *parent = atspi_accessible_get_parent(obj, NULL);
int children_count = atspi_accessible_get_child_count(parent, NULL);
char trait[HOVERSEL_TRAIT_SIZE];
- snprintf(trait, HOVERSEL_TRAIT_SIZE, HOVERSEL_TRAIT, children_count);
+ snprintf(trait, HOVERSEL_TRAIT_SIZE, _("IDS_TRAIT_PD_HOVERSEL"), children_count);
strncat(ret, trait, sizeof(ret) - strlen(ret) - 1);
}
else if (role == ATSPI_ROLE_LIST_ITEM && atspi_state_set_contains(state_set, ATSPI_STATE_EXPANDABLE))
{
- strncat(ret, GROUP_INDEX_TRAIT, sizeof(ret) - strlen(ret) - 1);
+ strncat(ret, _("IDS_TRAIT_GROUP_INDEX"), sizeof(ret) - strlen(ret) - 1);
strncat(ret, ", ", sizeof(ret) - strlen(ret) - 1);
if (atspi_state_set_contains(state_set, ATSPI_STATE_EXPANDED))
- strncat(ret, GROUP_INDEX_EXPANDED, sizeof(ret) - strlen(ret) - 1);
+ strncat(ret, _("IDS_TRAIT_GROUP_INDEX_EXPANDED"), sizeof(ret) - strlen(ret) - 1);
else
- strncat(ret, GROUP_INDEX_COLLAPSED, sizeof(ret) - strlen(ret) - 1);
+ strncat(ret, _("IDS_TRAIT_GROUP_INDEX_COLLAPSED"), sizeof(ret) - strlen(ret) - 1);
}
else
{
gchar *text = atspi_text_get_text(text_interface, 0, 1, NULL);
DEBUG("SPEAK:%s", text);
tts_speak(text, EINA_TRUE);
- tts_speak(TEXT_BEGIN, EINA_FALSE);
+ tts_speak(_("IDS_TEXT_BEGIN"), EINA_FALSE);
g_free(text);
}
else
if (ret)
{
DEBUG("Caret position increment done");
- DEBUG("SPEAK:%s", TEXT_END);
- tts_speak(TEXT_END, EINA_TRUE);
+ DEBUG("SPEAK:%s", _("IDS_TEXT_END"));
+ tts_speak(_("IDS_TEXT_END"), EINA_TRUE);
}
else
ERROR("Caret position to end error");
DEBUG("Current caret offset:%d", current_offset);
if (offset_pos == atspi_text_get_character_count (text_interface, NULL))
{
- DEBUG("SPEAK:%s", TEXT_END);
- tts_speak(TEXT_END, EINA_FALSE);
+ DEBUG("SPEAK:%s", _("IDS_TEXT_END"));
+ tts_speak(_("IDS_TEXT_END"), EINA_FALSE);
}
else
{
g_free(text);
if (offset_pos == 0)
{
- DEBUG("SPEAK:%s", TEXT_BEGIN);
- tts_speak(TEXT_BEGIN, EINA_FALSE);
+ DEBUG("SPEAK:%s", _("IDS_TEXT_BEGIN"));
+ tts_speak(_("IDS_TEXT_BEGIN"), EINA_FALSE);
}
}
else
#include "test_suite/test_suite.h"
#endif
-#define NO_VALUE_INTERFACE "No value interface present"
-#define NO_TEXT_INTERFACE "No text interface present"
-
#define EPS 0.000000001
/** @brief Service_Data used as screen reader internal data struct*/
if(!caret_pos)
{
DEBUG("MIN POSITION REACHED");
- if(asprintf(&return_text, "%s %s", (char*)atspi_text_get_text(text_interface, caret_pos, caret_pos + 1, NULL), MIN_POS_REACHED) < 0)
+ if(asprintf(&return_text, "%s %s", (char*)atspi_text_get_text(text_interface, caret_pos, caret_pos + 1, NULL), _("IDS_REACHED_MIN_POS")) < 0)
{
ERROR(MEMORY_ERROR);
return NULL;
else if(char_count == caret_pos)
{
DEBUG("MAX POSITION REACHED");
- if(asprintf(&return_text, "%s %s", (char*)atspi_text_get_text(text_interface, caret_pos, caret_pos + 1, NULL), MAX_POS_REACHED) < 0)
+ if(asprintf(&return_text, "%s %s", (char*)atspi_text_get_text(text_interface, caret_pos, caret_pos + 1, NULL), _("IDS_REACHED_MAX_POS")) < 0)
{
ERROR(MEMORY_ERROR);
return NULL;
if(abs(current_temp_value - atspi_value_get_maximum_value(value_interface, NULL)) < EPS)
{
DEBUG("MAX VALUE REACHED");
- if(asprintf(&text_to_read, "%.2f %s", current_temp_value, MAX_REACHED) < 0)
+ if(asprintf(&text_to_read, "%.2f %s", current_temp_value, _("IDS_REACHED_MAX_VAL")) < 0)
{
ERROR(MEMORY_ERROR);
return NULL;
else if(abs(current_temp_value - atspi_value_get_minimum_value(value_interface, NULL)) < EPS)
{
DEBUG("MIN VALUE REACHED");
- if(asprintf(&text_to_read, "%.2f %s", current_temp_value, MIN_REACHED) < 0)
+ if(asprintf(&text_to_read, "%.2f %s", current_temp_value, _("IDS_REACHED_MIN_VAL")) < 0)
{
ERROR(MEMORY_ERROR);
return NULL;
#include "smart_notification.h"
#include "logger.h"
-#define CHARGING "Battery charger connected"
-#define NOT_CHARGING "Battery charger disconnected"
-#define SCREEN_ON "Screen is on"
-#define SCREEN_OFF "Screen is off"
-#define BATTERY_EMPTY "Battery level is empty"
-#define BATTERY_LOW "Battery level is low"
-#define BATTERY_HIGH "Battery level is high"
-#define BATTERY_FULL "Battery level is full"
-#define BATTERY_CRITICAL "Battery level is critical"
#define MAX_SIM_COUNT 2
#define DATE_TIME_BUFFER_SIZE 26
-#define BATTERY_INFO_CHARGING "Charging."
-#define BATTERY_INFO_BATTERY_STR "Battery"
-#define BATTERY_STR_FULL_CHARGED "Full charged"
-#define SIGNAL_STR_SIGNAL_STRENGTH "Signal strength equals:"
-#define SIGNAL_STR_SIMCARD "Simcard"
-#define NETWORK_SERVICE_STR_LTE "LTE"
-#define NETWORK_SERVICE_STR_HSDPA "HSDPA"
-#define NETWORK_SERVICE_STR_3G "3G"
-#define NETWORK_SERVICE_STR_EDGE "EDGE"
-#define NETWORK_SERVICE_STR_25G "2.5G"
-#define NETWORK_SERVICE_STR_2G "2G"
-#define NETWORK_SERVICE_STR_SEARCHING "searching..."
-#define NETWORK_SERVICE_STR_EMERGENCY "emergency"
-#define NETWORK_SERVICE_STR_NO_SERVICE "no service"
-#define NETWORK_SERVICE_STR_UNKNOWN "unknown"
-#define NETWORK_TYPE_WIFI "Wi fi"
-#define WIFI_SIGNAL_GOOD "Good"
-#define WIFI_SIGNAL_MEDIUM "Medium"
-#define WIFI_SIGNAL_WEAK "Weak"
-#define WIFI_SIGNAL_POOR "Poor"
-#define WIFI_NO_SIGNAL "No signal"
-#define NOTI_NOTIFICATIONS_UNREAD_0 "No event"
-#define NOTI_NOTIFICATIONS_UNREAD_1 "1 notification unread"
-#define NOTI_NOTIFICATIONS_UNREAD_MANY "notifications unread"
-#define BT_BLUETOOTH_OFF "Bluetooth off"
-#define BT_NO_DEVICES_CONNECTED "Nothing connected"
-#define BT_DEVICES_CONNECTED_COUNT "devices connected"
TapiHandle *tapi_handle[MAX_SIM_COUNT + 1] = {0, };
if(status == DEVICE_BATTERY_LEVEL_LOW)
{
- tts_speak(BATTERY_LOW, EINA_TRUE);
+ tts_speak(_("IDS_SYSTEM_BATTERY_LOW"), EINA_TRUE);
}
else if(status == DEVICE_BATTERY_LEVEL_CRITICAL)
{
- tts_speak(BATTERY_CRITICAL, EINA_TRUE);
+ tts_speak(_("IDS_SYSTEM_BATTERY_CRITICAL"), EINA_TRUE);
}
else if(status == DEVICE_BATTERY_LEVEL_FULL)
{
- tts_speak(BATTERY_FULL, EINA_TRUE);
+ tts_speak(_("IDS_SYSTEM_BATTERY_FULL"), EINA_TRUE);
}
}
else if(type == DEVICE_CALLBACK_BATTERY_CHARGING)
if(charging)
{
- tts_speak(CHARGING, EINA_FALSE);
+ tts_speak(_("IDS_SYSTEM_CHARGING"), EINA_FALSE);
}
else
{
- tts_speak(NOT_CHARGING, EINA_FALSE);
+ tts_speak(_("IDS_SYSTEM_NOT_CHARGING"), EINA_FALSE);
}
}
else if(type == DEVICE_CALLBACK_DISPLAY_STATE)
if(state == DISPLAY_STATE_NORMAL)
{
- tts_speak(SCREEN_ON, EINA_FALSE);
+ tts_speak(_("IDS_SYSTEM_SCREEN_ON"), EINA_FALSE);
}
else if(state == DISPLAY_STATE_SCREEN_OFF)
{
- tts_speak(SCREEN_OFF, EINA_FALSE);
+ tts_speak(_("IDS_SYSTEM_SCREEN_OFF"), EINA_FALSE);
}
}
}
break;
default:
- return NETWORK_SERVICE_STR_UNKNOWN;
+ return _("IDS_SYSTEM_NETWORK_SERVICE_UNKNOWN");
break;
}
- return NETWORK_SERVICE_STR_UNKNOWN;
+ return _("IDS_SYSTEM_NETWORK_SERVICE_UNKNOWN");
}
void device_battery_get(void)
if (is_charging)
{
- charging_text = BATTERY_INFO_CHARGING;
+ charging_text = _("IDS_SYSTEM_BATTERY_INFO_CHARGING");
}
else
{
if(percent == 100)
{
- if (!asprintf(&buffer, "%s %s", charging_text, BATTERY_STR_FULL_CHARGED))
+ if (!asprintf(&buffer, "%s %s", charging_text, _("IDS_SYSTEM_BATTERY_FULLY_CHARGED_STR")))
{
ERROR("Buffer length == 0");
return;
}
else
{
- if (!asprintf(&buffer, "%s %d %% %s", charging_text, percent, BATTERY_INFO_BATTERY_STR))
+ if (!asprintf(&buffer, "%s %d %% %s", charging_text, percent, _("IDS_SYSTEM_BATTERY_INFO_BATTERY_STR")))
{
ERROR("Buffer length == 0");
return;
}
if (sim_card_count > 1)
- eina_strbuf_append_printf(str_buf, "%s %d %s %d; ", SIGNAL_STR_SIMCARD, i + 1, SIGNAL_STR_SIGNAL_STRENGTH, val);
+ eina_strbuf_append_printf(str_buf, "%s %d %s %d; ", _("IDS_SYSTEM_SIGNAL_SIMCARD"), i + 1, _("IDS_SYSTEM_SIGNAL_STRENGTH"), val);
else
- eina_strbuf_append_printf(str_buf, "%s %d; ", SIGNAL_STR_SIGNAL_STRENGTH, val);
+ eina_strbuf_append_printf(str_buf, "%s %d; ", _("IDS_SYSTEM_SIGNAL_STRENGTH"), val);
DEBUG("sim: %d TAPI_PROP_NETWORK_SIGNALSTRENGTH_LEVEL %d", i, val);
switch(service_type)
{
case TAPI_NETWORK_SERVICE_TYPE_UNKNOWN:
- service_type_text = NETWORK_SERVICE_STR_UNKNOWN;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_UNKNOWN");
break;
case TAPI_NETWORK_SERVICE_TYPE_NO_SERVICE:
- service_type_text = NETWORK_SERVICE_STR_NO_SERVICE;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_NO_SERVICE");
break;
case TAPI_NETWORK_SERVICE_TYPE_EMERGENCY:
- service_type_text = NETWORK_SERVICE_STR_EMERGENCY;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_EMERGENCY");
break;
case TAPI_NETWORK_SERVICE_TYPE_SEARCH:
- service_type_text = NETWORK_SERVICE_STR_SEARCHING;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_SEARCHING");
break;
case TAPI_NETWORK_SERVICE_TYPE_2G:
- service_type_text = NETWORK_SERVICE_STR_2G;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_2G");
break;
case TAPI_NETWORK_SERVICE_TYPE_2_5G:
- service_type_text = NETWORK_SERVICE_STR_25G;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_25G");
break;
case TAPI_NETWORK_SERVICE_TYPE_2_5G_EDGE:
- service_type_text = NETWORK_SERVICE_STR_EDGE;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_EDGE");
break;
case TAPI_NETWORK_SERVICE_TYPE_3G:
- service_type_text = NETWORK_SERVICE_STR_3G;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_3G");
break;
case TAPI_NETWORK_SERVICE_TYPE_HSDPA:
- service_type_text = NETWORK_SERVICE_STR_HSDPA;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_HSDPA");
break;
case TAPI_NETWORK_SERVICE_TYPE_LTE:
- service_type_text = NETWORK_SERVICE_STR_LTE;
+ service_type_text = _("IDS_SYSTEM_NETWORK_SERVICE_LTE");
break;
}
if(!ap)
{
- DEBUG("Text to say: %s %s",NETWORK_TYPE_WIFI, "Not connected");
+ DEBUG("Text to say: %s %s",_("IDS_SYSTEM_NETWORK_TYPE_WIFI"), "Not connected");
- if (!asprintf(&buffer, " %s, %s", NETWORK_TYPE_WIFI, "Not connected"))
+ if (!asprintf(&buffer, " %s, %s", _("IDS_SYSTEM_NETWORK_TYPE_WIFI"), "Not connected"))
{
ERROR("buffer length == 0");
return;
switch(val)
{
case 0:
- wifi_text = WIFI_NO_SIGNAL;
+ wifi_text = _("IDS_SYSTEM_WIFI_SIGNAL_NO_SIGNAL");
break;
case 1:
- wifi_text = WIFI_SIGNAL_POOR;
+ wifi_text = _("IDS_SYSTEM_WIFI_SIGNAL_POOR");
break;
case 2:
- wifi_text = WIFI_SIGNAL_WEAK;
+ wifi_text = _("IDS_SYSTEM_WIFI_SIGNAL_WEAK");
break;
case 3:
- wifi_text = WIFI_SIGNAL_MEDIUM;
+ wifi_text = _("IDS_SYSTEM_WIFI_SIGNAL_MEDIUM");
break;
case 4:
- wifi_text = WIFI_SIGNAL_GOOD;
+ wifi_text = _("IDS_SYSTEM_WIFI_SIGNAL_GOOD");
break;
}
- if (!asprintf(&buffer, " %s, %s", NETWORK_TYPE_WIFI, wifi_text))
+ if (!asprintf(&buffer, " %s, %s", _("IDS_SYSTEM_NETWORK_TYPE_WIFI"), wifi_text))
{
ERROR("buffer length == 0");
wifi_ap_destroy(ap);
if(noti_count == 0)
{
- DEBUG(NOTI_NOTIFICATIONS_UNREAD_0);
- tts_speak(NOTI_NOTIFICATIONS_UNREAD_0, EINA_FALSE);
+ DEBUG(_("IDS_SYSTEM_NOTIFICATIONS_UNREAD_0"));
+ tts_speak(_("IDS_SYSTEM_NOTIFICATIONS_UNREAD_0"), EINA_FALSE);
}
else if(noti_count == 1)
{
- DEBUG(NOTI_NOTIFICATIONS_UNREAD_1);
- tts_speak(NOTI_NOTIFICATIONS_UNREAD_1, EINA_FALSE);
+ DEBUG(_("IDS_SYSTEM_NOTIFICATIONS_UNREAD_1"));
+ tts_speak(_("IDS_SYSTEM_NOTIFICATIONS_UNREAD_1"), EINA_FALSE);
}
else
{
- DEBUG("%d %s", noti_count, NOTI_NOTIFICATIONS_UNREAD_MANY);
+ DEBUG("%d %s", noti_count, _("IDS_SYSTEM_NOTIFICATIONS_UNREAD_MANY"));
- if (asprintf(&buffer, "%d %s", noti_count, NOTI_NOTIFICATIONS_UNREAD_MANY))
+ if (asprintf(&buffer, "%d %s", noti_count, _("IDS_SYSTEM_NOTIFICATIONS_UNREAD_MANY")))
{
ERROR("buffer length equals 0");
}
if (adapter_state == BT_ADAPTER_DISABLED)
{
- DEBUG("Text to say: %s", BT_BLUETOOTH_OFF);
- tts_speak(BT_BLUETOOTH_OFF, EINA_FALSE);
+ DEBUG("Text to say: %s", _("IDS_SYSTEM_BT_BLUETOOTH_OFF"));
+ tts_speak(_("IDS_SYSTEM_BT_BLUETOOTH_OFF"), EINA_FALSE);
return;
}
else
if(device_count == 0)
{
- if (!asprintf(&buffer, BT_NO_DEVICES_CONNECTED))
+ if (!asprintf(&buffer, _("IDS_SYSTEM_BT_NO_DEVICES_CONNECTED")))
{
ERROR("buffer length == 0");
}
else
{
if (asprintf(&buffer, "%d %s", device_count,
- BT_DEVICES_CONNECTED_COUNT))
+ _("IDS_SYSTEM_BT_DEVICES_CONNECTED_COUNT")))
{
ERROR("buffer length == 0");
}
#define RED "\x1B[31m"
#define RESET "\033[0m"
-#define ITEMS_NOTIFICATION "Visible items from %d to %d"
-
static Eina_Bool status = EINA_FALSE;
static void _smart_notification_focus_chain_end(void);
char buf[256];
- snprintf(buf, sizeof(buf), ITEMS_NOTIFICATION, start_idx, end_idx);
+ snprintf(buf, sizeof(buf), _("IDS_REACHED_ITEMS_NOTIFICATION"), start_idx, end_idx);
tts_speak(strdup(buf), EINA_FALSE);
}