/**
* A module to assist with translating data values that may be helpful when interacting with xMatters.
*
* @module dictionary
*/
/**
* Country dictionary to convert between country code and country name as defined in xMatters.
*/
const country = {
nameByCode: {
al: 'Albania',
dz: 'Algeria',
as: 'American Samoa',
ad: 'Andorra',
ao: 'Angola',
ai: 'Anguilla',
ag: 'Antigua and Barbuda',
ar: 'Argentina',
am: 'Armenia',
aw: 'Aruba',
au: 'Australia',
at: 'Austria',
az: 'Azerbaijan',
bs: 'Bahamas',
bh: 'Bahrain',
bd: 'Bangladesh',
bb: 'Barbados',
by: 'Belarus',
be: 'Belgium',
bz: 'Belize',
bj: 'Benin',
bm: 'Bermuda',
bt: 'Bhutan',
bo: 'Bolivia',
ba: 'Bosnia and Herzegovina',
bw: 'Botswana',
br: 'Brazil',
bn: 'Brunei Darussalam',
bg: 'Bulgaria',
bf: 'Burkina Faso',
bi: 'Burundi',
kh: 'Cambodia',
cm: 'Cameroon',
ca: 'Canada',
cv: 'Cape Verde',
ky: 'Cayman Islands',
cf: 'Central African Republic',
td: 'Chad',
cl: 'Chile',
cn: 'China',
co: 'Colombia',
km: 'Comoros',
cg: 'Congo',
cd: 'Congo, The Democratic Republic of the',
ck: 'Cook Islands',
cr: 'Costa Rica',
ci: "Cote d'Ivoire",
hr: 'Croatia',
cu: 'Cuba',
cy: 'Cyprus',
cz: 'Czech Republic',
dk: 'Denmark',
dj: 'Djibouti',
dm: 'Dominica',
do: 'Dominican Republic',
ec: 'Ecuador',
eg: 'Egypt',
sv: 'El Salvador',
gq: 'Equatorial Guinea',
er: 'Eritrea',
ee: 'Estonia',
et: 'Ethiopia',
fk: 'Falkland Islands (Malvinas)',
fo: 'Faroe Islands',
fj: 'Fiji',
fi: 'Finland',
fr: 'France',
gf: 'French Guiana',
pf: 'French Polynesia',
ga: 'Gabon',
gm: 'Gambia',
ge: 'Georgia',
de: 'Germany',
gh: 'Ghana',
gi: 'Gibraltar',
gr: 'Greece',
gl: 'Greenland',
gd: 'Grenada',
gu: 'Guam',
gt: 'Guatemala',
gg: 'Guernsey',
gn: 'Guinea',
gw: 'Guinea-Bissau',
gy: 'Guyana',
ht: 'Haiti',
va: 'Holy See (Vatican City State)',
hn: 'Honduras',
hk: 'Hong Kong',
hu: 'Hungary',
is: 'Iceland',
in: 'India',
id: 'Indonesia',
ir: 'Iran, Islamic Republic of',
iq: 'Iraq',
ie: 'Ireland',
im: 'Isle of Man',
il: 'Israel',
it: 'Italy',
jm: 'Jamaica',
jp: 'Japan',
je: 'Jersey',
jo: 'Jordan',
kz: 'Kazakhstan',
ke: 'Kenya',
ki: 'Kiribati',
kp: "Korea, Democratic People's Republic of",
kr: 'Korea, Republic of',
kw: 'Kuwait',
kg: 'Kyrgyzstan',
la: "Lao People's Democratic Republic",
lv: 'Latvia',
lb: 'Lebanon',
ls: 'Lesotho',
lr: 'Liberia',
ly: 'Libyan Arab Jamahiriya',
li: 'Liechtenstein',
lt: 'Lithuania',
lu: 'Luxembourg',
mo: 'Macao',
mk: 'Macedonia, The former Yugoslav Republic of',
mg: 'Madagascar',
mw: 'Malawi',
my: 'Malaysia',
mv: 'Maldives',
ml: 'Mali',
mt: 'Malta',
mh: 'Marshall Islands',
mq: 'Martinique',
mr: 'Mauritania',
mu: 'Mauritius',
yt: 'Mayotte',
mx: 'Mexico',
fm: 'Micronesia, Federated States of',
md: 'Moldova, Republic of',
mc: 'Monaco',
mn: 'Mongolia',
me: 'Montenegro',
ms: 'Montserrat',
ma: 'Morocco',
mz: 'Mozambique',
mm: 'Myanmar',
na: 'Namibia',
nr: 'Nauru',
np: 'Nepal',
nl: 'Netherlands',
nc: 'New Caledonia',
nz: 'New Zealand',
ni: 'Nicaragua',
ne: 'Niger',
ng: 'Nigeria',
nu: 'Niue',
mp: 'Northern Mariana Islands',
no: 'Norway',
om: 'Oman',
pk: 'Pakistan',
pw: 'Palau',
ps: 'Palestine',
pa: 'Panama',
pg: 'Papua New Guinea',
py: 'Paraguay',
pe: 'Peru',
ph: 'Philippines',
pl: 'Poland',
pt: 'Portugal',
pr: 'Puerto Rico',
qa: 'Qatar',
re: 'Réunion',
ro: 'Romania',
ru: 'Russian Federation',
rw: 'Rwanda',
sh: 'Saint Helena',
kn: 'Saint Kitts and Nevis',
pm: 'Saint Pierre and Miquelon',
ws: 'Samoa',
sm: 'San Marino',
st: 'Sao Tome and Principe',
sa: 'Saudi Arabia',
sn: 'Senegal',
rs: 'Serbia',
sc: 'Seychelles',
sl: 'Sierra Leone',
sg: 'Singapore',
sk: 'Slovakia',
si: 'Slovenia',
sb: 'Solomon Islands',
so: 'Somalia',
za: 'South Africa',
es: 'Spain',
lk: 'Sri Lanka',
sd: 'Sudan',
sr: 'Suriname',
sz: 'Swaziland',
se: 'Sweden',
ch: 'Switzerland',
sy: 'Syrian Arab Republic',
tw: 'Taiwan',
tj: 'Tajikistan',
tz: 'Tanzania, United Republic of',
th: 'Thailand',
tg: 'Togo',
tk: 'Tokelau',
to: 'Tonga',
tt: 'Trinidad and Tobago',
tn: 'Tunisia',
tr: 'Turkey',
tm: 'Turkmenistan',
tv: 'Tuvalu',
ug: 'Uganda',
ua: 'Ukraine',
ae: 'United Arab Emirates',
gb: 'United Kingdom',
us: 'United States',
uy: 'Uruguay',
uz: 'Uzbekistan',
vu: 'Vanuatu',
ve: 'Venezuela',
vn: 'Viet Nam',
vg: 'Virgin Islands, British',
vi: 'Virgin Islands, U.S.',
wf: 'Wallis and Futuna',
zm: 'Zambia',
zw: 'Zimbabwe'
},
codeByName: {
Albania: 'al',
Algeria: 'dz',
'American Samoa': 'as',
Andorra: 'ad',
Angola: 'ao',
Anguilla: 'ai',
'Antigua and Barbuda': 'ag',
Argentina: 'ar',
Armenia: 'am',
Aruba: 'aw',
Australia: 'au',
Austria: 'at',
Azerbaijan: 'az',
Bahamas: 'bs',
Bahrain: 'bh',
Bangladesh: 'bd',
Barbados: 'bb',
Belarus: 'by',
Belgium: 'be',
Belize: 'bz',
Benin: 'bj',
Bermuda: 'bm',
Bhutan: 'bt',
Bolivia: 'bo',
'Bosnia and Herzegovina': 'ba',
Botswana: 'bw',
Brazil: 'br',
'Brunei Darussalam': 'bn',
Bulgaria: 'bg',
'Burkina Faso': 'bf',
Burundi: 'bi',
Cambodia: 'kh',
Cameroon: 'cm',
Canada: 'ca',
'Cape Verde': 'cv',
'Cayman Islands': 'ky',
'Central African Republic': 'cf',
Chad: 'td',
Chile: 'cl',
China: 'cn',
Colombia: 'co',
Comoros: 'km',
Congo: 'cg',
'Congo, The Democratic Republic of the': 'cd',
'Cook Islands': 'ck',
'Costa Rica': 'cr',
"Cote d'Ivoire": 'ci',
Croatia: 'hr',
Cuba: 'cu',
Cyprus: 'cy',
'Czech Republic': 'cz',
Denmark: 'dk',
Djibouti: 'dj',
Dominica: 'dm',
'Dominican Republic': 'do',
Ecuador: 'ec',
Egypt: 'eg',
'El Salvador': 'sv',
'Equatorial Guinea': 'gq',
Eritrea: 'er',
Estonia: 'ee',
Ethiopia: 'et',
'Falkland Islands (Malvinas)': 'fk',
'Faroe Islands': 'fo',
Fiji: 'fj',
Finland: 'fi',
France: 'fr',
'French Guiana': 'gf',
'French Polynesia': 'pf',
Gabon: 'ga',
Gambia: 'gm',
Georgia: 'ge',
Germany: 'de',
Ghana: 'gh',
Gibraltar: 'gi',
Greece: 'gr',
Greenland: 'gl',
Grenada: 'gd',
Guam: 'gu',
Guatemala: 'gt',
Guernsey: 'gg',
Guinea: 'gn',
'Guinea-Bissau': 'gw',
Guyana: 'gy',
Haiti: 'ht',
'Holy See (Vatican City State)': 'va',
Honduras: 'hn',
'Hong Kong': 'hk',
Hungary: 'hu',
Iceland: 'is',
India: 'in',
Indonesia: 'id',
'Iran, Islamic Republic of': 'ir',
Iraq: 'iq',
Ireland: 'ie',
'Isle of Man': 'im',
Israel: 'il',
Italy: 'it',
Jamaica: 'jm',
Japan: 'jp',
Jersey: 'je',
Jordan: 'jo',
Kazakhstan: 'kz',
Kenya: 'ke',
Kiribati: 'ki',
"Korea, Democratic People's Republic of": 'kp',
'Korea, Republic of': 'kr',
Kuwait: 'kw',
Kyrgyzstan: 'kg',
"Lao People's Democratic Republic": 'la',
Latvia: 'lv',
Lebanon: 'lb',
Lesotho: 'ls',
Liberia: 'lr',
'Libyan Arab Jamahiriya': 'ly',
Liechtenstein: 'li',
Lithuania: 'lt',
Luxembourg: 'lu',
Macao: 'mo',
'Macedonia, The former Yugoslav Republic of': 'mk',
Madagascar: 'mg',
Malawi: 'mw',
Malaysia: 'my',
Maldives: 'mv',
Mali: 'ml',
Malta: 'mt',
'Marshall Islands': 'mh',
Martinique: 'mq',
Mauritania: 'mr',
Mauritius: 'mu',
Mayotte: 'yt',
Mexico: 'mx',
'Micronesia, Federated States of': 'fm',
'Moldova, Republic of': 'md',
Monaco: 'mc',
Mongolia: 'mn',
Montenegro: 'me',
Montserrat: 'ms',
Morocco: 'ma',
Mozambique: 'mz',
Myanmar: 'mm',
Namibia: 'na',
Nauru: 'nr',
Nepal: 'np',
Netherlands: 'nl',
'New Caledonia': 'nc',
'New Zealand': 'nz',
Nicaragua: 'ni',
Niger: 'ne',
Nigeria: 'ng',
Niue: 'nu',
'Northern Mariana Islands': 'mp',
Norway: 'no',
Oman: 'om',
Pakistan: 'pk',
Palau: 'pw',
Palestine: 'ps',
Panama: 'pa',
'Papua New Guinea': 'pg',
Paraguay: 'py',
Peru: 'pe',
Philippines: 'ph',
Poland: 'pl',
Portugal: 'pt',
'Puerto Rico': 'pr',
Qatar: 'qa',
Réunion: 're',
Romania: 'ro',
'Russian Federation': 'ru',
Rwanda: 'rw',
'Saint Helena': 'sh',
'Saint Kitts and Nevis': 'kn',
'Saint Pierre and Miquelon': 'pm',
Samoa: 'ws',
'San Marino': 'sm',
'Sao Tome and Principe': 'st',
'Saudi Arabia': 'sa',
Senegal: 'sn',
Serbia: 'rs',
Seychelles: 'sc',
'Sierra Leone': 'sl',
Singapore: 'sg',
Slovakia: 'sk',
Slovenia: 'si',
'Solomon Islands': 'sb',
Somalia: 'so',
'South Africa': 'za',
Spain: 'es',
'Sri Lanka': 'lk',
Sudan: 'sd',
Suriname: 'sr',
Swaziland: 'sz',
Sweden: 'se',
Switzerland: 'ch',
'Syrian Arab Republic': 'sy',
Taiwan: 'tw',
Tajikistan: 'tj',
'Tanzania, United Republic of': 'tz',
Thailand: 'th',
Togo: 'tg',
Tokelau: 'tk',
Tonga: 'to',
'Trinidad and Tobago': 'tt',
Tunisia: 'tn',
Turkey: 'tr',
Turkmenistan: 'tm',
Tuvalu: 'tv',
Uganda: 'ug',
Ukraine: 'ua',
'United Arab Emirates': 'ae',
'United Kingdom': 'gb',
'United States': 'us',
Uruguay: 'uy',
Uzbekistan: 'uz',
Vanuatu: 'vu',
Venezuela: 've',
'Viet Nam': 'vn',
'Virgin Islands, British': 'vg',
'Virgin Islands, U.S.': 'vi',
'Wallis and Futuna': 'wf',
Zambia: 'zm',
Zimbabwe: 'zw'
}
};
/**
* Language dictionary to convert between language code and language name as defined in xMatters.
*/
const language = {
nameByCode: {
sq: 'Albanian',
ar: 'Arabic',
be: 'Belarusian',
pt_BR: 'Brazillian Portuguese',
bg: 'Bulgarian',
zh_HK: 'Cantonese',
ca: 'Catalan',
hr: 'Croatian',
cs: 'Czech',
da: 'Danish',
en: 'English',
en_GB: 'English UK',
et: 'Estonian',
fi: 'Finnish',
fr: 'French',
de: 'German',
el: 'Greek',
he: 'Hebrew',
hi: 'Hindi',
hu: 'Hungarian',
is: 'Icelandic',
it: 'Italian',
ja: 'Japanese',
ko: 'Korean',
lv: 'Latvian',
lt: 'Lithuanian',
mk: 'Macedonian',
zh_CN: 'Madarin',
no: 'Norwegian',
pl: 'Polish',
pt: 'Portuguese',
ro: 'Romanian',
ru: 'Russian',
sk: 'Slovak',
sl: 'Slovenian',
es: 'Spanish',
sv: 'Swedish',
th: 'Thai',
tr: 'Turkish',
uk: 'Ukrainian',
vi: 'Vietnamese'
},
codeByName: {
Albanian: 'sq',
Arabic: 'ar',
Belarusian: 'be',
'Brazillian Portuguese': 'pt_BR',
Bulgarian: 'bg',
Cantonese: 'zh_HK',
Catalan: 'ca',
Croatian: 'hr',
Czech: 'cs',
Danish: 'da',
English: 'en',
'English UK': 'en_GB',
Estonian: 'et',
Finnish: 'fi',
French: 'fr',
German: 'de',
Greek: 'el',
Hebrew: 'he',
Hindi: 'hi',
Hungarian: 'hu',
Icelandic: 'is',
Italian: 'it',
Japanese: 'ja',
Korean: 'ko',
Latvian: 'lv',
Lithuanian: 'lt',
Macedonian: 'mk',
Madarin: 'zh_CN',
Norwegian: 'no',
Polish: 'pl',
Portuguese: 'pt',
Romanian: 'ro',
Russian: 'ru',
Slovak: 'sk',
Slovenian: 'sl',
Spanish: 'es',
Swedish: 'sv',
Thai: 'th',
Turkish: 'tr',
Ukrainian: 'uk',
Vietnamese: 'vi'
}
};
exports.country = country;
exports.language = language;
Source