i18n_admin_utils 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjMyN2YxYTJkMDNiNTc4YjQ3MTYyN2UyYzFkZTlkNjNlNDgyOWMyZg==
4
+ MjM0ZGNjZTk5NGY0ZmQ5MWM5ZTEwOGU0MDYzZjI4NDQzM2NmOWRhMg==
5
5
  data.tar.gz: !binary |-
6
- ZWZmMzFkY2NjZTEzOWJjNTdkZTJlNGYwZWY4NjQwN2Q4OTdiNDk0Ng==
6
+ ZDg0NDJhNjRjZTcwOWE2MDRkMjYyOTU0NDY0NmYyNjU1ZWFiNWY3Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzBhMDAwZGY5ODQyZmE4OWI5NGM3N2U5ZmVmNTg1NjZmN2VkYmFmMjg1OGQ0
10
- NTVlM2ViMDk4MDcxZmE2MmM5ODI5Yzk0ZTQ1NjYxM2NjYjAxN2ZlMTJmOGI5
11
- YzBjYmFhMWY2ODg4NDYzY2NlZWU5YzlkZDdiM2Y5NDczMGI5OGY=
9
+ ZGZjOGEzYzgwYzIwMzA4MzRlZTE2ZmQ3NDAxZDEwMWZiMjllMjhmOTQ2MmVj
10
+ YWVhMTI1OGY4ODIwODczN2JhNmFmMGQ3OWE4OWY4YTNjMDE5OGFhZWZlY2Jh
11
+ MmNjOWMyNTRlNjhiZjU3N2M1OTlhZWM0N2RkM2Q4YzM3NGFlZWE=
12
12
  data.tar.gz: !binary |-
13
- NzI2N2E4NTUxZWUxNWNkZDViMDdkN2IyZjdkZmZkYWI2MWE4NGQyM2QwODUz
14
- ODhiMTJhZTk1YTI2YzQzOWViMGFjMWRlOTBiMDY5YTdjMzkwYTZjMmQ2MjE4
15
- ZWM5YTE4ZmVjY2EzMGJjNjdkYzk2YmRjZDEwNDY0MjhmM2ViOWM=
13
+ NzA5NmFkZjFhMGQ0NzVkZTY0ZTNmNDk0NjM5MmE2MDViNTM4MDY2ZmUxMmJj
14
+ MWUyMmY1ZjEwNTMwZDdmZjNmMTgxMmNhYWJhOGNlMmVkZTQ0ODk1M2JiNzY5
15
+ MjAwZjM3NjA2MzgyZDlkZTBlNjk0MTdkMjcwNjY5ZTMwOTYyNTA=
@@ -16,3 +16,20 @@
16
16
  #= require_tree .
17
17
  #= require bootstrap
18
18
 
19
+ $(document).ready ()->
20
+ window.load_script_on($(this))
21
+ $(document).on 'click', 'form input.nosubmit, form button.nosubmit', (e) ->
22
+ e.preventDefault();
23
+
24
+ $(document).on 'keyup', 'input[data-update], textarea[data-update]', () ->
25
+ input = $(this)
26
+ form = input.closest('form')
27
+ console.log(form)
28
+ form.find('input[name="' + input.data('update') + '"], textarea[name="' + input.data('update') + '"]').val(input.val())
29
+
30
+ #Rerun this command for reloading script for new element added with ajax for example
31
+ window.load_script_on = (container) ->
32
+ container.find("[rel=tooltip]").tooltip({ container: 'body', animation: false, delay: 0});
33
+ container.find("[rel=popover]").popover({ container: 'body', animation: false, delay: 0, trigger: 'hover'});
34
+ container.find('[data-toggle="modal"]').modal('hide')
35
+
@@ -16,6 +16,7 @@ $(document).ready () ->
16
16
  url = container.data('url')
17
17
  $.get(url).success (data) ->
18
18
  container.html(data)
19
+ window.load_script_on(container)
19
20
 
20
21
  $(document).on 'submit', 'form.translation_helper', (e)->
21
22
  e.preventDefault()
@@ -29,7 +30,7 @@ $(document).ready () ->
29
30
  data: form.serialize()
30
31
  }).success( (data) ->
31
32
  if data.success
32
- form.find('button').html('Translation added')
33
+ form.find('button:not(.nosubmit)').html("<span class='glyphicon glyphicon-ok'></span>")
33
34
  form.find('div.alert').hide()
34
35
  else
35
36
  handle_error(form, data)
@@ -16,3 +16,7 @@
16
16
  body {
17
17
  padding-top: 70px;
18
18
  }
19
+
20
+ .translation_missing_container .row{
21
+ margin-top: 5px;
22
+ }
@@ -1,29 +1,74 @@
1
- <div>
2
- <% translation.each do |translation| %>
3
- <div class='container'>
4
- <%= form_tag translation_edit_path, :class => 'translation_helper form-horizontal' do %>
5
- <div class='' data-locale='<%= translation[:locale] %>' data-key='<%= translation[:key ] %>'>
6
- <div class='row'>
7
- <div class='col-md-1'>
8
- <%= translation[:locale] %>
9
- </div>
10
- <div class='col-md-3'>
11
- <%= translation[:key] %>
1
+ <div class='translation_missing_container'>
2
+ <div class='container'>
3
+ <div class='row'>
4
+ <div class='col-md-1'>
5
+ <strong>Locale</strong>
6
+ </div>
7
+
8
+ <div class='col-md-2'>
9
+ <strong> Key</strong>
10
+ </div>
11
+
12
+ <div class='col-md-8'>
13
+ <strong>Translation</strong>
14
+ </div>
15
+
16
+ <div class='col-md-1'>
17
+ <div class='pull-right'>
18
+ <strong> Submit</strong>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <% translation.each do |translation| %>
23
+ <div class='row' data-locale='<%= translation[:locale] %>' data-key='<%= translation[:key] %>'>
24
+ <%= form_tag translation_edit_path, :class => 'translation_helper' do %>
25
+ <div class='col-md-1'>
26
+ <%= translation[:locale] %>
27
+ </div>
28
+ <div class='col-md-2'>
29
+ <%= translation[:key] %>
30
+ </div>
31
+ <%= hidden_field_tag :locale, translation[:locale] %>
32
+ <%= hidden_field_tag :key, translation[:key] %>
33
+ <div class='col-md-8'>
34
+ <div class='input-group'>
35
+ <%= text_field_tag :value, '', :class => 'form-control', 'data-update' => 'value_ta' %>
36
+ <% id = "#{translation[:locale]}_#{translation[:key]}".gsub(/\./, '_') %>
37
+ <span class="input-group-btn">
38
+ <button class='btn btn-default nosubmit' title='Click to open larger edit box' rel='tooltip' data-toggle="modal" data-target="#<%= id %>">
39
+ <span class='glyphicon glyphicon-edit'></span>
40
+ </button>
41
+ </span>
12
42
  </div>
13
- <%= hidden_field_tag :locale, translation[:locale] %>
14
- <%= hidden_field_tag :key, translation[:key] %>
15
- <div class='col-md-4'>
16
- <%= text_area_tag :value, '', :class => 'form-control' %>
43
+ <div>
44
+ <div class="modal fade" id="<%= id %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
45
+ <div class="modal-dialog">
46
+ <div class="modal-content">
47
+ <div class="modal-header">
48
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
49
+ <h4 class="modal-title" id="myModalLabel">Input translation</h4>
50
+ </div>
51
+ <div class="modal-body">
52
+ <%= text_area_tag :value_ta, '', :class => 'form-control', 'data-update' => 'value' %>
53
+ </div>
54
+ <div class="modal-footer">
55
+ <button type="button" class="btn btn-default nosubmit" data-dismiss="modal">Ok</button>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
17
60
  </div>
18
- <div class='col-md-4'>
61
+ </div>
62
+ <div class='col-md-1'>
63
+ <div class='pull-right'>
19
64
  <button class='btn btn-primary'>
20
65
  Add
21
66
  </button>
22
67
  </div>
23
68
  </div>
24
- <hr>
25
- </div>
26
- <% end %>
27
- </div>
28
- <% end %>
69
+ <% end %>
70
+ </div>
71
+ <% end %>
72
+
73
+ </div>
29
74
  </div>
@@ -1,5 +1,4 @@
1
1
  <h1>List of untranslated key found in the application</h1>
2
2
  <hr>
3
-
4
3
  <div class='loadonready' data-url='<%= translation_missing_list_path %>'>
5
4
  </div>
@@ -1,6 +1,7 @@
1
1
  require 'i18n_admin_utils/engine'
2
2
  require 'i18n_admin_utils/config'
3
3
  require 'i18n_admin_utils/search_translation'
4
+ require 'i18n_admin_utils/search_result'
4
5
 
5
6
  module I18nAdminUtils
6
7
  def self.config(&block)
@@ -0,0 +1,28 @@
1
+ module I18nAdminUtils
2
+ class SearchResult
3
+ attr_accessor :results
4
+
5
+ def initialize(hash = {})
6
+ @results = hash
7
+ end
8
+
9
+ def total_found
10
+ @results.values.map{|x| x.size}.inject { |sum, x| sum + x }
11
+ end
12
+
13
+ def [](key)
14
+ @results[key]
15
+ end
16
+
17
+ def []=(key, value)
18
+ @results[key]= value
19
+ end
20
+
21
+ def include?(str)
22
+ @results.values.flatten.include?(str)
23
+ end
24
+ def to_s
25
+ @results.values.to_s
26
+ end
27
+ end
28
+ end
@@ -1,17 +1,21 @@
1
1
  module I18nAdminUtils
2
2
  class SearchTranslation
3
+ #Regex that match plain text in html
4
+ HTML_PLAIN_TEXT_REGEX = /(?<=>)(([^><])+)(?=<)/
5
+
3
6
  def self.search
4
- results = find_transaltion
7
+ results = find_translation
5
8
  check_results(results)
6
9
  end
7
10
 
8
- def self.find_transaltion
11
+ def self.find_translation
9
12
  results = []
10
13
  dirs = I18nAdminUtils::Config.search_folders
11
14
  dirs.each do |dir|
12
15
  Dir.glob("#{dir}/**/*.*").each do |filename|
13
16
  File.open(filename).read.scan(/t\(("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')\)/).each do |result|
14
- results << result[0][1...-1]
17
+ key = result[0][1...-1]
18
+ results << key
15
19
  end
16
20
  end
17
21
  end
@@ -21,7 +25,6 @@ module I18nAdminUtils
21
25
  def self.check_results(results)
22
26
  missing = []
23
27
  results.each do |result|
24
- locale = 'en'
25
28
  I18nAdminUtils::Config.locales.each do |locale|
26
29
  if I18nAdminUtils::Config.translation_model.where(:locale => locale, :key => result).first.nil?
27
30
  missing << {:locale => locale, :key => result}
@@ -30,5 +33,24 @@ module I18nAdminUtils
30
33
  end
31
34
  missing
32
35
  end
36
+
37
+ def self.find_plain_text
38
+ results = SearchResult.new
39
+ dirs = I18nAdminUtils::Config.search_folders
40
+ dirs.each do |dir|
41
+ Dir.glob("#{dir}/**/*.*").each do |filename|
42
+ results[filename] = find_plain_text_in_file(filename)
43
+ end
44
+ end
45
+ results
46
+ end
47
+
48
+ def self.find_plain_text_in_file(filename)
49
+ list = []
50
+ File.open(filename).read.scan(HTML_PLAIN_TEXT_REGEX).each do |result|
51
+ list << result[0] unless result[0].blank?
52
+ end
53
+ list
54
+ end
33
55
  end
34
56
  end
@@ -1,3 +1,3 @@
1
1
  module I18nAdminUtils
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -1173,3 +1173,808 @@ InstallGeneratorTest: test_Assert_routes_were_properly_created
1173
1173
  SearchTranslationTest: test_Find_all_the_translations
1174
1174
  -----------------------------------------------------
1175
1175
   (0.0ms) rollback transaction
1176
+  (0.0ms) begin transaction
1177
+ --------------------------------------------
1178
+ ConfigTest: test_Load_config_fine_with_block
1179
+ --------------------------------------------
1180
+  (0.0ms) rollback transaction
1181
+  (0.0ms) begin transaction
1182
+ ---------------------------------------------------
1183
+ ConfigTest: test_Test_config_function_without_param
1184
+ ---------------------------------------------------
1185
+  (0.0ms) rollback transaction
1186
+  (0.0ms) begin transaction
1187
+ ------------------------------------------------------
1188
+ ConfigTest: test_Test_translation_model_if_given_model
1189
+ ------------------------------------------------------
1190
+  (0.0ms) rollback transaction
1191
+  (0.0ms) begin transaction
1192
+ -------------------------------------------------------
1193
+ ConfigTest: test_Test_translation_model_if_given_string
1194
+ -------------------------------------------------------
1195
+  (0.0ms) rollback transaction
1196
+  (0.0ms) begin transaction
1197
+ ------------------------------
1198
+ I18nAdminUtilsTest: test_truth
1199
+ ------------------------------
1200
+  (0.0ms) rollback transaction
1201
+  (0.0ms) begin transaction
1202
+ ----------------------------------------------------------------
1203
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1204
+ ----------------------------------------------------------------
1205
+  (0.0ms) rollback transaction
1206
+  (0.0ms) begin transaction
1207
+ --------------------------------------------------------------
1208
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1209
+ --------------------------------------------------------------
1210
+  (0.0ms) rollback transaction
1211
+  (0.0ms) begin transaction
1212
+ -----------------------------------------------------
1213
+ SearchTranslationTest: test_Find_all_the_translations
1214
+ -----------------------------------------------------
1215
+  (0.0ms) rollback transaction
1216
+  (2.0ms) begin transaction
1217
+ --------------------------------------------
1218
+ ConfigTest: test_Load_config_fine_with_block
1219
+ --------------------------------------------
1220
+  (0.0ms) rollback transaction
1221
+  (0.0ms) begin transaction
1222
+ ---------------------------------------------------
1223
+ ConfigTest: test_Test_config_function_without_param
1224
+ ---------------------------------------------------
1225
+  (0.0ms) rollback transaction
1226
+  (1.0ms) begin transaction
1227
+ ------------------------------------------------------
1228
+ ConfigTest: test_Test_translation_model_if_given_model
1229
+ ------------------------------------------------------
1230
+  (0.0ms) rollback transaction
1231
+  (0.0ms) begin transaction
1232
+ -------------------------------------------------------
1233
+ ConfigTest: test_Test_translation_model_if_given_string
1234
+ -------------------------------------------------------
1235
+  (0.0ms) rollback transaction
1236
+  (0.0ms) begin transaction
1237
+ ------------------------------
1238
+ I18nAdminUtilsTest: test_truth
1239
+ ------------------------------
1240
+  (0.0ms) rollback transaction
1241
+  (0.0ms) begin transaction
1242
+ ----------------------------------------------------------------
1243
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1244
+ ----------------------------------------------------------------
1245
+  (0.0ms) rollback transaction
1246
+  (0.0ms) begin transaction
1247
+ --------------------------------------------------------------
1248
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1249
+ --------------------------------------------------------------
1250
+  (0.0ms) rollback transaction
1251
+  (0.0ms) begin transaction
1252
+ ---------------------------------------------------
1253
+ SearchTranslationTest: test_Find_all_the_plain_text
1254
+ ---------------------------------------------------
1255
+  (0.0ms) rollback transaction
1256
+  (0.0ms) begin transaction
1257
+ -----------------------------------------------------
1258
+ SearchTranslationTest: test_Find_all_the_translations
1259
+ -----------------------------------------------------
1260
+  (0.0ms) rollback transaction
1261
+  (0.0ms) begin transaction
1262
+ --------------------------------------------
1263
+ ConfigTest: test_Load_config_fine_with_block
1264
+ --------------------------------------------
1265
+  (0.0ms) rollback transaction
1266
+  (0.0ms) begin transaction
1267
+ ---------------------------------------------------
1268
+ ConfigTest: test_Test_config_function_without_param
1269
+ ---------------------------------------------------
1270
+  (0.0ms) rollback transaction
1271
+  (0.0ms) begin transaction
1272
+ ------------------------------------------------------
1273
+ ConfigTest: test_Test_translation_model_if_given_model
1274
+ ------------------------------------------------------
1275
+  (0.0ms) rollback transaction
1276
+  (0.0ms) begin transaction
1277
+ -------------------------------------------------------
1278
+ ConfigTest: test_Test_translation_model_if_given_string
1279
+ -------------------------------------------------------
1280
+  (0.0ms) rollback transaction
1281
+  (0.0ms) begin transaction
1282
+ ------------------------------
1283
+ I18nAdminUtilsTest: test_truth
1284
+ ------------------------------
1285
+  (0.0ms) rollback transaction
1286
+  (0.0ms) begin transaction
1287
+ ----------------------------------------------------------------
1288
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1289
+ ----------------------------------------------------------------
1290
+  (0.0ms) rollback transaction
1291
+  (0.0ms) begin transaction
1292
+ --------------------------------------------------------------
1293
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1294
+ --------------------------------------------------------------
1295
+  (0.0ms) rollback transaction
1296
+  (0.0ms) begin transaction
1297
+ ---------------------------------------------------
1298
+ SearchTranslationTest: test_Find_all_the_plain_text
1299
+ ---------------------------------------------------
1300
+  (0.0ms) rollback transaction
1301
+  (0.0ms) begin transaction
1302
+ -----------------------------------------------------
1303
+ SearchTranslationTest: test_Find_all_the_translations
1304
+ -----------------------------------------------------
1305
+  (0.0ms) rollback transaction
1306
+  (0.0ms) begin transaction
1307
+ --------------------------------------------
1308
+ ConfigTest: test_Load_config_fine_with_block
1309
+ --------------------------------------------
1310
+  (0.0ms) rollback transaction
1311
+  (0.0ms) begin transaction
1312
+ ---------------------------------------------------
1313
+ ConfigTest: test_Test_config_function_without_param
1314
+ ---------------------------------------------------
1315
+  (0.0ms) rollback transaction
1316
+  (0.0ms) begin transaction
1317
+ ------------------------------------------------------
1318
+ ConfigTest: test_Test_translation_model_if_given_model
1319
+ ------------------------------------------------------
1320
+  (0.0ms) rollback transaction
1321
+  (0.0ms) begin transaction
1322
+ -------------------------------------------------------
1323
+ ConfigTest: test_Test_translation_model_if_given_string
1324
+ -------------------------------------------------------
1325
+  (0.0ms) rollback transaction
1326
+  (0.0ms) begin transaction
1327
+ ------------------------------
1328
+ I18nAdminUtilsTest: test_truth
1329
+ ------------------------------
1330
+  (1.0ms) rollback transaction
1331
+  (1.0ms) begin transaction
1332
+ ----------------------------------------------------------------
1333
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1334
+ ----------------------------------------------------------------
1335
+  (0.0ms) rollback transaction
1336
+  (0.0ms) begin transaction
1337
+ --------------------------------------------------------------
1338
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1339
+ --------------------------------------------------------------
1340
+  (0.0ms) rollback transaction
1341
+  (0.0ms) begin transaction
1342
+ ---------------------------------------------------
1343
+ SearchTranslationTest: test_Find_all_the_plain_text
1344
+ ---------------------------------------------------
1345
+  (0.0ms) rollback transaction
1346
+  (0.0ms) begin transaction
1347
+ -----------------------------------------------------
1348
+ SearchTranslationTest: test_Find_all_the_translations
1349
+ -----------------------------------------------------
1350
+  (0.0ms) rollback transaction
1351
+  (1.0ms) begin transaction
1352
+ --------------------------------------------
1353
+ ConfigTest: test_Load_config_fine_with_block
1354
+ --------------------------------------------
1355
+  (0.0ms) rollback transaction
1356
+  (1.0ms) begin transaction
1357
+ ---------------------------------------------------
1358
+ ConfigTest: test_Test_config_function_without_param
1359
+ ---------------------------------------------------
1360
+  (0.0ms) rollback transaction
1361
+  (0.0ms) begin transaction
1362
+ ------------------------------------------------------
1363
+ ConfigTest: test_Test_translation_model_if_given_model
1364
+ ------------------------------------------------------
1365
+  (0.0ms) rollback transaction
1366
+  (0.0ms) begin transaction
1367
+ -------------------------------------------------------
1368
+ ConfigTest: test_Test_translation_model_if_given_string
1369
+ -------------------------------------------------------
1370
+  (0.0ms) rollback transaction
1371
+  (0.0ms) begin transaction
1372
+ ------------------------------
1373
+ I18nAdminUtilsTest: test_truth
1374
+ ------------------------------
1375
+  (0.0ms) rollback transaction
1376
+  (0.0ms) begin transaction
1377
+ ----------------------------------------------------------------
1378
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1379
+ ----------------------------------------------------------------
1380
+  (0.0ms) rollback transaction
1381
+  (0.0ms) begin transaction
1382
+ --------------------------------------------------------------
1383
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1384
+ --------------------------------------------------------------
1385
+  (0.0ms) rollback transaction
1386
+  (0.0ms) begin transaction
1387
+ ---------------------------------------------------
1388
+ SearchTranslationTest: test_Find_all_the_plain_text
1389
+ ---------------------------------------------------
1390
+  (0.0ms) rollback transaction
1391
+  (0.0ms) begin transaction
1392
+ -----------------------------------------------------
1393
+ SearchTranslationTest: test_Find_all_the_translations
1394
+ -----------------------------------------------------
1395
+  (1.0ms) rollback transaction
1396
+  (1.0ms) begin transaction
1397
+ --------------------------------------------
1398
+ ConfigTest: test_Load_config_fine_with_block
1399
+ --------------------------------------------
1400
+  (0.0ms) rollback transaction
1401
+  (0.0ms) begin transaction
1402
+ ---------------------------------------------------
1403
+ ConfigTest: test_Test_config_function_without_param
1404
+ ---------------------------------------------------
1405
+  (0.0ms) rollback transaction
1406
+  (0.0ms) begin transaction
1407
+ ------------------------------------------------------
1408
+ ConfigTest: test_Test_translation_model_if_given_model
1409
+ ------------------------------------------------------
1410
+  (0.0ms) rollback transaction
1411
+  (0.0ms) begin transaction
1412
+ -------------------------------------------------------
1413
+ ConfigTest: test_Test_translation_model_if_given_string
1414
+ -------------------------------------------------------
1415
+  (0.0ms) rollback transaction
1416
+  (0.0ms) begin transaction
1417
+ ------------------------------
1418
+ I18nAdminUtilsTest: test_truth
1419
+ ------------------------------
1420
+  (0.0ms) rollback transaction
1421
+  (0.0ms) begin transaction
1422
+ ----------------------------------------------------------------
1423
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1424
+ ----------------------------------------------------------------
1425
+  (1.0ms) rollback transaction
1426
+  (0.0ms) begin transaction
1427
+ --------------------------------------------------------------
1428
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1429
+ --------------------------------------------------------------
1430
+  (0.0ms) rollback transaction
1431
+  (0.0ms) begin transaction
1432
+ ---------------------------------------------------
1433
+ SearchTranslationTest: test_Find_all_the_plain_text
1434
+ ---------------------------------------------------
1435
+  (1.0ms) rollback transaction
1436
+  (0.0ms) begin transaction
1437
+ -----------------------------------------------------
1438
+ SearchTranslationTest: test_Find_all_the_translations
1439
+ -----------------------------------------------------
1440
+  (0.0ms) rollback transaction
1441
+  (0.0ms) begin transaction
1442
+ --------------------------------------------
1443
+ ConfigTest: test_Load_config_fine_with_block
1444
+ --------------------------------------------
1445
+  (0.0ms) rollback transaction
1446
+  (0.0ms) begin transaction
1447
+ ---------------------------------------------------
1448
+ ConfigTest: test_Test_config_function_without_param
1449
+ ---------------------------------------------------
1450
+  (0.0ms) rollback transaction
1451
+  (0.0ms) begin transaction
1452
+ ------------------------------------------------------
1453
+ ConfigTest: test_Test_translation_model_if_given_model
1454
+ ------------------------------------------------------
1455
+  (0.0ms) rollback transaction
1456
+  (1.0ms) begin transaction
1457
+ -------------------------------------------------------
1458
+ ConfigTest: test_Test_translation_model_if_given_string
1459
+ -------------------------------------------------------
1460
+  (0.0ms) rollback transaction
1461
+  (0.0ms) begin transaction
1462
+ ------------------------------
1463
+ I18nAdminUtilsTest: test_truth
1464
+ ------------------------------
1465
+  (1.0ms) rollback transaction
1466
+  (0.0ms) begin transaction
1467
+ ----------------------------------------------------------------
1468
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1469
+ ----------------------------------------------------------------
1470
+  (0.0ms) rollback transaction
1471
+  (0.0ms) begin transaction
1472
+ --------------------------------------------------------------
1473
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1474
+ --------------------------------------------------------------
1475
+  (0.0ms) rollback transaction
1476
+  (0.0ms) begin transaction
1477
+ ---------------------------------------------------
1478
+ SearchTranslationTest: test_Find_all_the_plain_text
1479
+ ---------------------------------------------------
1480
+  (0.0ms) rollback transaction
1481
+  (0.0ms) begin transaction
1482
+ -----------------------------------------------------
1483
+ SearchTranslationTest: test_Find_all_the_translations
1484
+ -----------------------------------------------------
1485
+  (0.0ms) rollback transaction
1486
+  (0.0ms) begin transaction
1487
+ --------------------------------------------
1488
+ ConfigTest: test_Load_config_fine_with_block
1489
+ --------------------------------------------
1490
+  (0.0ms) rollback transaction
1491
+  (0.0ms) begin transaction
1492
+ ---------------------------------------------------
1493
+ ConfigTest: test_Test_config_function_without_param
1494
+ ---------------------------------------------------
1495
+  (0.0ms) rollback transaction
1496
+  (1.0ms) begin transaction
1497
+ ------------------------------------------------------
1498
+ ConfigTest: test_Test_translation_model_if_given_model
1499
+ ------------------------------------------------------
1500
+  (0.0ms) rollback transaction
1501
+  (0.0ms) begin transaction
1502
+ -------------------------------------------------------
1503
+ ConfigTest: test_Test_translation_model_if_given_string
1504
+ -------------------------------------------------------
1505
+  (0.0ms) rollback transaction
1506
+  (0.0ms) begin transaction
1507
+ ------------------------------
1508
+ I18nAdminUtilsTest: test_truth
1509
+ ------------------------------
1510
+  (0.0ms) rollback transaction
1511
+  (0.0ms) begin transaction
1512
+ ----------------------------------------------------------------
1513
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1514
+ ----------------------------------------------------------------
1515
+  (0.0ms) rollback transaction
1516
+  (0.0ms) begin transaction
1517
+ --------------------------------------------------------------
1518
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1519
+ --------------------------------------------------------------
1520
+  (0.0ms) rollback transaction
1521
+  (0.0ms) begin transaction
1522
+ ---------------------------------------------------
1523
+ SearchTranslationTest: test_Find_all_the_plain_text
1524
+ ---------------------------------------------------
1525
+  (0.0ms) rollback transaction
1526
+  (0.0ms) begin transaction
1527
+ -----------------------------------------------------
1528
+ SearchTranslationTest: test_Find_all_the_translations
1529
+ -----------------------------------------------------
1530
+  (0.0ms) rollback transaction
1531
+  (0.0ms) begin transaction
1532
+ --------------------------------------------
1533
+ ConfigTest: test_Load_config_fine_with_block
1534
+ --------------------------------------------
1535
+  (1.0ms) rollback transaction
1536
+  (0.0ms) begin transaction
1537
+ ---------------------------------------------------
1538
+ ConfigTest: test_Test_config_function_without_param
1539
+ ---------------------------------------------------
1540
+  (1.0ms) rollback transaction
1541
+  (0.0ms) begin transaction
1542
+ ------------------------------------------------------
1543
+ ConfigTest: test_Test_translation_model_if_given_model
1544
+ ------------------------------------------------------
1545
+  (0.0ms) rollback transaction
1546
+  (0.0ms) begin transaction
1547
+ -------------------------------------------------------
1548
+ ConfigTest: test_Test_translation_model_if_given_string
1549
+ -------------------------------------------------------
1550
+  (0.0ms) rollback transaction
1551
+  (0.0ms) begin transaction
1552
+ ------------------------------
1553
+ I18nAdminUtilsTest: test_truth
1554
+ ------------------------------
1555
+  (0.0ms) rollback transaction
1556
+  (0.0ms) begin transaction
1557
+ ----------------------------------------------------------------
1558
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1559
+ ----------------------------------------------------------------
1560
+  (1.0ms) rollback transaction
1561
+  (0.0ms) begin transaction
1562
+ --------------------------------------------------------------
1563
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1564
+ --------------------------------------------------------------
1565
+  (0.0ms) rollback transaction
1566
+  (0.0ms) begin transaction
1567
+ ---------------------------------------------------
1568
+ SearchTranslationTest: test_Find_all_the_plain_text
1569
+ ---------------------------------------------------
1570
+  (0.0ms) rollback transaction
1571
+  (0.0ms) begin transaction
1572
+ -----------------------------------------------------
1573
+ SearchTranslationTest: test_Find_all_the_translations
1574
+ -----------------------------------------------------
1575
+  (0.0ms) rollback transaction
1576
+  (0.0ms) begin transaction
1577
+ --------------------------------------------
1578
+ ConfigTest: test_Load_config_fine_with_block
1579
+ --------------------------------------------
1580
+  (0.0ms) rollback transaction
1581
+  (0.0ms) begin transaction
1582
+ ---------------------------------------------------
1583
+ ConfigTest: test_Test_config_function_without_param
1584
+ ---------------------------------------------------
1585
+  (0.0ms) rollback transaction
1586
+  (0.0ms) begin transaction
1587
+ ------------------------------------------------------
1588
+ ConfigTest: test_Test_translation_model_if_given_model
1589
+ ------------------------------------------------------
1590
+  (0.0ms) rollback transaction
1591
+  (0.0ms) begin transaction
1592
+ -------------------------------------------------------
1593
+ ConfigTest: test_Test_translation_model_if_given_string
1594
+ -------------------------------------------------------
1595
+  (0.0ms) rollback transaction
1596
+  (1.0ms) begin transaction
1597
+ ------------------------------
1598
+ I18nAdminUtilsTest: test_truth
1599
+ ------------------------------
1600
+  (0.0ms) rollback transaction
1601
+  (0.0ms) begin transaction
1602
+ ----------------------------------------------------------------
1603
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1604
+ ----------------------------------------------------------------
1605
+  (1.0ms) rollback transaction
1606
+  (0.0ms) begin transaction
1607
+ --------------------------------------------------------------
1608
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1609
+ --------------------------------------------------------------
1610
+  (1.0ms) rollback transaction
1611
+  (0.0ms) begin transaction
1612
+ ---------------------------------------------------
1613
+ SearchTranslationTest: test_Find_all_the_plain_text
1614
+ ---------------------------------------------------
1615
+  (0.0ms) rollback transaction
1616
+  (0.0ms) begin transaction
1617
+ -----------------------------------------------------
1618
+ SearchTranslationTest: test_Find_all_the_translations
1619
+ -----------------------------------------------------
1620
+  (0.0ms) rollback transaction
1621
+  (1.0ms) begin transaction
1622
+ --------------------------------------------
1623
+ ConfigTest: test_Load_config_fine_with_block
1624
+ --------------------------------------------
1625
+  (0.0ms) rollback transaction
1626
+  (0.0ms) begin transaction
1627
+ ---------------------------------------------------
1628
+ ConfigTest: test_Test_config_function_without_param
1629
+ ---------------------------------------------------
1630
+  (0.0ms) rollback transaction
1631
+  (0.0ms) begin transaction
1632
+ ------------------------------------------------------
1633
+ ConfigTest: test_Test_translation_model_if_given_model
1634
+ ------------------------------------------------------
1635
+  (0.0ms) rollback transaction
1636
+  (0.0ms) begin transaction
1637
+ -------------------------------------------------------
1638
+ ConfigTest: test_Test_translation_model_if_given_string
1639
+ -------------------------------------------------------
1640
+  (0.0ms) rollback transaction
1641
+  (0.0ms) begin transaction
1642
+ ------------------------------
1643
+ I18nAdminUtilsTest: test_truth
1644
+ ------------------------------
1645
+  (0.0ms) rollback transaction
1646
+  (0.0ms) begin transaction
1647
+ ----------------------------------------------------------------
1648
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1649
+ ----------------------------------------------------------------
1650
+  (0.0ms) rollback transaction
1651
+  (0.0ms) begin transaction
1652
+ --------------------------------------------------------------
1653
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1654
+ --------------------------------------------------------------
1655
+  (0.0ms) rollback transaction
1656
+  (0.0ms) begin transaction
1657
+ ---------------------------------------------------
1658
+ SearchTranslationTest: test_Find_all_the_plain_text
1659
+ ---------------------------------------------------
1660
+  (0.0ms) rollback transaction
1661
+  (0.0ms) begin transaction
1662
+ -----------------------------------------------------
1663
+ SearchTranslationTest: test_Find_all_the_translations
1664
+ -----------------------------------------------------
1665
+  (0.0ms) rollback transaction
1666
+  (0.0ms) begin transaction
1667
+ --------------------------------------------
1668
+ ConfigTest: test_Load_config_fine_with_block
1669
+ --------------------------------------------
1670
+  (0.0ms) rollback transaction
1671
+  (0.0ms) begin transaction
1672
+ ---------------------------------------------------
1673
+ ConfigTest: test_Test_config_function_without_param
1674
+ ---------------------------------------------------
1675
+  (0.0ms) rollback transaction
1676
+  (0.0ms) begin transaction
1677
+ ------------------------------------------------------
1678
+ ConfigTest: test_Test_translation_model_if_given_model
1679
+ ------------------------------------------------------
1680
+  (0.0ms) rollback transaction
1681
+  (0.0ms) begin transaction
1682
+ -------------------------------------------------------
1683
+ ConfigTest: test_Test_translation_model_if_given_string
1684
+ -------------------------------------------------------
1685
+  (0.0ms) rollback transaction
1686
+  (1.0ms) begin transaction
1687
+ ------------------------------
1688
+ I18nAdminUtilsTest: test_truth
1689
+ ------------------------------
1690
+  (0.0ms) rollback transaction
1691
+  (0.0ms) begin transaction
1692
+ ----------------------------------------------------------------
1693
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1694
+ ----------------------------------------------------------------
1695
+  (0.0ms) rollback transaction
1696
+  (0.0ms) begin transaction
1697
+ --------------------------------------------------------------
1698
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1699
+ --------------------------------------------------------------
1700
+  (0.0ms) rollback transaction
1701
+  (0.0ms) begin transaction
1702
+ ---------------------------------------------------
1703
+ SearchTranslationTest: test_Find_all_the_plain_text
1704
+ ---------------------------------------------------
1705
+  (0.0ms) rollback transaction
1706
+  (0.0ms) begin transaction
1707
+ -----------------------------------------------------
1708
+ SearchTranslationTest: test_Find_all_the_translations
1709
+ -----------------------------------------------------
1710
+  (0.0ms) rollback transaction
1711
+  (1.0ms) begin transaction
1712
+ --------------------------------------------
1713
+ ConfigTest: test_Load_config_fine_with_block
1714
+ --------------------------------------------
1715
+  (0.0ms) rollback transaction
1716
+  (0.0ms) begin transaction
1717
+ ---------------------------------------------------
1718
+ ConfigTest: test_Test_config_function_without_param
1719
+ ---------------------------------------------------
1720
+  (0.0ms) rollback transaction
1721
+  (1.0ms) begin transaction
1722
+ ------------------------------------------------------
1723
+ ConfigTest: test_Test_translation_model_if_given_model
1724
+ ------------------------------------------------------
1725
+  (0.0ms) rollback transaction
1726
+  (0.0ms) begin transaction
1727
+ -------------------------------------------------------
1728
+ ConfigTest: test_Test_translation_model_if_given_string
1729
+ -------------------------------------------------------
1730
+  (0.0ms) rollback transaction
1731
+  (0.0ms) begin transaction
1732
+ ------------------------------
1733
+ I18nAdminUtilsTest: test_truth
1734
+ ------------------------------
1735
+  (0.0ms) rollback transaction
1736
+  (0.0ms) begin transaction
1737
+ ----------------------------------------------------------------
1738
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1739
+ ----------------------------------------------------------------
1740
+  (0.0ms) rollback transaction
1741
+  (1.0ms) begin transaction
1742
+ --------------------------------------------------------------
1743
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1744
+ --------------------------------------------------------------
1745
+  (0.0ms) rollback transaction
1746
+  (1.0ms) begin transaction
1747
+ ---------------------------------------------------
1748
+ SearchTranslationTest: test_Find_all_the_plain_text
1749
+ ---------------------------------------------------
1750
+  (1.0ms) rollback transaction
1751
+  (0.0ms) begin transaction
1752
+ -----------------------------------------------------
1753
+ SearchTranslationTest: test_Find_all_the_translations
1754
+ -----------------------------------------------------
1755
+  (0.0ms) rollback transaction
1756
+  (0.0ms) begin transaction
1757
+ --------------------------------------------
1758
+ ConfigTest: test_Load_config_fine_with_block
1759
+ --------------------------------------------
1760
+  (0.0ms) rollback transaction
1761
+  (0.0ms) begin transaction
1762
+ ---------------------------------------------------
1763
+ ConfigTest: test_Test_config_function_without_param
1764
+ ---------------------------------------------------
1765
+  (0.0ms) rollback transaction
1766
+  (0.0ms) begin transaction
1767
+ ------------------------------------------------------
1768
+ ConfigTest: test_Test_translation_model_if_given_model
1769
+ ------------------------------------------------------
1770
+  (0.0ms) rollback transaction
1771
+  (0.0ms) begin transaction
1772
+ -------------------------------------------------------
1773
+ ConfigTest: test_Test_translation_model_if_given_string
1774
+ -------------------------------------------------------
1775
+  (0.0ms) rollback transaction
1776
+  (0.0ms) begin transaction
1777
+ ------------------------------
1778
+ I18nAdminUtilsTest: test_truth
1779
+ ------------------------------
1780
+  (1.0ms) rollback transaction
1781
+  (0.0ms) begin transaction
1782
+ ----------------------------------------------------------------
1783
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1784
+ ----------------------------------------------------------------
1785
+  (0.0ms) rollback transaction
1786
+  (0.0ms) begin transaction
1787
+ --------------------------------------------------------------
1788
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1789
+ --------------------------------------------------------------
1790
+  (0.0ms) rollback transaction
1791
+  (0.0ms) begin transaction
1792
+ ---------------------------------------------------
1793
+ SearchTranslationTest: test_Find_all_the_plain_text
1794
+ ---------------------------------------------------
1795
+  (0.0ms) rollback transaction
1796
+  (0.0ms) begin transaction
1797
+ -----------------------------------------------------
1798
+ SearchTranslationTest: test_Find_all_the_translations
1799
+ -----------------------------------------------------
1800
+  (0.0ms) rollback transaction
1801
+  (0.0ms) begin transaction
1802
+ --------------------------------------------
1803
+ ConfigTest: test_Load_config_fine_with_block
1804
+ --------------------------------------------
1805
+  (0.0ms) rollback transaction
1806
+  (0.0ms) begin transaction
1807
+ ---------------------------------------------------
1808
+ ConfigTest: test_Test_config_function_without_param
1809
+ ---------------------------------------------------
1810
+  (0.0ms) rollback transaction
1811
+  (1.0ms) begin transaction
1812
+ ------------------------------------------------------
1813
+ ConfigTest: test_Test_translation_model_if_given_model
1814
+ ------------------------------------------------------
1815
+  (0.0ms) rollback transaction
1816
+  (0.0ms) begin transaction
1817
+ -------------------------------------------------------
1818
+ ConfigTest: test_Test_translation_model_if_given_string
1819
+ -------------------------------------------------------
1820
+  (0.0ms) rollback transaction
1821
+  (0.0ms) begin transaction
1822
+ ------------------------------
1823
+ I18nAdminUtilsTest: test_truth
1824
+ ------------------------------
1825
+  (0.0ms) rollback transaction
1826
+  (0.0ms) begin transaction
1827
+ ----------------------------------------------------------------
1828
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1829
+ ----------------------------------------------------------------
1830
+  (0.0ms) rollback transaction
1831
+  (0.0ms) begin transaction
1832
+ --------------------------------------------------------------
1833
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1834
+ --------------------------------------------------------------
1835
+  (0.0ms) rollback transaction
1836
+  (0.0ms) begin transaction
1837
+ ---------------------------------------------------
1838
+ SearchTranslationTest: test_Find_all_the_plain_text
1839
+ ---------------------------------------------------
1840
+  (0.0ms) rollback transaction
1841
+  (0.0ms) begin transaction
1842
+ -----------------------------------------------------
1843
+ SearchTranslationTest: test_Find_all_the_translations
1844
+ -----------------------------------------------------
1845
+  (0.0ms) rollback transaction
1846
+  (0.0ms) begin transaction
1847
+ --------------------------------------------
1848
+ ConfigTest: test_Load_config_fine_with_block
1849
+ --------------------------------------------
1850
+  (0.0ms) rollback transaction
1851
+  (0.0ms) begin transaction
1852
+ ---------------------------------------------------
1853
+ ConfigTest: test_Test_config_function_without_param
1854
+ ---------------------------------------------------
1855
+  (0.0ms) rollback transaction
1856
+  (0.0ms) begin transaction
1857
+ ------------------------------------------------------
1858
+ ConfigTest: test_Test_translation_model_if_given_model
1859
+ ------------------------------------------------------
1860
+  (0.0ms) rollback transaction
1861
+  (0.0ms) begin transaction
1862
+ -------------------------------------------------------
1863
+ ConfigTest: test_Test_translation_model_if_given_string
1864
+ -------------------------------------------------------
1865
+  (0.0ms) rollback transaction
1866
+  (0.0ms) begin transaction
1867
+ ------------------------------
1868
+ I18nAdminUtilsTest: test_truth
1869
+ ------------------------------
1870
+  (0.0ms) rollback transaction
1871
+  (0.0ms) begin transaction
1872
+ ----------------------------------------------------------------
1873
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1874
+ ----------------------------------------------------------------
1875
+  (0.0ms) rollback transaction
1876
+  (0.0ms) begin transaction
1877
+ --------------------------------------------------------------
1878
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1879
+ --------------------------------------------------------------
1880
+  (0.0ms) rollback transaction
1881
+  (0.0ms) begin transaction
1882
+ ---------------------------------------------------
1883
+ SearchTranslationTest: test_Find_all_the_plain_text
1884
+ ---------------------------------------------------
1885
+  (0.0ms) rollback transaction
1886
+  (0.0ms) begin transaction
1887
+ -----------------------------------------------------
1888
+ SearchTranslationTest: test_Find_all_the_translations
1889
+ -----------------------------------------------------
1890
+  (0.0ms) rollback transaction
1891
+  (0.0ms) begin transaction
1892
+ --------------------------------------------
1893
+ ConfigTest: test_Load_config_fine_with_block
1894
+ --------------------------------------------
1895
+  (1.0ms) rollback transaction
1896
+  (0.0ms) begin transaction
1897
+ ---------------------------------------------------
1898
+ ConfigTest: test_Test_config_function_without_param
1899
+ ---------------------------------------------------
1900
+  (0.0ms) rollback transaction
1901
+  (1.0ms) begin transaction
1902
+ ------------------------------------------------------
1903
+ ConfigTest: test_Test_translation_model_if_given_model
1904
+ ------------------------------------------------------
1905
+  (0.0ms) rollback transaction
1906
+  (0.0ms) begin transaction
1907
+ -------------------------------------------------------
1908
+ ConfigTest: test_Test_translation_model_if_given_string
1909
+ -------------------------------------------------------
1910
+  (0.0ms) rollback transaction
1911
+  (0.0ms) begin transaction
1912
+ ------------------------------
1913
+ I18nAdminUtilsTest: test_truth
1914
+ ------------------------------
1915
+  (0.0ms) rollback transaction
1916
+  (0.0ms) begin transaction
1917
+ ----------------------------------------------------------------
1918
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1919
+ ----------------------------------------------------------------
1920
+  (0.0ms) rollback transaction
1921
+  (0.0ms) begin transaction
1922
+ --------------------------------------------------------------
1923
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1924
+ --------------------------------------------------------------
1925
+  (0.0ms) rollback transaction
1926
+  (0.0ms) begin transaction
1927
+ ---------------------------------------------------
1928
+ SearchTranslationTest: test_Find_all_the_plain_text
1929
+ ---------------------------------------------------
1930
+  (0.0ms) rollback transaction
1931
+  (0.0ms) begin transaction
1932
+ -----------------------------------------------------
1933
+ SearchTranslationTest: test_Find_all_the_translations
1934
+ -----------------------------------------------------
1935
+  (1.0ms) rollback transaction
1936
+  (1.0ms) begin transaction
1937
+ --------------------------------------------
1938
+ ConfigTest: test_Load_config_fine_with_block
1939
+ --------------------------------------------
1940
+  (0.0ms) rollback transaction
1941
+  (0.0ms) begin transaction
1942
+ ---------------------------------------------------
1943
+ ConfigTest: test_Test_config_function_without_param
1944
+ ---------------------------------------------------
1945
+  (0.0ms) rollback transaction
1946
+  (0.0ms) begin transaction
1947
+ ------------------------------------------------------
1948
+ ConfigTest: test_Test_translation_model_if_given_model
1949
+ ------------------------------------------------------
1950
+  (0.0ms) rollback transaction
1951
+  (0.0ms) begin transaction
1952
+ -------------------------------------------------------
1953
+ ConfigTest: test_Test_translation_model_if_given_string
1954
+ -------------------------------------------------------
1955
+  (0.0ms) rollback transaction
1956
+  (0.0ms) begin transaction
1957
+ ------------------------------
1958
+ I18nAdminUtilsTest: test_truth
1959
+ ------------------------------
1960
+  (0.0ms) rollback transaction
1961
+  (0.0ms) begin transaction
1962
+ ----------------------------------------------------------------
1963
+ InstallGeneratorTest: test_Assert_all_files_are_properly_created
1964
+ ----------------------------------------------------------------
1965
+  (0.0ms) rollback transaction
1966
+  (0.0ms) begin transaction
1967
+ --------------------------------------------------------------
1968
+ InstallGeneratorTest: test_Assert_routes_were_properly_created
1969
+ --------------------------------------------------------------
1970
+  (0.0ms) rollback transaction
1971
+  (0.0ms) begin transaction
1972
+ ---------------------------------------------------
1973
+ SearchTranslationTest: test_Find_all_the_plain_text
1974
+ ---------------------------------------------------
1975
+  (0.0ms) rollback transaction
1976
+  (0.0ms) begin transaction
1977
+ -----------------------------------------------------
1978
+ SearchTranslationTest: test_Find_all_the_translations
1979
+ -----------------------------------------------------
1980
+  (1.0ms) rollback transaction
@@ -8,14 +8,17 @@ class SearchTranslationTest < ActiveSupport::TestCase
8
8
  end
9
9
 
10
10
  setup do
11
+ FileUtils.rm_rf(destination) #empty the dir
11
12
  @translations = ['translation1', 'test.translation2', 'super.super.translation3', 'test_pl.translation4']
13
+ @plain_text = ['Hello', 'Welcome to this aswome werbsite', 'Blabla']
12
14
  FileUtils.mkdir_p(destination)
13
- copy_translation_to_file()
15
+ copy_translation_to_file
16
+ generate_plain_text
14
17
  I18nAdminUtils::Config.search_folders = [destination]
15
18
  end
16
19
 
17
20
  def copy_translation_to_file
18
- filename = File.join(destination, "#{@translations.size}_use.rb")
21
+ filename = File.join(destination, "t_#{@translations.size}_use.rb")
19
22
  file = File.new(filename, 'w')
20
23
  @translations.each do |translation|
21
24
  file.puts "t('#{translation}')"
@@ -23,9 +26,18 @@ class SearchTranslationTest < ActiveSupport::TestCase
23
26
  file.close
24
27
  end
25
28
 
29
+ def generate_plain_text
30
+ filename = File.join(destination, "p_#{@plain_text.size}_use.rb")
31
+ file = File.new(filename, 'w')
32
+ @plain_text.each do |text|
33
+ file.puts "<div>#{text}</div>"
34
+ end
35
+ file.close
36
+ end
37
+
26
38
  test 'Find all the translations' do
27
- results = I18nAdminUtils::SearchTranslation.find_transaltion
28
- puts 'R: ' + results.to_s
39
+ results = I18nAdminUtils::SearchTranslation.find_translation
40
+ puts 'T: ' + results.to_s
29
41
  assert @translations.size == results.size, "Found different amount of translation: #{results.size} instead of #{@translations.size}"
30
42
 
31
43
  @translations.each do |translation|
@@ -34,6 +46,16 @@ class SearchTranslationTest < ActiveSupport::TestCase
34
46
  end
35
47
 
36
48
 
49
+ test 'Find all the plain text' do
50
+ results = I18nAdminUtils::SearchTranslation.find_plain_text
51
+ puts '*-------R: ' + results.to_s
52
+ assert @plain_text.size == results.total_found, "Found different amount of translation: #{results.total_found} instead of #{@plain_text.size}"
53
+
54
+ @plain_text.each do |text|
55
+ assert results.include?(text), "Error plain text #{text} not found"
56
+ end
57
+ end
58
+
37
59
 
38
60
 
39
61
  end
@@ -0,0 +1,3 @@
1
+ <div>Hello</div>
2
+ <div>Welcome to this aswome werbsite</div>
3
+ <div>Blabla</div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_admin_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothee Guerin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-20 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -121,6 +121,7 @@ files:
121
121
  - lib/i18n_admin_utils.rb
122
122
  - lib/i18n_admin_utils/config.rb
123
123
  - lib/i18n_admin_utils/engine.rb
124
+ - lib/i18n_admin_utils/search_result.rb
124
125
  - lib/i18n_admin_utils/search_translation.rb
125
126
  - lib/i18n_admin_utils/version.rb
126
127
  - lib/tasks/i18n_admin_utils_tasks.rake
@@ -142,10 +143,7 @@ files:
142
143
  - test/dummy/config/environments/development.rb
143
144
  - test/dummy/config/environments/production.rb
144
145
  - test/dummy/config/environments/test.rb
145
- - test/dummy/config/initializers/backtrace_silencers.rb
146
146
  - test/dummy/config/initializers/filter_parameter_logging.rb
147
- - test/dummy/config/initializers/inflections.rb
148
- - test/dummy/config/initializers/mime_types.rb
149
147
  - test/dummy/config/initializers/secret_token.rb
150
148
  - test/dummy/config/initializers/session_store.rb
151
149
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -164,7 +162,8 @@ files:
164
162
  - test/test_helper.rb
165
163
  - test/tmp/config/initializers/i18n_admin_utils.rb
166
164
  - test/tmp/config/routes.rb
167
- - test/tmp/translation_use/4_use.rb
165
+ - test/tmp/translation_use/p_3_use.rb
166
+ - test/tmp/translation_use/t_4_use.rb
168
167
  homepage: http://github.com/timcolonel/i18n_admin_utils
169
168
  licenses: []
170
169
  metadata: {}
@@ -204,10 +203,7 @@ test_files:
204
203
  - test/dummy/config/environments/development.rb
205
204
  - test/dummy/config/environments/production.rb
206
205
  - test/dummy/config/environments/test.rb
207
- - test/dummy/config/initializers/backtrace_silencers.rb
208
206
  - test/dummy/config/initializers/filter_parameter_logging.rb
209
- - test/dummy/config/initializers/inflections.rb
210
- - test/dummy/config/initializers/mime_types.rb
211
207
  - test/dummy/config/initializers/secret_token.rb
212
208
  - test/dummy/config/initializers/session_store.rb
213
209
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -229,4 +225,5 @@ test_files:
229
225
  - test/test_helper.rb
230
226
  - test/tmp/config/initializers/i18n_admin_utils.rb
231
227
  - test/tmp/config/routes.rb
232
- - test/tmp/translation_use/4_use.rb
228
+ - test/tmp/translation_use/p_3_use.rb
229
+ - test/tmp/translation_use/t_4_use.rb
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,16 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
16
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone