Debian Codegraph @

demo/i18n.html

raw
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6 <title>ACE Editor StatusBar Demo</title>
7 <style type="text/css" media="screen">
8 body {
9 overflow: hidden;
10 }
11
12 #editor {
13 margin: 0;
14 position: absolute;
15 top: 2em;
16 bottom: 0;
17 left: 0;
18 right: 0;
19 }
20 #statusBar {
21 margin: 0;
22 padding: 0;
23 position: absolute;
24 left: 0;
25 right: 0;
26 bottom: 0;
27 height: 20px;
28 background-color: rgb(245, 245, 245);
29 color: gray;
30 }
31 .ace_status-indicator {
32 color: gray;
33 position: absolute;
34 right: 0;
35 border-left: 1px solid;
36 }
37 </style>
38 </head>
39 <body>
40 <a href="?lang=Ru">Russian</a> &nbsp;
41 <a href="?lang=Am">Armenian</a>&nbsp;
42 <a href="?lang=En">English</a>&nbsp;
43 <a href="?lang=Es">Spanish</a>&nbsp;
44 <pre id="editor"></pre>
45
46 <script src="kitchen-sink/require.js"></script>
47 <script>
48 // setup paths
49 require.config({paths: { "ace" : "../src"}});
50 // load ace and extensions
51 require(["ace/ace", "ace/ext/searchbox", "ace/ext/language_tools"], function(ace) {
52 var messagesRussian = {
53 "$id": "ru",
54
55 "Search for": "Найти",
56 "All": "Все",
57 "Replace with": "Заменить",
58 "Replace": "Заменить",
59 "Toggle Replace mode": "Перейти в режим поиска",
60 "RegExp Search": "Поиск по регулярному выражению",
61 "CaseSensitive Search": "",
62 "Whole Word Search": "",
63 "Search In Selection": "Искать в выделенном",
64 "$0 of $1": "$0 из $1",
65
66 "Looks good!": "Нет ошибок",
67
68 "Recently used": "Недавно использованные",
69 "Other commands": "Другие команды",
70 "No matching commands": "Нет подходящих команд",
71
72 "Autocomplete suggestions": "Предложения автозаполнения",
73
74 "Cursor at row $0": "",
75 "Toggle code folding, rows $0 through $1": "",
76 "Toggle code folding, row $0": "",
77 "Unfold code": "",
78 "Fold code": "",
79 "Read annotations row $0": "",
80
81 "error": "ошибка",
82 "errors": "ошибки",
83 "warning": "предупреждение",
84 "warnings": "предупреждения",
85 "information message": "информационное сообщение",
86 "information messages": "информационные сообщения"
87 };
88
89 var messagesArmenian = {
90 "$id": "am",
91
92 "Search for": "Փնտրել",
93 "All": "Բոլորը",
94 "Replace with": "Փոխարինել",
95 "Replace": "Փոխարինել",
96 "Toggle Replace mode": "",
97 "RegExp Search": "Փնտրել ռեգեքսպով",
98 "CaseSensitive Search": "",
99 "Whole Word Search": "Ամբողջ բառեր",
100 "Search In Selection": "Փնտրել նշվածում",
101 "$0 of $1": "$1-ից $0",
102
103 "Looks good!": "Սխալ չկա",
104
105 "Recently used": "Վերջերս օգտագործված",
106 "Other commands": "Այլ հրամաններ",
107 "No matching commands": "Չկան համապատասխան հրամաններ",
108
109 "Autocomplete suggestions": "Ավտոմատ լրացման առաջարկներ",
110
111 "Cursor at row $0": "",
112 "Toggle code folding, rows $0 through $1": "",
113 "Toggle code folding, row $0": "",
114 "Unfold code": "",
115 "Fold code": "",
116 "Read annotations row $0": "",
117
118 "error": "սխալ",
119 "errors": "սխալներ",
120 "warning": "նախազգուշացում",
121 "warnings": "նախազգուշացումներ",
122 "information message": "տեղեկատվություն",
123 "information messages": "տեղեկատվություններ"
124 };
125
126 var messagesSpanish = {
127 "$id": "es",
128 "Autocomplete suggestions": "Sugerencias de autocompletar",
129 "editor": "editor",
130 "Editor content, press Enter to start editing, press Escape to exit": "Contenido del editor, presiona Entrar para empezar a editar, presiona Escape para salir",
131 "Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit": "Canaleta de editor, presiona Entrar para por, presiona Escape para salir",
132 "Looks good!": "¡Parece bien!",
133 "Recently used": "Usado recientemente",
134 "Other commands": "Otros mandos",
135 "No matching commands": "No hay mandos que hacen juego",
136 "Search for": "Buscar",
137 "All": "Todo",
138 "Replace with": "Reemplazar con",
139 "Replace": "Reemplazar",
140 "Toggle Replace mode": "Pasar el modo de reemplazar",
141 "RegExp Search": "Búsqueda de RegExp",
142 "CaseSensitive Search": "Búsqueda sensible a mayúsculas y minúsculas",
143 "Whole Word Search": "Búsqueda de palabras enteras",
144 "Search In Selection": "Buscar en la selección",
145 "$0 of $1": "$0 de $1",
146 "Cursor at row $0": "Cursor en row $0",
147 "Unfold rows $0 to $1": "Desplegar las filas desde $0 hasta $1",
148 "Unfold code": "Desplegar el codigo",
149 "Fold at row $0": "Plegar en fila $0",
150 "Toggle code folding, rows $0 through $1": "",
151 "Toggle code folding, row $0": "",
152 "Fold code": "Plegar el codigo",
153 "Read annotations row $0": "Leer anotaciones fila $0",
154 "error": "error",
155 "errors": "errores",
156 "warning": "advertencia",
157 "warnings": "advertencias",
158 "information message": "mensaje de informacion",
159 "information messages": "mensajes de informacion"
160 }
161
162
163
164 if (/lang=ru/i.test(location.href)) {
165 ace.config.setMessages(messagesRussian);
166 } else if (/lang=en/i.test(location.href)) {
167 ace.config.setMessages();
168 } else if (/lang=es/i.test(location.href)) {
169 ace.config.setMessages(messagesSpanish)
170 } else {
171 ace.config.setMessages(messagesArmenian);
172 }
173
174 var editor = ace.edit("editor", {
175 mode: "ace/mode/html"
176 });
177
178 editor.execCommand("find");
179 setTimeout(function() {
180 editor.execCommand("goToNextError");
181 }, 2000);
182 });
183 </script>
184
185 <script src="./show_own_source.js"></script>
186 </body>
187 </html>