lit 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/lit/dashboard/index.html.erb +1 -1
  3. data/app/views/lit/incomming_localizations/index.html.erb +1 -1
  4. data/app/views/lit/localization_keys/_localizations_list.html.erb +1 -1
  5. data/lib/lit/cache.rb +5 -1
  6. data/lib/lit/engine.rb +6 -0
  7. data/lib/lit/i18n_backend.rb +2 -1
  8. data/lib/lit/loader.rb +1 -0
  9. data/lib/lit/version.rb +1 -1
  10. metadata +17 -254
  11. data/app/assets/images/lit/famfamfam_flags/ad.png +0 -0
  12. data/app/assets/images/lit/famfamfam_flags/ae.png +0 -0
  13. data/app/assets/images/lit/famfamfam_flags/af.png +0 -0
  14. data/app/assets/images/lit/famfamfam_flags/ag.png +0 -0
  15. data/app/assets/images/lit/famfamfam_flags/ai.png +0 -0
  16. data/app/assets/images/lit/famfamfam_flags/al.png +0 -0
  17. data/app/assets/images/lit/famfamfam_flags/am.png +0 -0
  18. data/app/assets/images/lit/famfamfam_flags/an.png +0 -0
  19. data/app/assets/images/lit/famfamfam_flags/ao.png +0 -0
  20. data/app/assets/images/lit/famfamfam_flags/ar.png +0 -0
  21. data/app/assets/images/lit/famfamfam_flags/as.png +0 -0
  22. data/app/assets/images/lit/famfamfam_flags/at.png +0 -0
  23. data/app/assets/images/lit/famfamfam_flags/au.png +0 -0
  24. data/app/assets/images/lit/famfamfam_flags/aw.png +0 -0
  25. data/app/assets/images/lit/famfamfam_flags/ax.png +0 -0
  26. data/app/assets/images/lit/famfamfam_flags/az.png +0 -0
  27. data/app/assets/images/lit/famfamfam_flags/ba.png +0 -0
  28. data/app/assets/images/lit/famfamfam_flags/bb.png +0 -0
  29. data/app/assets/images/lit/famfamfam_flags/bd.png +0 -0
  30. data/app/assets/images/lit/famfamfam_flags/be.png +0 -0
  31. data/app/assets/images/lit/famfamfam_flags/bf.png +0 -0
  32. data/app/assets/images/lit/famfamfam_flags/bg.png +0 -0
  33. data/app/assets/images/lit/famfamfam_flags/bh.png +0 -0
  34. data/app/assets/images/lit/famfamfam_flags/bi.png +0 -0
  35. data/app/assets/images/lit/famfamfam_flags/bj.png +0 -0
  36. data/app/assets/images/lit/famfamfam_flags/bm.png +0 -0
  37. data/app/assets/images/lit/famfamfam_flags/bn.png +0 -0
  38. data/app/assets/images/lit/famfamfam_flags/bo.png +0 -0
  39. data/app/assets/images/lit/famfamfam_flags/br.png +0 -0
  40. data/app/assets/images/lit/famfamfam_flags/bs.png +0 -0
  41. data/app/assets/images/lit/famfamfam_flags/bt.png +0 -0
  42. data/app/assets/images/lit/famfamfam_flags/bv.png +0 -0
  43. data/app/assets/images/lit/famfamfam_flags/bw.png +0 -0
  44. data/app/assets/images/lit/famfamfam_flags/by.png +0 -0
  45. data/app/assets/images/lit/famfamfam_flags/bz.png +0 -0
  46. data/app/assets/images/lit/famfamfam_flags/ca.png +0 -0
  47. data/app/assets/images/lit/famfamfam_flags/catalonia.png +0 -0
  48. data/app/assets/images/lit/famfamfam_flags/cc.png +0 -0
  49. data/app/assets/images/lit/famfamfam_flags/cd.png +0 -0
  50. data/app/assets/images/lit/famfamfam_flags/cf.png +0 -0
  51. data/app/assets/images/lit/famfamfam_flags/cg.png +0 -0
  52. data/app/assets/images/lit/famfamfam_flags/ch.png +0 -0
  53. data/app/assets/images/lit/famfamfam_flags/ci.png +0 -0
  54. data/app/assets/images/lit/famfamfam_flags/ck.png +0 -0
  55. data/app/assets/images/lit/famfamfam_flags/cl.png +0 -0
  56. data/app/assets/images/lit/famfamfam_flags/cm.png +0 -0
  57. data/app/assets/images/lit/famfamfam_flags/cn.png +0 -0
  58. data/app/assets/images/lit/famfamfam_flags/co.png +0 -0
  59. data/app/assets/images/lit/famfamfam_flags/cr.png +0 -0
  60. data/app/assets/images/lit/famfamfam_flags/cs.png +0 -0
  61. data/app/assets/images/lit/famfamfam_flags/cu.png +0 -0
  62. data/app/assets/images/lit/famfamfam_flags/cv.png +0 -0
  63. data/app/assets/images/lit/famfamfam_flags/cx.png +0 -0
  64. data/app/assets/images/lit/famfamfam_flags/cy.png +0 -0
  65. data/app/assets/images/lit/famfamfam_flags/cz.png +0 -0
  66. data/app/assets/images/lit/famfamfam_flags/da.png +0 -0
  67. data/app/assets/images/lit/famfamfam_flags/de.png +0 -0
  68. data/app/assets/images/lit/famfamfam_flags/dj.png +0 -0
  69. data/app/assets/images/lit/famfamfam_flags/dk.png +0 -0
  70. data/app/assets/images/lit/famfamfam_flags/dm.png +0 -0
  71. data/app/assets/images/lit/famfamfam_flags/do.png +0 -0
  72. data/app/assets/images/lit/famfamfam_flags/dz.png +0 -0
  73. data/app/assets/images/lit/famfamfam_flags/ec.png +0 -0
  74. data/app/assets/images/lit/famfamfam_flags/ee.png +0 -0
  75. data/app/assets/images/lit/famfamfam_flags/eg.png +0 -0
  76. data/app/assets/images/lit/famfamfam_flags/eh.png +0 -0
  77. data/app/assets/images/lit/famfamfam_flags/en.png +0 -0
  78. data/app/assets/images/lit/famfamfam_flags/england.png +0 -0
  79. data/app/assets/images/lit/famfamfam_flags/er.png +0 -0
  80. data/app/assets/images/lit/famfamfam_flags/es.png +0 -0
  81. data/app/assets/images/lit/famfamfam_flags/et.png +0 -0
  82. data/app/assets/images/lit/famfamfam_flags/europeanunion.png +0 -0
  83. data/app/assets/images/lit/famfamfam_flags/fam.png +0 -0
  84. data/app/assets/images/lit/famfamfam_flags/fi.png +0 -0
  85. data/app/assets/images/lit/famfamfam_flags/fj.png +0 -0
  86. data/app/assets/images/lit/famfamfam_flags/fk.png +0 -0
  87. data/app/assets/images/lit/famfamfam_flags/fm.png +0 -0
  88. data/app/assets/images/lit/famfamfam_flags/fo.png +0 -0
  89. data/app/assets/images/lit/famfamfam_flags/fr.png +0 -0
  90. data/app/assets/images/lit/famfamfam_flags/ga.png +0 -0
  91. data/app/assets/images/lit/famfamfam_flags/gb.png +0 -0
  92. data/app/assets/images/lit/famfamfam_flags/gd.png +0 -0
  93. data/app/assets/images/lit/famfamfam_flags/ge.png +0 -0
  94. data/app/assets/images/lit/famfamfam_flags/gf.png +0 -0
  95. data/app/assets/images/lit/famfamfam_flags/gh.png +0 -0
  96. data/app/assets/images/lit/famfamfam_flags/gi.png +0 -0
  97. data/app/assets/images/lit/famfamfam_flags/gl.png +0 -0
  98. data/app/assets/images/lit/famfamfam_flags/gm.png +0 -0
  99. data/app/assets/images/lit/famfamfam_flags/gn.png +0 -0
  100. data/app/assets/images/lit/famfamfam_flags/gp.png +0 -0
  101. data/app/assets/images/lit/famfamfam_flags/gq.png +0 -0
  102. data/app/assets/images/lit/famfamfam_flags/gr.png +0 -0
  103. data/app/assets/images/lit/famfamfam_flags/gs.png +0 -0
  104. data/app/assets/images/lit/famfamfam_flags/gt.png +0 -0
  105. data/app/assets/images/lit/famfamfam_flags/gu.png +0 -0
  106. data/app/assets/images/lit/famfamfam_flags/gw.png +0 -0
  107. data/app/assets/images/lit/famfamfam_flags/gy.png +0 -0
  108. data/app/assets/images/lit/famfamfam_flags/hk.png +0 -0
  109. data/app/assets/images/lit/famfamfam_flags/hm.png +0 -0
  110. data/app/assets/images/lit/famfamfam_flags/hn.png +0 -0
  111. data/app/assets/images/lit/famfamfam_flags/hr.png +0 -0
  112. data/app/assets/images/lit/famfamfam_flags/ht.png +0 -0
  113. data/app/assets/images/lit/famfamfam_flags/hu.png +0 -0
  114. data/app/assets/images/lit/famfamfam_flags/id.png +0 -0
  115. data/app/assets/images/lit/famfamfam_flags/ie.png +0 -0
  116. data/app/assets/images/lit/famfamfam_flags/il.png +0 -0
  117. data/app/assets/images/lit/famfamfam_flags/in.png +0 -0
  118. data/app/assets/images/lit/famfamfam_flags/io.png +0 -0
  119. data/app/assets/images/lit/famfamfam_flags/iq.png +0 -0
  120. data/app/assets/images/lit/famfamfam_flags/ir.png +0 -0
  121. data/app/assets/images/lit/famfamfam_flags/is.png +0 -0
  122. data/app/assets/images/lit/famfamfam_flags/it.png +0 -0
  123. data/app/assets/images/lit/famfamfam_flags/ja.png +0 -0
  124. data/app/assets/images/lit/famfamfam_flags/jm.png +0 -0
  125. data/app/assets/images/lit/famfamfam_flags/jo.png +0 -0
  126. data/app/assets/images/lit/famfamfam_flags/jp.png +0 -0
  127. data/app/assets/images/lit/famfamfam_flags/ke.png +0 -0
  128. data/app/assets/images/lit/famfamfam_flags/kg.png +0 -0
  129. data/app/assets/images/lit/famfamfam_flags/kh.png +0 -0
  130. data/app/assets/images/lit/famfamfam_flags/ki.png +0 -0
  131. data/app/assets/images/lit/famfamfam_flags/km.png +0 -0
  132. data/app/assets/images/lit/famfamfam_flags/kn.png +0 -0
  133. data/app/assets/images/lit/famfamfam_flags/kp.png +0 -0
  134. data/app/assets/images/lit/famfamfam_flags/kr.png +0 -0
  135. data/app/assets/images/lit/famfamfam_flags/kw.png +0 -0
  136. data/app/assets/images/lit/famfamfam_flags/ky.png +0 -0
  137. data/app/assets/images/lit/famfamfam_flags/kz.png +0 -0
  138. data/app/assets/images/lit/famfamfam_flags/la.png +0 -0
  139. data/app/assets/images/lit/famfamfam_flags/lb.png +0 -0
  140. data/app/assets/images/lit/famfamfam_flags/lc.png +0 -0
  141. data/app/assets/images/lit/famfamfam_flags/li.png +0 -0
  142. data/app/assets/images/lit/famfamfam_flags/lk.png +0 -0
  143. data/app/assets/images/lit/famfamfam_flags/lr.png +0 -0
  144. data/app/assets/images/lit/famfamfam_flags/ls.png +0 -0
  145. data/app/assets/images/lit/famfamfam_flags/lt.png +0 -0
  146. data/app/assets/images/lit/famfamfam_flags/lu.png +0 -0
  147. data/app/assets/images/lit/famfamfam_flags/lv.png +0 -0
  148. data/app/assets/images/lit/famfamfam_flags/ly.png +0 -0
  149. data/app/assets/images/lit/famfamfam_flags/ma.png +0 -0
  150. data/app/assets/images/lit/famfamfam_flags/mc.png +0 -0
  151. data/app/assets/images/lit/famfamfam_flags/md.png +0 -0
  152. data/app/assets/images/lit/famfamfam_flags/me.png +0 -0
  153. data/app/assets/images/lit/famfamfam_flags/mg.png +0 -0
  154. data/app/assets/images/lit/famfamfam_flags/mh.png +0 -0
  155. data/app/assets/images/lit/famfamfam_flags/mk.png +0 -0
  156. data/app/assets/images/lit/famfamfam_flags/ml.png +0 -0
  157. data/app/assets/images/lit/famfamfam_flags/mm.png +0 -0
  158. data/app/assets/images/lit/famfamfam_flags/mn.png +0 -0
  159. data/app/assets/images/lit/famfamfam_flags/mo.png +0 -0
  160. data/app/assets/images/lit/famfamfam_flags/mp.png +0 -0
  161. data/app/assets/images/lit/famfamfam_flags/mq.png +0 -0
  162. data/app/assets/images/lit/famfamfam_flags/mr.png +0 -0
  163. data/app/assets/images/lit/famfamfam_flags/ms.png +0 -0
  164. data/app/assets/images/lit/famfamfam_flags/mt.png +0 -0
  165. data/app/assets/images/lit/famfamfam_flags/mu.png +0 -0
  166. data/app/assets/images/lit/famfamfam_flags/mv.png +0 -0
  167. data/app/assets/images/lit/famfamfam_flags/mw.png +0 -0
  168. data/app/assets/images/lit/famfamfam_flags/mx.png +0 -0
  169. data/app/assets/images/lit/famfamfam_flags/my.png +0 -0
  170. data/app/assets/images/lit/famfamfam_flags/mz.png +0 -0
  171. data/app/assets/images/lit/famfamfam_flags/na.png +0 -0
  172. data/app/assets/images/lit/famfamfam_flags/nc.png +0 -0
  173. data/app/assets/images/lit/famfamfam_flags/ne.png +0 -0
  174. data/app/assets/images/lit/famfamfam_flags/nf.png +0 -0
  175. data/app/assets/images/lit/famfamfam_flags/ng.png +0 -0
  176. data/app/assets/images/lit/famfamfam_flags/ni.png +0 -0
  177. data/app/assets/images/lit/famfamfam_flags/nl.png +0 -0
  178. data/app/assets/images/lit/famfamfam_flags/no.png +0 -0
  179. data/app/assets/images/lit/famfamfam_flags/np.png +0 -0
  180. data/app/assets/images/lit/famfamfam_flags/nr.png +0 -0
  181. data/app/assets/images/lit/famfamfam_flags/nu.png +0 -0
  182. data/app/assets/images/lit/famfamfam_flags/nz.png +0 -0
  183. data/app/assets/images/lit/famfamfam_flags/om.png +0 -0
  184. data/app/assets/images/lit/famfamfam_flags/pa.png +0 -0
  185. data/app/assets/images/lit/famfamfam_flags/pe.png +0 -0
  186. data/app/assets/images/lit/famfamfam_flags/pf.png +0 -0
  187. data/app/assets/images/lit/famfamfam_flags/pg.png +0 -0
  188. data/app/assets/images/lit/famfamfam_flags/ph.png +0 -0
  189. data/app/assets/images/lit/famfamfam_flags/pk.png +0 -0
  190. data/app/assets/images/lit/famfamfam_flags/pl.png +0 -0
  191. data/app/assets/images/lit/famfamfam_flags/pm.png +0 -0
  192. data/app/assets/images/lit/famfamfam_flags/pn.png +0 -0
  193. data/app/assets/images/lit/famfamfam_flags/pr.png +0 -0
  194. data/app/assets/images/lit/famfamfam_flags/ps.png +0 -0
  195. data/app/assets/images/lit/famfamfam_flags/pt.png +0 -0
  196. data/app/assets/images/lit/famfamfam_flags/pw.png +0 -0
  197. data/app/assets/images/lit/famfamfam_flags/py.png +0 -0
  198. data/app/assets/images/lit/famfamfam_flags/qa.png +0 -0
  199. data/app/assets/images/lit/famfamfam_flags/re.png +0 -0
  200. data/app/assets/images/lit/famfamfam_flags/ro.png +0 -0
  201. data/app/assets/images/lit/famfamfam_flags/rs.png +0 -0
  202. data/app/assets/images/lit/famfamfam_flags/ru.png +0 -0
  203. data/app/assets/images/lit/famfamfam_flags/rw.png +0 -0
  204. data/app/assets/images/lit/famfamfam_flags/sa.png +0 -0
  205. data/app/assets/images/lit/famfamfam_flags/sb.png +0 -0
  206. data/app/assets/images/lit/famfamfam_flags/sc.png +0 -0
  207. data/app/assets/images/lit/famfamfam_flags/scotland.png +0 -0
  208. data/app/assets/images/lit/famfamfam_flags/sd.png +0 -0
  209. data/app/assets/images/lit/famfamfam_flags/se.png +0 -0
  210. data/app/assets/images/lit/famfamfam_flags/sg.png +0 -0
  211. data/app/assets/images/lit/famfamfam_flags/sh.png +0 -0
  212. data/app/assets/images/lit/famfamfam_flags/si.png +0 -0
  213. data/app/assets/images/lit/famfamfam_flags/sj.png +0 -0
  214. data/app/assets/images/lit/famfamfam_flags/sk.png +0 -0
  215. data/app/assets/images/lit/famfamfam_flags/sl.png +0 -0
  216. data/app/assets/images/lit/famfamfam_flags/sm.png +0 -0
  217. data/app/assets/images/lit/famfamfam_flags/sn.png +0 -0
  218. data/app/assets/images/lit/famfamfam_flags/so.png +0 -0
  219. data/app/assets/images/lit/famfamfam_flags/sr.png +0 -0
  220. data/app/assets/images/lit/famfamfam_flags/st.png +0 -0
  221. data/app/assets/images/lit/famfamfam_flags/sv.png +0 -0
  222. data/app/assets/images/lit/famfamfam_flags/sy.png +0 -0
  223. data/app/assets/images/lit/famfamfam_flags/sz.png +0 -0
  224. data/app/assets/images/lit/famfamfam_flags/tc.png +0 -0
  225. data/app/assets/images/lit/famfamfam_flags/td.png +0 -0
  226. data/app/assets/images/lit/famfamfam_flags/tf.png +0 -0
  227. data/app/assets/images/lit/famfamfam_flags/tg.png +0 -0
  228. data/app/assets/images/lit/famfamfam_flags/th.png +0 -0
  229. data/app/assets/images/lit/famfamfam_flags/tj.png +0 -0
  230. data/app/assets/images/lit/famfamfam_flags/tk.png +0 -0
  231. data/app/assets/images/lit/famfamfam_flags/tl.png +0 -0
  232. data/app/assets/images/lit/famfamfam_flags/tm.png +0 -0
  233. data/app/assets/images/lit/famfamfam_flags/tn.png +0 -0
  234. data/app/assets/images/lit/famfamfam_flags/to.png +0 -0
  235. data/app/assets/images/lit/famfamfam_flags/tr.png +0 -0
  236. data/app/assets/images/lit/famfamfam_flags/tt.png +0 -0
  237. data/app/assets/images/lit/famfamfam_flags/tv.png +0 -0
  238. data/app/assets/images/lit/famfamfam_flags/tw.png +0 -0
  239. data/app/assets/images/lit/famfamfam_flags/tz.png +0 -0
  240. data/app/assets/images/lit/famfamfam_flags/ua.png +0 -0
  241. data/app/assets/images/lit/famfamfam_flags/ug.png +0 -0
  242. data/app/assets/images/lit/famfamfam_flags/um.png +0 -0
  243. data/app/assets/images/lit/famfamfam_flags/us.png +0 -0
  244. data/app/assets/images/lit/famfamfam_flags/uy.png +0 -0
  245. data/app/assets/images/lit/famfamfam_flags/uz.png +0 -0
  246. data/app/assets/images/lit/famfamfam_flags/va.png +0 -0
  247. data/app/assets/images/lit/famfamfam_flags/vc.png +0 -0
  248. data/app/assets/images/lit/famfamfam_flags/ve.png +0 -0
  249. data/app/assets/images/lit/famfamfam_flags/vg.png +0 -0
  250. data/app/assets/images/lit/famfamfam_flags/vi.png +0 -0
  251. data/app/assets/images/lit/famfamfam_flags/vn.png +0 -0
  252. data/app/assets/images/lit/famfamfam_flags/vu.png +0 -0
  253. data/app/assets/images/lit/famfamfam_flags/wales.png +0 -0
  254. data/app/assets/images/lit/famfamfam_flags/wf.png +0 -0
  255. data/app/assets/images/lit/famfamfam_flags/ws.png +0 -0
  256. data/app/assets/images/lit/famfamfam_flags/ye.png +0 -0
  257. data/app/assets/images/lit/famfamfam_flags/yt.png +0 -0
  258. data/app/assets/images/lit/famfamfam_flags/za.png +0 -0
  259. data/app/assets/images/lit/famfamfam_flags/zm.png +0 -0
  260. data/app/assets/images/lit/famfamfam_flags/zw.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fc9495f36feac58c3bd78947fc6ec550387d9c25751474515b117e7fbbeeffc
4
- data.tar.gz: 75584cbb5204b1204826e65eddb2a1c0553f9fbd4d037c596207959d1b458fa4
3
+ metadata.gz: 4c5dfa0728bf37d5d8ec30cf4e41f35fdbb3b983435dc7bfb13f32dfb6f7a158
4
+ data.tar.gz: 30790191f771ca56d7e0fa4437a8dc24ef2cabb93ba001165ad1ad1f6d134b6e
5
5
  SHA512:
6
- metadata.gz: 6811efb9e66943fc19250874f204761857e6ec4ffe012334fb72d10a33ccfd718c818e4b680a559d35d11a21bcf7a40995f6410277d1c905b2b18bcb6326e194
7
- data.tar.gz: e6fd5b2b8759984db4b7cefe6506a4378143de6d1d6a6c066196485abc45310f2d11b0a382cf62e494149d0e27b4ead807374b1f174267b113e26b6abfacea03
6
+ metadata.gz: d2681e97e1f16e71ecccb21fdd61075538396f02755d14241c157c2d9862ba3d507b0110cfe8dcb052bdd7a85198805b59c1ad42968aa68c1bb5352e132711fa
7
+ data.tar.gz: e90e44494c18adcc7c6ccbb4fc9d3e6963cba5269daea7eb8f0c53619ba33eb086b09ce692fd7479171f44aa3c6396993bd5fe7cf948b76f8605526b4485ac95
@@ -1,5 +1,5 @@
1
1
  <strong>All localization keys</strong> <%= Lit::LocalizationKey.active.count(:id) %><br/>
2
2
  <% @locales.each do |l| %>
3
- <strong><%= image_tag "lit/famfamfam_flags/#{l.locale[0,2]}.png" %> <%= I18n.t("lit.locale_to_languages.#{l.locale}", :default=>l.locale) %>:</strong> <span title="<%= "#{l.changed_localizations_count}/#{l.all_localizations_count}" %>"><%= l.translated_percentage %>%</span><br/>
3
+ <strong><%= EmojiFlag.new(l.locale) %> <%= I18n.t("lit.locale_to_languages.#{l.locale}", :default=>l.locale) %>:</strong> <span title="<%= "#{l.changed_localizations_count}/#{l.all_localizations_count}" %>"><%= l.translated_percentage %>%</span><br/>
4
4
  <% end %>
5
5
 
@@ -25,7 +25,7 @@
25
25
  <% @incomming_localizations.each do |il| %>
26
26
  <tr data-id="<%= il.id %>">
27
27
  <td colspan="3">
28
- <%= image_tag "lit/famfamfam_flags/#{il.locale_str[0,2]}.png" %>
28
+ <%= image_tag EmojiFlag.new(il.locale_str) %>
29
29
  <strong><%= il.full_key %></strong>
30
30
  </td>
31
31
  </tr>
@@ -43,7 +43,7 @@
43
43
  <%= render partial: 'localization_row', locals: {localization: Lit.init.cache["#{locale}.#{lk.localization_key}"]} %>
44
44
  </td>
45
45
  <td class="locale_row text-center">
46
- <%= image_tag "lit/famfamfam_flags/#{locale[0,2]}.png" %>
46
+ <%= EmojiFlag.new(locale) %>
47
47
  <%= locale %>
48
48
  <% if localization %>
49
49
  <%= link_to lit.previous_versions_localization_key_localization_path(lk, localization, format: :js), class: "show_prev_versions #{'hidden' unless versions?(localization)}", remote: true do %>
@@ -115,10 +115,14 @@ module Lit
115
115
  I18n.backend.reload!
116
116
  end
117
117
 
118
- def reset
118
+ def reset_local_cache
119
119
  @locale_cache = {}
120
120
  @localization_key_object_cache = {}
121
121
  @localization_object_cache = {}
122
+ end
123
+
124
+ def reset
125
+ reset_local_cache
122
126
  localizations.clear
123
127
  localization_keys.clear
124
128
  load_all_translations
@@ -17,6 +17,12 @@ module Lit
17
17
  end
18
18
  end
19
19
 
20
+ initializer 'lit.reloader' do |app|
21
+ config.to_prepare do
22
+ Lit.loader.cache.reset_local_cache if Lit.loader
23
+ end
24
+ end
25
+
20
26
  initializer 'lit.migrations.append' do |app|
21
27
  unless app.root.to_s.include?(root.to_s)
22
28
  config.paths['db/migrate'].expanded.each do |expanded_path|
@@ -72,6 +72,7 @@ module Lit
72
72
  # check in cache or in simple backend
73
73
  content = @cache[key_with_locale] || super
74
74
  return content if parts.size <= 1
75
+
75
76
  if content.nil? && should_cache?(key_with_locale, options)
76
77
  new_content = @cache.init_key_with_value(key_with_locale, content)
77
78
  content = new_content if content.nil? # Content can change when Lit.humanize is true for example
@@ -181,7 +182,7 @@ module Lit
181
182
 
182
183
  def should_cache?(key_with_locale, options)
183
184
  if @cache.has_key?(key_with_locale)
184
- return false unless options[:default]
185
+ return false unless options[:default] && !options[:default].is_a?(Array)
185
186
  end
186
187
 
187
188
  _, key_without_locale = ::Lit::Cache.split_key(key_with_locale)
@@ -4,6 +4,7 @@ require 'lit/cache'
4
4
  require 'lit/export'
5
5
  require 'lit/import'
6
6
  require 'lit/cloud_translation'
7
+ require 'emoji_flag'
7
8
 
8
9
  module Lit
9
10
  class Loader
@@ -1,3 +1,3 @@
1
1
  module Lit
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Litwiniuk
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-01-10 00:00:00.000000000 Z
14
+ date: 2019-06-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -69,6 +69,20 @@ dependencies:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: emoji_flag
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
72
86
  - !ruby/object:Gem::Dependency
73
87
  name: appraisal
74
88
  requirement: !ruby/object:Gem::Requirement
@@ -193,256 +207,6 @@ files:
193
207
  - MIT-LICENSE
194
208
  - README.md
195
209
  - Rakefile
196
- - app/assets/images/lit/famfamfam_flags/ad.png
197
- - app/assets/images/lit/famfamfam_flags/ae.png
198
- - app/assets/images/lit/famfamfam_flags/af.png
199
- - app/assets/images/lit/famfamfam_flags/ag.png
200
- - app/assets/images/lit/famfamfam_flags/ai.png
201
- - app/assets/images/lit/famfamfam_flags/al.png
202
- - app/assets/images/lit/famfamfam_flags/am.png
203
- - app/assets/images/lit/famfamfam_flags/an.png
204
- - app/assets/images/lit/famfamfam_flags/ao.png
205
- - app/assets/images/lit/famfamfam_flags/ar.png
206
- - app/assets/images/lit/famfamfam_flags/as.png
207
- - app/assets/images/lit/famfamfam_flags/at.png
208
- - app/assets/images/lit/famfamfam_flags/au.png
209
- - app/assets/images/lit/famfamfam_flags/aw.png
210
- - app/assets/images/lit/famfamfam_flags/ax.png
211
- - app/assets/images/lit/famfamfam_flags/az.png
212
- - app/assets/images/lit/famfamfam_flags/ba.png
213
- - app/assets/images/lit/famfamfam_flags/bb.png
214
- - app/assets/images/lit/famfamfam_flags/bd.png
215
- - app/assets/images/lit/famfamfam_flags/be.png
216
- - app/assets/images/lit/famfamfam_flags/bf.png
217
- - app/assets/images/lit/famfamfam_flags/bg.png
218
- - app/assets/images/lit/famfamfam_flags/bh.png
219
- - app/assets/images/lit/famfamfam_flags/bi.png
220
- - app/assets/images/lit/famfamfam_flags/bj.png
221
- - app/assets/images/lit/famfamfam_flags/bm.png
222
- - app/assets/images/lit/famfamfam_flags/bn.png
223
- - app/assets/images/lit/famfamfam_flags/bo.png
224
- - app/assets/images/lit/famfamfam_flags/br.png
225
- - app/assets/images/lit/famfamfam_flags/bs.png
226
- - app/assets/images/lit/famfamfam_flags/bt.png
227
- - app/assets/images/lit/famfamfam_flags/bv.png
228
- - app/assets/images/lit/famfamfam_flags/bw.png
229
- - app/assets/images/lit/famfamfam_flags/by.png
230
- - app/assets/images/lit/famfamfam_flags/bz.png
231
- - app/assets/images/lit/famfamfam_flags/ca.png
232
- - app/assets/images/lit/famfamfam_flags/catalonia.png
233
- - app/assets/images/lit/famfamfam_flags/cc.png
234
- - app/assets/images/lit/famfamfam_flags/cd.png
235
- - app/assets/images/lit/famfamfam_flags/cf.png
236
- - app/assets/images/lit/famfamfam_flags/cg.png
237
- - app/assets/images/lit/famfamfam_flags/ch.png
238
- - app/assets/images/lit/famfamfam_flags/ci.png
239
- - app/assets/images/lit/famfamfam_flags/ck.png
240
- - app/assets/images/lit/famfamfam_flags/cl.png
241
- - app/assets/images/lit/famfamfam_flags/cm.png
242
- - app/assets/images/lit/famfamfam_flags/cn.png
243
- - app/assets/images/lit/famfamfam_flags/co.png
244
- - app/assets/images/lit/famfamfam_flags/cr.png
245
- - app/assets/images/lit/famfamfam_flags/cs.png
246
- - app/assets/images/lit/famfamfam_flags/cu.png
247
- - app/assets/images/lit/famfamfam_flags/cv.png
248
- - app/assets/images/lit/famfamfam_flags/cx.png
249
- - app/assets/images/lit/famfamfam_flags/cy.png
250
- - app/assets/images/lit/famfamfam_flags/cz.png
251
- - app/assets/images/lit/famfamfam_flags/da.png
252
- - app/assets/images/lit/famfamfam_flags/de.png
253
- - app/assets/images/lit/famfamfam_flags/dj.png
254
- - app/assets/images/lit/famfamfam_flags/dk.png
255
- - app/assets/images/lit/famfamfam_flags/dm.png
256
- - app/assets/images/lit/famfamfam_flags/do.png
257
- - app/assets/images/lit/famfamfam_flags/dz.png
258
- - app/assets/images/lit/famfamfam_flags/ec.png
259
- - app/assets/images/lit/famfamfam_flags/ee.png
260
- - app/assets/images/lit/famfamfam_flags/eg.png
261
- - app/assets/images/lit/famfamfam_flags/eh.png
262
- - app/assets/images/lit/famfamfam_flags/en.png
263
- - app/assets/images/lit/famfamfam_flags/england.png
264
- - app/assets/images/lit/famfamfam_flags/er.png
265
- - app/assets/images/lit/famfamfam_flags/es.png
266
- - app/assets/images/lit/famfamfam_flags/et.png
267
- - app/assets/images/lit/famfamfam_flags/europeanunion.png
268
- - app/assets/images/lit/famfamfam_flags/fam.png
269
- - app/assets/images/lit/famfamfam_flags/fi.png
270
- - app/assets/images/lit/famfamfam_flags/fj.png
271
- - app/assets/images/lit/famfamfam_flags/fk.png
272
- - app/assets/images/lit/famfamfam_flags/fm.png
273
- - app/assets/images/lit/famfamfam_flags/fo.png
274
- - app/assets/images/lit/famfamfam_flags/fr.png
275
- - app/assets/images/lit/famfamfam_flags/ga.png
276
- - app/assets/images/lit/famfamfam_flags/gb.png
277
- - app/assets/images/lit/famfamfam_flags/gd.png
278
- - app/assets/images/lit/famfamfam_flags/ge.png
279
- - app/assets/images/lit/famfamfam_flags/gf.png
280
- - app/assets/images/lit/famfamfam_flags/gh.png
281
- - app/assets/images/lit/famfamfam_flags/gi.png
282
- - app/assets/images/lit/famfamfam_flags/gl.png
283
- - app/assets/images/lit/famfamfam_flags/gm.png
284
- - app/assets/images/lit/famfamfam_flags/gn.png
285
- - app/assets/images/lit/famfamfam_flags/gp.png
286
- - app/assets/images/lit/famfamfam_flags/gq.png
287
- - app/assets/images/lit/famfamfam_flags/gr.png
288
- - app/assets/images/lit/famfamfam_flags/gs.png
289
- - app/assets/images/lit/famfamfam_flags/gt.png
290
- - app/assets/images/lit/famfamfam_flags/gu.png
291
- - app/assets/images/lit/famfamfam_flags/gw.png
292
- - app/assets/images/lit/famfamfam_flags/gy.png
293
- - app/assets/images/lit/famfamfam_flags/hk.png
294
- - app/assets/images/lit/famfamfam_flags/hm.png
295
- - app/assets/images/lit/famfamfam_flags/hn.png
296
- - app/assets/images/lit/famfamfam_flags/hr.png
297
- - app/assets/images/lit/famfamfam_flags/ht.png
298
- - app/assets/images/lit/famfamfam_flags/hu.png
299
- - app/assets/images/lit/famfamfam_flags/id.png
300
- - app/assets/images/lit/famfamfam_flags/ie.png
301
- - app/assets/images/lit/famfamfam_flags/il.png
302
- - app/assets/images/lit/famfamfam_flags/in.png
303
- - app/assets/images/lit/famfamfam_flags/io.png
304
- - app/assets/images/lit/famfamfam_flags/iq.png
305
- - app/assets/images/lit/famfamfam_flags/ir.png
306
- - app/assets/images/lit/famfamfam_flags/is.png
307
- - app/assets/images/lit/famfamfam_flags/it.png
308
- - app/assets/images/lit/famfamfam_flags/ja.png
309
- - app/assets/images/lit/famfamfam_flags/jm.png
310
- - app/assets/images/lit/famfamfam_flags/jo.png
311
- - app/assets/images/lit/famfamfam_flags/jp.png
312
- - app/assets/images/lit/famfamfam_flags/ke.png
313
- - app/assets/images/lit/famfamfam_flags/kg.png
314
- - app/assets/images/lit/famfamfam_flags/kh.png
315
- - app/assets/images/lit/famfamfam_flags/ki.png
316
- - app/assets/images/lit/famfamfam_flags/km.png
317
- - app/assets/images/lit/famfamfam_flags/kn.png
318
- - app/assets/images/lit/famfamfam_flags/kp.png
319
- - app/assets/images/lit/famfamfam_flags/kr.png
320
- - app/assets/images/lit/famfamfam_flags/kw.png
321
- - app/assets/images/lit/famfamfam_flags/ky.png
322
- - app/assets/images/lit/famfamfam_flags/kz.png
323
- - app/assets/images/lit/famfamfam_flags/la.png
324
- - app/assets/images/lit/famfamfam_flags/lb.png
325
- - app/assets/images/lit/famfamfam_flags/lc.png
326
- - app/assets/images/lit/famfamfam_flags/li.png
327
- - app/assets/images/lit/famfamfam_flags/lk.png
328
- - app/assets/images/lit/famfamfam_flags/lr.png
329
- - app/assets/images/lit/famfamfam_flags/ls.png
330
- - app/assets/images/lit/famfamfam_flags/lt.png
331
- - app/assets/images/lit/famfamfam_flags/lu.png
332
- - app/assets/images/lit/famfamfam_flags/lv.png
333
- - app/assets/images/lit/famfamfam_flags/ly.png
334
- - app/assets/images/lit/famfamfam_flags/ma.png
335
- - app/assets/images/lit/famfamfam_flags/mc.png
336
- - app/assets/images/lit/famfamfam_flags/md.png
337
- - app/assets/images/lit/famfamfam_flags/me.png
338
- - app/assets/images/lit/famfamfam_flags/mg.png
339
- - app/assets/images/lit/famfamfam_flags/mh.png
340
- - app/assets/images/lit/famfamfam_flags/mk.png
341
- - app/assets/images/lit/famfamfam_flags/ml.png
342
- - app/assets/images/lit/famfamfam_flags/mm.png
343
- - app/assets/images/lit/famfamfam_flags/mn.png
344
- - app/assets/images/lit/famfamfam_flags/mo.png
345
- - app/assets/images/lit/famfamfam_flags/mp.png
346
- - app/assets/images/lit/famfamfam_flags/mq.png
347
- - app/assets/images/lit/famfamfam_flags/mr.png
348
- - app/assets/images/lit/famfamfam_flags/ms.png
349
- - app/assets/images/lit/famfamfam_flags/mt.png
350
- - app/assets/images/lit/famfamfam_flags/mu.png
351
- - app/assets/images/lit/famfamfam_flags/mv.png
352
- - app/assets/images/lit/famfamfam_flags/mw.png
353
- - app/assets/images/lit/famfamfam_flags/mx.png
354
- - app/assets/images/lit/famfamfam_flags/my.png
355
- - app/assets/images/lit/famfamfam_flags/mz.png
356
- - app/assets/images/lit/famfamfam_flags/na.png
357
- - app/assets/images/lit/famfamfam_flags/nc.png
358
- - app/assets/images/lit/famfamfam_flags/ne.png
359
- - app/assets/images/lit/famfamfam_flags/nf.png
360
- - app/assets/images/lit/famfamfam_flags/ng.png
361
- - app/assets/images/lit/famfamfam_flags/ni.png
362
- - app/assets/images/lit/famfamfam_flags/nl.png
363
- - app/assets/images/lit/famfamfam_flags/no.png
364
- - app/assets/images/lit/famfamfam_flags/np.png
365
- - app/assets/images/lit/famfamfam_flags/nr.png
366
- - app/assets/images/lit/famfamfam_flags/nu.png
367
- - app/assets/images/lit/famfamfam_flags/nz.png
368
- - app/assets/images/lit/famfamfam_flags/om.png
369
- - app/assets/images/lit/famfamfam_flags/pa.png
370
- - app/assets/images/lit/famfamfam_flags/pe.png
371
- - app/assets/images/lit/famfamfam_flags/pf.png
372
- - app/assets/images/lit/famfamfam_flags/pg.png
373
- - app/assets/images/lit/famfamfam_flags/ph.png
374
- - app/assets/images/lit/famfamfam_flags/pk.png
375
- - app/assets/images/lit/famfamfam_flags/pl.png
376
- - app/assets/images/lit/famfamfam_flags/pm.png
377
- - app/assets/images/lit/famfamfam_flags/pn.png
378
- - app/assets/images/lit/famfamfam_flags/pr.png
379
- - app/assets/images/lit/famfamfam_flags/ps.png
380
- - app/assets/images/lit/famfamfam_flags/pt.png
381
- - app/assets/images/lit/famfamfam_flags/pw.png
382
- - app/assets/images/lit/famfamfam_flags/py.png
383
- - app/assets/images/lit/famfamfam_flags/qa.png
384
- - app/assets/images/lit/famfamfam_flags/re.png
385
- - app/assets/images/lit/famfamfam_flags/ro.png
386
- - app/assets/images/lit/famfamfam_flags/rs.png
387
- - app/assets/images/lit/famfamfam_flags/ru.png
388
- - app/assets/images/lit/famfamfam_flags/rw.png
389
- - app/assets/images/lit/famfamfam_flags/sa.png
390
- - app/assets/images/lit/famfamfam_flags/sb.png
391
- - app/assets/images/lit/famfamfam_flags/sc.png
392
- - app/assets/images/lit/famfamfam_flags/scotland.png
393
- - app/assets/images/lit/famfamfam_flags/sd.png
394
- - app/assets/images/lit/famfamfam_flags/se.png
395
- - app/assets/images/lit/famfamfam_flags/sg.png
396
- - app/assets/images/lit/famfamfam_flags/sh.png
397
- - app/assets/images/lit/famfamfam_flags/si.png
398
- - app/assets/images/lit/famfamfam_flags/sj.png
399
- - app/assets/images/lit/famfamfam_flags/sk.png
400
- - app/assets/images/lit/famfamfam_flags/sl.png
401
- - app/assets/images/lit/famfamfam_flags/sm.png
402
- - app/assets/images/lit/famfamfam_flags/sn.png
403
- - app/assets/images/lit/famfamfam_flags/so.png
404
- - app/assets/images/lit/famfamfam_flags/sr.png
405
- - app/assets/images/lit/famfamfam_flags/st.png
406
- - app/assets/images/lit/famfamfam_flags/sv.png
407
- - app/assets/images/lit/famfamfam_flags/sy.png
408
- - app/assets/images/lit/famfamfam_flags/sz.png
409
- - app/assets/images/lit/famfamfam_flags/tc.png
410
- - app/assets/images/lit/famfamfam_flags/td.png
411
- - app/assets/images/lit/famfamfam_flags/tf.png
412
- - app/assets/images/lit/famfamfam_flags/tg.png
413
- - app/assets/images/lit/famfamfam_flags/th.png
414
- - app/assets/images/lit/famfamfam_flags/tj.png
415
- - app/assets/images/lit/famfamfam_flags/tk.png
416
- - app/assets/images/lit/famfamfam_flags/tl.png
417
- - app/assets/images/lit/famfamfam_flags/tm.png
418
- - app/assets/images/lit/famfamfam_flags/tn.png
419
- - app/assets/images/lit/famfamfam_flags/to.png
420
- - app/assets/images/lit/famfamfam_flags/tr.png
421
- - app/assets/images/lit/famfamfam_flags/tt.png
422
- - app/assets/images/lit/famfamfam_flags/tv.png
423
- - app/assets/images/lit/famfamfam_flags/tw.png
424
- - app/assets/images/lit/famfamfam_flags/tz.png
425
- - app/assets/images/lit/famfamfam_flags/ua.png
426
- - app/assets/images/lit/famfamfam_flags/ug.png
427
- - app/assets/images/lit/famfamfam_flags/um.png
428
- - app/assets/images/lit/famfamfam_flags/us.png
429
- - app/assets/images/lit/famfamfam_flags/uy.png
430
- - app/assets/images/lit/famfamfam_flags/uz.png
431
- - app/assets/images/lit/famfamfam_flags/va.png
432
- - app/assets/images/lit/famfamfam_flags/vc.png
433
- - app/assets/images/lit/famfamfam_flags/ve.png
434
- - app/assets/images/lit/famfamfam_flags/vg.png
435
- - app/assets/images/lit/famfamfam_flags/vi.png
436
- - app/assets/images/lit/famfamfam_flags/vn.png
437
- - app/assets/images/lit/famfamfam_flags/vu.png
438
- - app/assets/images/lit/famfamfam_flags/wales.png
439
- - app/assets/images/lit/famfamfam_flags/wf.png
440
- - app/assets/images/lit/famfamfam_flags/ws.png
441
- - app/assets/images/lit/famfamfam_flags/ye.png
442
- - app/assets/images/lit/famfamfam_flags/yt.png
443
- - app/assets/images/lit/famfamfam_flags/za.png
444
- - app/assets/images/lit/famfamfam_flags/zm.png
445
- - app/assets/images/lit/famfamfam_flags/zw.png
446
210
  - app/assets/images/lit/jquery-te.png
447
211
  - app/assets/javascripts/lit/application.js
448
212
  - app/assets/javascripts/lit/backend/bootstrap.js.coffee
@@ -577,8 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
577
341
  - !ruby/object:Gem::Version
578
342
  version: '0'
579
343
  requirements: []
580
- rubyforge_project:
581
- rubygems_version: 2.7.8
344
+ rubygems_version: 3.0.3
582
345
  signing_key:
583
346
  specification_version: 4
584
347
  summary: Database powered i18n backend with web gui