summaryrefslogtreecommitdiff
path: root/lib/common/ph-text.c
blob: c9137be1b45886c29020f7871e42341298a10e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * 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 <appcore-efl.h>

#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]);
}