/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.tizenopensource.org/license * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include "phone.h" #include "phone-text.h" static const char *basic_str[] = { N_("IDS_PB_ITAB4_DIALLER"), N_("IDS_PB_ITAB4_FAVOURITES"), N_("IDS_CST_BODY_VOICE_MAIL"), N_("IDS_CLOG_ITAB4_LOGS"), N_("IDS_PB_POP_REQUEST_FAILED"), N_("IDS_PB_POP_REQUEST_SUCCESS"), N_("IDS_CALL_POP_EMERGENCY_CALL"), N_("IDS_CLOG_BODY_NO_LOGS"), N_("IDS_PB_BODY_NO_FAVOURITES"), N_("IDS_PB_POP_MAXIMUM_PHONE_NUMBER_LENGTH_EXCEEDED"), N_("IDS_CLOG_POP_DELETING_LOGS_ING"), N_("IDS_PB_POP_DELETING_FAVOURITES_ING"), N_("IDS_PB_POP_INITIALISING_TRY_LATER_ING"), }; static const char *base_op_str[] = { N_("IDS_CLOG_HEADER_SELECT_LOGS"), N_("IDS_CST_OPT_CHANGE_CONTACT_ABB"), }; const char* phone_get_text(int op, int type) { const char **table; switch (op) { case PH_GET_TEXT_BASIC: table = basic_str; return dgettext(PACKAGE, table[type]); case PH_GET_TEXT_BASE_OP: table = base_op_str; return dgettext(PACKAGE, table[type]); default: return NULL; } } static const char *sys_str[] = { "IDS_COM_SK_OK", "IDS_COM_SK_EDIT", "IDS_COM_SK_DELETE", "IDS_COM_SK_CANCEL", "IDS_COM_BODY_CALL", "IDS_COM_BODY_MESSAGE", "IDS_COM_BODY_UNKNOWN", "IDS_COM_BODY_SELECT_ALL", "IDS_COM_BODY_CONTACTS", "IDS_COM_BODY_DETAILS", "IDS_COM_BODY_REMOVE", "IDS_COM_POP_FAIL", "IDS_COM_POP_FAILED", "IDS_COM_POP_CLOSE", "IDS_COM_POP_REMOVED", "IDS_COM_POP_DELETED", "IDS_COM_POP_INCORRECT_PASSWORD", "IDS_COM_POP_ALREDY_EXISTS", "IDS_COM_POP_SELECTED", "IDS_COM_OPT_ADD_TO_CONTACTS", "IDS_COM_BODY_TODAY", "IDS_COM_BODY_YESTERDAY", "IDS_COM_BODY_PREVIOUS", "IDS_COM_BODY_NO_NAME", }; const char* phone_get_system_string(int type) { return dgettext("sys_string", sys_str[type]); }