1

I have a Rails/Angular webapp. We use two different methods to translate our app: Ruby Globalize i18n with the corresponding yml language files, and angular-translate with the corresponding json language files. Managing language files can be a pain. I just found the i18n-tasks gem on github to help find missing and unused keys in my yml language files. It works great! Does anyone know of a similar static analysis tool to help manage json language files? Is there a better way to do this?

As I write this I am wondering if there is some sort of i18n transpilation that I could do. Keep a single language file and generate the yml and json from that.

Features wanted:

  • sort keys alphabetically
  • delete unused keys in all language files
  • add missing keys in all language files
glebm
  • 20,282
  • 8
  • 51
  • 67
Jared Menard
  • 2,654
  • 1
  • 21
  • 22

1 Answers1

1

i18n-tasks already supports JSON, but you would need to write a custom scanner to detect usages of angular-translate. See the custom scanner example.

glebm
  • 20,282
  • 8
  • 51
  • 67