Revert "Added TV trait descriptions for Screen Reader in new lua script and translati... 98/61598/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 9 Mar 2016 06:09:17 +0000 (15:09 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Wed, 9 Mar 2016 06:09:17 +0000 (15:09 +0900)
This reverts commit bdc459e63ab88aae600d72deb68052d189b878f9.

Conflicts:
res/po/en_US.po

Change-Id: Ia9141b0eeb9dc750eee1a4ae704d0e0018c36e6c

res/po/en_US.po
res/scripts/tv.lua [deleted file]
src/screen_reader.c

index 84a2a08..34b2b8d 100644 (file)
@@ -58,24 +58,15 @@ msgstr "group index"
 msgid "IDS_TRAIT_GROUP_INDEX_EXPANDED"
 msgstr "Expandable list, Double tap to collapse"
 
-msgid "IDS_TRAIT_GROUP_INDEX_EXPANDED_TV"
-msgstr "Expandable list, press OK button to collapse"
-
 msgid "IDS_TRAIT_GROUP_INDEX_COLLAPSED"
 msgstr "Expandable list, Double tap to expand"
 
-msgid "IDS_TRAIT_GROUP_INDEX_COLLAPSED_TV"
-msgstr "Expandable list, press OK button to expand"
-
 msgid "IDS_TRAIT_MENU_ITEM_TAB_INDEX"
 msgstr "Tab %d of %d"
 
 msgid "IDS_TRAIT_TEXT_EDIT"
 msgstr "Double tap to edit"
 
-msgid "IDS_TRAIT_TEXT_EDIT_TV"
-msgstr "press OK button to edit"
-
 msgid "IDS_TRAIT_CTX_POPUP"
 msgstr "Contextual popup"
 
@@ -91,9 +82,6 @@ msgstr "Items"
 msgid "IDS_TRAIT_POPUP_CLOSE"
 msgstr "double tap to close it"
 
-msgid "IDS_TRAIT_POPUP_CLOSE_TV"
-msgstr "press OK button to close it"
-
 msgid "IDS_TRAIT_TEXT_EDIT_FOCUSED"
 msgstr "Editing, flick up and down to adjust position."
 
diff --git a/res/scripts/tv.lua b/res/scripts/tv.lua
deleted file mode 100644 (file)
index 8c71768..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-function entry_trait(obj)
-       local ret = ""
-       if obj:is(FOCUSED) then
-               ret = T("IDS_TRAIT_TEXT_EDIT_FOCUSED_TV")
-       else
-               ret = T("IDS_TRAIT_TEXT_EDIT_TV")
-       end
-       return obj:roleName() .. ", " .. ret
-end
-
-function menu_item_trait(obj)
-       n = table.getn(obj:parent():children())
-       return string.format(T("IDS_TRAIT_MENU_ITEM_TAB_INDEX"), obj:index() + 1, n)
-end
-
-function popup_menu_trait(obj)
-       local tr = { T("IDS_TRAIT_CTX_POPUP") , T("IDS_TRAIT_SHOWING") , tostring(table.getn(obj:children())),
-                                T("IDS_TRAIT_ITEMS") , T("IDS_TRAIT_POPUP_CLOSE_TV")}
-       return table.concat(tr, " ")
-end
-
-function dialog_trait(obj)
-       local n = table.getn(obj:children())
-       local ret = T("IDS_TRAIT_POPUP")
-       if n > 0 then
-               ret = ret .. T("IDS_TRAIT_SHOWING") .. " " .. tostring(n) .. " " .. T("IDS_TRAIT_ITEMS")
-       end
-       return ret .. T("IDS_TRAIT_POPUP_CLOSE_TV")
-end
-
-function list_item_trait(obj)
-       local ret = ""
-       local p = obj:parent()
-       if p and p:is(MULTISELECTABLE) then
-               if obj:is(SELECTED) then
-                       ret = ret .. T("IDS_TRAIT_ITEM_SELECTED")
-               end
-               if p:selection() then
-                       ret = ret .. string.format(T("IDS_TRAIT_ITEM_SELECTED_COUNT"), p:selection():count())
-               end
-       else
-               if obj:is(EXPANDABLE) then
-                       if obj:is(EXPANDED) then
-                               ret = ret .. T("IDS_TRAIT_GROUP_INDEX_EXPANDED_TV")
-                       else
-                               ret = ret .. T("IDS_TRAIT_GROUP_INDEX_COLLAPSED_TV")
-                       end
-               end
-       end
-       return ret
-end
-
-function check_radio_trait(obj)
-       if obj:is(CHECKED) then
-               return T("IDS_TRAIT_CHECK_BOX_SELECTED")
-       else
-               return T("IDS_TRAIT_CHECK_BOX_NOT_SELECTED")
-       end
-end
-
-function push_button_trait(obj)
-       return T("IDS_TRAIT_PUSH_BUTTON")
-end
-
-function progress_bar_trait(obj)
-       if obj:value() then
-               cv = obj:value():current()
-               if cv >= 0 then
-                       return string.format(T("IDS_TRAIT_PD_PROGRESSBAR_PERCENT"), cv * 100)
-               else
-                       return T("IDS_TRAIT_PD_PROGRESSBAR")
-               end
-       end
-       return ""
-end
-
-function toggle_button_trait(obj)
-       if obj:is(CHECKED) then
-               local state = T("IDS_TRAIT_TOGGLE_BUTTON_ON")
-       else
-               local state = T("IDS_TRAIT_TOGGLE_BUTTON_OFF")
-       end
-       return T("IDS_TRAIT_TOGGLE_BUTTON") .. ", " .. state
-end
-
-function empty_trait(obj)
-       return ""
-end
-
-function default_trait(obj)
-       return obj:roleName()
-end
-
-local trait_map = {
-       [ENTRY] = entry_trait,
-       [MENU_ITEM] = menu_item_trait,
-       [POPUP_MENU] = popup_menu_trait,
-       [DIALOG] = dialog_trait,
-       [LIST_ITEM] = list_item_trait,
-       [CHECK_BOX] = check_radio_trait,
-       [RADIO_BUTTON] = check_radio_trait,
-       [PUSH_BUTTON] = push_button_trait,
-       [PROGRESS_BAR] = progress_bar_trait,
-       [TOGGLE_BUTTON] = toggle_button_trait,
-       [HEADING] = empty_trait,
-       [FILLER] = empty_trait,
-}
-
-function trait(obj)
-       local func = trait_map[obj:role()]
-       if func ~= nil then
-               return func(obj)
-       else
-               return default_trait(obj)
-       end
-end
-
-function describeObject(obj)
-       local related_trait = {}
-       for k, target in ipairs(obj:inRelation(RELATION_DESCRIBED_BY)) do
-               table.insert(related_trait, trait(target))
-       end
-       local ret = {obj:name(), trait(obj), obj:description(), table.concat(related_trait, ", ")}
-       for i=#ret,1,-1 do
-               if ret[i] == nil or ret[i] == "" then
-                       table.remove(ret, i)
-               end
-       end
-       return table.concat(ret, ", ")
-end
index 4d800af..1f5e29e 100644 (file)
@@ -42,11 +42,7 @@ Service_Data service_data = {
 
        //Actions to do when tts state is 'ready'
        .update_language_list = false,
-#ifdef SCREEN_READER_TV
-       .lua_script_path = SCRIPTDIR "/tv.lua",
-#else
        .lua_script_path = SCRIPTDIR "/mobile.lua",
-#endif
 
        .text_to_say_info = NULL
 };