From ingoweiss at gmail.com Thu Jan 4 14:23:21 2007 From: ingoweiss at gmail.com (Ingo Weiss) Date: Thu, 4 Jan 2007 20:23:21 +0100 Subject: [Rails I18n] globalize_languages doesn't exist error Message-ID: Hi, I am getting started with globalize and so far it works ok. At some point I had to do 'rake globalize:teardown' to reset the database (I had the problem where all user translations were stored as 'built_in' as described on the 'example application' pag). Now when I run 'rake globalize:setup' again I got the following error: rake aborted! Mysql::Error: #42S02Table 'globalize_development.globalize_languages' doesn't exist: SHOW FIELDS FROM globalize_languages and I thought: of course it doesn't exist - I just deleted it! ;-) I am actually getting the same error now when trying to run any migration! Thanks for any hint how to fix this! Ingo -- Posted via http://www.ruby-forum.com/. From me at seebq.com Thu Jan 4 15:55:36 2007 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 4 Jan 2007 15:55:36 -0500 Subject: [Rails I18n] globalize_languages doesn't exist error In-Reply-To: References: Message-ID: <3a2de0cd0701041255o1a40db3obb21f95809652529@mail.gmail.com> The problem occurs when you require Globalize and then do anything with Locale.set in your rails environment. Whenever rake tasks run, it loads the entire environment. I ended up using the following code (in environment.rb) so that I could teardown and setup and use capistrano to manage my app: # require globalize plugin and set default locale to us english include Globalize begin Locale.set_base_language AppConstants::DEFAULT_LOCALE Locale.set AppConstants::DEFAULT_LOCALE rescue puts "** Warning: Install Globalize plugin first and setup using rake globalize:setup" end Hope this helps, -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com Ruby on Rails Bootcamp at the Big Nerd Ranch Intensive Ruby on Rails Training: http://www.bignerdranch.com/classes/ruby.shtml On 1/4/07, Ingo Weiss wrote: > Hi, > > > I am getting started with globalize and so far it works ok. At some > point I had to do 'rake globalize:teardown' to reset the database (I had > the problem where all user translations were stored as 'built_in' as > described on the 'example application' pag). Now when I run 'rake > globalize:setup' again I got the following error: > > rake aborted! > Mysql::Error: #42S02Table 'globalize_development.globalize_languages' > doesn't exist: SHOW FIELDS FROM globalize_languages > > and I thought: of course it doesn't exist - I just deleted it! ;-) > > I am actually getting the same error now when trying to run any > migration! > > Thanks for any hint how to fix this! > > Ingo > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Railsi18n-discussion mailing list > Railsi18n-discussion at rubyforge.org > http://rubyforge.org/mailman/listinfo/railsi18n-discussion > From david.scheffel at novaris-software.com Mon Jan 8 09:13:40 2007 From: david.scheffel at novaris-software.com (David Scheffel) Date: Mon, 8 Jan 2007 15:13:40 +0100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution Message-ID: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> Hello there. I'm looking for a localisation plugin that is: - easy to use (like java's ressource bundle for instance) - flexible enough* - fast - well documented *My requirements in detail: - I want to take care of my database schema on my own (don't want a autom. handling like globalize) - It should not torture my database; a file-based solution (with caching in memory) would be appreciated - Multiple languages per site required - but not necessarily per page - nice to have: The choise of the active language for a request should be up to me; not handled automatically - Unicode should be possible - Rails 1.16, 1.2 compatible - should work with fragment/action/page caching - would like to have a routing like: site.com/:lang/:controller/:action - translation of rails error messages and stuff - translation of model and attribute names (in error messages) would be appreciated However I'm still not sure if it's preferable to have multiple rhtmls per language or to have just one with multiple calls to something like "getText(XXXX)". I could image that the multiple rhtml-solution is more flexible and possibly faster. What do you think or what are you experiences? Thanks.. David -- Posted via http://www.ruby-forum.com/. From ingoweiss at gmail.com Wed Jan 10 07:33:04 2007 From: ingoweiss at gmail.com (Ingo Weiss) Date: Wed, 10 Jan 2007 13:33:04 +0100 Subject: [Rails I18n] mysql character set Message-ID: <1c1469357ed8bb4757a5fe317a464ce8@ruby-forum.com> Hi all, I am just familarizing myself -- Posted via http://www.ruby-forum.com/. From ingoweiss at gmail.com Wed Jan 10 07:36:43 2007 From: ingoweiss at gmail.com (Ingo Weiss) Date: Wed, 10 Jan 2007 13:36:43 +0100 Subject: [Rails I18n] mysql character set In-Reply-To: <1c1469357ed8bb4757a5fe317a464ce8@ruby-forum.com> References: <1c1469357ed8bb4757a5fe317a464ce8@ruby-forum.com> Message-ID: <2bf105c61203b10b7422a69417f398ba@ruby-forum.com> Ingo Weiss wrote: > Hi all, > > I am just familarizing myself Oops, this one got sent prematurely... what I was going to ask is how to set the mysql character sets from Rails. I did set my database's character set to utf-8 when creating it - do I even need to set each table's character set then? If yes, how is it done in a migration, when creating the table? Thanks! Ingo -- Posted via http://www.ruby-forum.com/. From ingoweiss at gmail.com Wed Jan 10 07:39:41 2007 From: ingoweiss at gmail.com (Ingo Weiss) Date: Wed, 10 Jan 2007 13:39:41 +0100 Subject: [Rails I18n] utf test case? Message-ID: Hi, I was wondering if anybody has successfully written a rails integration test case for an app's utf-8 support. Meaning a test that feeds a utf-8 string into the app, and asserts that it moves through it unharmed and is in fact put out as utf-8? Thanks for any hint! Ingo -- Posted via http://www.ruby-forum.com/. From tomislav at filipcic.com Wed Jan 10 16:01:11 2007 From: tomislav at filipcic.com (=?UTF-8?B?VG9taXNsYXYgRmlsaXDEjWnEhw==?=) Date: Wed, 10 Jan 2007 22:01:11 +0100 Subject: [Rails I18n] mysql character set In-Reply-To: <2bf105c61203b10b7422a69417f398ba@ruby-forum.com> References: <1c1469357ed8bb4757a5fe317a464ce8@ruby-forum.com> <2bf105c61203b10b7422a69417f398ba@ruby-forum.com> Message-ID: Ingo Weiss wrote: > Ingo Weiss wrote: >> Hi all, >> >> I am just familarizing myself > > Oops, this one got sent prematurely... > > what I was going to ask is how to set the mysql character sets from > Rails. I did set my database's character set to utf-8 when creating it - > do I even need to set each table's character set then? If yes, how is > it done in a migration, when creating the table? In config/database.yml set the encoding to utf8 for each enviroment. Like this: development: adapter: mysql database: app_development username: root password: host: localhost encoding: utf8 I think is is only for Rails 1.2 From neongrau at gmail.com Fri Jan 12 09:48:36 2007 From: neongrau at gmail.com (Ralf Vitasek) Date: Fri, 12 Jan 2007 15:48:36 +0100 Subject: [Rails I18n] Rails Engine localization with Ruby-GetText In-Reply-To: <20060918162334.5ce785cb.mutoh@highway.ne.jp> References: <20060918162334.5ce785cb.mutoh@highway.ne.jp> Message-ID: Masao Mutoh wrote: > Hi, > > Recently, some people ask me for the l10n of > Engines with gettext. > > So I wrote a HOWTO for it. > http://www.yotabanana.com/hiki/?ruby-gettext-howto-engines > > And I localized login_engine for an example. > It includes English and Japanese messages. > > http://www.yotabanana.com/hiki/?c=plugin;plugin=attach_download;p=ruby-gettext-howto-engines;file_name=login_engine_v1.0.2.gettext.tar.gz > > HTH, hello masao-san, i'm currently trying l10n with gettext and have 2 problems in my application. it looks like "rake updatepo" cannot find messages inside strings like output << "
#{_('my localized message')}
" is this a bug? do i need a newer version (i'm currently using the gettext-1.8.0-mswin32 gem)? or is it just me doing s.th. wrong? and the second problem is that despite what language i want to enforce via GetText.locale = "fr_CH" (right before init_gettext in the application controller) it always seems to fall back to the HTTP_ACCEPT_LANGUAGE from the browser :( any help would be greatly appreciated! best regards ralf -- Posted via http://www.ruby-forum.com/. From mutoh at highway.ne.jp Sat Jan 13 04:28:18 2007 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Sat, 13 Jan 2007 18:28:18 +0900 Subject: [Rails I18n] Rails Engine localization with Ruby-GetText In-Reply-To: References: <20060918162334.5ce785cb.mutoh@highway.ne.jp> Message-ID: <20070113182818.03d4a285.mutoh@highway.ne.jp> Hi, On Fri, 12 Jan 2007 15:48:36 +0100 Ralf Vitasek wrote: > hello masao-san, > > i'm currently trying l10n with gettext and have 2 problems in my > application. > > it looks like "rake updatepo" cannot find messages inside strings like > output << "
#{_('my localized message')}
" > > is this a bug? do i need a newer version (i'm currently using the > gettext-1.8.0-mswin32 gem)? or is it just me doing s.th. wrong? Hmm. OK. I'll try it. But I don't know I can fix it. Try this as work arround. "
%s
" % _('my localized message') > and the second problem is that despite what language i want to enforce > via > GetText.locale = "fr_CH" > (right before init_gettext in the application controller) > it always seems to fall back to the HTTP_ACCEPT_LANGUAGE from the > browser :( This may be a bug of 1.8.0. Could you try CVS version ? From abdulaziz1 at mac.com Tue Jan 23 12:01:32 2007 From: abdulaziz1 at mac.com (Abdulaziz Al-khater) Date: Tue, 23 Jan 2007 18:01:32 +0100 Subject: [Rails I18n] UTF8 Database content Message-ID: <80b09c9232190cab327b67f9f926b551@ruby-forum.com> Hi, Forgive me if this is a basic question. I am using rails and simply trying to get content stored and retrieved from the database in UTF8 (i am using arabic). When the data is stored it ends up as ????????? question marks. I have set the database charset and the table to UTF8. Any help appreciated. Abdulaziz -- Posted via http://www.ruby-forum.com/. From neongrau at gmail.com Wed Jan 24 05:50:46 2007 From: neongrau at gmail.com (Ralf Vitasek) Date: Wed, 24 Jan 2007 11:50:46 +0100 Subject: [Rails I18n] Rails Engine localization with Ruby-GetText In-Reply-To: <20070113182818.03d4a285.mutoh@highway.ne.jp> References: <20060918162334.5ce785cb.mutoh@highway.ne.jp> <20070113182818.03d4a285.mutoh@highway.ne.jp> Message-ID: Masao Mutoh wrote: >> and the second problem is that despite what language i want to enforce >> via >> GetText.locale = "fr_CH" >> (right before init_gettext in the application controller) >> it always seems to fall back to the HTTP_ACCEPT_LANGUAGE from the >> browser :( > > This may be a bug of 1.8.0. > Could you try CVS version ? hi again, tried now with 1.9.0 and it works! woohoo :) but something else... today i read about the "haml" plugin for view templates (see http://haml.hamptoncatlin.com). which is really cool but gettext doesnt seem to get along with it at all :( rake updatepo Error: # in app/views/ test/test.haml:1 #content{:style=>'padding:20px'} rake aborted! do you see any chances to support haml-templates in the near future? i would really love to start using them, but without gettext support it'd be a no-go. best regards, ralf -- Posted via http://www.ruby-forum.com/.