summarylogtreecommitdiffstats
path: root/qaratms_translate_ru
blob: e629448ece1ff2390a4f6dd8f90af0745094eaf5 (plain)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
#!/usr/bin/env bash

###################################################################
##
## git clone https://github.com/a13xh7/QaraTMS
## 
##
###################################################################

ere_quote_grep(){
    # Что экранировать
    sed 's/[][\.|$(){}?+*^]/\\&/g' <<< "$*"
    # Что не экранировать
    #sed 's/[^a-zA-Z0-9=",;/_@#%&<> -]/\\&/g' <<< "$*"
}
    
ere_quote_sed(){
    # Что экранировать
    sed 's/[][\.|$(){}?+*^;/&]/\\&/g' <<< "$*"
    # Что не экранировать
    #sed 's/[^a-zA-Z0-9=",_@#%<> -]/\\&/g' <<< "$*"
}

translate_to_locale(){
    local -n SELECT_LOCAL="UBPILE_LOCAL_$1"
    while IFS= read -ru3 SELECT_ITEM; do
	IFS='|' read -r ITEM_PATH ITEM_MSG <<< "${SELECT_ITEM}"
	if [[ -f ${WEB_ROOT}/${ITEM_PATH} ]]; then
	    ITEM_MSG_ESC_COUNT=$(grep -Ec "$(ere_quote_grep "${ITEM_MSG}")" "${WEB_ROOT}/${ITEM_PATH}") #"
	    if [[ -z ${ARG_QUIET} ]]; then
		echo "${ITEM_MSG_ESC_COUNT} : ${WEB_ROOT}/${ITEM_PATH} : ${ITEM_MSG}" : ${SELECT_LOCAL[${SELECT_ITEM}]} | tee -a ${LOGFILE}
	    else
		echo "${ITEM_MSG_ESC_COUNT} : ${WEB_ROOT}/${ITEM_PATH} : ${ITEM_MSG}" : ${SELECT_LOCAL[${SELECT_ITEM}]} >> ${LOGFILE}
	    fi
	    #sed -E "s/${ITEM_MSG_ESC}/${NEW_ITEM_MSG_ESC}/" -i ${WEB_ROOT}/${ITEM_PATH}
	    sed -E "s/$(ere_quote_sed "${ITEM_MSG}")/$(ere_quote_sed "${SELECT_LOCAL[${SELECT_ITEM}]}")/g" -i ${WEB_ROOT}/${ITEM_PATH}
	fi
    done 3< <(printf "%s\n" "${!SELECT_LOCAL[@]}")
}

#declare -A UBPILE_LOCAL_RU
#    UBPILE_LOCAL_RU[sample_conf/setup.json|"\"description\": \"For events that don"\'"t fit anywhere else.\""]='"description": "Для событий, которые больше никуда не подходят."'
#    UBPILE_LOCAL_RU[sample_conf/setup.json|'"description": "For events that don'"'"'t fit anywhere else."']='"description": "Для событий, которые больше никуда не подходят."'

#translate_to_locale "RU"
#exit

#translate_to_locale "RU"
#return
#UBPILE_LOCAL_RU[sample_conf/.json|'']=''	'"'"'
######################################################################################################################################################

ru_app(){
    ###############################
    ### /app/* ###
    ###############################
    declare -A UBPILE_LOCAL_RU
    UBPILE_LOCAL_RU[app/Http/Controllers/AuthController.php|"'Login details are not valid'"]="'Регистрационные данные недействительны'"
    UBPILE_LOCAL_RU[app/Http/Controllers/ProjectController.php|'"Default Test Repository. Test suites and test cases are located here"']='"Репозиторий тестов по умолчанию. Тест-наборы и тест-сценарии расположены здесь"'
    UBPILE_LOCAL_RU[app/Http/Controllers/TestPlanController.php|"'Test Run'"]="'Тестовый запуск'"
    UBPILE_LOCAL_RU[app/Http/Controllers/TestPlanController.php|"'Test Run '"]="'Тест запуск '"
    UBPILE_LOCAL_RU[app/Http/Controllers/TestPlanController.php|"' for '"]="' для '"

#    UBPILE_LOCAL_RU[|'']=''

    translate_to_locale "RU"
}

ru_resources_views_auth(){
    declare -A UBPILE_LOCAL_RU

    ##########################
    ### /resources/views/* ###
    ##########################
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'QaraTMS - Login']='QaraTMS - Вход'
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'>Login<']='>Вход<'
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'"Email"']='"Электронная почта"'
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'"Password"']='"Пароль"'
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'> Remember Me']='> Запомнить'
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'  Login']='  Вход'
    UBPILE_LOCAL_RU[resources/views/auth/login_page.blade.php|'Copyright &']='Авторское право &'

    translate_to_locale "RU"
}

ru_resources_views_docs(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    sed -E "/summernote-lite.min.js/a\    <script src=\"{{asset('editor/${FILE_SUMMERNOTE_LANG}')}}\"></script>" -i "${WEB_ROOT}/resources/views/docs/create_page.blade.php"
    sed "/^[[:blank:]]*\$('#content').summernote({/a\            lang: '${SUMMERNOTE_LANG}'," -i "${WEB_ROOT}/resources/views/docs/create_page.blade.php"
    UBPILE_LOCAL_RU[resources/views/docs/create_page.blade.php|'  Add Document']='  Добавить документ'
    UBPILE_LOCAL_RU[resources/views/docs/create_page.blade.php|'>Title<']='>Заголовок<'
    UBPILE_LOCAL_RU[resources/views/docs/create_page.blade.php|'>Parent<']='>Родитель<'
    UBPILE_LOCAL_RU[resources/views/docs/create_page.blade.php|' Root ']=' Корень '
    UBPILE_LOCAL_RU[resources/views/docs/create_page.blade.php|'>Create<']='>Создать<'
    UBPILE_LOCAL_RU[resources/views/docs/create_page.blade.php|'>Cancel<']='>Отменить<'

    sed -E "/summernote-lite.min.js/a\    <script src=\"{{asset('editor/${FILE_SUMMERNOTE_LANG}')}}\"></script>" -i "${WEB_ROOT}/resources/views/docs/edit_page.blade.php"
    sed "/^[[:blank:]]*\$('#content').summernote({/a\            lang: '${SUMMERNOTE_LANG}'," -i "${WEB_ROOT}/resources/views/docs/edit_page.blade.php"
    UBPILE_LOCAL_RU[resources/views/docs/edit_page.blade.php|'  Edit Document']='  Редактировать документ'
    UBPILE_LOCAL_RU[resources/views/docs/edit_page.blade.php|'>Title<']='>Заголовок<'
    UBPILE_LOCAL_RU[resources/views/docs/edit_page.blade.php|'>Parent<']='>Родитель<'
    UBPILE_LOCAL_RU[resources/views/docs/edit_page.blade.php|' Root ']=' Корень '
    UBPILE_LOCAL_RU[resources/views/docs/edit_page.blade.php|'>Update<']='>Обновить<'
    UBPILE_LOCAL_RU[resources/views/docs/edit_page.blade.php|'>Cancel<']='>Отменить<'
    
    UBPILE_LOCAL_RU[resources/views/docs/list_page.blade.php|'  Documents']='  Документы'
    UBPILE_LOCAL_RU[resources/views/docs/list_page.blade.php|'> Add New']='> Добавить новый'
    UBPILE_LOCAL_RU[resources/views/docs/list_page.blade.php|'>Table of Contents<']='>Содержание<'
    UBPILE_LOCAL_RU[resources/views/docs/list_page.blade.php|'"Edit"']='"Редактировать"'
    UBPILE_LOCAL_RU[resources/views/docs/list_page.blade.php|'"Delete"']='"Удалить"'
    
    translate_to_locale "RU"
}

ru_resources_views_layout(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/layout/base_layout.blade.php|'QaraTMS - Open Source Test Management System']='QaraTMS - Система управления тестированием'

    translate_to_locale "RU"
}

ru_resources_views_project(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|'  Create Project']='  Создать проект'
    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|'>Project Name<']='>Название проекта<'
    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|'>Description<']='>Описание<'
    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|"                    Create"]='                    Создать'
    UBPILE_LOCAL_RU[resources/views/project/create_page.blade.php|'>Cancel<']='>Отменить<'


    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'> Edit Project']='> Редактировать проект'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'  Delete']='  Удалить'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'>Project Name<']='>Название проекта<'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'>Description<']='>Описание<'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'>Update<']='>Обновить<'
    UBPILE_LOCAL_RU[resources/views/project/edit_page.blade.php|'>Cancel<']='>Отменить<'
    
    translate_to_locale "RU"
}

ru_resources_views_repository(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'  Add Test Repository']='  Добавить тестовый репозиторий'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'>Prefix <']='>Префикс <'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'>(max 3 symbols)<']='>(максимально 3 символа)<'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'"please dont use the white space :)"']='"пожалуйста, не используйте пробелы :)"'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'>Description<']='>Описание<'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'  Save']='  Сохранить'
    UBPILE_LOCAL_RU[resources/views/repository/create_page.blade.php|'>Cancel<']='>Отменить<'

    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'  Edit Repository']='  Редактировать репозиторий'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'  Delete']='  Удалить'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>Prefix <']='>Префикс <'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>(max 3 symbols)<']='>(максимально 3 символа)<'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'"please dont use the white space :)"']='"пожалуйста, не используйте пробелы :)"'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>Description<']='>Описание<'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>Update<']='>Обновить<'
    UBPILE_LOCAL_RU[resources/views/repository/edit_page.blade.php|'>Cancel<']='>Отменить<'

    UBPILE_LOCAL_RU[resources/views/repository/list_page.blade.php|'Repositories']='Репозиторий'
    UBPILE_LOCAL_RU[resources/views/repository/list_page.blade.php|'> Add New']='> Добавить новый'
    UBPILE_LOCAL_RU[resources/views/repository/list_page.blade.php|'> Test Suites']='> Тест-наборы'
    UBPILE_LOCAL_RU[resources/views/repository/list_page.blade.php|'> Test Cases']='> Тест-сценарии'
    UBPILE_LOCAL_RU[resources/views/repository/list_page.blade.php|'> Automated']='> Автоматический'

    sed -E "/summernote-lite.min.js/a\    <script src=\"{{asset('editor/${FILE_SUMMERNOTE_LANG}')}}\"></script>" -i "${WEB_ROOT}/resources/views/repository/show_page.blade.php"
    sed "/^[[:blank:]]*\$('#content').summernote({/a\            lang: '${SUMMERNOTE_LANG}'," -i "${WEB_ROOT}/resources/views/repository/show_page.blade.php"
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'>Repository:<']='>Репозиторий:<'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'> Test Suite']='> Тест-набор'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'"Repository Settings"']='"Настройки репозитория"'
    #UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'ROOT']=''
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'>Suite: <']='>Набор: <'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'  Select Test Suite']='  Выберите тест-набор'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'"Add Test Case"']='"Добавить тест-сценарий"'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'> Test Case']='> Тест-сценарий'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'  Create Test Suite']='  Создать тест-набор'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'>Suite name<']='>Название набора<'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'"New test suite"']='"Новый тест-набор"'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'>Update']='>Обновить'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'                       Create']='                       Создать'
    UBPILE_LOCAL_RU[resources/views/repository/show_page.blade.php|'>Cancel<']='>Отменить<'

    UBPILE_LOCAL_RU[resources/views/repository/test_cases_list.blade.php|'"Edit"']='"Редактировать"'
    UBPILE_LOCAL_RU[resources/views/repository/test_cases_list.blade.php|'"Delete"']='"Удалить"'
    
    translate_to_locale "RU"
}

ru_resources_views_test_case(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Create Test Case<']='>Создать тестовый сценарий<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Test Suite<']='>Тест-набор<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Priority<']='>Приоритет<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>High<']='>Высокий<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'> Medium<']='> Средний<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Low<']='>Низкий<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Automation status<']='>Состояние автоматизации<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'> Manual<']='> Ручной<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Automated<']='>Автоматический<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Title<']='>Заголовок<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Steps<']='>Шаги<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'>Action <']='>Действие <'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'> Expected Result<']='> Ожидаемый результат<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'  Add Step']='  Добавить шаг'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|'               Create']='               Создать'
    UBPILE_LOCAL_RU[resources/views/test_case/create_form.blade.php|' and add another']=' и добавить еще один'

    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Create Test Case<']='>Создать тест-сценарий<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Test Suite<']='>Тест-набор<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Priority<']='>Приоритет<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'> Normal<']='> Обычный<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>High<']='>Высокий<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Low<']='>Низкий<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Type<']='>Тип<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'> Manual<']='> Ручной<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Automated<']='>Автоматический<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Title<']='>Заголовок<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'>Steps <']='>Шаги <'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'(Action ']='(Действие '
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|' Expected Result)']=' Ожидаемый результат)'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'                       Add Step']='                       Добавить шаг'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|'                       Create']='                       Создать'
    UBPILE_LOCAL_RU[resources/views/test_case/create_overlay.blade.php|' and add another']=' и добавить еще один'
    
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Edit Test Case<']='>Редактировать тест-сценарий<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Test Suite<']='>Тест-набор<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Priority<']='>Приоритет<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'> Normal<']='> Обычный<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>High<']='>Высокий<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Low<']='>Низкий<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Type<']='>Тип<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'> Manual<']='> Ручной<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Automated<']='>Автоматический<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Title<']='>Заголовок<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Steps<']='>Шаги<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'>Action <']='>Действие <'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'> Expected Result<']='> Ожидаемый результат<'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'Add Step']='Добавить шаг'
    UBPILE_LOCAL_RU[resources/views/test_case/edit_form.blade.php|'Update Test Case']='Обновить тест-сценарий'

    UBPILE_LOCAL_RU[resources/views/test_case/show_form.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_form.blade.php|'>Steps<']='>Шаги<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_form.blade.php|'>Action<']='>Действие<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_form.blade.php|'>Expected result<']='>Ожидаемый результат<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_form.blade.php|'>No additional details available.<']='>Никаких дополнительных подробностей не имеется.<'

    UBPILE_LOCAL_RU[resources/views/test_case/show_overlay.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_overlay.blade.php|'>Steps<']='>Шаги<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_overlay.blade.php|'>Action<']='>Действие<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_overlay.blade.php|'>Expected result<']='>Ожидаемый результат<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_overlay.blade.php|'>No additional details available.<']='>Никаких дополнительных подробностей не имеется.<'

    UBPILE_LOCAL_RU[resources/views/test_case/show_page.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_page.blade.php|'>Steps<']='>Шаги<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_page.blade.php|'>Action<']='>Действие<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_page.blade.php|'>Expected result<']='>Ожидаемый результат<'
    UBPILE_LOCAL_RU[resources/views/test_case/show_page.blade.php|'>No additional details available.<']='>Никаких дополнительных подробностей не имеется.<'

    translate_to_locale "RU"
}

ru_resources_views_test_plan(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'Create Test Plan']='Создать тест-план'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'"Test plan - {']='"Тест-план - {'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Test Repository<']='>Тестовый репозиторий<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Description<']='>Описание<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Save<']='>Сохранить<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'>Select Test Cases<']='>Выберите тест-сценарий<'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'> Select All']='> Выбрать все'
    UBPILE_LOCAL_RU[resources/views/test_plan/create_page.blade.php|'> Deselect All']='> Отменить все'

    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'Edit Test Plan']='Редактировать тест-план'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'Delete']='Удалить'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Test Repository<']='>Тестовый репозиторий<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Description<']='>Описание<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Update<']='>Обновить<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'>Select Test Cases<']='>Выберите тест-сценарий<'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'> Select All']='> Выбрать все'
    UBPILE_LOCAL_RU[resources/views/test_plan/edit_page.blade.php|'> Deselect All']='> Отменить все'

    UBPILE_LOCAL_RU[resources/views/test_plan/list_page.blade.php|'Test Plans']='Тест-планы'
    UBPILE_LOCAL_RU[resources/views/test_plan/list_page.blade.php|'test cases']='тест-сценария'
    UBPILE_LOCAL_RU[resources/views/test_plan/list_page.blade.php|'"created at"']='"создан"'
    UBPILE_LOCAL_RU[resources/views/test_plan/list_page.blade.php|'> New Test Plan']='> Новый тест-план'
    UBPILE_LOCAL_RU[resources/views/test_plan/list_page.blade.php|'Start new test run']='Новый тест-запуск'
    UBPILE_LOCAL_RU[resources/views/test_plan/list_page.blade.php|'Edit']='Редактировать'

    translate_to_locale "RU"
}

ru_resources_views_test_run(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/test_run/chart.blade.php|'"Passed"']='"Пройдено"'
    UBPILE_LOCAL_RU[resources/views/test_run/chart.blade.php|'"Failed"']='"Неудачно"'
    UBPILE_LOCAL_RU[resources/views/test_run/chart.blade.php|'"Blocked"']='"Блокировано"'
    UBPILE_LOCAL_RU[resources/views/test_run/chart.blade.php|'"Not Tested"']='"Не проверено"'
    
    UBPILE_LOCAL_RU[resources/views/test_run/create_page.blade.php|'Add Test Run']='Добавить тест-запуск'
    UBPILE_LOCAL_RU[resources/views/test_run/create_page.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/test_run/create_page.blade.php|'"Test Run"']='"Тест-запуск"'
    UBPILE_LOCAL_RU[resources/views/test_run/create_page.blade.php|'>Select Test Plan<']='>Выбрать тест-план<'
    UBPILE_LOCAL_RU[resources/views/test_run/create_page.blade.php|'>Save<']='>Сохранить<'

    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'Edit Test Run']='Редактировать тест-запуск'
    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'Delete']='Удалить'
    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'>Whoops!<']='>Упс!<'
    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'> There were some problems with your input.<']='> С вашим вводом возникли некоторые проблемы.<'
    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'>Update<']='>Обновить<'
    UBPILE_LOCAL_RU[resources/views/test_run/edit_page.blade.php|'>Cancel<']='>Отменить<'

    UBPILE_LOCAL_RU[resources/views/test_run/list_page.blade.php|'Test Runs']='Тестовые запуски'
    UBPILE_LOCAL_RU[resources/views/test_run/list_page.blade.php|'> New Test Run']='> Новый тест-запуск'
    UBPILE_LOCAL_RU[resources/views/test_run/list_page.blade.php|'"created at"']='"создан"'
    
    UBPILE_LOCAL_RU[resources/views/test_run/show_page.blade.php|'Test Run  <']='Тест-запуск  <'
    UBPILE_LOCAL_RU[resources/views/test_run/show_page.blade.php|'"Repository Settings"']='"Настройки репозитория"'
    UBPILE_LOCAL_RU[resources/views/test_run/show_page.blade.php|'Select Test Case']='Выберите тест-сценарий'

    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'Passed']='Пройдено'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'Failed']='Неудачно'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'>Blocked<']='>Блокировано<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'Not Tested']='Не проверено'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'>Preconditions<']='>Условия<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'>Steps<']='>Шаги<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'>Action<']='>Действия<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'>Expected result<']='>Ожидаемый результат<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_case.blade.php|'>No additional details available.<']='>Никаких дополнительных подробностей не имеется.<'

    UBPILE_LOCAL_RU[resources/views/test_run/test_cases_list.blade.php|'>Not Tested<']='>Не проверено<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_cases_list.blade.php|'>Passed<']='>Пройдено<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_cases_list.blade.php|'>Failed<']='>Неудачно<'
    UBPILE_LOCAL_RU[resources/views/test_run/test_cases_list.blade.php|'>Blocked<']='>Блокировано<'

    UBPILE_LOCAL_RU[resources/views/test_run/tree_item.blade.php|'>Not Tested<']='>Не проверено<'
    UBPILE_LOCAL_RU[resources/views/test_run/tree_item.blade.php|'>Passed<']='>Пройдено<'
    UBPILE_LOCAL_RU[resources/views/test_run/tree_item.blade.php|'>Failed<']='>Неудачно<'
    UBPILE_LOCAL_RU[resources/views/test_run/tree_item.blade.php|'>Blocked<']='>Блокировано<'

    translate_to_locale "RU"
}

ru_resources_views_test_suite(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/test_suite/create_form.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/test_suite/create_form.blade.php|'"Name"']='"Имя"'
    UBPILE_LOCAL_RU[resources/views/test_suite/create_form.blade.php|'Cancel']='Отменить'
    UBPILE_LOCAL_RU[resources/views/test_suite/create_form.blade.php|'>Save<']='>Сохранить<'

    UBPILE_LOCAL_RU[resources/views/test_suite/edit_form.blade.php|'>Name<']='>Имя<'
    UBPILE_LOCAL_RU[resources/views/test_suite/edit_form.blade.php|'"Name"']='"Имя"'
    UBPILE_LOCAL_RU[resources/views/test_suite/edit_form.blade.php|'>Move to<']='>Перейти к<'
    UBPILE_LOCAL_RU[resources/views/test_suite/edit_form.blade.php|' Root ']=' Корень '
    UBPILE_LOCAL_RU[resources/views/test_suite/edit_form.blade.php|'Cancel']='Отменить'
    UBPILE_LOCAL_RU[resources/views/test_suite/edit_form.blade.php|'>Update<']='>Обновить<'

    UBPILE_LOCAL_RU[resources/views/test_suite/editor.blade.php|'Add Test Suite']='Добавить тест-набор'
    UBPILE_LOCAL_RU[resources/views/test_suite/editor.blade.php|'Edit Test Suite']='Редактировать тест-набор'
    UBPILE_LOCAL_RU[resources/views/test_suite/editor.blade.php|'"Close"']='"Закрыть"'

    translate_to_locale "RU"
}

ru_resources_views_users(){
    declare -A UBPILE_LOCAL_RU

    ##########################

    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'Create user']='Создать пользователя'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'"Name"']='"Имя"'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'"Email"']='"Электронная почта"'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'"Password. Min 6 symbols"']='"Пароль. Минимум 6 символов"'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Create<']='>Создать<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Permissions<']='>Разрешения<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Entity<']='>Объект<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Add & Edit<']='>Добавлять и редактировать<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Delete<']='>Удалить<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Project<']='>Проект<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Repository<']='>Репозиторий<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Test Suite<']='>Тест-набор<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Test Case<']='>Тест-сценарий<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Test Plan<']='>Тест-план<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Test Run<']='>Тест-запуск<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>Document<']='>Документ<'
    UBPILE_LOCAL_RU[resources/views/users/create_page.blade.php|'>User<']='>Пользователь<'

    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'Edit user']='Редактировать пользователя'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'"Name"']='"Имя"'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'"Email"']='"Электронная почта"'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|"New Password. Min 6 symbols. Leave field empty if you don't want to change password"]='Новый пароль. Минимум 6 символов. Оставьте поле пустым, если вы не хотите менять пароль'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Update<']='>Обновить<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Cancel<']='>Отменить<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Permissions<']='>Разрешения<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Entity<']='>Объект<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Add & Edit<']='>Добавлять и редактировать<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Delete<']='>Удалить<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Project<']='>Проект<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Repository<']='>Репозиторий<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Test Suite<']='>Тест-набор<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Test Case<']='>Тест-сценарий<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Test Plan<']='>Тест-план<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Test Run<']='>Тест-запуск<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>Document<']='>Документ<'
    UBPILE_LOCAL_RU[resources/views/users/edit_page.blade.php|'>User<']='>Пользователь<'

    UBPILE_LOCAL_RU[resources/views/users/list_page.blade.php|'Users']='Пользователи'
    UBPILE_LOCAL_RU[resources/views/users/list_page.blade.php|'> Add User']='> Добавить пользователя'
    UBPILE_LOCAL_RU[resources/views/users/list_page.blade.php|'    Edit']='    Редактировать'
    UBPILE_LOCAL_RU[resources/views/users/list_page.blade.php|'    Delete']='    Удалить'

    translate_to_locale "RU"
}

ru_public_js(){
    declare -A UBPILE_LOCAL_RU

    ##########################
    sed "/^[[:blank:]]*editor = \$('.editor_textarea').summernote({/a\            lang: '${SUMMERNOTE_LANG}'," -i "${WEB_ROOT}/public/js/repo/case_editor.js"
    UBPILE_LOCAL_RU[public/js/repo/case_crud.js|"'Title is required'"]="'Требуется название'"
    UBPILE_LOCAL_RU[public/js/repo/case_editor.js|"'Create at least one test suite.'"]="'Создайте хотя бы один тест-набор.'"
    UBPILE_LOCAL_RU[public/js/repo/suites_tree_and_crud.js|"'Create Test Suite'"]="'Создать тест-набор'"
    UBPILE_LOCAL_RU[public/js/repo/suites_tree_and_crud.js|"'Edit Test Suite'"]="'Редактировать тест-набор'"
    UBPILE_LOCAL_RU[public/js/repo/tree.js|'"Expland / Collapse"']='"Развернуть / Свернуть"'
    UBPILE_LOCAL_RU[public/js/repo/tree.js|'"Edit"']='"Редактировать"'
    UBPILE_LOCAL_RU[public/js/repo/tree.js|'"Add child test suite"']='"Добавить дочерний тест-набор"'
    UBPILE_LOCAL_RU[public/js/repo/tree.js|'"Delete"']='"Удалить"'
    UBPILE_LOCAL_RU[public/js/repo/tree.js|'"Invalid selector! Make sure that your add child button is inside a branch."']='"Неверный селектор! Убедитесь, что кнопка добавления дочернего элемента находится внутри ветки."'

    translate_to_locale "RU"
}


  #######################################
 ###              MAIN               ###
#######################################
    #WEB_ROOT="/opt/QaraTMS"
    WEB_ROOT="."
    LOGFILE="${WEB_ROOT}/logs/qaratms_translate_ru.log"

    FILE_SUMMERNOTE_LANG="summernote-ru-RU.min.js"
    SUMMERNOTE_LANG=${FILE_SUMMERNOTE_LANG%%.*}; SUMMERNOTE_LANG=${SUMMERNOTE_LANG#*-}
    
    [[ $1 == @("-q"|"--quiet") ]] && ARG_QUIET="--quiet" && LOGFILE="/tmp/qaratms/qaratms_translate_ru.log" && shift
    [[ -d $1 ]] && WEB_ROOT=${1} && shift

    [[ -d ${LOGFILE%/*} ]] || install -dm0755 ${LOGFILE%/*}
    rm -f "${LOGFILE}"
    touch ${LOGFILE}


    ru_app &
    ru_resources_views_auth &
    ru_resources_views_docs &
    ru_resources_views_layout &
    ru_resources_views_project &
    ru_resources_views_repository &
    ru_resources_views_test_case &
    ru_resources_views_test_plan &
    ru_resources_views_test_run &
    ru_resources_views_test_suite &
    ru_resources_views_users &
    ru_public_js &
    
    wait