1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef I18N_H 3*4882a593Smuzhiyun #define I18N_H 4*4882a593Smuzhiyun /* Internationalization declarations */ 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun enum msg_index_t { 7*4882a593Smuzhiyun MSG_FIRST_INDEX, 8*4882a593Smuzhiyun MSG_ANNOUNCEMENTS_START = MSG_FIRST_INDEX, 9*4882a593Smuzhiyun MSG_BLANK = MSG_ANNOUNCEMENTS_START, 10*4882a593Smuzhiyun MSG_IAM_ALIVE, 11*4882a593Smuzhiyun MSG_YOU_KILLED_SPEAKUP, 12*4882a593Smuzhiyun MSG_HEY_THATS_BETTER, 13*4882a593Smuzhiyun MSG_YOU_TURNED_ME_OFF, 14*4882a593Smuzhiyun MSG_PARKED, 15*4882a593Smuzhiyun MSG_UNPARKED, 16*4882a593Smuzhiyun MSG_MARK, 17*4882a593Smuzhiyun MSG_CUT, 18*4882a593Smuzhiyun MSG_MARK_CLEARED, 19*4882a593Smuzhiyun MSG_PASTE, 20*4882a593Smuzhiyun MSG_BRIGHT, 21*4882a593Smuzhiyun MSG_ON_BLINKING, 22*4882a593Smuzhiyun MSG_STATUS_START, 23*4882a593Smuzhiyun MSG_OFF = MSG_STATUS_START, 24*4882a593Smuzhiyun MSG_ON, 25*4882a593Smuzhiyun MSG_NO_WINDOW, 26*4882a593Smuzhiyun MSG_CURSOR_MSGS_START, 27*4882a593Smuzhiyun MSG_CURSORING_OFF = MSG_CURSOR_MSGS_START, 28*4882a593Smuzhiyun MSG_CURSORING_ON, 29*4882a593Smuzhiyun MSG_HIGHLIGHT_TRACKING, 30*4882a593Smuzhiyun MSG_READ_WINDOW, 31*4882a593Smuzhiyun MSG_READ_ALL, 32*4882a593Smuzhiyun MSG_EDIT_DONE, 33*4882a593Smuzhiyun MSG_WINDOW_ALREADY_SET, 34*4882a593Smuzhiyun MSG_END_BEFORE_START, 35*4882a593Smuzhiyun MSG_WINDOW_CLEARED, 36*4882a593Smuzhiyun MSG_WINDOW_SILENCED, 37*4882a593Smuzhiyun MSG_WINDOW_SILENCE_DISABLED, 38*4882a593Smuzhiyun MSG_ERROR, 39*4882a593Smuzhiyun MSG_GOTO_CANCELED, 40*4882a593Smuzhiyun MSG_GOTO, 41*4882a593Smuzhiyun MSG_LEAVING_HELP, 42*4882a593Smuzhiyun MSG_IS_UNASSIGNED, 43*4882a593Smuzhiyun MSG_HELP_INFO, 44*4882a593Smuzhiyun MSG_EDGE_MSGS_START, 45*4882a593Smuzhiyun MSG_EDGE_TOP = MSG_EDGE_MSGS_START, 46*4882a593Smuzhiyun MSG_EDGE_BOTTOM, 47*4882a593Smuzhiyun MSG_EDGE_LEFT, 48*4882a593Smuzhiyun MSG_EDGE_RIGHT, 49*4882a593Smuzhiyun MSG_NUMBER, 50*4882a593Smuzhiyun MSG_SPACE, 51*4882a593Smuzhiyun MSG_START, /* A little confusing, given our convention. */ 52*4882a593Smuzhiyun MSG_END, /* A little confusing, given our convention. */ 53*4882a593Smuzhiyun MSG_CTRL, 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun /* A message containing the single word "or". */ 56*4882a593Smuzhiyun MSG_DISJUNCTION, 57*4882a593Smuzhiyun MSG_ANNOUNCEMENTS_END = MSG_DISJUNCTION, 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun /* Messages with format specifiers. */ 60*4882a593Smuzhiyun MSG_FORMATTED_START, 61*4882a593Smuzhiyun MSG_POS_INFO = MSG_FORMATTED_START, 62*4882a593Smuzhiyun MSG_CHAR_INFO, 63*4882a593Smuzhiyun MSG_REPEAT_DESC, 64*4882a593Smuzhiyun MSG_REPEAT_DESC2, 65*4882a593Smuzhiyun MSG_WINDOW_LINE, 66*4882a593Smuzhiyun MSG_WINDOW_BOUNDARY, 67*4882a593Smuzhiyun MSG_EDIT_PROMPT, 68*4882a593Smuzhiyun MSG_NO_COMMAND, 69*4882a593Smuzhiyun MSG_KEYDESC, 70*4882a593Smuzhiyun MSG_FORMATTED_END = MSG_KEYDESC, 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun /* Control keys. */ 73*4882a593Smuzhiyun MSG_CTL_START, 74*4882a593Smuzhiyun MSG_CTL_SHIFT = MSG_CTL_START, 75*4882a593Smuzhiyun MSG_CTL_ALTGR, 76*4882a593Smuzhiyun MSG_CTL_CONTROL, 77*4882a593Smuzhiyun MSG_CTL_ALT, 78*4882a593Smuzhiyun MSG_CTL_LSHIFT, 79*4882a593Smuzhiyun MSG_CTL_SPEAKUP, 80*4882a593Smuzhiyun MSG_CTL_LCONTROL, 81*4882a593Smuzhiyun MSG_CTL_RCONTROL, 82*4882a593Smuzhiyun MSG_CTL_CAPSSHIFT, 83*4882a593Smuzhiyun MSG_CTL_END = MSG_CTL_CAPSSHIFT, 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun /* Colors. */ 86*4882a593Smuzhiyun MSG_COLORS_START, 87*4882a593Smuzhiyun MSG_COLOR_BLACK = MSG_COLORS_START, 88*4882a593Smuzhiyun MSG_COLOR_BLUE, 89*4882a593Smuzhiyun MSG_COLOR_GREEN, 90*4882a593Smuzhiyun MSG_COLOR_CYAN, 91*4882a593Smuzhiyun MSG_COLOR_RED, 92*4882a593Smuzhiyun MSG_COLOR_MAGENTA, 93*4882a593Smuzhiyun MSG_COLOR_YELLOW, 94*4882a593Smuzhiyun MSG_COLOR_WHITE, 95*4882a593Smuzhiyun MSG_COLOR_GREY, 96*4882a593Smuzhiyun MSG_COLORS_END = MSG_COLOR_GREY, 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun MSG_STATES_START, 99*4882a593Smuzhiyun MSG_STATE_DOUBLE = MSG_STATES_START, 100*4882a593Smuzhiyun MSG_STATE_SPEAKUP, 101*4882a593Smuzhiyun MSG_STATE_ALT, 102*4882a593Smuzhiyun MSG_STATE_CONTROL, 103*4882a593Smuzhiyun MSG_STATE_ALTGR, 104*4882a593Smuzhiyun MSG_STATE_SHIFT, 105*4882a593Smuzhiyun MSG_STATES_END = MSG_STATE_SHIFT, 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun MSG_KEYNAMES_START, 108*4882a593Smuzhiyun MSG_KEYNAME_ESC = MSG_KEYNAMES_START, 109*4882a593Smuzhiyun MSG_KEYNAME_1, MSG_KEYNAME_2, MSG_KEYNAME_3, MSG_KEYNAME_4, 110*4882a593Smuzhiyun MSG_KEYNAME_5, MSG_KEYNAME_6, MSG_KEYNAME_7, MSG_KEYNAME_8, 111*4882a593Smuzhiyun MSG_KEYNAME_9, 112*4882a593Smuzhiyun MSG_KEYNAME_0, MSG_KEYNAME_DASH, MSG_KEYNAME_EQUAL, MSG_KEYNAME_BS, 113*4882a593Smuzhiyun MSG_KEYNAME_TAB, 114*4882a593Smuzhiyun MSG_KEYNAME_Q, MSG_KEYNAME_W, MSG_KEYNAME_E, MSG_KEYNAME_R, 115*4882a593Smuzhiyun MSG_KEYNAME_T, MSG_KEYNAME_Y, MSG_KEYNAME_U, MSG_KEYNAME_I, 116*4882a593Smuzhiyun MSG_KEYNAME_O, MSG_KEYNAME_P, 117*4882a593Smuzhiyun MSG_KEYNAME_LEFTBRACE, MSG_KEYNAME_RIGHTBRACE, MSG_KEYNAME_ENTER, 118*4882a593Smuzhiyun MSG_KEYNAME_LEFTCTRL, MSG_KEYNAME_A, 119*4882a593Smuzhiyun MSG_KEYNAME_S, MSG_KEYNAME_D, MSG_KEYNAME_F, MSG_KEYNAME_G, 120*4882a593Smuzhiyun MSG_KEYNAME_H, MSG_KEYNAME_J, MSG_KEYNAME_K, MSG_KEYNAME_L, 121*4882a593Smuzhiyun MSG_KEYNAME_SEMICOLON, 122*4882a593Smuzhiyun MSG_KEYNAME_SINGLEQUOTE, MSG_KEYNAME_GRAVE, 123*4882a593Smuzhiyun MSG_KEYNAME_LEFTSHFT, MSG_KEYNAME_BACKSLASH, MSG_KEYNAME_Z, 124*4882a593Smuzhiyun MSG_KEYNAME_X, MSG_KEYNAME_C, MSG_KEYNAME_V, MSG_KEYNAME_B, 125*4882a593Smuzhiyun MSG_KEYNAME_N, MSG_KEYNAME_M, MSG_KEYNAME_COMMA, MSG_KEYNAME_DOT, 126*4882a593Smuzhiyun MSG_KEYNAME_SLASH, MSG_KEYNAME_RIGHTSHFT, 127*4882a593Smuzhiyun MSG_KEYNAME_KPSTAR, 128*4882a593Smuzhiyun MSG_KEYNAME_LEFTALT, MSG_KEYNAME_SPACE, MSG_KEYNAME_CAPSLOCK, 129*4882a593Smuzhiyun MSG_KEYNAME_F1, MSG_KEYNAME_F2, 130*4882a593Smuzhiyun MSG_KEYNAME_F3, MSG_KEYNAME_F4, MSG_KEYNAME_F5, MSG_KEYNAME_F6, 131*4882a593Smuzhiyun MSG_KEYNAME_F7, 132*4882a593Smuzhiyun MSG_KEYNAME_F8, MSG_KEYNAME_F9, MSG_KEYNAME_F10, MSG_KEYNAME_NUMLOCK, 133*4882a593Smuzhiyun MSG_KEYNAME_SCROLLLOCK, 134*4882a593Smuzhiyun MSG_KEYNAME_KP7, MSG_KEYNAME_KP8, MSG_KEYNAME_KP9, MSG_KEYNAME_KPMINUS, 135*4882a593Smuzhiyun MSG_KEYNAME_KP4, 136*4882a593Smuzhiyun MSG_KEYNAME_KP5, MSG_KEYNAME_KP6, MSG_KEYNAME_KPPLUS, MSG_KEYNAME_KP1, 137*4882a593Smuzhiyun MSG_KEYNAME_KP2, 138*4882a593Smuzhiyun MSG_KEYNAME_KP3, MSG_KEYNAME_KP0, MSG_KEYNAME_KPDOT, MSG_KEYNAME_103RD, 139*4882a593Smuzhiyun MSG_KEYNAME_F13, 140*4882a593Smuzhiyun MSG_KEYNAME_102ND, MSG_KEYNAME_F11, MSG_KEYNAME_F12, MSG_KEYNAME_F14, 141*4882a593Smuzhiyun MSG_KEYNAME_F15, 142*4882a593Smuzhiyun MSG_KEYNAME_F16, MSG_KEYNAME_F17, MSG_KEYNAME_F18, MSG_KEYNAME_F19, 143*4882a593Smuzhiyun MSG_KEYNAME_F20, 144*4882a593Smuzhiyun MSG_KEYNAME_KPENTER, MSG_KEYNAME_RIGHTCTRL, MSG_KEYNAME_KPSLASH, 145*4882a593Smuzhiyun MSG_KEYNAME_SYSRQ, MSG_KEYNAME_RIGHTALT, 146*4882a593Smuzhiyun MSG_KEYNAME_LF, MSG_KEYNAME_HOME, MSG_KEYNAME_UP, MSG_KEYNAME_PGUP, 147*4882a593Smuzhiyun MSG_KEYNAME_LEFT, 148*4882a593Smuzhiyun MSG_KEYNAME_RIGHT, MSG_KEYNAME_END, MSG_KEYNAME_DOWN, MSG_KEYNAME_PGDN, 149*4882a593Smuzhiyun MSG_KEYNAME_INS, 150*4882a593Smuzhiyun MSG_KEYNAME_DEL, MSG_KEYNAME_MACRO, MSG_KEYNAME_MUTE, 151*4882a593Smuzhiyun MSG_KEYNAME_VOLDOWN, MSG_KEYNAME_VOLUP, 152*4882a593Smuzhiyun MSG_KEYNAME_POWER, MSG_KEYNAME_KPEQUAL, MSG_KEYNAME_KPPLUSDASH, 153*4882a593Smuzhiyun MSG_KEYNAME_PAUSE, MSG_KEYNAME_F21, MSG_KEYNAME_F22, MSG_KEYNAME_F23, 154*4882a593Smuzhiyun MSG_KEYNAME_F24, MSG_KEYNAME_KPCOMMA, MSG_KEYNAME_LEFTMETA, 155*4882a593Smuzhiyun MSG_KEYNAME_RIGHTMETA, MSG_KEYNAME_COMPOSE, MSG_KEYNAME_STOP, 156*4882a593Smuzhiyun MSG_KEYNAME_AGAIN, MSG_KEYNAME_PROPS, 157*4882a593Smuzhiyun MSG_KEYNAME_UNDO, MSG_KEYNAME_FRONT, MSG_KEYNAME_COPY, MSG_KEYNAME_OPEN, 158*4882a593Smuzhiyun MSG_KEYNAME_PASTE, 159*4882a593Smuzhiyun MSG_KEYNAME_FIND, MSG_KEYNAME_CUT, MSG_KEYNAME_HELP, MSG_KEYNAME_MENU, 160*4882a593Smuzhiyun MSG_KEYNAME_CALC, 161*4882a593Smuzhiyun MSG_KEYNAME_SETUP, MSG_KEYNAME_SLEEP, MSG_KEYNAME_WAKEUP, 162*4882a593Smuzhiyun MSG_KEYNAME_FILE, MSG_KEYNAME_SENDFILE, 163*4882a593Smuzhiyun MSG_KEYNAME_DELFILE, MSG_KEYNAME_XFER, MSG_KEYNAME_PROG1, 164*4882a593Smuzhiyun MSG_KEYNAME_PROG2, MSG_KEYNAME_WWW, 165*4882a593Smuzhiyun MSG_KEYNAME_MSDOS, MSG_KEYNAME_COFFEE, MSG_KEYNAME_DIRECTION, 166*4882a593Smuzhiyun MSG_KEYNAME_CYCLEWINDOWS, MSG_KEYNAME_MAIL, 167*4882a593Smuzhiyun MSG_KEYNAME_BOOKMARKS, MSG_KEYNAME_COMPUTER, MSG_KEYNAME_BACK, 168*4882a593Smuzhiyun MSG_KEYNAME_FORWARD, MSG_KEYNAME_CLOSECD, 169*4882a593Smuzhiyun MSG_KEYNAME_EJECTCD, MSG_KEYNAME_EJECTCLOSE, MSG_KEYNAME_NEXTSONG, 170*4882a593Smuzhiyun MSG_KEYNAME_PLAYPAUSE, MSG_KEYNAME_PREVSONG, 171*4882a593Smuzhiyun MSG_KEYNAME_STOPCD, MSG_KEYNAME_RECORD, MSG_KEYNAME_REWIND, 172*4882a593Smuzhiyun MSG_KEYNAME_PHONE, MSG_KEYNAME_ISO, 173*4882a593Smuzhiyun MSG_KEYNAME_CONFIG, MSG_KEYNAME_HOMEPG, MSG_KEYNAME_REFRESH, 174*4882a593Smuzhiyun MSG_KEYNAME_EXIT, MSG_KEYNAME_MOVE, 175*4882a593Smuzhiyun MSG_KEYNAME_EDIT, MSG_KEYNAME_SCROLLUP, MSG_KEYNAME_SCROLLDN, 176*4882a593Smuzhiyun MSG_KEYNAME_KPLEFTPAR, MSG_KEYNAME_KPRIGHTPAR, 177*4882a593Smuzhiyun MSG_KEYNAMES_END = MSG_KEYNAME_KPRIGHTPAR, 178*4882a593Smuzhiyun 179*4882a593Smuzhiyun MSG_FUNCNAMES_START, 180*4882a593Smuzhiyun MSG_FUNCNAME_ATTRIB_BLEEP_DEC = MSG_FUNCNAMES_START, 181*4882a593Smuzhiyun MSG_FUNCNAME_ATTRIB_BLEEP_INC, 182*4882a593Smuzhiyun MSG_FUNCNAME_BLEEPS_DEC, MSG_FUNCNAME_BLEEPS_INC, 183*4882a593Smuzhiyun MSG_FUNCNAME_CHAR_FIRST, MSG_FUNCNAME_CHAR_LAST, 184*4882a593Smuzhiyun MSG_FUNCNAME_CHAR_CURRENT, MSG_FUNCNAME_CHAR_HEX_AND_DEC, 185*4882a593Smuzhiyun MSG_FUNCNAME_CHAR_NEXT, 186*4882a593Smuzhiyun MSG_FUNCNAME_CHAR_PHONETIC, MSG_FUNCNAME_CHAR_PREVIOUS, 187*4882a593Smuzhiyun MSG_FUNCNAME_CURSOR_PARK, MSG_FUNCNAME_CUT, 188*4882a593Smuzhiyun MSG_FUNCNAME_EDIT_DELIM, MSG_FUNCNAME_EDIT_EXNUM, 189*4882a593Smuzhiyun MSG_FUNCNAME_EDIT_MOST, MSG_FUNCNAME_EDIT_REPEATS, 190*4882a593Smuzhiyun MSG_FUNCNAME_EDIT_SOME, 191*4882a593Smuzhiyun MSG_FUNCNAME_GOTO, MSG_FUNCNAME_GOTO_BOTTOM, MSG_FUNCNAME_GOTO_LEFT, 192*4882a593Smuzhiyun MSG_FUNCNAME_GOTO_RIGHT, MSG_FUNCNAME_GOTO_TOP, MSG_FUNCNAME_HELP, 193*4882a593Smuzhiyun MSG_FUNCNAME_LINE_SAY_CURRENT, MSG_FUNCNAME_LINE_SAY_NEXT, 194*4882a593Smuzhiyun MSG_FUNCNAME_LINE_SAY_PREVIOUS, MSG_FUNCNAME_LINE_SAY_WITH_INDENT, 195*4882a593Smuzhiyun MSG_FUNCNAME_PASTE, MSG_FUNCNAME_PITCH_DEC, MSG_FUNCNAME_PITCH_INC, 196*4882a593Smuzhiyun MSG_FUNCNAME_PUNC_DEC, MSG_FUNCNAME_PUNC_INC, 197*4882a593Smuzhiyun MSG_FUNCNAME_PUNC_LEVEL_DEC, MSG_FUNCNAME_PUNC_LEVEL_INC, 198*4882a593Smuzhiyun MSG_FUNCNAME_QUIET, 199*4882a593Smuzhiyun MSG_FUNCNAME_RATE_DEC, MSG_FUNCNAME_RATE_INC, 200*4882a593Smuzhiyun MSG_FUNCNAME_READING_PUNC_DEC, MSG_FUNCNAME_READING_PUNC_INC, 201*4882a593Smuzhiyun MSG_FUNCNAME_SAY_ATTRIBUTES, 202*4882a593Smuzhiyun MSG_FUNCNAME_SAY_FROM_LEFT, MSG_FUNCNAME_SAY_FROM_TOP, 203*4882a593Smuzhiyun MSG_FUNCNAME_SAY_POSITION, MSG_FUNCNAME_SAY_SCREEN, 204*4882a593Smuzhiyun MSG_FUNCNAME_SAY_TO_BOTTOM, MSG_FUNCNAME_SAY_TO_RIGHT, 205*4882a593Smuzhiyun MSG_FUNCNAME_SPEAKUP, MSG_FUNCNAME_SPEAKUP_LOCK, 206*4882a593Smuzhiyun MSG_FUNCNAME_SPEAKUP_OFF, MSG_FUNCNAME_SPEECH_KILL, 207*4882a593Smuzhiyun MSG_FUNCNAME_SPELL_DELAY_DEC, MSG_FUNCNAME_SPELL_DELAY_INC, 208*4882a593Smuzhiyun MSG_FUNCNAME_SPELL_WORD, MSG_FUNCNAME_SPELL_WORD_PHONETICALLY, 209*4882a593Smuzhiyun MSG_FUNCNAME_TONE_DEC, MSG_FUNCNAME_TONE_INC, 210*4882a593Smuzhiyun MSG_FUNCNAME_VOICE_DEC, MSG_FUNCNAME_VOICE_INC, 211*4882a593Smuzhiyun MSG_FUNCNAME_VOLUME_DEC, MSG_FUNCNAME_VOLUME_INC, 212*4882a593Smuzhiyun MSG_FUNCNAME_WINDOW_CLEAR, MSG_FUNCNAME_WINDOW_SAY, 213*4882a593Smuzhiyun MSG_FUNCNAME_WINDOW_SET, MSG_FUNCNAME_WINDOW_SILENCE, 214*4882a593Smuzhiyun MSG_FUNCNAME_WORD_SAY_CURRENT, MSG_FUNCNAME_WORD_SAY_NEXT, 215*4882a593Smuzhiyun MSG_FUNCNAME_WORD_SAY_PREVIOUS, 216*4882a593Smuzhiyun MSG_FUNCNAMES_END = MSG_FUNCNAME_WORD_SAY_PREVIOUS, 217*4882a593Smuzhiyun 218*4882a593Smuzhiyun /* all valid indices must be above this */ 219*4882a593Smuzhiyun MSG_LAST_INDEX 220*4882a593Smuzhiyun }; 221*4882a593Smuzhiyun 222*4882a593Smuzhiyun struct msg_group_t { 223*4882a593Smuzhiyun char *name; 224*4882a593Smuzhiyun enum msg_index_t start; 225*4882a593Smuzhiyun enum msg_index_t end; 226*4882a593Smuzhiyun }; 227*4882a593Smuzhiyun 228*4882a593Smuzhiyun char *spk_msg_get(enum msg_index_t index); 229*4882a593Smuzhiyun ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length); 230*4882a593Smuzhiyun struct msg_group_t *spk_find_msg_group(const char *group_name); 231*4882a593Smuzhiyun void spk_reset_msg_group(struct msg_group_t *group); 232*4882a593Smuzhiyun void spk_initialize_msgs(void); 233*4882a593Smuzhiyun void spk_free_user_msgs(void); 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun #endif 236