cms/app-client/app/services/constants.js
changeset 126 e87a340711a4
child 142 86fcf0c837c0
equal deleted inserted replaced
125:e550b10fe3ca 126:e87a340711a4
       
     1 import Ember from 'ember';
       
     2 
       
     3 const OLAC_ROLES = {
       
     4   'http://www.language-archives.org/OLAC/1.1/annotator': 'bo.olac_role_annotator',
       
     5   'http://www.language-archives.org/OLAC/1.1/author': 'bo.olac_role_author',
       
     6   'http://www.language-archives.org/OLAC/1.1/compiler': 'bo.olac_role_compiler',
       
     7   'http://www.language-archives.org/OLAC/1.1/consultant': 'bo.olac_role_consultant',
       
     8   'http://www.language-archives.org/OLAC/1.1/data_inputter': 'bo.olac_role_data_inputter',
       
     9   'http://www.language-archives.org/OLAC/1.1/depositor': 'bo.olac_role_depositor',
       
    10   'http://www.language-archives.org/OLAC/1.1/developer': 'bo.olac_role_developer',
       
    11   'http://www.language-archives.org/OLAC/1.1/editor': 'bo.olac_role_editor',
       
    12   'http://www.language-archives.org/OLAC/1.1/illustrator': 'bo.olac_role_illustrator',
       
    13   'http://www.language-archives.org/OLAC/1.1/interpreter': 'bo.olac_role_interpreter',
       
    14   'http://www.language-archives.org/OLAC/1.1/interviewer': 'bo.olac_role_interviewer',
       
    15   'http://www.language-archives.org/OLAC/1.1/participant': 'bo.olac_role_participant',
       
    16   'http://www.language-archives.org/OLAC/1.1/performer': 'bo.olac_role_performer',
       
    17   'http://www.language-archives.org/OLAC/1.1/photographer': 'bo.olac_role_photographer',
       
    18   'http://www.language-archives.org/OLAC/1.1/recorder': 'bo.olac_role_recorder',
       
    19   'http://www.language-archives.org/OLAC/1.1/researcher': 'bo.olac_role_researcher',
       
    20   'http://www.language-archives.org/OLAC/1.1/research_participant': 'bo.olac_role_research_participant',
       
    21   'http://www.language-archives.org/OLAC/1.1/responder': 'bo.olac_role_responder',
       
    22   'http://www.language-archives.org/OLAC/1.1/signer': 'bo.olac_role_signer',
       
    23   'http://www.language-archives.org/OLAC/1.1/singer': 'bo.olac_role_singer',
       
    24   'http://www.language-archives.org/OLAC/1.1/speaker': 'bo.olac_role_speaker',
       
    25   'http://www.language-archives.org/OLAC/1.1/sponsor': 'bo.olac_role_sponsor',
       
    26   'http://www.language-archives.org/OLAC/1.1/transcriber': 'bo.olac_role_transcriber',
       
    27   'http://www.language-archives.org/OLAC/1.1/translator': 'bo.olac_role_translator',
       
    28 };
       
    29 
       
    30 const KEY_CODES = {
       
    31   BACKSPACE : 8,
       
    32   DELETE : 46,
       
    33   ESCAPE: 27,
       
    34   RETURN: 13,
       
    35 };
       
    36 
       
    37 const LANGUAGES_TREEMAP = {
       
    38  "name": "Global",
       
    39  "children": [
       
    40   {
       
    41     "id": "http://lexvo.org/id/iso639-3/fra",
       
    42     "name": "Français",
       
    43   },
       
    44   {
       
    45     "id": "http://lexvo.org/id/iso639-3/gsw",
       
    46     "name": "Alsacien",
       
    47   },
       
    48   {
       
    49     "id": "http://lexvo.org/id/iso639-3/bre",
       
    50     "name": "Breton",
       
    51   },
       
    52   {
       
    53     "id": "http://lexvo.org/id/iso639-3/oci",
       
    54     "name": "Occitan",
       
    55   },
       
    56   {
       
    57     "id": "http://lexvo.org/id/iso639-3/lad",
       
    58     "name": "Judéo-espagnol",
       
    59   },
       
    60   {
       
    61     "id": "http://lexvo.org/id/iso639-3/und",
       
    62     "name": "Undetermined",
       
    63   },
       
    64   {
       
    65     "name": "Langues régionales",
       
    66     // (franccomtois,wallon, champenois, picard, normand, gallo,poitevin-saintongeais [dans ses deux variétés : poitevinet saintongeais], lorrain, bourguignon-morvandiau)
       
    67     "children": [
       
    68       {
       
    69         "id": "http://lexvo.org/id/iso639-3/pcd",
       
    70         "name": "Langues d'oïl",
       
    71       },
       
    72       {
       
    73         "id": "http://lexvo.org/id/iso639-3/frp",
       
    74         "name": "Francoprovençal",
       
    75       },
       
    76       {
       
    77         "id": "http://lexvo.org/id/iso639-3/cos",
       
    78         "name": "Corse",
       
    79       }
       
    80     ]
       
    81   },
       
    82   {
       
    83     "name": "Langues non territoriales",
       
    84     "children": [
       
    85       {
       
    86         "id": "http://lexvo.org/id/iso639-3/fsl",
       
    87         "name": "Langue des signes française (LSF)",
       
    88       },
       
    89       {
       
    90         "id": "http://lexvo.org/id/iso639-3/ber",
       
    91         "name": "Berbère",
       
    92       },
       
    93       {
       
    94         "id": "http://lexvo.org/id/iso639-3/kab",
       
    95         "name": "Kabyle",
       
    96       },
       
    97       {
       
    98         "id": "http://lexvo.org/id/iso639-3/ell",
       
    99         "name": "Grec moderne"
       
   100       },
       
   101       {
       
   102         "id": "http://lexvo.org/id/iso639-3/spa",
       
   103         "name": "Espagnol"
       
   104       },
       
   105       {
       
   106         "id": "http://lexvo.org/id/iso639-3/eng",
       
   107         "name": "Anglais",
       
   108       },
       
   109       {
       
   110         "id": "http://lexvo.org/id/iso639-3/ita",
       
   111         "name": "Italien",
       
   112       },
       
   113       {
       
   114         "id": "http://lexvo.org/id/iso639-3/deu",
       
   115         "name": "Allemand",
       
   116       },
       
   117       {
       
   118         "id": "http://lexvo.org/id/iso639-3/tur",
       
   119         "name": "Turque",
       
   120       },
       
   121     ]
       
   122   },
       
   123   {
       
   124     "name": "Les Creoles",
       
   125     "children": [
       
   126       {
       
   127         "id": "http://lexvo.org/id/iso639-3/rcf",
       
   128         "name": "Creole de la Réunion",
       
   129       },
       
   130       {
       
   131         "id": "http://lexvo.org/id/iso639-3/gcf",
       
   132         "name": "Creole de la Guadeloupe",
       
   133       }
       
   134     ]
       
   135   },
       
   136   {
       
   137     "name": "Guyane",
       
   138     "children": [
       
   139       {
       
   140         "id": "http://lexvo.org/id/iso639-3/gcf",
       
   141         "name": "Ndyuka-Trio Pidgin (njt)",
       
   142       },
       
   143       {
       
   144         "id": "http://lexvo.org/id/iso639-3/plu",
       
   145         "name": "Palikúr (plu)",
       
   146       },
       
   147       {
       
   148         "id": "http://lexvo.org/id/iso639-3/gcr",
       
   149         "name": "Guianese Creole French (gcr)",
       
   150       },
       
   151       {
       
   152         "id": "http://lexvo.org/id/iso639-3/djk",
       
   153         "name": "Eastern Maroon Creole (djk)",
       
   154       },
       
   155       {
       
   156         "id": "http://lexvo.org/id/iso639-3/srn",
       
   157         "name": "Sranan Tongo (srn)",
       
   158       },
       
   159       {
       
   160         "id": "http://lexvo.org/id/iso639-3/car",
       
   161         "name": "kali'na (car)",
       
   162       }
       
   163     ]
       
   164   },
       
   165   {
       
   166     "name": "Mayotte",
       
   167     "children": [
       
   168       {
       
   169         "id": "http://lexvo.org/id/iso639-3/swb",
       
   170         "name": "Maore Comorian (swb)",
       
   171       },
       
   172       {
       
   173         "id": "http://lexvo.org/id/iso639-3/lsy",
       
   174         "name": "Mauritian Sign Language (lsy)",
       
   175       }
       
   176     ]
       
   177   },
       
   178   {
       
   179     "name": "Polynésie française",
       
   180     "children": [
       
   181       {
       
   182         "id": "http://lexvo.org/id/iso639-3/uve",
       
   183         "name": "West Uvean (uve)",
       
   184       }
       
   185     ]
       
   186   },
       
   187   {
       
   188     "name": "Wallis et Futuna",
       
   189     "children": [
       
   190       {
       
   191         "id": "http://lexvo.org/id/iso639-3/fud",
       
   192         "name": "LanEast Futuna (fud)",
       
   193       },
       
   194       {
       
   195         "id": "http://lexvo.org/id/iso639-3/wls",
       
   196         "name": "Wallisian (wls)",
       
   197       }
       
   198     ]
       
   199   },
       
   200   {
       
   201     "name": "Nouvelle-Calédonie",
       
   202     "children": [
       
   203       {
       
   204         "id": "http://lexvo.org/id/iso639-3/wls",
       
   205         "name": "Wallisian (wls)",
       
   206       },
       
   207       {
       
   208         "id": "http://lexvo.org/id/iso639-3/ane",
       
   209         "name": "Xârâcùù (ane)",
       
   210       },
       
   211       {
       
   212         "id": "http://lexvo.org/id/iso639-3/cam",
       
   213         "name": "Cemuhî (cam)",
       
   214       },
       
   215       {
       
   216         "id": "http://lexvo.org/id/iso639-3/axx",
       
   217         "name": "Xaragure (axx)",
       
   218       },
       
   219       {
       
   220         "id": "http://lexvo.org/id/iso639-3/iai",
       
   221         "name": "Iaai (iai)",
       
   222       },
       
   223       {
       
   224         "id": "http://lexvo.org/id/iso639-3/nee",
       
   225         "name": "Nêlêmwa-Nixumwak (nee)",
       
   226       },
       
   227       {
       
   228         "id": "http://lexvo.org/id/iso639-3/dhv",
       
   229         "name": "Dehu (dhv)",
       
   230       },
       
   231       {
       
   232         "id": "http://lexvo.org/id/iso639-3/nen",
       
   233         "name": "Nengone (nen)",
       
   234       },
       
   235       {
       
   236         "id": "http://lexvo.org/id/iso639-3/aji",
       
   237         "name": "Ajië (aji)",
       
   238       },
       
   239       {
       
   240         "id": "http://lexvo.org/id/iso639-3/kdk",
       
   241         "name": "Numee (kdk)",
       
   242       },
       
   243       {
       
   244         "id": "http://lexvo.org/id/iso639-3/nem",
       
   245         "name": "Nemi",
       
   246       },
       
   247       {
       
   248         "id": "http://lexvo.org/id/iso639-3/nua",
       
   249         "name": "Yuaga (nua)",
       
   250       },
       
   251       {
       
   252         "id": "http://lexvo.org/id/iso639-3/bwa",
       
   253         "name": "Bwatoo (bwa)",
       
   254       }
       
   255     ]
       
   256   }
       
   257  ]
       
   258 };
       
   259 
       
   260 export default Ember.Service.extend({
       
   261   OLAC_ROLES: OLAC_ROLES,
       
   262   KEY_CODES: KEY_CODES,
       
   263   VIAF_BASE_URL: "http://viaf.org/viaf/",
       
   264   LEXVO_BASE_URL: "http://lexvo.org/id/iso639-3/",
       
   265   LANGUAGES_TREEMAP: LANGUAGES_TREEMAP
       
   266 });