forked from goldendict/goldendict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrussiantranslit.cc
112 lines (101 loc) · 2.29 KB
/
russiantranslit.cc
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/* This file is (c) 2008-2012 Konstantin Isakov <[email protected]>
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include "russiantranslit.hh"
#include "transliteration.hh"
#include <QCoreApplication>
namespace RussianTranslit {
class RussianTable: public Transliteration::Table
{
public:
RussianTable();
};
RussianTable::RussianTable()
{
// Utf8
// Lowercase
ins( "a", "а" );
ins( "b", "б" );
ins( "v", "в" );
ins( "w", "в" );
ins( "g", "г" );
ins( "d", "д" );
ins( "e", "е" );
ins( "yo", "ё" );
ins( "zh", "ж" );
ins( "z", "з" );
ins( "i", "и" );
ins( "j", "й" );
ins( "k", "к" );
ins( "l", "л" );
ins( "m", "м" );
ins( "n", "н" );
ins( "o", "о" );
ins( "p", "п" );
ins( "r", "р" );
ins( "s", "с" );
ins( "t", "т" );
ins( "u", "у" );
ins( "f", "ф" );
ins( "h", "х" );
ins( "ts", "ц" );
ins( "c", "ц" );
ins( "ch", "ч" );
ins( "sh", "ш" );
ins( "shch", "щ" );
ins( "\"", "ъ" );
ins( "y", "ы" );
ins( "'", "ь" );
ins( "'e", "э" );
ins( "yu", "ю" );
ins( "ya", "я" );
// Uppercase
ins( "A", "А" );
ins( "B", "Б" );
ins( "V", "В" );
ins( "W", "В" );
ins( "G", "Г" );
ins( "D", "Д" );
ins( "E", "Е" );
ins( "YO", "Ё" );
ins( "Yo", "Ё" );
ins( "ZH", "Ж" );
ins( "Zh", "Ж" );
ins( "Z", "З" );
ins( "I", "И" );
ins( "J", "Й" );
ins( "K", "К" );
ins( "L", "Л" );
ins( "M", "М" );
ins( "N", "Н" );
ins( "O", "О" );
ins( "P", "П" );
ins( "R", "Р" );
ins( "S", "С" );
ins( "T", "Т" );
ins( "U", "У" );
ins( "F", "Ф" );
ins( "H", "Х" );
ins( "TS", "Ц" );
ins( "Ts", "Ц" );
ins( "C", "Ц" );
ins( "CH", "Ч" );
ins( "Ch", "Ч" );
ins( "SH", "Ш" );
ins( "Sh", "Ш" );
ins( "SHCH", "Щ" );
ins( "ShCh", "Щ" );
ins( "Y", "Ы" );
ins( "'E", "Э" );
ins( "YU", "Ю" );
ins( "Yu", "Ю" );
ins( "YA", "Я" );
ins( "Ya", "Я" );
}
sptr< Dictionary::Class > makeDictionary() throw( std::exception )
{
static RussianTable t;
return new Transliteration::TransliterationDictionary( "cf1b74acd98adea9b2bba16af38f1086",
QCoreApplication::translate( "RussianTranslit", "Russian Transliteration" ).toUtf8().data(),
QIcon( ":/flags/ru.png" ), t );
}
}