-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gettext is broken (no such file textdomain_manager) #1
Comments
Hi. Sorry for a late response. I didn't have much time for this fork lately, but I'll look into it. Can't promise anything soon though - maybe later this week. I'm not sure I will be making stable releases - I probably won't have time to actively maintain it. This gem breaks for me quite often. I'd prefer mutoh to pull the patches into the original repo, but it does not seem likely. BTW: The fact that this gem was totally broken when I created the fork and there was no working one for Rails 3 makes me wonder if anyone is using gettext in Ruby at all. There's fast_gettext, but it does not have anything to extract strings from the code. Maybe there's some obscure tool for creating .pot files from Ruby that everyone's using? |
Hi Kamil! Am Dienstag, 22. November 2011, 19:50:55 schrieben Sie:
Even in the next few weeks would be awesome. Better late than never. I would
I had already last year a mail conversation with mutoh. Maybe you are right.
I have also the impression, that the standard toolchain gettext with po and In the ruby world there are a lot of other possibilities for i18n. KDE is also available for python and php. Luckily they don't suffer the same
Clearly ruby is missing in this list. So maybe it would be the best to just Best, |
I am using it for i18n in my application so it'll be fixed sooner or later. I'll let you know in this thread. What surprises me is that there are actively maintained "fast_gettext" and "gettext_i18n_rails" gems. Someone is using gettext in Ruby. But how do they extract the strings from the code? I doubt they do this manually. I've seen a gem for reporting untranslated strings in the log file but it's for the built-in Rails i18n. I have started a thread on Ruby on Rails Talk mailing list to find out. Support for Ruby in gettext would probably be better than in a gem, I could even try to do it, but I'm concerned with the maintenance. Would gettext people be willing to fix the code on their own when something breaks or would they just drop the unmaintained Ruby part? In the current situation where I can't really commit to the maintenance I think that a gem hosted on GitHub is a better solution. There is a lot of Ruby folk willing to submit patches here, so even if it just sits there unmaintained anyone can easily fork it and fix it for their own use. |
Hi cameel, We're in the same situation at out company. We are using gettext, fast_gettext and gettext_i18n_rails with the same workflow, using gettext to extract the strings and we get hit often with issues related to outdated and not maintained gem. We are currently not able to use gettext with rails3, ruby 1.9.2-p290 and the lastest rubygems. Your patch works with the rake find and pack tasks, but then the application fail to show certain strings. I've commented in the original issue in mutoh's repository, mutoh#11 We'd like to keep using gettext, but we are considering moving to i18n after this issues. But if you are willing to take over, we are willing to help if we can. |
Hi Unfortunately I failed to find enough time for this last week and earlier this week, but since there seem to be ever more people wanting this fixed, I'll m going to look into it tomorrow and see what I can do. |
I have started working on this today. I want to make First thing is that gettext fails in projects using Haml because gettext_i18n_rails that provides Haml parser is missing a dependency on ruby_parse tree. I have submitted a patch for this. grosser/gettext_i18n_rails#39 . A quick workaround for this is to add ruby_parser to your Gemfile: gem 'ruby_parser' |
Today I have fixed It turned out not to be caused by broken gettext but by the fact that gettext_i18n_rails ignores namespaced models so it doesn't solve your problems but I did not know the cause when I started debugging it. Anyway, it's another step forward. More fixes coming soon. It also turns out that my last patch to gettext_i18n_rails (already pulled in and released with gettext_i18n_rails 0.3.1) does fix |
Today I have dug deeper into into problems with rgettext and below is what I found. For me it fails in locale gem because @salout: Your problem with You seem to be using gettext 2.0.0. I don't know if that's because of outdated gemspec in this repository (it was saying version is 2.0.0; I have just fixed it) or if you're actually using an old version. The latest version released by mutoh is 2.1.0. If it's the latter, please update to 2.1.0 from RubyGems or, better, try to use my fork for now. Easiest way to do this would be to install # Gemfile
source 'http://rubygems.org'
gem 'gettext', '>= 2.1.0', :git => 'git://github.com/cameel/gettext.git'
gem 'locale', '>= 2.0.6', :git => 'git://github.com/mutoh/locale.git' As for the long-term solution, I am starting to think that relying on gettext gem is not a good idea. A better one would be to extract parts related to creating/updating .po/.pot files into a separate gem and make it use fast_gettext which is actively maintained. Or maybe try to get get_pomo going since it seems to have similar scope. |
@dgilperez I can't reproduce your problem. I tried both with my application and on a clean Rails 3.1.3 one and in both cases strings with embedded %{} are translated correctly. Can you provide more information on your setup? In particular, are you actually using My gettext setup in Gemfile is this (note # Gemfile
...
gem 'rails-i18n'
gem 'gettext_i18n_rails', '>= 0.3.2'
group :development do
gem 'gettext', '>= 2.1.0', :git => 'git://github.com/cameel/gettext.git', :require => false
end
... |
Hi @cameel, That's right, we're using Here is my setup, just in case it helps others:
What are you using Many thanks for your efforts. We're now able to operate normally again, both with |
Nice to hear that it works now.
|
Status-update: Using this gems (https://gist.github.com/1435327) with ruby 1.8.7 makes kdegettext working again. Same gem version with ruby 1.9.2 breaks with this error: https://gist.github.com/1435341 The Gemfile with Thank you very much for your ongoing efforts to make it work again! |
So you're using latest gettext from RubyGems. It doesn't work with Ruby 1.9.2 because it contains newer RubyGems and it's not compatible with it. I have fixed it in my fork - mutoh#11 is the patch for that. That patch breaks it for older RubyGems though. A new one that works with both older and newer RubyGems is only in the master branch of my fork as I gave up hoping that the patches will get pulled in and did not make any further pull requests. And as for the Gemfile - you're right, I forgot that the # Gemfile
source 'http://rubygems.org'
gem 'gettext', '>= 2.1.0', :git => 'git://github.com/cameel/gettext.git'
gem 'locale', '>= 2.0.6', :git => 'git://github.com/cameel/locale.git', :branch => 'add-gemspec' Check if that works for you. If so, tomorrow I'll build gems out of these two repos and push them to RubyGems. I probably can't push them as |
I already installed locale using the rake task. By now, I'm probably ok with getting it running using ruby 1.8.7 If you consider to rechain the gettext toolchain using other components, it might be better to do not put more efforts into the old kind of unmaintained tools from mutoh. Having different gems with same names could be a bit confusing. I'm ok with having these versions in your gitrepo and grapping it from there. :) |
OK. So I'm closing this issue. I'll let you both know when I get some alternative tool for extracting translations working. Probably not all that soon, but in the coming months I'll find some time for that. |
I appreciate your work Cameel. Thanks and keep us posted, please. |
I'm the maintainer of kdegettext.rb, which builds on top of gettext. After the recent changes of rubygems, the gettext gem seems to be completely broken. Looks like you already started to fix these issues. Sincerely your current master doesn't work for me either.
It would be really important to get a working version again. Looking at the network graph of mutoh's version, shows off, that there a many forks, but nothing got merged into the original gem version.
The initial idea was to use kdegettext and gettext in the KDE automated internationalization tool chain hooked into our git hosting system. So I hope to see a working gettext again - maybe a version 2.2.0?
Doesn't work. So let's try it interactively:
The text was updated successfully, but these errors were encountered: