From saimonmoore at gmail.com Wed Nov 1 10:39:11 2006 From: saimonmoore at gmail.com (Saimon Moore) Date: Wed, 1 Nov 2006 16:39:11 +0100 Subject: [Rails I18n] globalize server down In-Reply-To: <3527dd260609141105g4f66f187w993dd432ae1640df@mail.gmail.com> References: <6C0FFB6A-5FD4-40B5-B702-9620CD289A74@gmx.net> <3527dd260609141105g4f66f187w993dd432ae1640df@mail.gmail.com> Message-ID: Hi, Whenever I try to access http://www.globalize-rails.org I get redirected to: http://www.dnsmadeeasy.com/lostredirect.html It's been like that for the last couple of days... Anyone else seeing this? Joshua Harvey wrote: > Back up. > > -- Josh -- Posted via http://www.ruby-forum.com/. From fabienpenso at gmail.com Wed Nov 1 12:40:41 2006 From: fabienpenso at gmail.com (Fabien Penso) Date: Wed, 1 Nov 2006 18:40:41 +0100 Subject: [Rails I18n] globalize server down In-Reply-To: References: <6C0FFB6A-5FD4-40B5-B702-9620CD289A74@gmx.net> <3527dd260609141105g4f66f187w993dd432ae1640df@mail.gmail.com> Message-ID: <89fe6f1b0611010940g7eee42edj9247b7c71796f21b@mail.gmail.com> same here. On 11/1/06, Saimon Moore wrote: > Hi, > > Whenever I try to access http://www.globalize-rails.org I get redirected > to: > > http://www.dnsmadeeasy.com/lostredirect.html > > It's been like that for the last couple of days... > > Anyone else seeing this? From tim at cs.msu.su Sat Nov 4 19:11:29 2006 From: tim at cs.msu.su (Tim Alexeevsky) Date: Sun, 5 Nov 2006 01:11:29 +0100 Subject: [Rails I18n] "has_many through" problems Message-ID: <9517e39508ddc1a7bc19e3397259e867@ruby-forum.com> Hello! I have got a problem with Globalize since I installed "rbac" plugin. Error is as follows: :select option not allowed on translatable models (roles.*) Application trace: vendor/plugins/globalize/lib/globalize/localization/db_translate.rb:342:in `find_every' vendor/rails/activerecord/lib/active_record/base.rb:381:in `find' vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:54:in `find_target' vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:116:in `load_target' vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:109:in `method_missing' vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:47:in `method_missing' #{RAILS_ROOT}/app/models/user.rb:18:in `permission?' As I understand the problem arises because "rbac" uses constructions like has_many :roles, :through => :user_roles and Globalize doesn't deal with related find method behaviour. So my question is: is it difficult to make Globalize work with things like this? And by the way, is there a chance to release Globalize from this :select limitations? Thank you! Tim -- Posted via http://www.ruby-forum.com/. From tugbaeron at yahoo.com Sat Nov 18 04:33:10 2006 From: tugbaeron at yahoo.com (Tugba Eron) Date: Sat, 18 Nov 2006 10:33:10 +0100 Subject: [Rails I18n] sending data to asp Message-ID: hi, i am using the sortable elements script, i want to save my new sequence to my db. can anyone send me an example? i wish this forum is the right one -- Posted via http://www.ruby-forum.com/. From nomail at nowhere.az Sat Nov 25 04:34:32 2006 From: nomail at nowhere.az (nuno) Date: Sat, 25 Nov 2006 10:34:32 +0100 Subject: [Rails I18n] is globalize usable with edge rails ? Message-ID: <324b115527c9438506486ab17fb1122f@ruby-forum.com> Hi, the question is the title : is everything going smoothly when using globalize with the latest version of edge rails ? Thanks -- Posted via http://www.ruby-forum.com/. From joshmh at gmail.com Sat Nov 25 16:27:54 2006 From: joshmh at gmail.com (Joshua Harvey) Date: Sun, 26 Nov 2006 00:27:54 +0300 Subject: [Rails I18n] is globalize usable with edge rails ? In-Reply-To: <324b115527c9438506486ab17fb1122f@ruby-forum.com> References: <324b115527c9438506486ab17fb1122f@ruby-forum.com> Message-ID: <3527dd260611251327n6cd3873fk2fa4f796bbf6bbe5@mail.gmail.com> We're working on it, see the globalize-rails list for more info. [ http://wiki.globalize-rails.org/globalize/show/MailingList] -- Josh On 11/25/06, nuno wrote: > > Hi, the question is the title : is everything going smoothly when using > globalize with the latest version of edge rails ? > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Railsi18n-discussion mailing list > Railsi18n-discussion at rubyforge.org > http://rubyforge.org/mailman/listinfo/railsi18n-discussion > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/railsi18n-discussion/attachments/20061126/c872ba03/attachment.html From mihnea_capraru at fastmail.fm Tue Nov 28 12:06:39 2006 From: mihnea_capraru at fastmail.fm (Mihnea Capraru) Date: Tue, 28 Nov 2006 18:06:39 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <20060815003514.61edd209.mutoh@highway.ne.jp> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> Message-ID: <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> Masao Mutoh wrote: > Hi, > > It may be a bug of gettext-1.7.0. > > Could you try this patch to your gettext/rails.rb ? > [...] Hello, I've experienced the same problem and tried the patch. It works, in as much as it translates Subject etc. However the view doesn't get translated automatically. Was it supposed to, or does it need to be split in one version per language? -- Posted via http://www.ruby-forum.com/. From mutoh at highway.ne.jp Tue Nov 28 18:40:58 2006 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Wed, 29 Nov 2006 08:40:58 +0900 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> Message-ID: <20061129084058.708baeea.mutoh@highway.ne.jp> Hi, On Tue, 28 Nov 2006 18:06:39 +0100 Mihnea Capraru wrote: > Masao Mutoh wrote: > > Hi, > > > > It may be a bug of gettext-1.7.0. > > > > Could you try this patch to your gettext/rails.rb ? > > [...] > > Hello, I've experienced the same problem and tried the patch. It works, > in as much as it translates Subject etc. However the view doesn't get > translated automatically. Was it supposed to, or does it need to be > split in one version per language? I coudn't understand your problem. You might need to try the tutorial once below. You can know what Ruby-GetText produces. http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html At least, you should try the newest version of Ruby-GetText(1.8.0). Then tell me your problem concretely. From vibhash.rawat at yahoo.com Wed Nov 29 04:28:02 2006 From: vibhash.rawat at yahoo.com (Vibhash) Date: Wed, 29 Nov 2006 10:28:02 +0100 Subject: [Rails I18n] reading value from text_field Message-ID: Hi All, I am new user of ruby and rails, and i am developing an application using ruby and rails. I am facing a problem in reading value of text_field in the same .rhtml file. how i should i read text_field value and make comparison in my .rhtml file(using ruby tag libs). Thanx in advance. Regards Vibhash -- Posted via http://www.ruby-forum.com/. From flippie124 at hotmail.com Wed Nov 29 11:05:49 2006 From: flippie124 at hotmail.com (Maarten Porters) Date: Wed, 29 Nov 2006 17:05:49 +0100 Subject: [Rails I18n] Gloc bug? Message-ID: <4af7da08cfb8ba0470bc0ee3a563ad8c@ruby-forum.com> Hi, I use Gloc plugin to create some localisation and it works great on my local webbrick server. Unfortunately It doesn't work anymore when I upload the gloc dir to vendor/plugins on my host. I always get this error: "uninitialized constant GLoc" The error occures when environment.rb is executing this: GLoc.set_config :default_language => :nl GLoc.clear_strings_except :fr, :nl GLoc.set_kcode GLoc.load_localized_strings Did I miss something? I'm getting really frustrated because my whole app uses Gloc greetings, Temmesta -- Posted via http://www.ruby-forum.com/. From japgolly at gmail.com Wed Nov 29 17:06:36 2006 From: japgolly at gmail.com (David Barri) Date: Thu, 30 Nov 2006 09:06:36 +1100 Subject: [Rails I18n] Gloc bug? In-Reply-To: <4af7da08cfb8ba0470bc0ee3a563ad8c@ruby-forum.com> References: <4af7da08cfb8ba0470bc0ee3a563ad8c@ruby-forum.com> Message-ID: Hi, Sounds like the plugin isn't being initialised. So you're sure it's in vendor/plugins/gloc/* ? Maybe you should modify gloc's init.rb and just add a line to output loaded or something so that you know if it's being called or not. Ur host might've set things up differently somehow (?). If it's not being called you could just manually add it to the load path and require it. Golly On 30/11/06, Maarten Porters wrote: > Hi, > > I use Gloc plugin to create some localisation and it works great on my > local webbrick server. Unfortunately It doesn't work anymore when I > upload the gloc dir to vendor/plugins on my host. I always get this > error: > > "uninitialized constant GLoc" > > The error occures when environment.rb is executing this: > > GLoc.set_config :default_language => :nl > GLoc.clear_strings_except :fr, :nl > GLoc.set_kcode > GLoc.load_localized_strings > > Did I miss something? I'm getting really frustrated because my whole app > uses Gloc > > greetings, > > Temmesta > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Railsi18n-discussion mailing list > Railsi18n-discussion at rubyforge.org > http://rubyforge.org/mailman/listinfo/railsi18n-discussion > From flippie124 at hotmail.com Thu Nov 30 07:46:28 2006 From: flippie124 at hotmail.com (Maarten Porters) Date: Thu, 30 Nov 2006 13:46:28 +0100 Subject: [Rails I18n] Gloc bug? In-Reply-To: References: <4af7da08cfb8ba0470bc0ee3a563ad8c@ruby-forum.com> Message-ID: I'm happy that you replied so quick :). I'm absolutely sure it's in vendor/plugins/gloc . I'm a rails newbie so I'm not sure how I can output something from the init.rb. I can't do puts 'blablabla' because I won't be able to see server output with my dreamhost account. So then I tried to to add this in my environment.rb : config.load_paths += %W( {RAILS_ROOT}/vendor/plugins/gloc {RAILS_ROOT}/vendor/plugins/gloc/lib ) this didn't work :(. I also tried other plugins and they work so I'm not sure it's a problem with my host. Any suggestions? Temesta -- Posted via http://www.ruby-forum.com/. From admin at midela.net Thu Nov 30 10:19:39 2006 From: admin at midela.net (Michael) Date: Thu, 30 Nov 2006 16:19:39 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <20061129084058.708baeea.mutoh@highway.ne.jp> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> Message-ID: <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> I'm having issues with ActionMailer too. The problem is that I'm calling ActionMailer with a cron task, for example: ./script/runner Somerecord.find_stuff_and_mail_it So I can't set the locale in a controller like I'm used to. I tried init_gettext 'myapp', 'nl' but that isn't allowed in the model. Couldn't find anything better though. -- Posted via http://www.ruby-forum.com/. From mihnea_capraru at fastmail.fm Thu Nov 30 10:27:27 2006 From: mihnea_capraru at fastmail.fm (Mihnea Capraru) Date: Thu, 30 Nov 2006 16:27:27 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <20061129084058.708baeea.mutoh@highway.ne.jp> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> Message-ID: <25cefd0d5e55274dfbf6ab43903a9d2e@ruby-forum.com> Masao Mutoh wrote: > Hi, > > On Tue, 28 Nov 2006 18:06:39 +0100 > Mihnea Capraru wrote: > >> translated automatically. Was it supposed to, or does it need to be >> split in one version per language? > > I coudn't understand your problem. The problem is (was) that the '_' function was doing nothing in ActionMailer views. This was happening in 1.7 until I called bindtextdomain. Don't know about 1.8. -- Posted via http://www.ruby-forum.com/. From mihnea_capraru at fastmail.fm Thu Nov 30 10:28:26 2006 From: mihnea_capraru at fastmail.fm (Mihnea Capraru) Date: Thu, 30 Nov 2006 16:28:26 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> Message-ID: <6ffbc162d7fb19d919a25a4340542828@ruby-forum.com> Michael wrote: > I'm having issues with ActionMailer too. The problem is that I'm calling > ActionMailer with a cron task, for example: > ./script/runner Somerecord.find_stuff_and_mail_it > > So I can't set the locale in a controller like I'm used to. > > I tried > > init_gettext 'myapp', 'nl' > > but that isn't allowed in the model. Couldn't find anything better > though. Try bindtextdomain 'myapp' in your model, and <%= bindtextdomain 'myapp' -%> in each of your views. -- Posted via http://www.ruby-forum.com/. From admin at midela.net Thu Nov 30 10:33:20 2006 From: admin at midela.net (Michael) Date: Thu, 30 Nov 2006 16:33:20 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <6ffbc162d7fb19d919a25a4340542828@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> <6ffbc162d7fb19d919a25a4340542828@ruby-forum.com> Message-ID: <24398100096147a0f679c92631516d26@ruby-forum.com> > Try > bindtextdomain 'myapp' > in your model, and > <%= bindtextdomain 'myapp' -%> > in each of your views. Thanks. But how would I go about setting the language? There is no user session when the mail is getting sent, so I need to retrieve the language from the record itself and send the mail in the appropriate language. -- Posted via http://www.ruby-forum.com/. From mutoh at highway.ne.jp Thu Nov 30 11:33:24 2006 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Fri, 1 Dec 2006 01:33:24 +0900 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <25cefd0d5e55274dfbf6ab43903a9d2e@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <25cefd0d5e55274dfbf6ab43903a9d2e@ruby-forum.com> Message-ID: <20061201013324.c7f15fc2.mutoh@highway.ne.jp> Hi, On Thu, 30 Nov 2006 16:27:27 +0100 Mihnea Capraru wrote: > Masao Mutoh wrote: > > Hi, > > > > On Tue, 28 Nov 2006 18:06:39 +0100 > > Mihnea Capraru wrote: > > > >> translated automatically. Was it supposed to, or does it need to be > >> split in one version per language? > > > > I coudn't understand your problem. > > The problem is (was) that the '_' function was doing nothing in > ActionMailer views. > > This was happening in 1.7 until I called bindtextdomain. Don't know > about 1.8. So, why don't you try 1.8 ? From mutoh at highway.ne.jp Thu Nov 30 11:40:27 2006 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Fri, 1 Dec 2006 01:40:27 +0900 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> Message-ID: <20061201014027.cba671f9.mutoh@highway.ne.jp> Hi, On Thu, 30 Nov 2006 16:19:39 +0100 Michael wrote: > I'm having issues with ActionMailer too. The problem is that I'm calling > ActionMailer with a cron task, for example: > ./script/runner Somerecord.find_stuff_and_mail_it > > So I can't set the locale in a controller like I'm used to. > > I tried > > init_gettext 'myapp', 'nl' init_gettext can't accept lang value as 2nd parameter. Call GetText.locale= before initialize gettext. GetText.locale = "nl" init_gettext 'myapp' BTW, I don't know it works with cron. If it doesn't work with init_gettext, try bindtextdomain as Mihnea said. GetText.locale = "nl" bindtextdomain 'myapp' Anyway, try 1.8.0 not 1.7.0. From mihnea_capraru at fastmail.fm Thu Nov 30 12:04:49 2006 From: mihnea_capraru at fastmail.fm (Mihnea Capraru) Date: Thu, 30 Nov 2006 18:04:49 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <20061201013324.c7f15fc2.mutoh@highway.ne.jp> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <25cefd0d5e55274dfbf6ab43903a9d2e@ruby-forum.com> <20061201013324.c7f15fc2.mutoh@highway.ne.jp> Message-ID: <8413edcb3eaa8b6c3954418e1d15793c@ruby-forum.com> Masao Mutoh wrote: > So, why don't you try 1.8 ? Hm. That's un/fortunately how a pragmatic user thinks. I got it to work with 1.7, so until I schedule a wholesale update of the libraries that I use, I'll just focus on other stuff that still doesn't work. -- Posted via http://www.ruby-forum.com/. From admin at midela.net Thu Nov 30 12:09:47 2006 From: admin at midela.net (Michael) Date: Thu, 30 Nov 2006 18:09:47 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <20061201014027.cba671f9.mutoh@highway.ne.jp> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> <20061201014027.cba671f9.mutoh@highway.ne.jp> Message-ID: <13cce36bfe8de635ee153f8db19b93ff@ruby-forum.com> Masao Mutoh wrote: > init_gettext can't accept lang value as 2nd parameter. > Call GetText.locale= before initialize gettext. > > GetText.locale = "nl" > init_gettext 'myapp' > > BTW, I don't know it works with cron. > If it doesn't work with init_gettext, try bindtextdomain as > Mihnea said. > > GetText.locale = "nl" > bindtextdomain 'myapp' > > Anyway, try 1.8.0 not 1.7.0. I'm using 1.8.0. Using init_gettext generates an error message. The second suggestion does work, but only within the model itself, so far. Here's what I have in the model: require 'gettext/rails' class Mymailer < ActionMailer::Base def send_a_mail(email, language) GetText.locale = language bindtextdomain 'my app' @subject = _('You have a winning combination!') @recipients = email end This succesfully translates the subject, but the body of the email (a view), doesn't get translated. Can I use translatable strings in the actionmailer views or should I created seperate files (like mail_nl.rhtml,...)? -- Posted via http://www.ruby-forum.com/. From admin at midela.net Thu Nov 30 12:13:54 2006 From: admin at midela.net (Michael) Date: Thu, 30 Nov 2006 18:13:54 +0100 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <13cce36bfe8de635ee153f8db19b93ff@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> <20061201014027.cba671f9.mutoh@highway.ne.jp> <13cce36bfe8de635ee153f8db19b93ff@ruby-forum.com> Message-ID: <0dd482ea704e43b14da716a757e80490@ruby-forum.com> A quick update: using seperate view files DOES work. (mail_nl.rhtml, mail_de.rhtml and so on) It would still be nice if it worked with .po/.mo files though, because that would make it easier to translate the app to more languages. -- Posted via http://www.ruby-forum.com/. From mutoh at highway.ne.jp Thu Nov 30 23:09:21 2006 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Fri, 1 Dec 2006 13:09:21 +0900 Subject: [Rails I18n] GetText doesn't work in ActionMailer In-Reply-To: <0dd482ea704e43b14da716a757e80490@ruby-forum.com> References: <35f335a949791bfaf3e50642b8628a12@ruby-forum.com> <20060815003514.61edd209.mutoh@highway.ne.jp> <5674aa149ffd87e22032d299c8452a9b@ruby-forum.com> <20061129084058.708baeea.mutoh@highway.ne.jp> <003b94b071fcdfef5beb9d2bdadf467e@ruby-forum.com> <20061201014027.cba671f9.mutoh@highway.ne.jp> <13cce36bfe8de635ee153f8db19b93ff@ruby-forum.com> <0dd482ea704e43b14da716a757e80490@ruby-forum.com> Message-ID: <20061201130921.d182f5fb.mutoh@highway.ne.jp> Hi, On Thu, 30 Nov 2006 18:13:54 +0100 Michael wrote: > A quick update: using seperate view files DOES work. (mail_nl.rhtml, > mail_de.rhtml and so on) > > It would still be nice if it worked with .po/.mo files though, because > that would make it easier to translate the app to more languages. Yes. It should be so. How about this ? 1. Remove GetText.locale= and bindtextdomain anywhere on your script. 2. Add the lines into app/controller/applications.rb class ApplicationController < ActionController::Base init_gettext "myapp" after_init_gettext { #HERE GetText.set_locale_all("nl") #HERE } #HERE end