Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:49
    pcothenet commented #283
  • May 16 20:06
    yorsant closed #419
  • May 16 18:23
    geoffharcourt commented #409
  • May 16 17:39
    davidwessman commented #409
  • May 16 16:56
    geoffharcourt commented #409
  • May 16 16:53
    glebm commented #409
  • May 16 16:41
    geoffharcourt commented #409
  • May 16 16:41
    geoffharcourt commented #409
  • May 16 08:49
    mtancoigne commented #373
  • May 16 08:00
    nurbs999 commented #373
  • May 16 07:16
    afdev82 commented #453
  • May 16 07:09
    davidwessman commented #453
  • May 16 07:01
    afdev82 commented #453
  • May 16 06:54
    davidwessman commented #453
  • May 16 06:52
    afdev82 commented #453
  • May 16 06:44
    davidwessman commented #453
  • May 15 20:31
    afdev82 commented #453
  • May 15 20:19
    davidwessman commented #373
  • May 15 18:59
    davidwessman commented #373
  • May 15 18:51
    davidwessman commented #409
Gleb Mazovetskiy
@glebm
ping
pong
PikachuEXE
@PikachuEXE
test
Erez Zukerman
@ezuk
pong, indeed
Gleb Mazovetskiy
@glebm
Great, it works!
So, I accepted a boring Java job at ACME corp, and I won't have much time to develop i18n-tasks in the near future
So I figured it's time to move i18n-tasks to an org
Rails i18n doesn't have an org yet, so let's start one
@ezuk has been working on an informational portal for Rails I18n, so far it has a number of interviews, more is coming http://ruby-i18n.github.io/rails-i18n.org/
Gleb Mazovetskiy
@glebm
Just found this https://github.com/ruby-i18n, invited Paul here
Tsvetelina Borisova
@tborisova
Hi
Can I use this gem with ruby 18.7?
1.8.7*
Gleb Mazovetskiy
@glebm
@tborisova nope sorry
@tborisova However, you can install ruby 2.1 and use the gem, regardless of what ruby your project requires
@tborisova 1.9.3 minimum
Tsvetelina Borisova
@tborisova
thanks
Alexey Shein
@conf
Hi
I've just started to use your gem (great by the way) and noticed that it doesn't use translations from gem 'russian'
Do you have any solution for this?
Alexey Shein
@conf
Oh, nevermind. I've read documentation again and found solution:
# read from a gem (config is parsed with ERB first, then YAML)
- "<%= %x[bundle show russian].chomp %>/lib/russian/locale/*.yml"
Julien Vanier
@monkbroc
Hi
Can you point me in the right direction to make the key matcher regexp more permissive? I have keys like t("home.index.100+_categories") that are marked as unused because of the +. I'm not sure which config to change or const to monkeypatch to allow +, $ and % in the translation keys.
Didn't know this was allowed in yaml :)
Julien Vanier
@monkbroc

Thanks. Here's how I monkeypatched it.

In i18n-task.yml

<% require('./config/initializers/i18n-tasks.rb') %>

base_locale: en
#...

In config/initializers/i18n-tasks.rb

if defined? I18n::Tasks::Scanners::BaseScanner
  # Monkeypatch the list of string symbols with a more permissive
  # version to make the i15r and i18n-tasks gems compatible
  I18n::Tasks::Scanners::BaseScanner.send(:remove_const, :VALID_KEY_RE)
  I18n::Tasks::Scanners::BaseScanner.const_set(:VALID_KEY_RE, /^([-\w.?!;:+$%@]|[\#{@}])+$/)
end
By the way, the reason I have those keys is that I'm using the i15r gem to automatically extract strings from my views. It generates symbols with +, $ and %.
John Nico Garcia
@Winter41
Love this gem!
Jack Chan
@jchanfnet
I used the i18n-tasks normalize command, and it split my long strings into multiple lines. Is there any way to disable that?
Jack Chan
@jchanfnet
found it. just gotta change the config to line_width: -1 under yaml write
Colin Browne
@ceres629
I'm currently using i18n gettext helpers instead of the default t() translate functions. Gettext uses () instead of t() however i18n-tasks does not detect this as a key in my views. Is there anyway to tell i18n-tasks that () also signifies a key?
Gleb Mazovetskiy
@glebm
@ceres629 You can override the scanner pattern by inheriting from the scanner and specifying the new scanner in the config. I suggest you use v0.9.0.rc2 for this
@ceres629 For 0.9, the easiest would be to monkey-patch this method https://github.com/glebm/i18n-tasks/blob/0.9-dev/lib/i18n/tasks/scanners/pattern_scanner.rb#L85 and to pass a different receivers: argument to the AST scanner constructor via the config
Colin Browne
@ceres629
many thx! I was able to figure it out thanks to your pointers!
Colin Browne
@ceres629

Is the strict config setting working in 0.9.0? I've added

search:
  strict: false

To my i18n-tasks.yml in my project, but it doesn't have any effect.

Gleb Mazovetskiy
@glebm
@ceres629 That's strange, there is currently a passing test for this https://github.com/glebm/i18n-tasks/blob/0.9-dev/spec/i18n_tasks_spec.rb#L110
@ceres629 Perhaps it's a problem with config parsing, can you please have a look?
Russell Osborne
@rposborne
Quick question I am trying to inject nil values for missing keys vs an empty string any hints on how to achieve this?
found
glebm/i18n-tasks#170
Russell Osborne
@rposborne
I am attempting to write a custom scanner for Spree, using the 0.9.0-rc2 release. Maybe someone can point me in the right direction, Spree uses a helper Spree.t("key") to use the spree namespace in I18n. I have successfully writing a Scanner for this but I am dealing with an overly eager PatterMatcherWithScope that matches these the above call again.