Contribs: add libbluray
[vlc/asuraparaju-public.git] / modules / demux / kate_categories.c
blobbfe98d4696888a6d5dc514eb8a813824627a023c
1 /*****************************************************************************
2 * kate_categories.c : maps well known category tags to translated strings.
3 *****************************************************************************
4 * Copyright (C) 2009 ogg.k.ogg.k@googlemail.com
5 * $Id$
7 * Authors: ogg.k.ogg.k@googlemail.com
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /*****************************************************************************
25 * Preamble
26 *****************************************************************************/
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
31 #include <stddef.h>
32 #include <string.h>
33 #include "kate_categories.h"
35 static const struct {
36 const char *psz_tag;
37 const char *psz_i18n;
38 } Katei18nCategories[] = {
39 /* From Silvia's Mozilla list */
40 { "CC", N_("Closed captions") },
41 { "SUB", N_("Subtitles") },
42 { "TAD", N_("Textual audio descriptions") },
43 { "KTV", N_("Karaoke") },
44 { "TIK", N_("Ticker text") },
45 { "AR", N_("Active regions") },
46 { "NB", N_("Semantic annotations") },
47 { "META", N_("Metadata") },
48 { "TRX", N_("Transcript") },
49 { "LRC", N_("Lyrics") },
50 { "LIN", N_("Linguistic markup") },
51 { "CUE", N_("Cue points") },
53 /* Grandfathered */
54 { "subtitles", N_("Subtitles") },
55 { "spu-subtitles", N_("Subtitles (images)") },
56 { "lyrics", N_("Lyrics") },
58 /* Kate specific */
59 { "K-SPU", N_("Subtitles (images)") },
60 { "K-SLD-T", N_("Slides (text)") },
61 { "K-SLD-I", N_("Slides (images)") },
64 const char *FindKateCategoryName( const char *psz_tag )
66 size_t i;
68 for( i = 0; i < sizeof(Katei18nCategories)/sizeof(Katei18nCategories[0]); i++ )
70 if( !strcmp( psz_tag, Katei18nCategories[i].psz_tag ) )
71 return Katei18nCategories[i].psz_i18n;
73 return N_("Unknown category");