lit 1.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (297) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -5
  3. data/app/assets/javascripts/lit/backend/bootstrap.min.js +7 -0
  4. data/app/assets/javascripts/lit/backend/localizations.js.coffee +13 -6
  5. data/app/assets/stylesheets/lit/application.css +16 -13
  6. data/app/controllers/lit/api/v1/localizations_controller.rb +12 -15
  7. data/app/controllers/lit/cloud_translations_controller.rb +1 -1
  8. data/app/controllers/lit/concerns/request_info_store.rb +16 -10
  9. data/app/controllers/lit/concerns/request_keys_store.rb +17 -10
  10. data/app/controllers/lit/localization_keys_controller.rb +40 -34
  11. data/app/controllers/lit/localizations_controller.rb +1 -1
  12. data/app/controllers/lit/sources_controller.rb +1 -1
  13. data/app/helpers/lit/frontend_helper.rb +1 -1
  14. data/app/helpers/lit/localizations_helper.rb +9 -0
  15. data/app/models/lit/base.rb +33 -17
  16. data/app/models/lit/incomming_localization.rb +13 -27
  17. data/app/models/lit/localization.rb +6 -14
  18. data/app/services/remote_interactor_service.rb +3 -1
  19. data/app/services/synchronize_source_service.rb +4 -8
  20. data/app/views/layouts/lit/application.html.erb +0 -1
  21. data/app/views/lit/dashboard/index.html.erb +1 -1
  22. data/app/views/lit/incomming_localizations/index.html.erb +1 -1
  23. data/app/views/lit/localization_keys/_localizations_list.html.erb +19 -11
  24. data/app/views/lit/localization_keys/batch_touch.js.erb +1 -0
  25. data/app/views/lit/localization_keys/index.html.erb +2 -0
  26. data/app/views/lit/localization_keys/not_translated.html.erb +2 -0
  27. data/app/views/lit/localization_keys/visited_again.html.erb +3 -0
  28. data/app/views/lit/localizations/update.js.erb +1 -1
  29. data/config/routes.rb +1 -0
  30. data/lib/generators/lit/install/templates/initializer.rb +6 -3
  31. data/lib/lit.rb +19 -6
  32. data/lib/lit/adapters/hash_storage.rb +35 -1
  33. data/lib/lit/adapters/redis_storage.rb +42 -7
  34. data/lib/lit/cache.rb +66 -10
  35. data/lib/lit/cloud_translation/providers/google.rb +2 -0
  36. data/lib/lit/cloud_translation/providers/yandex.rb +2 -0
  37. data/lib/lit/engine.rb +12 -5
  38. data/lib/lit/export.rb +2 -18
  39. data/lib/lit/i18n_backend.rb +20 -7
  40. data/lib/lit/import.rb +18 -15
  41. data/lib/lit/loader.rb +1 -0
  42. data/lib/lit/middleware.rb +29 -0
  43. data/lib/lit/rails.rb +1 -0
  44. data/lib/lit/railtie.rb +6 -7
  45. data/lib/lit/services/localization_keys_to_hash_service.rb +23 -0
  46. data/lib/lit/version.rb +1 -1
  47. metadata +30 -263
  48. data/app/assets/images/lit/famfamfam_flags/ad.png +0 -0
  49. data/app/assets/images/lit/famfamfam_flags/ae.png +0 -0
  50. data/app/assets/images/lit/famfamfam_flags/af.png +0 -0
  51. data/app/assets/images/lit/famfamfam_flags/ag.png +0 -0
  52. data/app/assets/images/lit/famfamfam_flags/ai.png +0 -0
  53. data/app/assets/images/lit/famfamfam_flags/al.png +0 -0
  54. data/app/assets/images/lit/famfamfam_flags/am.png +0 -0
  55. data/app/assets/images/lit/famfamfam_flags/an.png +0 -0
  56. data/app/assets/images/lit/famfamfam_flags/ao.png +0 -0
  57. data/app/assets/images/lit/famfamfam_flags/ar.png +0 -0
  58. data/app/assets/images/lit/famfamfam_flags/as.png +0 -0
  59. data/app/assets/images/lit/famfamfam_flags/at.png +0 -0
  60. data/app/assets/images/lit/famfamfam_flags/au.png +0 -0
  61. data/app/assets/images/lit/famfamfam_flags/aw.png +0 -0
  62. data/app/assets/images/lit/famfamfam_flags/ax.png +0 -0
  63. data/app/assets/images/lit/famfamfam_flags/az.png +0 -0
  64. data/app/assets/images/lit/famfamfam_flags/ba.png +0 -0
  65. data/app/assets/images/lit/famfamfam_flags/bb.png +0 -0
  66. data/app/assets/images/lit/famfamfam_flags/bd.png +0 -0
  67. data/app/assets/images/lit/famfamfam_flags/be.png +0 -0
  68. data/app/assets/images/lit/famfamfam_flags/bf.png +0 -0
  69. data/app/assets/images/lit/famfamfam_flags/bg.png +0 -0
  70. data/app/assets/images/lit/famfamfam_flags/bh.png +0 -0
  71. data/app/assets/images/lit/famfamfam_flags/bi.png +0 -0
  72. data/app/assets/images/lit/famfamfam_flags/bj.png +0 -0
  73. data/app/assets/images/lit/famfamfam_flags/bm.png +0 -0
  74. data/app/assets/images/lit/famfamfam_flags/bn.png +0 -0
  75. data/app/assets/images/lit/famfamfam_flags/bo.png +0 -0
  76. data/app/assets/images/lit/famfamfam_flags/br.png +0 -0
  77. data/app/assets/images/lit/famfamfam_flags/bs.png +0 -0
  78. data/app/assets/images/lit/famfamfam_flags/bt.png +0 -0
  79. data/app/assets/images/lit/famfamfam_flags/bv.png +0 -0
  80. data/app/assets/images/lit/famfamfam_flags/bw.png +0 -0
  81. data/app/assets/images/lit/famfamfam_flags/by.png +0 -0
  82. data/app/assets/images/lit/famfamfam_flags/bz.png +0 -0
  83. data/app/assets/images/lit/famfamfam_flags/ca.png +0 -0
  84. data/app/assets/images/lit/famfamfam_flags/catalonia.png +0 -0
  85. data/app/assets/images/lit/famfamfam_flags/cc.png +0 -0
  86. data/app/assets/images/lit/famfamfam_flags/cd.png +0 -0
  87. data/app/assets/images/lit/famfamfam_flags/cf.png +0 -0
  88. data/app/assets/images/lit/famfamfam_flags/cg.png +0 -0
  89. data/app/assets/images/lit/famfamfam_flags/ch.png +0 -0
  90. data/app/assets/images/lit/famfamfam_flags/ci.png +0 -0
  91. data/app/assets/images/lit/famfamfam_flags/ck.png +0 -0
  92. data/app/assets/images/lit/famfamfam_flags/cl.png +0 -0
  93. data/app/assets/images/lit/famfamfam_flags/cm.png +0 -0
  94. data/app/assets/images/lit/famfamfam_flags/cn.png +0 -0
  95. data/app/assets/images/lit/famfamfam_flags/co.png +0 -0
  96. data/app/assets/images/lit/famfamfam_flags/cr.png +0 -0
  97. data/app/assets/images/lit/famfamfam_flags/cs.png +0 -0
  98. data/app/assets/images/lit/famfamfam_flags/cu.png +0 -0
  99. data/app/assets/images/lit/famfamfam_flags/cv.png +0 -0
  100. data/app/assets/images/lit/famfamfam_flags/cx.png +0 -0
  101. data/app/assets/images/lit/famfamfam_flags/cy.png +0 -0
  102. data/app/assets/images/lit/famfamfam_flags/cz.png +0 -0
  103. data/app/assets/images/lit/famfamfam_flags/da.png +0 -0
  104. data/app/assets/images/lit/famfamfam_flags/de.png +0 -0
  105. data/app/assets/images/lit/famfamfam_flags/dj.png +0 -0
  106. data/app/assets/images/lit/famfamfam_flags/dk.png +0 -0
  107. data/app/assets/images/lit/famfamfam_flags/dm.png +0 -0
  108. data/app/assets/images/lit/famfamfam_flags/do.png +0 -0
  109. data/app/assets/images/lit/famfamfam_flags/dz.png +0 -0
  110. data/app/assets/images/lit/famfamfam_flags/ec.png +0 -0
  111. data/app/assets/images/lit/famfamfam_flags/ee.png +0 -0
  112. data/app/assets/images/lit/famfamfam_flags/eg.png +0 -0
  113. data/app/assets/images/lit/famfamfam_flags/eh.png +0 -0
  114. data/app/assets/images/lit/famfamfam_flags/en.png +0 -0
  115. data/app/assets/images/lit/famfamfam_flags/england.png +0 -0
  116. data/app/assets/images/lit/famfamfam_flags/er.png +0 -0
  117. data/app/assets/images/lit/famfamfam_flags/es.png +0 -0
  118. data/app/assets/images/lit/famfamfam_flags/et.png +0 -0
  119. data/app/assets/images/lit/famfamfam_flags/europeanunion.png +0 -0
  120. data/app/assets/images/lit/famfamfam_flags/fam.png +0 -0
  121. data/app/assets/images/lit/famfamfam_flags/fi.png +0 -0
  122. data/app/assets/images/lit/famfamfam_flags/fj.png +0 -0
  123. data/app/assets/images/lit/famfamfam_flags/fk.png +0 -0
  124. data/app/assets/images/lit/famfamfam_flags/fm.png +0 -0
  125. data/app/assets/images/lit/famfamfam_flags/fo.png +0 -0
  126. data/app/assets/images/lit/famfamfam_flags/fr.png +0 -0
  127. data/app/assets/images/lit/famfamfam_flags/ga.png +0 -0
  128. data/app/assets/images/lit/famfamfam_flags/gb.png +0 -0
  129. data/app/assets/images/lit/famfamfam_flags/gd.png +0 -0
  130. data/app/assets/images/lit/famfamfam_flags/ge.png +0 -0
  131. data/app/assets/images/lit/famfamfam_flags/gf.png +0 -0
  132. data/app/assets/images/lit/famfamfam_flags/gh.png +0 -0
  133. data/app/assets/images/lit/famfamfam_flags/gi.png +0 -0
  134. data/app/assets/images/lit/famfamfam_flags/gl.png +0 -0
  135. data/app/assets/images/lit/famfamfam_flags/gm.png +0 -0
  136. data/app/assets/images/lit/famfamfam_flags/gn.png +0 -0
  137. data/app/assets/images/lit/famfamfam_flags/gp.png +0 -0
  138. data/app/assets/images/lit/famfamfam_flags/gq.png +0 -0
  139. data/app/assets/images/lit/famfamfam_flags/gr.png +0 -0
  140. data/app/assets/images/lit/famfamfam_flags/gs.png +0 -0
  141. data/app/assets/images/lit/famfamfam_flags/gt.png +0 -0
  142. data/app/assets/images/lit/famfamfam_flags/gu.png +0 -0
  143. data/app/assets/images/lit/famfamfam_flags/gw.png +0 -0
  144. data/app/assets/images/lit/famfamfam_flags/gy.png +0 -0
  145. data/app/assets/images/lit/famfamfam_flags/hk.png +0 -0
  146. data/app/assets/images/lit/famfamfam_flags/hm.png +0 -0
  147. data/app/assets/images/lit/famfamfam_flags/hn.png +0 -0
  148. data/app/assets/images/lit/famfamfam_flags/hr.png +0 -0
  149. data/app/assets/images/lit/famfamfam_flags/ht.png +0 -0
  150. data/app/assets/images/lit/famfamfam_flags/hu.png +0 -0
  151. data/app/assets/images/lit/famfamfam_flags/id.png +0 -0
  152. data/app/assets/images/lit/famfamfam_flags/ie.png +0 -0
  153. data/app/assets/images/lit/famfamfam_flags/il.png +0 -0
  154. data/app/assets/images/lit/famfamfam_flags/in.png +0 -0
  155. data/app/assets/images/lit/famfamfam_flags/io.png +0 -0
  156. data/app/assets/images/lit/famfamfam_flags/iq.png +0 -0
  157. data/app/assets/images/lit/famfamfam_flags/ir.png +0 -0
  158. data/app/assets/images/lit/famfamfam_flags/is.png +0 -0
  159. data/app/assets/images/lit/famfamfam_flags/it.png +0 -0
  160. data/app/assets/images/lit/famfamfam_flags/ja.png +0 -0
  161. data/app/assets/images/lit/famfamfam_flags/jm.png +0 -0
  162. data/app/assets/images/lit/famfamfam_flags/jo.png +0 -0
  163. data/app/assets/images/lit/famfamfam_flags/jp.png +0 -0
  164. data/app/assets/images/lit/famfamfam_flags/ke.png +0 -0
  165. data/app/assets/images/lit/famfamfam_flags/kg.png +0 -0
  166. data/app/assets/images/lit/famfamfam_flags/kh.png +0 -0
  167. data/app/assets/images/lit/famfamfam_flags/ki.png +0 -0
  168. data/app/assets/images/lit/famfamfam_flags/km.png +0 -0
  169. data/app/assets/images/lit/famfamfam_flags/kn.png +0 -0
  170. data/app/assets/images/lit/famfamfam_flags/kp.png +0 -0
  171. data/app/assets/images/lit/famfamfam_flags/kr.png +0 -0
  172. data/app/assets/images/lit/famfamfam_flags/kw.png +0 -0
  173. data/app/assets/images/lit/famfamfam_flags/ky.png +0 -0
  174. data/app/assets/images/lit/famfamfam_flags/kz.png +0 -0
  175. data/app/assets/images/lit/famfamfam_flags/la.png +0 -0
  176. data/app/assets/images/lit/famfamfam_flags/lb.png +0 -0
  177. data/app/assets/images/lit/famfamfam_flags/lc.png +0 -0
  178. data/app/assets/images/lit/famfamfam_flags/li.png +0 -0
  179. data/app/assets/images/lit/famfamfam_flags/lk.png +0 -0
  180. data/app/assets/images/lit/famfamfam_flags/lr.png +0 -0
  181. data/app/assets/images/lit/famfamfam_flags/ls.png +0 -0
  182. data/app/assets/images/lit/famfamfam_flags/lt.png +0 -0
  183. data/app/assets/images/lit/famfamfam_flags/lu.png +0 -0
  184. data/app/assets/images/lit/famfamfam_flags/lv.png +0 -0
  185. data/app/assets/images/lit/famfamfam_flags/ly.png +0 -0
  186. data/app/assets/images/lit/famfamfam_flags/ma.png +0 -0
  187. data/app/assets/images/lit/famfamfam_flags/mc.png +0 -0
  188. data/app/assets/images/lit/famfamfam_flags/md.png +0 -0
  189. data/app/assets/images/lit/famfamfam_flags/me.png +0 -0
  190. data/app/assets/images/lit/famfamfam_flags/mg.png +0 -0
  191. data/app/assets/images/lit/famfamfam_flags/mh.png +0 -0
  192. data/app/assets/images/lit/famfamfam_flags/mk.png +0 -0
  193. data/app/assets/images/lit/famfamfam_flags/ml.png +0 -0
  194. data/app/assets/images/lit/famfamfam_flags/mm.png +0 -0
  195. data/app/assets/images/lit/famfamfam_flags/mn.png +0 -0
  196. data/app/assets/images/lit/famfamfam_flags/mo.png +0 -0
  197. data/app/assets/images/lit/famfamfam_flags/mp.png +0 -0
  198. data/app/assets/images/lit/famfamfam_flags/mq.png +0 -0
  199. data/app/assets/images/lit/famfamfam_flags/mr.png +0 -0
  200. data/app/assets/images/lit/famfamfam_flags/ms.png +0 -0
  201. data/app/assets/images/lit/famfamfam_flags/mt.png +0 -0
  202. data/app/assets/images/lit/famfamfam_flags/mu.png +0 -0
  203. data/app/assets/images/lit/famfamfam_flags/mv.png +0 -0
  204. data/app/assets/images/lit/famfamfam_flags/mw.png +0 -0
  205. data/app/assets/images/lit/famfamfam_flags/mx.png +0 -0
  206. data/app/assets/images/lit/famfamfam_flags/my.png +0 -0
  207. data/app/assets/images/lit/famfamfam_flags/mz.png +0 -0
  208. data/app/assets/images/lit/famfamfam_flags/na.png +0 -0
  209. data/app/assets/images/lit/famfamfam_flags/nc.png +0 -0
  210. data/app/assets/images/lit/famfamfam_flags/ne.png +0 -0
  211. data/app/assets/images/lit/famfamfam_flags/nf.png +0 -0
  212. data/app/assets/images/lit/famfamfam_flags/ng.png +0 -0
  213. data/app/assets/images/lit/famfamfam_flags/ni.png +0 -0
  214. data/app/assets/images/lit/famfamfam_flags/nl.png +0 -0
  215. data/app/assets/images/lit/famfamfam_flags/no.png +0 -0
  216. data/app/assets/images/lit/famfamfam_flags/np.png +0 -0
  217. data/app/assets/images/lit/famfamfam_flags/nr.png +0 -0
  218. data/app/assets/images/lit/famfamfam_flags/nu.png +0 -0
  219. data/app/assets/images/lit/famfamfam_flags/nz.png +0 -0
  220. data/app/assets/images/lit/famfamfam_flags/om.png +0 -0
  221. data/app/assets/images/lit/famfamfam_flags/pa.png +0 -0
  222. data/app/assets/images/lit/famfamfam_flags/pe.png +0 -0
  223. data/app/assets/images/lit/famfamfam_flags/pf.png +0 -0
  224. data/app/assets/images/lit/famfamfam_flags/pg.png +0 -0
  225. data/app/assets/images/lit/famfamfam_flags/ph.png +0 -0
  226. data/app/assets/images/lit/famfamfam_flags/pk.png +0 -0
  227. data/app/assets/images/lit/famfamfam_flags/pl.png +0 -0
  228. data/app/assets/images/lit/famfamfam_flags/pm.png +0 -0
  229. data/app/assets/images/lit/famfamfam_flags/pn.png +0 -0
  230. data/app/assets/images/lit/famfamfam_flags/pr.png +0 -0
  231. data/app/assets/images/lit/famfamfam_flags/ps.png +0 -0
  232. data/app/assets/images/lit/famfamfam_flags/pt.png +0 -0
  233. data/app/assets/images/lit/famfamfam_flags/pw.png +0 -0
  234. data/app/assets/images/lit/famfamfam_flags/py.png +0 -0
  235. data/app/assets/images/lit/famfamfam_flags/qa.png +0 -0
  236. data/app/assets/images/lit/famfamfam_flags/re.png +0 -0
  237. data/app/assets/images/lit/famfamfam_flags/ro.png +0 -0
  238. data/app/assets/images/lit/famfamfam_flags/rs.png +0 -0
  239. data/app/assets/images/lit/famfamfam_flags/ru.png +0 -0
  240. data/app/assets/images/lit/famfamfam_flags/rw.png +0 -0
  241. data/app/assets/images/lit/famfamfam_flags/sa.png +0 -0
  242. data/app/assets/images/lit/famfamfam_flags/sb.png +0 -0
  243. data/app/assets/images/lit/famfamfam_flags/sc.png +0 -0
  244. data/app/assets/images/lit/famfamfam_flags/scotland.png +0 -0
  245. data/app/assets/images/lit/famfamfam_flags/sd.png +0 -0
  246. data/app/assets/images/lit/famfamfam_flags/se.png +0 -0
  247. data/app/assets/images/lit/famfamfam_flags/sg.png +0 -0
  248. data/app/assets/images/lit/famfamfam_flags/sh.png +0 -0
  249. data/app/assets/images/lit/famfamfam_flags/si.png +0 -0
  250. data/app/assets/images/lit/famfamfam_flags/sj.png +0 -0
  251. data/app/assets/images/lit/famfamfam_flags/sk.png +0 -0
  252. data/app/assets/images/lit/famfamfam_flags/sl.png +0 -0
  253. data/app/assets/images/lit/famfamfam_flags/sm.png +0 -0
  254. data/app/assets/images/lit/famfamfam_flags/sn.png +0 -0
  255. data/app/assets/images/lit/famfamfam_flags/so.png +0 -0
  256. data/app/assets/images/lit/famfamfam_flags/sr.png +0 -0
  257. data/app/assets/images/lit/famfamfam_flags/st.png +0 -0
  258. data/app/assets/images/lit/famfamfam_flags/sv.png +0 -0
  259. data/app/assets/images/lit/famfamfam_flags/sy.png +0 -0
  260. data/app/assets/images/lit/famfamfam_flags/sz.png +0 -0
  261. data/app/assets/images/lit/famfamfam_flags/tc.png +0 -0
  262. data/app/assets/images/lit/famfamfam_flags/td.png +0 -0
  263. data/app/assets/images/lit/famfamfam_flags/tf.png +0 -0
  264. data/app/assets/images/lit/famfamfam_flags/tg.png +0 -0
  265. data/app/assets/images/lit/famfamfam_flags/th.png +0 -0
  266. data/app/assets/images/lit/famfamfam_flags/tj.png +0 -0
  267. data/app/assets/images/lit/famfamfam_flags/tk.png +0 -0
  268. data/app/assets/images/lit/famfamfam_flags/tl.png +0 -0
  269. data/app/assets/images/lit/famfamfam_flags/tm.png +0 -0
  270. data/app/assets/images/lit/famfamfam_flags/tn.png +0 -0
  271. data/app/assets/images/lit/famfamfam_flags/to.png +0 -0
  272. data/app/assets/images/lit/famfamfam_flags/tr.png +0 -0
  273. data/app/assets/images/lit/famfamfam_flags/tt.png +0 -0
  274. data/app/assets/images/lit/famfamfam_flags/tv.png +0 -0
  275. data/app/assets/images/lit/famfamfam_flags/tw.png +0 -0
  276. data/app/assets/images/lit/famfamfam_flags/tz.png +0 -0
  277. data/app/assets/images/lit/famfamfam_flags/ua.png +0 -0
  278. data/app/assets/images/lit/famfamfam_flags/ug.png +0 -0
  279. data/app/assets/images/lit/famfamfam_flags/um.png +0 -0
  280. data/app/assets/images/lit/famfamfam_flags/us.png +0 -0
  281. data/app/assets/images/lit/famfamfam_flags/uy.png +0 -0
  282. data/app/assets/images/lit/famfamfam_flags/uz.png +0 -0
  283. data/app/assets/images/lit/famfamfam_flags/va.png +0 -0
  284. data/app/assets/images/lit/famfamfam_flags/vc.png +0 -0
  285. data/app/assets/images/lit/famfamfam_flags/ve.png +0 -0
  286. data/app/assets/images/lit/famfamfam_flags/vg.png +0 -0
  287. data/app/assets/images/lit/famfamfam_flags/vi.png +0 -0
  288. data/app/assets/images/lit/famfamfam_flags/vn.png +0 -0
  289. data/app/assets/images/lit/famfamfam_flags/vu.png +0 -0
  290. data/app/assets/images/lit/famfamfam_flags/wales.png +0 -0
  291. data/app/assets/images/lit/famfamfam_flags/wf.png +0 -0
  292. data/app/assets/images/lit/famfamfam_flags/ws.png +0 -0
  293. data/app/assets/images/lit/famfamfam_flags/ye.png +0 -0
  294. data/app/assets/images/lit/famfamfam_flags/yt.png +0 -0
  295. data/app/assets/images/lit/famfamfam_flags/za.png +0 -0
  296. data/app/assets/images/lit/famfamfam_flags/zm.png +0 -0
  297. data/app/assets/images/lit/famfamfam_flags/zw.png +0 -0