From 30be853f4b8ed33a92190c1f75258f767937f067 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Mon, 24 Oct 2016 10:07:27 +0900 Subject: [PATCH] Applied i18n to the Cancel button of STT layout Change-Id: I8142c211332a7282927d19b7c4306ffbebdfae10 --- src/include/ise.h | 1 + src/ise-stt-mode.cpp | 6 ++++++ src/ise.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/include/ise.h b/src/include/ise.h index 9d6d66c..30db1c0 100644 --- a/src/include/ise.h +++ b/src/include/ise.h @@ -168,6 +168,7 @@ const ISE_DEFAULT_VALUES g_ise_default_values[ISE_LAYOUT_STYLE_MAX] = { #define ISE_RETURN_KEY_LABEL_SEND gettext("IDS_IME_BUTTON_SEND_M_KEYBOARD") #define ISE_RETURN_KEY_LABEL_SIGNIN gettext("IDS_IME_BUTTON_SIGN_IN_M_KEYBOARD") +#define ISE_CANCEL_STRING gettext("IDS_ST_SK_CANCEL"); #define IMDATA_ACTION_DISABLE_EMOTICONS 0x0040 diff --git a/src/ise-stt-mode.cpp b/src/ise-stt-mode.cpp index 1ebdca7..525236d 100644 --- a/src/ise-stt-mode.cpp +++ b/src/ise-stt-mode.cpp @@ -804,9 +804,15 @@ void ise_show_stt_mode(Evas_Object *win) return; show_voice_input(win, NULL, NULL); + + const int BUF_LEN = 256; + static char buf[BUF_LEN] = {0}; + snprintf(buf, BUF_LEN, gettext("IDS_ST_SK_CANCEL")); + g_ui->set_string_substitution("Cancel", buf); } void ise_hide_stt_mode() { destroy_voice(); + g_ui->unset_string_substitution("Cancel"); } diff --git a/src/ise.cpp b/src/ise.cpp index 983169d..ca57c4d 100644 --- a/src/ise.cpp +++ b/src/ise.cpp @@ -1735,7 +1735,7 @@ ise_update_cursor_position(int position) void ise_set_return_key_type(unsigned int type) { - const int BUF_LEN = 64; + const int BUF_LEN = 256; char buf[BUF_LEN] = {0}; LOGD("return key type : %d\n", type); -- 2.7.4