• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

localeapp

Replace string with I18n including key based on current file path, and uploads intial string to localeapp.
mgbatchelor
0.1.3 139
0
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

localeapp package

Currently only works for Rails Controllers

Replace a String in a rails controller with I18n.t("key"). Where the key will be the path to the controller, including the controller name, and the string downcased and underscored.

Example:

Given a basic rails project
---
app
  controllers
    admin
      test
        hello_controller.rb
  class HelloController < ApplicaitonController
 
    def index
      "Hello World"
    end
 
  end

This the create action will replace the selected text, and send a request to localeapp to create the key and english translation that it replaced.

  class HelloController < ApplicaitonController
 
    def index
      I18n.t('controllers.admin.test.hello.hello_world')
    end
 
  end

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by