Commit 552556a96b7c089a684c3bce242b163e14cde88e

Authored by Peter Zhigalov
1 parent 1da4b114

Добавил русскую локализацию в проект с Qt

fem_draw_qt.pro
... ... @@ -38,7 +38,14 @@ HEADERS += \
38 38 FORMS += \
39 39 src_qt/mainwindow.ui
40 40  
41   -RESOURCES += resources/icon.qrc
  41 +TRANSLATIONS += \
  42 + src_qt/l10ns/fem_draw_qt_en.ts \
  43 + src_qt/l10ns/fem_draw_qt_ru.ts
  44 +
  45 +RESOURCES += \
  46 + resources/icon.qrc \
  47 + src_qt/l10ns/l10ns.qrc
  48 +
42 49 QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
43 50  
44 51 win32 {
... ...
src_qt/l10ns/fem_draw_qt_en.qm 0 → 100644
No preview for this file type
src_qt/l10ns/fem_draw_qt_en.ts 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!DOCTYPE TS>
  3 +<TS version="2.0" language="en_US">
  4 +<context>
  5 + <name>Dock</name>
  6 + <message>
  7 + <location filename="../mainwindow.cpp" line="624"/>
  8 + <source>New Window</source>
  9 + <translation type="unfinished">New Window</translation>
  10 + </message>
  11 +</context>
  12 +<context>
  13 + <name>MainWindow</name>
  14 + <message>
  15 + <location filename="../mainwindow.ui" line="41"/>
  16 + <source>Draw color image</source>
  17 + <translation type="unfinished">Draw color image</translation>
  18 + </message>
  19 + <message>
  20 + <location filename="../mainwindow.ui" line="44"/>
  21 + <source>Color</source>
  22 + <translation type="unfinished">Color</translation>
  23 + </message>
  24 + <message>
  25 + <location filename="../mainwindow.ui" line="57"/>
  26 + <source>Data component for colors and isolines</source>
  27 + <translation type="unfinished">Data component for colors and isolines</translation>
  28 + </message>
  29 + <message>
  30 + <location filename="../mainwindow.ui" line="70"/>
  31 + <source>Draw isolines</source>
  32 + <translation type="unfinished">Draw isolines</translation>
  33 + </message>
  34 + <message>
  35 + <location filename="../mainwindow.ui" line="73"/>
  36 + <location filename="../mainwindow.ui" line="227"/>
  37 + <source>Isolines</source>
  38 + <translation type="unfinished">Isolines</translation>
  39 + </message>
  40 + <message>
  41 + <location filename="../mainwindow.ui" line="86"/>
  42 + <source>Number of isolines</source>
  43 + <translation type="unfinished">Number of isolines</translation>
  44 + </message>
  45 + <message>
  46 + <location filename="../mainwindow.ui" line="99"/>
  47 + <source>Draw vectors</source>
  48 + <translation type="unfinished">Draw vectors</translation>
  49 + </message>
  50 + <message>
  51 + <location filename="../mainwindow.ui" line="102"/>
  52 + <location filename="../mainwindow.ui" line="235"/>
  53 + <source>Vectors</source>
  54 + <translation type="unfinished">Vectors</translation>
  55 + </message>
  56 + <message>
  57 + <location filename="../mainwindow.ui" line="115"/>
  58 + <source>Draw vectors for every i value</source>
  59 + <translation type="unfinished">Draw vectors for every i value</translation>
  60 + </message>
  61 + <message>
  62 + <location filename="../mainwindow.ui" line="128"/>
  63 + <source>Data component for first vector axis</source>
  64 + <translation type="unfinished">Data component for first vector axis</translation>
  65 + </message>
  66 + <message>
  67 + <location filename="../mainwindow.ui" line="141"/>
  68 + <source>Data component for second vector axis</source>
  69 + <translation type="unfinished">Data component for second vector axis</translation>
  70 + </message>
  71 + <message>
  72 + <location filename="../mainwindow.ui" line="154"/>
  73 + <source>U:</source>
  74 + <translation type="unfinished">U:</translation>
  75 + </message>
  76 + <message>
  77 + <location filename="../mainwindow.ui" line="167"/>
  78 + <source>V:</source>
  79 + <translation type="unfinished">V:</translation>
  80 + </message>
  81 + <message>
  82 + <location filename="../mainwindow.ui" line="182"/>
  83 + <source>File</source>
  84 + <translation type="unfinished">File</translation>
  85 + </message>
  86 + <message>
  87 + <location filename="../mainwindow.ui" line="195"/>
  88 + <source>Interpolation</source>
  89 + <translation type="unfinished">Interpolation</translation>
  90 + </message>
  91 + <message>
  92 + <location filename="../mainwindow.ui" line="202"/>
  93 + <location filename="../mainwindow.cpp" line="677"/>
  94 + <source>About</source>
  95 + <translation type="unfinished">About</translation>
  96 + </message>
  97 + <message>
  98 + <location filename="../mainwindow.ui" line="210"/>
  99 + <source>Configuration</source>
  100 + <translation type="unfinished">Configuration</translation>
  101 + </message>
  102 + <message>
  103 + <location filename="../mainwindow.ui" line="214"/>
  104 + <source>Language</source>
  105 + <translation type="unfinished">Language</translation>
  106 + </message>
  107 + <message>
  108 + <location filename="../mainwindow.ui" line="252"/>
  109 + <location filename="../mainwindow.ui" line="255"/>
  110 + <source>Open Tecplot File...</source>
  111 + <translation type="unfinished">Open Tecplot File...</translation>
  112 + </message>
  113 + <message>
  114 + <location filename="../mainwindow.ui" line="258"/>
  115 + <source>Ctrl+O</source>
  116 + <translation type="unfinished"></translation>
  117 + </message>
  118 + <message>
  119 + <location filename="../mainwindow.ui" line="263"/>
  120 + <source>Copy Image to Clipboard</source>
  121 + <translation type="unfinished">Copy Image to Clipboard</translation>
  122 + </message>
  123 + <message>
  124 + <location filename="../mainwindow.ui" line="266"/>
  125 + <source>Ctrl+C</source>
  126 + <translation type="unfinished"></translation>
  127 + </message>
  128 + <message>
  129 + <location filename="../mainwindow.ui" line="271"/>
  130 + <location filename="../mainwindow.ui" line="274"/>
  131 + <source>Save Image File...</source>
  132 + <translation type="unfinished">Save Image File...</translation>
  133 + </message>
  134 + <message>
  135 + <location filename="../mainwindow.ui" line="277"/>
  136 + <source>Ctrl+S</source>
  137 + <translation type="unfinished"></translation>
  138 + </message>
  139 + <message>
  140 + <location filename="../mainwindow.ui" line="282"/>
  141 + <source>New Window</source>
  142 + <translation type="unfinished">New Window</translation>
  143 + </message>
  144 + <message>
  145 + <location filename="../mainwindow.ui" line="287"/>
  146 + <source>Exit</source>
  147 + <translation type="unfinished">Exit</translation>
  148 + </message>
  149 + <message>
  150 + <location filename="../mainwindow.ui" line="290"/>
  151 + <source>Ctrl+Q</source>
  152 + <translation type="unfinished"></translation>
  153 + </message>
  154 + <message>
  155 + <location filename="../mainwindow.ui" line="298"/>
  156 + <source>Increase Interpolation</source>
  157 + <translation type="unfinished">Increase Interpolation</translation>
  158 + </message>
  159 + <message>
  160 + <location filename="../mainwindow.ui" line="301"/>
  161 + <source>Increase number of interpolation (bilinear)</source>
  162 + <translation type="unfinished">Increase number of interpolation (bilinear)</translation>
  163 + </message>
  164 + <message>
  165 + <location filename="../mainwindow.ui" line="304"/>
  166 + <source>=</source>
  167 + <translation type="unfinished"></translation>
  168 + </message>
  169 + <message>
  170 + <location filename="../mainwindow.ui" line="309"/>
  171 + <source>Decrease Interpolation</source>
  172 + <translation type="unfinished">Decrease Interpolation</translation>
  173 + </message>
  174 + <message>
  175 + <location filename="../mainwindow.ui" line="312"/>
  176 + <source>Decrease number of interpolation (bilinear)</source>
  177 + <translation type="unfinished">Decrease number of interpolation (bilinear)</translation>
  178 + </message>
  179 + <message>
  180 + <location filename="../mainwindow.ui" line="315"/>
  181 + <source>-</source>
  182 + <translation type="unfinished"></translation>
  183 + </message>
  184 + <message>
  185 + <location filename="../mainwindow.ui" line="320"/>
  186 + <source>About FEM Draw...</source>
  187 + <translation type="unfinished">About FEM Draw...</translation>
  188 + </message>
  189 + <message>
  190 + <location filename="../mainwindow.ui" line="328"/>
  191 + <source>About Third Party Libraries...</source>
  192 + <translation type="unfinished">About Third Party Libraries...</translation>
  193 + </message>
  194 + <message>
  195 + <location filename="../mainwindow.ui" line="336"/>
  196 + <source>About Qt...</source>
  197 + <translation type="unfinished">About Qt...</translation>
  198 + </message>
  199 + <message>
  200 + <location filename="../mainwindow.ui" line="347"/>
  201 + <source>Transparent Image</source>
  202 + <translation type="unfinished">Transparent Image</translation>
  203 + </message>
  204 + <message>
  205 + <location filename="../mainwindow.ui" line="355"/>
  206 + <source>Show Isolines</source>
  207 + <translation type="unfinished">Show Isolines</translation>
  208 + </message>
  209 + <message>
  210 + <location filename="../mainwindow.ui" line="360"/>
  211 + <source>Isolines Color...</source>
  212 + <translation type="unfinished">Isolines Color...</translation>
  213 + </message>
  214 + <message>
  215 + <location filename="../mainwindow.ui" line="365"/>
  216 + <source>Isolines Width...</source>
  217 + <translation type="unfinished">Isolines Width...</translation>
  218 + </message>
  219 + <message>
  220 + <location filename="../mainwindow.ui" line="373"/>
  221 + <source>Show Vectors</source>
  222 + <translation type="unfinished">Show Vectors</translation>
  223 + </message>
  224 + <message>
  225 + <location filename="../mainwindow.ui" line="378"/>
  226 + <source>Vectors Color...</source>
  227 + <translation type="unfinished">Vectors Color...</translation>
  228 + </message>
  229 + <message>
  230 + <location filename="../mainwindow.ui" line="383"/>
  231 + <source>Vectors Width...</source>
  232 + <translation type="unfinished">Vectors Width...</translation>
  233 + </message>
  234 + <message>
  235 + <location filename="../mainwindow.ui" line="388"/>
  236 + <source>Vectors Length...</source>
  237 + <translation type="unfinished">Vectors Length...</translation>
  238 + </message>
  239 + <message>
  240 + <location filename="../mainwindow.ui" line="393"/>
  241 + <source>Vectors Arrow Size...</source>
  242 + <translation type="unfinished">Vectors Arrow Size...</translation>
  243 + </message>
  244 + <message>
  245 + <location filename="../mainwindow.ui" line="401"/>
  246 + <source>English</source>
  247 + <translation type="unfinished">English</translation>
  248 + </message>
  249 + <message>
  250 + <location filename="../mainwindow.ui" line="409"/>
  251 + <source>Russian</source>
  252 + <translation type="unfinished">Russian</translation>
  253 + </message>
  254 + <message>
  255 + <location filename="../mainwindow.ui" line="417"/>
  256 + <source>Show Legend</source>
  257 + <translation type="unfinished">Show Legend</translation>
  258 + </message>
  259 + <message>
  260 + <location filename="../mainwindow.ui" line="425"/>
  261 + <source>Use Light Colors</source>
  262 + <translation type="unfinished">Use Light Colors</translation>
  263 + </message>
  264 + <message>
  265 + <location filename="../mainwindow.ui" line="433"/>
  266 + <source>Use Purple Colors</source>
  267 + <translation type="unfinished">Use Purple Colors</translation>
  268 + </message>
  269 + <message>
  270 + <location filename="../mainwindow.ui" line="441"/>
  271 + <source>1 GiB Memory Limit</source>
  272 + <translation type="unfinished">1 GiB Memory Limit</translation>
  273 + </message>
  274 + <message>
  275 + <location filename="../mainwindow.ui" line="14"/>
  276 + <location filename="../mainwindow.cpp" line="66"/>
  277 + <location filename="../mainwindow.cpp" line="137"/>
  278 + <location filename="../mainwindow.cpp" line="195"/>
  279 + <location filename="../mainwindow.cpp" line="678"/>
  280 + <source>FEM Draw</source>
  281 + <translation type="unfinished"></translation>
  282 + </message>
  283 + <message>
  284 + <location filename="../mainwindow.cpp" line="85"/>
  285 + <source>draw.png</source>
  286 + <translation type="unfinished"></translation>
  287 + </message>
  288 + <message>
  289 + <location filename="../mainwindow.cpp" line="217"/>
  290 + <source>Open Tecplot File</source>
  291 + <translation type="unfinished">Open Tecplot File</translation>
  292 + </message>
  293 + <message>
  294 + <location filename="../mainwindow.cpp" line="282"/>
  295 + <source>Images</source>
  296 + <translation type="unfinished">Images</translation>
  297 + </message>
  298 + <message>
  299 + <location filename="../mainwindow.cpp" line="291"/>
  300 + <source>Save Image File</source>
  301 + <translation type="unfinished">Save Image File</translation>
  302 + </message>
  303 + <message>
  304 + <location filename="../mainwindow.cpp" line="323"/>
  305 + <source>Generated with FEM Draw</source>
  306 + <translation type="unfinished"></translation>
  307 + </message>
  308 + <message>
  309 + <location filename="../mainwindow.cpp" line="404"/>
  310 + <location filename="../mainwindow.cpp" line="441"/>
  311 + <location filename="../mainwindow.cpp" line="456"/>
  312 + <location filename="../mainwindow.cpp" line="840"/>
  313 + <source>Error</source>
  314 + <translation type="unfinished">Error</translation>
  315 + </message>
  316 + <message>
  317 + <location filename="../mainwindow.cpp" line="405"/>
  318 + <source>Error: Can&apos;t save file</source>
  319 + <translation type="unfinished">Error: Can&apos;t save file</translation>
  320 + </message>
  321 + <message>
  322 + <location filename="../mainwindow.cpp" line="442"/>
  323 + <source>Error: Memory limit exceeded</source>
  324 + <translation type="unfinished">Error: Memory limit exceeded</translation>
  325 + </message>
  326 + <message>
  327 + <location filename="../mainwindow.cpp" line="457"/>
  328 + <source>Error: More than 10x interpolation is not supported</source>
  329 + <translation type="unfinished">Error: More than 10x interpolation is not supported</translation>
  330 + </message>
  331 + <message>
  332 + <location filename="../mainwindow.cpp" line="485"/>
  333 + <source>Select Isolines Color</source>
  334 + <translation type="unfinished">Select Isolines Color</translation>
  335 + </message>
  336 + <message>
  337 + <location filename="../mainwindow.cpp" line="500"/>
  338 + <location filename="../mainwindow.cpp" line="534"/>
  339 + <source>Width</source>
  340 + <translation type="unfinished">Width</translation>
  341 + </message>
  342 + <message>
  343 + <location filename="../mainwindow.cpp" line="500"/>
  344 + <source>Select Isolines Width:</source>
  345 + <translation type="unfinished">Select Isolines Width:</translation>
  346 + </message>
  347 + <message>
  348 + <location filename="../mainwindow.cpp" line="519"/>
  349 + <source>Select Vectors Color</source>
  350 + <translation type="unfinished">Select Vectors Color</translation>
  351 + </message>
  352 + <message>
  353 + <location filename="../mainwindow.cpp" line="534"/>
  354 + <source>Select Vectors Width:</source>
  355 + <translation type="unfinished">Select Vectors Width:</translation>
  356 + </message>
  357 + <message>
  358 + <location filename="../mainwindow.cpp" line="547"/>
  359 + <source>Length</source>
  360 + <translation type="unfinished">Length</translation>
  361 + </message>
  362 + <message>
  363 + <location filename="../mainwindow.cpp" line="547"/>
  364 + <source>Select Vectors Length:</source>
  365 + <translation type="unfinished">Select Vectors Length:</translation>
  366 + </message>
  367 + <message>
  368 + <location filename="../mainwindow.cpp" line="560"/>
  369 + <source>Arrow Size</source>
  370 + <translation type="unfinished">Arrow Size</translation>
  371 + </message>
  372 + <message>
  373 + <location filename="../mainwindow.cpp" line="560"/>
  374 + <source>Select Arrow Size:</source>
  375 + <translation type="unfinished">Select Arrow Size:</translation>
  376 + </message>
  377 + <message>
  378 + <location filename="../mainwindow.cpp" line="684"/>
  379 + <source>Peter Zhigalov</source>
  380 + <translation type="unfinished">Peter Zhigalov</translation>
  381 + </message>
  382 + <message>
  383 + <location filename="../mainwindow.cpp" line="699"/>
  384 + <source>About Third Party Libraries</source>
  385 + <translation type="unfinished">About Third Party Libraries</translation>
  386 + </message>
  387 + <message>
  388 + <location filename="../mainwindow.cpp" line="700"/>
  389 + <source>Third Party Libraries</source>
  390 + <translation type="unfinished">Third Party Libraries</translation>
  391 + </message>
  392 + <message>
  393 + <location filename="../mainwindow.cpp" line="717"/>
  394 + <source>Library</source>
  395 + <translation type="unfinished">Library</translation>
  396 + </message>
  397 + <message>
  398 + <location filename="../mainwindow.cpp" line="684"/>
  399 + <location filename="../mainwindow.cpp" line="717"/>
  400 + <source>License</source>
  401 + <translation type="unfinished">License</translation>
  402 + </message>
  403 + <message>
  404 + <location filename="../mainwindow.cpp" line="218"/>
  405 + <source>Tecplot Data Files</source>
  406 + <translation type="unfinished">Tecplot Data Files</translation>
  407 + </message>
  408 + <message>
  409 + <location filename="../mainwindow.cpp" line="218"/>
  410 + <source>All Files</source>
  411 + <translation type="unfinished">All Files</translation>
  412 + </message>
  413 + <message>
  414 + <location filename="../mainwindow.cpp" line="287"/>
  415 + <source>All Images</source>
  416 + <translation type="unfinished">All Images</translation>
  417 + </message>
  418 + <message>
  419 + <location filename="../mainwindow.cpp" line="717"/>
  420 + <source>Website</source>
  421 + <translation type="unfinished">Website</translation>
  422 + </message>
  423 + <message>
  424 + <location filename="../mainwindow.cpp" line="841"/>
  425 + <source>Error: You can open only one file simultaneously</source>
  426 + <translation type="unfinished">Error: You can open only one file simultaneously</translation>
  427 + </message>
  428 +</context>
  429 +<context>
  430 + <name>paintwidget</name>
  431 + <message>
  432 + <location filename="../paintwidget.cpp" line="24"/>
  433 + <source>Error</source>
  434 + <translation type="unfinished">Error</translation>
  435 + </message>
  436 + <message>
  437 + <location filename="../paintwidget.cpp" line="25"/>
  438 + <source>Error: Corrupted file</source>
  439 + <translation type="unfinished">Error: Corrupted file</translation>
  440 + </message>
  441 +</context>
  442 +</TS>
... ...
src_qt/l10ns/fem_draw_qt_ru.qm 0 → 100644
No preview for this file type
src_qt/l10ns/fem_draw_qt_ru.ts 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!DOCTYPE TS>
  3 +<TS version="2.0" language="ru_RU">
  4 +<context>
  5 + <name>Dock</name>
  6 + <message>
  7 + <location filename="../mainwindow.cpp" line="624"/>
  8 + <source>New Window</source>
  9 + <translation type="unfinished">Новое окно</translation>
  10 + </message>
  11 +</context>
  12 +<context>
  13 + <name>MainWindow</name>
  14 + <message>
  15 + <location filename="../mainwindow.ui" line="41"/>
  16 + <source>Draw color image</source>
  17 + <translation type="unfinished">Отрисовывать цветовую картину</translation>
  18 + </message>
  19 + <message>
  20 + <location filename="../mainwindow.ui" line="44"/>
  21 + <source>Color</source>
  22 + <translation type="unfinished">Цвет</translation>
  23 + </message>
  24 + <message>
  25 + <location filename="../mainwindow.ui" line="57"/>
  26 + <source>Data component for colors and isolines</source>
  27 + <translation type="unfinished">Компонета для отрисовки цветом и изолиниями</translation>
  28 + </message>
  29 + <message>
  30 + <location filename="../mainwindow.ui" line="70"/>
  31 + <source>Draw isolines</source>
  32 + <translation type="unfinished">Отрисовывать изолинии</translation>
  33 + </message>
  34 + <message>
  35 + <location filename="../mainwindow.ui" line="73"/>
  36 + <location filename="../mainwindow.ui" line="227"/>
  37 + <source>Isolines</source>
  38 + <translation type="unfinished">Изолинии</translation>
  39 + </message>
  40 + <message>
  41 + <location filename="../mainwindow.ui" line="86"/>
  42 + <source>Number of isolines</source>
  43 + <translation type="unfinished">Количество изолиний</translation>
  44 + </message>
  45 + <message>
  46 + <location filename="../mainwindow.ui" line="99"/>
  47 + <source>Draw vectors</source>
  48 + <translation type="unfinished">Отрисовывать векторное поле</translation>
  49 + </message>
  50 + <message>
  51 + <location filename="../mainwindow.ui" line="102"/>
  52 + <location filename="../mainwindow.ui" line="235"/>
  53 + <source>Vectors</source>
  54 + <translation type="unfinished">Векторы</translation>
  55 + </message>
  56 + <message>
  57 + <location filename="../mainwindow.ui" line="115"/>
  58 + <source>Draw vectors for every i value</source>
  59 + <translation type="unfinished">Отрисовывать векторы для каждого i-го значения</translation>
  60 + </message>
  61 + <message>
  62 + <location filename="../mainwindow.ui" line="128"/>
  63 + <source>Data component for first vector axis</source>
  64 + <translation type="unfinished">Компонента для оси абсцисс векторного поля</translation>
  65 + </message>
  66 + <message>
  67 + <location filename="../mainwindow.ui" line="141"/>
  68 + <source>Data component for second vector axis</source>
  69 + <translation type="unfinished">Компонента для оси ординат векторного поля</translation>
  70 + </message>
  71 + <message>
  72 + <location filename="../mainwindow.ui" line="154"/>
  73 + <source>U:</source>
  74 + <translation type="unfinished">U:</translation>
  75 + </message>
  76 + <message>
  77 + <location filename="../mainwindow.ui" line="167"/>
  78 + <source>V:</source>
  79 + <translation type="unfinished">V:</translation>
  80 + </message>
  81 + <message>
  82 + <location filename="../mainwindow.ui" line="182"/>
  83 + <source>File</source>
  84 + <translation type="unfinished">Файл</translation>
  85 + </message>
  86 + <message>
  87 + <location filename="../mainwindow.ui" line="195"/>
  88 + <source>Interpolation</source>
  89 + <translation type="unfinished">Интерполяция</translation>
  90 + </message>
  91 + <message>
  92 + <location filename="../mainwindow.ui" line="202"/>
  93 + <location filename="../mainwindow.cpp" line="677"/>
  94 + <source>About</source>
  95 + <translation type="unfinished">Справка</translation>
  96 + </message>
  97 + <message>
  98 + <location filename="../mainwindow.ui" line="210"/>
  99 + <source>Configuration</source>
  100 + <translation type="unfinished">Конфигурация</translation>
  101 + </message>
  102 + <message>
  103 + <location filename="../mainwindow.ui" line="214"/>
  104 + <source>Language</source>
  105 + <translation type="unfinished">Язык</translation>
  106 + </message>
  107 + <message>
  108 + <location filename="../mainwindow.ui" line="252"/>
  109 + <location filename="../mainwindow.ui" line="255"/>
  110 + <source>Open Tecplot File...</source>
  111 + <translation type="unfinished">Открыть файл Tecplot...</translation>
  112 + </message>
  113 + <message>
  114 + <location filename="../mainwindow.ui" line="258"/>
  115 + <source>Ctrl+O</source>
  116 + <translation type="unfinished"></translation>
  117 + </message>
  118 + <message>
  119 + <location filename="../mainwindow.ui" line="263"/>
  120 + <source>Copy Image to Clipboard</source>
  121 + <translation type="unfinished">Скопировать в буфер обмена</translation>
  122 + </message>
  123 + <message>
  124 + <location filename="../mainwindow.ui" line="266"/>
  125 + <source>Ctrl+C</source>
  126 + <translation type="unfinished"></translation>
  127 + </message>
  128 + <message>
  129 + <location filename="../mainwindow.ui" line="271"/>
  130 + <location filename="../mainwindow.ui" line="274"/>
  131 + <source>Save Image File...</source>
  132 + <translation type="unfinished">Сохранить изображение в файл...</translation>
  133 + </message>
  134 + <message>
  135 + <location filename="../mainwindow.ui" line="277"/>
  136 + <source>Ctrl+S</source>
  137 + <translation type="unfinished"></translation>
  138 + </message>
  139 + <message>
  140 + <location filename="../mainwindow.ui" line="282"/>
  141 + <source>New Window</source>
  142 + <translation type="unfinished">Новое окно</translation>
  143 + </message>
  144 + <message>
  145 + <location filename="../mainwindow.ui" line="287"/>
  146 + <source>Exit</source>
  147 + <translation type="unfinished">Выход</translation>
  148 + </message>
  149 + <message>
  150 + <location filename="../mainwindow.ui" line="290"/>
  151 + <source>Ctrl+Q</source>
  152 + <translation type="unfinished"></translation>
  153 + </message>
  154 + <message>
  155 + <location filename="../mainwindow.ui" line="298"/>
  156 + <source>Increase Interpolation</source>
  157 + <translation type="unfinished">Увеличить уровень интерполяции</translation>
  158 + </message>
  159 + <message>
  160 + <location filename="../mainwindow.ui" line="301"/>
  161 + <source>Increase number of interpolation (bilinear)</source>
  162 + <translation type="unfinished">Увеличить уровень интерполяции (билинейная интерполяция)</translation>
  163 + </message>
  164 + <message>
  165 + <location filename="../mainwindow.ui" line="304"/>
  166 + <source>=</source>
  167 + <translation type="unfinished"></translation>
  168 + </message>
  169 + <message>
  170 + <location filename="../mainwindow.ui" line="309"/>
  171 + <source>Decrease Interpolation</source>
  172 + <translation type="unfinished">Уменьшить уровень интерполяции</translation>
  173 + </message>
  174 + <message>
  175 + <location filename="../mainwindow.ui" line="312"/>
  176 + <source>Decrease number of interpolation (bilinear)</source>
  177 + <translation type="unfinished">Уменьшить уровень интерполяции (билинейная интерполяция)</translation>
  178 + </message>
  179 + <message>
  180 + <location filename="../mainwindow.ui" line="315"/>
  181 + <source>-</source>
  182 + <translation type="unfinished"></translation>
  183 + </message>
  184 + <message>
  185 + <location filename="../mainwindow.ui" line="320"/>
  186 + <source>About FEM Draw...</source>
  187 + <translation type="unfinished">О FEM Draw...</translation>
  188 + </message>
  189 + <message>
  190 + <location filename="../mainwindow.ui" line="328"/>
  191 + <source>About Third Party Libraries...</source>
  192 + <translation type="unfinished">О библиотеках...</translation>
  193 + </message>
  194 + <message>
  195 + <location filename="../mainwindow.ui" line="336"/>
  196 + <source>About Qt...</source>
  197 + <translation type="unfinished">О Qt...</translation>
  198 + </message>
  199 + <message>
  200 + <location filename="../mainwindow.ui" line="347"/>
  201 + <source>Transparent Image</source>
  202 + <translation type="unfinished">Прозрачные изображения</translation>
  203 + </message>
  204 + <message>
  205 + <location filename="../mainwindow.ui" line="355"/>
  206 + <source>Show Isolines</source>
  207 + <translation type="unfinished">Показывать изолинии</translation>
  208 + </message>
  209 + <message>
  210 + <location filename="../mainwindow.ui" line="360"/>
  211 + <source>Isolines Color...</source>
  212 + <translation type="unfinished">Цвет изолиний...</translation>
  213 + </message>
  214 + <message>
  215 + <location filename="../mainwindow.ui" line="365"/>
  216 + <source>Isolines Width...</source>
  217 + <translation type="unfinished">Толщина изолиний...</translation>
  218 + </message>
  219 + <message>
  220 + <location filename="../mainwindow.ui" line="373"/>
  221 + <source>Show Vectors</source>
  222 + <translation type="unfinished">Показывать векторы</translation>
  223 + </message>
  224 + <message>
  225 + <location filename="../mainwindow.ui" line="378"/>
  226 + <source>Vectors Color...</source>
  227 + <translation type="unfinished">Цвет векторов...</translation>
  228 + </message>
  229 + <message>
  230 + <location filename="../mainwindow.ui" line="383"/>
  231 + <source>Vectors Width...</source>
  232 + <translation type="unfinished">Толщина векторов...</translation>
  233 + </message>
  234 + <message>
  235 + <location filename="../mainwindow.ui" line="388"/>
  236 + <source>Vectors Length...</source>
  237 + <translation type="unfinished">Длина векторов...</translation>
  238 + </message>
  239 + <message>
  240 + <location filename="../mainwindow.ui" line="393"/>
  241 + <source>Vectors Arrow Size...</source>
  242 + <translation type="unfinished">Размер стрелок...</translation>
  243 + </message>
  244 + <message>
  245 + <location filename="../mainwindow.ui" line="401"/>
  246 + <source>English</source>
  247 + <translation type="unfinished">English</translation>
  248 + </message>
  249 + <message>
  250 + <location filename="../mainwindow.ui" line="409"/>
  251 + <source>Russian</source>
  252 + <translation type="unfinished">Русский</translation>
  253 + </message>
  254 + <message>
  255 + <location filename="../mainwindow.ui" line="417"/>
  256 + <source>Show Legend</source>
  257 + <translation type="unfinished">Показывать легенду</translation>
  258 + </message>
  259 + <message>
  260 + <location filename="../mainwindow.ui" line="425"/>
  261 + <source>Use Light Colors</source>
  262 + <translation type="unfinished">Осветлять цвета</translation>
  263 + </message>
  264 + <message>
  265 + <location filename="../mainwindow.ui" line="433"/>
  266 + <source>Use Purple Colors</source>
  267 + <translation type="unfinished">Использовать фиолетовые оттенки</translation>
  268 + </message>
  269 + <message>
  270 + <location filename="../mainwindow.ui" line="441"/>
  271 + <source>1 GiB Memory Limit</source>
  272 + <translation type="unfinished">Лимит памяти 1 ГиБ</translation>
  273 + </message>
  274 + <message>
  275 + <location filename="../mainwindow.ui" line="14"/>
  276 + <location filename="../mainwindow.cpp" line="66"/>
  277 + <location filename="../mainwindow.cpp" line="137"/>
  278 + <location filename="../mainwindow.cpp" line="195"/>
  279 + <location filename="../mainwindow.cpp" line="678"/>
  280 + <source>FEM Draw</source>
  281 + <translation type="unfinished"></translation>
  282 + </message>
  283 + <message>
  284 + <location filename="../mainwindow.cpp" line="85"/>
  285 + <source>draw.png</source>
  286 + <translation type="unfinished"></translation>
  287 + </message>
  288 + <message>
  289 + <location filename="../mainwindow.cpp" line="217"/>
  290 + <source>Open Tecplot File</source>
  291 + <translation type="unfinished">Открыть файл Tecplot</translation>
  292 + </message>
  293 + <message>
  294 + <location filename="../mainwindow.cpp" line="282"/>
  295 + <source>Images</source>
  296 + <translation type="unfinished">Изображения</translation>
  297 + </message>
  298 + <message>
  299 + <location filename="../mainwindow.cpp" line="291"/>
  300 + <source>Save Image File</source>
  301 + <translation type="unfinished">Сохранить изображение в файл</translation>
  302 + </message>
  303 + <message>
  304 + <location filename="../mainwindow.cpp" line="323"/>
  305 + <source>Generated with FEM Draw</source>
  306 + <translation type="unfinished"></translation>
  307 + </message>
  308 + <message>
  309 + <location filename="../mainwindow.cpp" line="404"/>
  310 + <location filename="../mainwindow.cpp" line="441"/>
  311 + <location filename="../mainwindow.cpp" line="456"/>
  312 + <location filename="../mainwindow.cpp" line="840"/>
  313 + <source>Error</source>
  314 + <translation type="unfinished">Ошибка</translation>
  315 + </message>
  316 + <message>
  317 + <location filename="../mainwindow.cpp" line="405"/>
  318 + <source>Error: Can&apos;t save file</source>
  319 + <translation type="unfinished">Ошибка: Не удалось сохранить файл</translation>
  320 + </message>
  321 + <message>
  322 + <location filename="../mainwindow.cpp" line="442"/>
  323 + <source>Error: Memory limit exceeded</source>
  324 + <translation type="unfinished">Ошибка: Превышен лимит памяти</translation>
  325 + </message>
  326 + <message>
  327 + <location filename="../mainwindow.cpp" line="457"/>
  328 + <source>Error: More than 10x interpolation is not supported</source>
  329 + <translation type="unfinished">Ошибка: Не поддерживаются уровни интерполяции больше 10</translation>
  330 + </message>
  331 + <message>
  332 + <location filename="../mainwindow.cpp" line="485"/>
  333 + <source>Select Isolines Color</source>
  334 + <translation type="unfinished">Выберите цвет изолиний</translation>
  335 + </message>
  336 + <message>
  337 + <location filename="../mainwindow.cpp" line="500"/>
  338 + <location filename="../mainwindow.cpp" line="534"/>
  339 + <source>Width</source>
  340 + <translation type="unfinished">Толщина</translation>
  341 + </message>
  342 + <message>
  343 + <location filename="../mainwindow.cpp" line="500"/>
  344 + <source>Select Isolines Width:</source>
  345 + <translation type="unfinished">Укажите толщину изолиний:</translation>
  346 + </message>
  347 + <message>
  348 + <location filename="../mainwindow.cpp" line="519"/>
  349 + <source>Select Vectors Color</source>
  350 + <translation type="unfinished">Выберите цвет векторов</translation>
  351 + </message>
  352 + <message>
  353 + <location filename="../mainwindow.cpp" line="534"/>
  354 + <source>Select Vectors Width:</source>
  355 + <translation type="unfinished">Укажите толщину векторов:</translation>
  356 + </message>
  357 + <message>
  358 + <location filename="../mainwindow.cpp" line="547"/>
  359 + <source>Length</source>
  360 + <translation type="unfinished">Длина</translation>
  361 + </message>
  362 + <message>
  363 + <location filename="../mainwindow.cpp" line="547"/>
  364 + <source>Select Vectors Length:</source>
  365 + <translation type="unfinished">Укажите длину векторов:</translation>
  366 + </message>
  367 + <message>
  368 + <location filename="../mainwindow.cpp" line="560"/>
  369 + <source>Arrow Size</source>
  370 + <translation type="unfinished">Размер стрелок</translation>
  371 + </message>
  372 + <message>
  373 + <location filename="../mainwindow.cpp" line="560"/>
  374 + <source>Select Arrow Size:</source>
  375 + <translation type="unfinished">Укажите размер стрелок:</translation>
  376 + </message>
  377 + <message>
  378 + <location filename="../mainwindow.cpp" line="684"/>
  379 + <source>Peter Zhigalov</source>
  380 + <translation type="unfinished">Жигалов Петр</translation>
  381 + </message>
  382 + <message>
  383 + <location filename="../mainwindow.cpp" line="699"/>
  384 + <source>About Third Party Libraries</source>
  385 + <translation type="unfinished">О библиотеках</translation>
  386 + </message>
  387 + <message>
  388 + <location filename="../mainwindow.cpp" line="700"/>
  389 + <source>Third Party Libraries</source>
  390 + <translation type="unfinished">Библиотеки</translation>
  391 + </message>
  392 + <message>
  393 + <location filename="../mainwindow.cpp" line="717"/>
  394 + <source>Library</source>
  395 + <translation type="unfinished">Библиотека</translation>
  396 + </message>
  397 + <message>
  398 + <location filename="../mainwindow.cpp" line="684"/>
  399 + <location filename="../mainwindow.cpp" line="717"/>
  400 + <source>License</source>
  401 + <translation type="unfinished">Лицензия</translation>
  402 + </message>
  403 + <message>
  404 + <location filename="../mainwindow.cpp" line="218"/>
  405 + <source>Tecplot Data Files</source>
  406 + <translation type="unfinished">Файлы данных Tecplot</translation>
  407 + </message>
  408 + <message>
  409 + <location filename="../mainwindow.cpp" line="218"/>
  410 + <source>All Files</source>
  411 + <translation type="unfinished">Все файлы</translation>
  412 + </message>
  413 + <message>
  414 + <location filename="../mainwindow.cpp" line="287"/>
  415 + <source>All Images</source>
  416 + <translation type="unfinished">Все изображения</translation>
  417 + </message>
  418 + <message>
  419 + <location filename="../mainwindow.cpp" line="717"/>
  420 + <source>Website</source>
  421 + <translation type="unfinished">Веб-сайт</translation>
  422 + </message>
  423 + <message>
  424 + <location filename="../mainwindow.cpp" line="841"/>
  425 + <source>Error: You can open only one file simultaneously</source>
  426 + <translation type="unfinished">Ошибка: Нельзя открывать несколько файлов одновременно</translation>
  427 + </message>
  428 +</context>
  429 +<context>
  430 + <name>paintwidget</name>
  431 + <message>
  432 + <location filename="../paintwidget.cpp" line="24"/>
  433 + <source>Error</source>
  434 + <translation type="unfinished">Ошибка</translation>
  435 + </message>
  436 + <message>
  437 + <location filename="../paintwidget.cpp" line="25"/>
  438 + <source>Error: Corrupted file</source>
  439 + <translation type="unfinished">Ошибка: Файл поврежден</translation>
  440 + </message>
  441 +</context>
  442 +</TS>
... ...
src_qt/l10ns/l10ns.qrc 0 → 100644
  1 +<RCC>
  2 + <qresource prefix="/l10ns">
  3 + <file>fem_draw_qt_en.qm</file>
  4 + <file>fem_draw_qt_ru.qm</file>
  5 + </qresource>
  6 +</RCC>
... ...
src_qt/main.cpp
1 1 #include "mainwindow.h"
2   -#include <QMenu>
3 2 #include "Application.h"
4 3  
5 4 #if defined (USE_STATIC_QJPEG)
... ... @@ -15,13 +14,12 @@ Q_IMPORT_PLUGIN(qico)
15 14 int main(int argc, char *argv[])
16 15 {
17 16 Application a(argc, argv);
  17 + a.setOrganizationDomain("fami.codefreak.ru");
  18 + a.setOrganizationName("FAMI Net Team");
  19 + a.setApplicationName("FEM Draw Qt");
  20 + a.setApplicationVersion("1.7");
18 21 MainWindow w;
19   -#if defined (Q_OS_MAC)
20   - void qt_mac_set_dock_menu(QMenu *menu);
21   - QMenu dock_menu;
22   - dock_menu.addAction("New Window", &w, SLOT(on_actionNew_Window_triggered()));
23   - qt_mac_set_dock_menu(&dock_menu);
24   -#endif
  22 + w.update_translations();
25 23 if(argc > 1)
26 24 {
27 25 string filename;
... ...
src_qt/mainwindow.cpp
... ... @@ -10,6 +10,12 @@
10 10 #include <QProcess>
11 11 #include <QDir>
12 12 #include <QStringList>
  13 +#include <QApplication>
  14 +#include <QTranslator>
  15 +#include <QPair>
  16 +#include <QMenu>
  17 +#include <QSettings>
  18 +#include <QLocale>
13 19 #include <algorithm>
14 20 #include <cmath>
15 21 #include "libs/jo_images.h"
... ... @@ -57,7 +63,7 @@ MainWindow::MainWindow(QWidget *parent) :
57 63 ui->actionShow_Vectors->setChecked(ui->checkBox_Vectors->isChecked());
58 64  
59 65 // Немного эстетства
60   - this->setWindowTitle("FEM Draw");
  66 + this->setWindowTitle(trUtf8("FEM Draw"));
61 67 connect(ui->actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
62 68  
63 69 // Передача начальных значений виджету
... ... @@ -76,7 +82,7 @@ MainWindow::MainWindow(QWidget *parent) :
76 82 setAcceptDrops(true);
77 83  
78 84 // Зададим умолчательные имена файлов
79   - last_saved = "draw.png";
  85 + last_saved = trUtf8("draw.png");
80 86 last_opened = "";
81 87  
82 88 #if defined (Q_OS_MAC)
... ... @@ -128,7 +134,7 @@ void MainWindow::open_file(const QString &amp; filename)
128 134 ui->widget->tec_read(filename);
129 135 if(!ui->widget->is_loaded)
130 136 {
131   - this->setWindowTitle("FEM Draw");
  137 + this->setWindowTitle(trUtf8("FEM Draw"));
132 138 ui->widget->invalidate();
133 139 return;
134 140 }
... ... @@ -186,7 +192,7 @@ void MainWindow::open_file(const QString &amp; filename)
186 192 #endif
187 193 if(ui->widget->title.length() > 0)
188 194 label.prepend(ui->widget->title + " - ");
189   - label.append(" - FEM Draw");
  195 + label.append(" - ").append(trUtf8("FEM Draw"));
190 196 this->setWindowTitle(label);
191 197  
192 198 // Сохраним директорию, в которой находится файл
... ... @@ -208,7 +214,8 @@ void MainWindow::open_file(const QString &amp; filename)
208 214 // Событие при открытии файла
209 215 void MainWindow::on_actionOpen_Tecplot_File_triggered()
210 216 {
211   - QString fileName = QFileDialog::getOpenFileName(this, trUtf8("Open Tecplot File"), last_opened, "Tecplot Data Files (*.dat *.plt);;All Files (*.*)");
  217 + QString fileName = QFileDialog::getOpenFileName(this, trUtf8("Open Tecplot File"), last_opened,
  218 + QString("%1 (*.dat *.plt);;%2 (*.*)").arg(trUtf8("Tecplot Data Files")).arg(trUtf8("All Files")));
212 219 if(fileName.length() == 0) return;
213 220 open_file(fileName);
214 221 }
... ... @@ -277,7 +284,7 @@ void MainWindow::on_actionSave_Image_File_triggered()
277 284 formats.append(*it);
278 285 formats.append(")");
279 286 }
280   - formats_all.prepend("All Images (");
  287 + formats_all.prepend(trUtf8("All Images").append(" ("));
281 288 formats_all.append(");;");
282 289 formats.prepend(formats_all);
283 290  
... ... @@ -559,6 +566,78 @@ void MainWindow::on_actionArrowSize_triggered()
559 566 }
560 567 }
561 568  
  569 +// Функция для применения локализации
  570 +void MainWindow::update_translations(QString language)
  571 +{
  572 + // Отображение название языка -> соответствующая ему менюшка
  573 + static QList<QPair<QString, QAction *> > languages_map = QList<QPair<QString, QAction *> >()
  574 + << qMakePair(QString("en"), ui->actionEnglish)
  575 + << qMakePair(QString("ru"), ui->actionRussian);
  576 +
  577 + // Определим системную локаль
  578 + static QString system_lang;
  579 + if(system_lang.isEmpty())
  580 + {
  581 + QString system_locale = QLocale::system().name().toLower();
  582 + for(QList<QPair<QString, QAction *> >::Iterator it = languages_map.begin(); it != languages_map.end(); ++it)
  583 + {
  584 + if(system_locale.startsWith(it->first))
  585 + {
  586 + system_lang = it->first;
  587 + break;
  588 + }
  589 + }
  590 + if(system_lang.isEmpty())
  591 + system_lang = "en";
  592 + }
  593 +
  594 + // Посмотрим в настройки, не сохранен ли случайно в них язык
  595 + QSettings settings;
  596 + if(language.isEmpty())
  597 + language = settings.value("Language", system_lang).toString();
  598 + else
  599 + settings.setValue("Language", language);
  600 +
  601 + // Удалим старый перевод, установим новый
  602 + static QTranslator translator;
  603 + if(!translator.isEmpty())
  604 + qApp->removeTranslator(&translator);
  605 + translator.load(QString(":/l10ns/fem_draw_qt_%1").arg(language));
  606 + qApp->installTranslator(&translator);
  607 + ui->retranslateUi(this);
  608 +
  609 + // Пробежим по меню и проставим галочку на нужном нам языке и снимем с остальных
  610 + for(QList<QPair<QString, QAction *> >::Iterator it = languages_map.begin(); it != languages_map.end(); ++it)
  611 + it->second->setChecked(it->first == language);
  612 +
  613 + // Меню в доке OS X также нуждается в переводе
  614 + update_dock_menu();
  615 +}
  616 +
  617 +// Функция, устанавливающая меню в доке OS X
  618 +void MainWindow::update_dock_menu()
  619 +{
  620 +#if defined (Q_OS_MAC)
  621 + void qt_mac_set_dock_menu(QMenu *menu);
  622 + static QMenu dock_menu;
  623 + dock_menu.clear();
  624 + dock_menu.addAction(qApp->translate("Dock", "New Window"), this, SLOT(on_actionNew_Window_triggered()));
  625 + qt_mac_set_dock_menu(&dock_menu);
  626 +#endif
  627 +}
  628 +
  629 +// Событие при включении английского языка
  630 +void MainWindow::on_actionEnglish_triggered()
  631 +{
  632 + update_translations("en");
  633 +}
  634 +
  635 +// Событие при включении русского языка
  636 +void MainWindow::on_actionRussian_triggered()
  637 +{
  638 + update_translations("ru");
  639 +}
  640 +
562 641 // Событие при переключении рисования легенды
563 642 void MainWindow::on_actionShow_Legend_triggered()
564 643 {
... ... @@ -595,14 +674,14 @@ void MainWindow::on_actionAbout_FEM_Draw_triggered()
595 674 msgBox.setAttribute(Qt::WA_QuitOnClose);
596 675 msgBox.setStandardButtons(QMessageBox::Ok);
597 676 msgBox.setDefaultButton(QMessageBox::Ok);
598   - msgBox.setWindowTitle("About");
599   - msgBox.setText(QString("<b>FEM Draw v1.7 (Qt)</b>").replace(" ", "&nbsp;"));
  677 + msgBox.setWindowTitle(trUtf8("About"));
  678 + msgBox.setText(QString("<b>%1 v1.7 (Qt)</b>").arg(trUtf8("FEM Draw")).replace(" ", "&nbsp;"));
600 679 msgBox.setInformativeText(QString(
601 680 "<a href=\"https://fami.codefreak.ru/osp/fem_draw/\">https://fami.codefreak.ru/osp/fem_draw/</a><br>"
602   - "License: <a href=\"http://www.gnu.org/copyleft/gpl.html\">GNU GPL v3</a><br><br>"
  681 + "%1: <a href=\"http://www.gnu.org/copyleft/gpl.html\">GNU GPL v3</a><br><br>"
603 682 "Copyright &copy; 2014-2016<br>"
604   - "Peter Zhigalov &lt;<a href=\"mailto:peter.zhigalov@gmail.com\">peter.zhigalov@gmail.com</a>&gt;"
605   - ).replace(" ", "&nbsp;").replace("a&nbsp;href", "a href"));
  683 + "%2 &lt;<a href=\"mailto:peter.zhigalov@gmail.com\">peter.zhigalov@gmail.com</a>&gt;"
  684 + ).arg(trUtf8("License")).arg(trUtf8("Peter Zhigalov")).replace(" ", "&nbsp;").replace("a&nbsp;href", "a href"));
606 685 msgBox.setIconPixmap(QPixmap::fromImage(QImage(":/resources/icon_64.png")));
607 686 #if !defined (Q_OS_MAC)
608 687 msgBox.setWindowIcon(QIcon(":/resources/icon.ico"));
... ... @@ -617,25 +696,26 @@ void MainWindow::on_actionAbout_Third_Party_Libraries_triggered()
617 696 msgBox.setAttribute(Qt::WA_QuitOnClose);
618 697 msgBox.setStandardButtons(QMessageBox::Ok);
619 698 msgBox.setDefaultButton(QMessageBox::Ok);
620   - msgBox.setWindowTitle("About Third Party Libraries");
621   - msgBox.setText(QString("<b>Third Party Libraries:</b>").replace(" ", "&nbsp;"));
  699 + msgBox.setWindowTitle(trUtf8("About Third Party Libraries"));
  700 + msgBox.setText(QString("<b>%1:</b>").arg(trUtf8("Third Party Libraries")).replace(" ", "&nbsp;"));
622 701 msgBox.setInformativeText(QString(
623 702 "<table border=\"0\">"
624   - "<tr><td style=\"padding-right:8%\">Library:</td><td>Jon Olick JPEG Writer</td></tr>"
625   - "<tr><td style=\"padding-right:8%\">License:</td><td>public domain</td></tr>"
626   - "<tr><td style=\"padding-right:8%\">Website:</td><td><a href=\"http://www.jonolick.com/code.html\">http://www.jonolick.com/code.html</td></tr>"
  703 + "<tr><td style=\"padding-right:8%\">%1:</td><td>Jon Olick JPEG Writer</td></tr>"
  704 + "<tr><td style=\"padding-right:8%\">%2:</td><td>public domain</td></tr>"
  705 + "<tr><td style=\"padding-right:8%\">%3:</td><td><a href=\"http://www.jonolick.com/code.html\">http://www.jonolick.com/code.html</td></tr>"
627 706 "</table><br>"
628 707 "<table border=\"0\">"
629   - "<tr><td style=\"padding-right:8%\">Library:</td><td>Jon Olick GIF Writer</td></tr>"
630   - "<tr><td style=\"padding-right:8%\">License:</td><td>public domain</td></tr>"
631   - "<tr><td style=\"padding-right:8%\">Website:</td><td><a href=\"http://www.jonolick.com/code.html\">http://www.jonolick.com/code.html</td></tr>"
  708 + "<tr><td style=\"padding-right:8%\">%1:</td><td>Jon Olick GIF Writer</td></tr>"
  709 + "<tr><td style=\"padding-right:8%\">%2:</td><td>public domain</td></tr>"
  710 + "<tr><td style=\"padding-right:8%\">%3:</td><td><a href=\"http://www.jonolick.com/code.html\">http://www.jonolick.com/code.html</td></tr>"
632 711 "</table><br>"
633 712 "<table border=\"0\">"
634   - "<tr><td style=\"padding-right:8%\">Library:</td><td>Jon Olick TGA Writer</td></tr>"
635   - "<tr><td style=\"padding-right:8%\">License:</td><td>public domain</td></tr>"
636   - "<tr><td style=\"padding-right:8%\">Website:</td><td><a href=\"http://www.jonolick.com/code.html\">http://www.jonolick.com/code.html</td></tr>"
  713 + "<tr><td style=\"padding-right:8%\">%1:</td><td>Jon Olick TGA Writer</td></tr>"
  714 + "<tr><td style=\"padding-right:8%\">%2:</td><td>public domain</td></tr>"
  715 + "<tr><td style=\"padding-right:8%\">%3:</td><td><a href=\"http://www.jonolick.com/code.html\">http://www.jonolick.com/code.html</td></tr>"
637 716 "</table>"
638   - ).replace(" ", "&nbsp;").replace("a&nbsp;href", "a href").replace("table&nbsp;border", "table border").replace("td&nbsp;style", "td style"));
  717 + ).arg(trUtf8("Library")).arg(trUtf8("License")).arg(trUtf8("Website"))
  718 + .replace(" ", "&nbsp;").replace("a&nbsp;href", "a href").replace("table&nbsp;border", "table border").replace("td&nbsp;style", "td style"));
639 719 msgBox.setIconPixmap(QPixmap::fromImage(QImage(":/resources/icon_64.png")));
640 720 #if !defined (Q_OS_MAC)
641 721 msgBox.setWindowIcon(QIcon(":/resources/icon.ico"));
... ... @@ -758,7 +838,7 @@ void MainWindow::dropEvent(QDropEvent * event)
758 838 msgBox.setStandardButtons(QMessageBox::Ok);
759 839 msgBox.setDefaultButton(QMessageBox::Ok);
760 840 msgBox.setWindowTitle(trUtf8("Error"));
761   - msgBox.setText(trUtf8("Error: You can open only one file simultaneously!"));
  841 + msgBox.setText(trUtf8("Error: You can open only one file simultaneously"));
762 842 msgBox.setIcon(QMessageBox::Critical);
763 843 #if !defined (Q_OS_MAC)
764 844 msgBox.setWindowIcon(QIcon(":/resources/icon.ico"));
... ...
src_qt/mainwindow.h
... ... @@ -38,6 +38,10 @@ public:
38 38 public slots:
39 39 // Открытие файла по имени
40 40 void open_file(const QString & filename);
  41 + // Функция для применения локализации
  42 + void update_translations(QString language = QString());
  43 + // Функция, устанавливающая меню в доке OS X
  44 + void update_dock_menu();
41 45 private slots:
42 46 // Событие при открытии файла
43 47 void on_actionOpen_Tecplot_File_triggered();
... ... @@ -68,6 +72,10 @@ private slots:
68 72 void on_actionVectors_Length_triggered();
69 73 // Событие при запросе конфигурации размера стрелок векторов
70 74 void on_actionArrowSize_triggered();
  75 + // Событие при включении английского языка
  76 + void on_actionEnglish_triggered();
  77 + // Событие при включении русского языка
  78 + void on_actionRussian_triggered();
71 79 // Событие при переключении рисования легенды
72 80 void on_actionShow_Legend_triggered();
73 81 // Событие при переключении использования светлых цветов
... ...
src_qt/mainwindow.ui
... ... @@ -11,7 +11,7 @@
11 11 </rect>
12 12 </property>
13 13 <property name="windowTitle">
14   - <string>MainWindow</string>
  14 + <string>FEM Draw</string>
15 15 </property>
16 16 <property name="windowIcon">
17 17 <iconset resource="../resources/icon.qrc">
... ... @@ -209,6 +209,14 @@
209 209 <property name="title">
210 210 <string>Configuration</string>
211 211 </property>
  212 + <widget class="QMenu" name="menuLanguage">
  213 + <property name="title">
  214 + <string>Language</string>
  215 + </property>
  216 + <addaction name="actionEnglish"/>
  217 + <addaction name="actionRussian"/>
  218 + </widget>
  219 + <addaction name="menuLanguage"/>
212 220 <addaction name="actionShow_Legend"/>
213 221 <addaction name="actionUse_Light_Colors"/>
214 222 <addaction name="actionUse_Purple_Colors"/>
... ... @@ -385,6 +393,22 @@
385 393 <string>Vectors Arrow Size...</string>
386 394 </property>
387 395 </action>
  396 + <action name="actionEnglish">
  397 + <property name="checkable">
  398 + <bool>true</bool>
  399 + </property>
  400 + <property name="text">
  401 + <string>English</string>
  402 + </property>
  403 + </action>
  404 + <action name="actionRussian">
  405 + <property name="checkable">
  406 + <bool>true</bool>
  407 + </property>
  408 + <property name="text">
  409 + <string>Russian</string>
  410 + </property>
  411 + </action>
388 412 <action name="actionShow_Legend">
389 413 <property name="checkable">
390 414 <bool>true</bool>
... ...