#include "screen_reader_tts.h"
#include "logger.h"
#include "utils.h"
+#include "symbols.h"
+#include <ctype.h>
#include <Eldbus.h>
#include <assert.h>
#define BUS "org.tizen.ScreenReader"
static Eldbus_Message *
_consume_read_command(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
- char *text = "";
+ const char *text = "";
int rc_id = -1;
Eina_Bool discardable = EINA_TRUE;
reply = eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "failed to parse arguments");
} else if (reply) {
DEBUG("RECIVED DBUS MESSAGE WITH ARGS: text(%s), discardable(%d)", text, discardable);
- Read_Command *command = tw_speak_customized(text, EINA_TRUE, discardable, NULL, 0);
+ Eina_Strbuf *buf = eina_strbuf_new();
+ const gchar *symtext = NULL;
+ if (strlen(text) == 1 && isupper((int)*text)) {
+ ESAF(buf, _("IDS_ACCS_OPT_CAPITAL_PS_TTS"), text);
+ } else if ((symtext = symbol_lookup(text))) {
+ ESAL(buf, _(symtext));
+ } else {
+ ESAL(buf, text);
+ }
+ Read_Command *command = tw_speak_customized(eina_strbuf_string_get(buf), EINA_TRUE, discardable, NULL, 0);
+ eina_strbuf_free(buf);
if (command) rc_id = command->command_id;
if (!eldbus_message_arguments_append(reply, "sbi", text, discardable, rc_id))
ERROR("eldbus_message_arguments_append() has failed to append arguments to reply message reply=%p", reply);