From phil at s126.de Wed Aug 1 17:41:07 2007
From: phil at s126.de (Philipp Hofmann)
Date: Wed, 1 Aug 2007 23:41:07 +0200
Subject: [Rails I18n] globalize_countries conflict
In-Reply-To: <88687807ac87615f609151136d1692aa@ruby-forum.com>
References: <21d9d82a3cd3afb8337b25c671dfe5b8@ruby-forum.com>
<88687807ac87615f609151136d1692aa@ruby-forum.com>
Message-ID: <3b1167aceff1da457ae4fa186c0a3561@ruby-forum.com>
Ingo Weiss wrote:
> Thanks for the reply! I got my app working by wrapping my Country model
> in a module like this MyApp::Country, and replacing all references to
> Country with MyApp::Country.
Hi,
I am experiencing the same problem and havn't figured out yet how to
point a *belongs_to* to the *moduled* model.
The obvious approach ...
module MyApp
class Country < ActiveRecord::Base
end
end
class Person
belongs_to :country, :class_name => 'MyApp::Country'
end
... sadly doesn't work.
--
Posted via http://www.ruby-forum.com/.
From z4n9ief at gmail.com Sat Aug 4 14:59:46 2007
From: z4n9ief at gmail.com (Zangief Ief)
Date: Sat, 4 Aug 2007 20:59:46 +0200
Subject: [Rails I18n] Binary conversion
Message-ID:
Hi all,
Could you please propose me a solution to convert a string or a file in
a univarsal binary value?
Regards,
Z4n9ief
--
Posted via http://www.ruby-forum.com/.
From hisham86 at aucegypt.edu Tue Aug 21 22:00:34 2007
From: hisham86 at aucegypt.edu (Hisham Elhifnawi)
Date: Wed, 22 Aug 2007 04:00:34 +0200
Subject: [Rails I18n] HOWTO generate rails skeleton
Message-ID: <2f91b985154256082acc7d84e3510ae8@ruby-forum.com>
NEED help:
My group are working on rails IDE and we're in the wizard part now and
we're trying to generate the Rails skeleton and we looked in the
rubygems and found in
gems/1.8/gems/rails-1.2.2/lib/rails_generator/generators/applications/app/app_generator.rb
what does it do, does it generates rails skeleton?
plz email me at hisham86 at aucegypt.edu
--
Posted via http://www.ruby-forum.com/.
From jarkko at jlaine.net Wed Aug 22 05:22:37 2007
From: jarkko at jlaine.net (Jarkko Laine)
Date: Wed, 22 Aug 2007 12:22:37 +0300
Subject: [Rails I18n] HOWTO generate rails skeleton
In-Reply-To: <2f91b985154256082acc7d84e3510ae8@ruby-forum.com>
References: <2f91b985154256082acc7d84e3510ae8@ruby-forum.com>
Message-ID:
On 22.8.2007, at 5.00, Hisham Elhifnawi wrote:
> NEED help:
> My group are working on rails IDE and we're in the wizard part now and
> we're trying to generate the Rails skeleton and we looked in the
> rubygems and found in
> gems/1.8/gems/rails-1.2.2/lib/rails_generator/generators/
> applications/app/app_generator.rb
> what does it do, does it generates rails skeleton?
> plz email me at hisham86 at aucegypt.edu
Man, you're still on the wrong list. This is a list for discussions
about localizing and internationalizing Rails.
http://groups.google.com/group/rubyonrails-talk is the list on which
you can except getting help for questions like yours.
Cheers,
//jarkko
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/railsi18n-discussion/attachments/20070822/797ea0dc/attachment.bin
From thibaut.barrere at gmail.com Thu Aug 23 11:59:30 2007
From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=)
Date: Thu, 23 Aug 2007 17:59:30 +0200
Subject: [Rails I18n] removing accents from sentences (ex: url creations) -
what's available today in ruby / rails ? (and here's my take)
Message-ID: <4a68b8cf0708230859o1c70f8ebj86c0e332bf49af0b@mail.gmail.com>
Hi!
I could not find it so far - but maybe rails i18n is the right list for that
question: is there something already available somewhere in the ruby space
to remove accents and other diacritics from a string ? (like: translation
?ph?m?re to ephemere, etc)
I've seen the mephisto PermalinkFu trick (iconv from utf-8 to
ascii//ignore//translit) but it doesn't work on my workstation.
I've attached DiacriticsFu which I wrote and is working fine for me - I'd be
happy to find something cleaner, cross-platform, and which does not rely on
Rails like this implementation (it would most likely work with unicode
hacks)
any hint, comment, link, idea ?
cheers
Thibaut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/railsi18n-discussion/attachments/20070823/07d77087/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diacritics_fu.rb
Type: application/octet-stream
Size: 166 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/railsi18n-discussion/attachments/20070823/07d77087/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diacritics_fu_spec.rb
Type: application/octet-stream
Size: 921 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/railsi18n-discussion/attachments/20070823/07d77087/attachment-0001.obj
From syadav at perimeterusa.com Fri Aug 24 09:54:23 2007
From: syadav at perimeterusa.com (Shyam Yadav)
Date: Fri, 24 Aug 2007 15:54:23 +0200
Subject: [Rails I18n] Rails Engines
Message-ID:
Hello guys ,
I am new in Ruby on rails ,
I have installed Ruby+rails+gem +mysql+oracle ,
from instant rail package installer
now i want to run ldap on my windows system , so please help me how i
can do that
please suggest how i can run install and run properly ?
please urgent
Thanks in Advance
Please Reply
--
Posted via http://www.ruby-forum.com/.
From syadav at perimeterusa.com Fri Aug 24 10:04:26 2007
From: syadav at perimeterusa.com (Shyam Yadav)
Date: Fri, 24 Aug 2007 16:04:26 +0200
Subject: [Rails I18n] Ldap+windows+instant rails
Message-ID: <30ce8ccbfdd46b0984368feea4ba0de3@ruby-forum.com>
Hello guys ,
I am new in Ruby on rails ,
I have installed Ruby+rails+gem +mysql+oracle ,
from instant rail package installer
now i want to run ldap on my windows system , so please help me how i
can do that
please suggest how i can run install and run properly ?
please urgent
Thanks in Advance
Please Reply
--
Posted via http://www.ruby-forum.com/.
From hellolinus at gmail.com Tue Aug 28 04:55:04 2007
From: hellolinus at gmail.com (Tom Bak)
Date: Tue, 28 Aug 2007 10:55:04 +0200
Subject: [Rails I18n] Legacy ISO-8859-1 MSSQL db and UTF8 rails app
Message-ID: <64f457d2222fdd531635bc43aa63b37d@ruby-forum.com>
Hi!
I have problem with legacy database in MSSQL encoding.
The new app in Rails and most of the database is Utf8, while
tables from legacy MSSQL are encoded in ISO-8859-1.
I am not sure how to approach this problem. I would imagine
creation of some kind of filter with Iconv.conv("UTF-8", "ISO-8859-1",
input)
for reading sql statements and the reverse for write methods.
Any suggestions how this could be done?
Cheers,
Tomasz Bak
--
Posted via http://www.ruby-forum.com/.
From hellolinus at gmail.com Tue Aug 28 06:15:36 2007
From: hellolinus at gmail.com (Tom Bak)
Date: Tue, 28 Aug 2007 12:15:36 +0200
Subject: [Rails I18n] Legacy ISO-8859-1 MSSQL db and UTF8 rails app
In-Reply-To: <64f457d2222fdd531635bc43aa63b37d@ruby-forum.com>
References: <64f457d2222fdd531635bc43aa63b37d@ruby-forum.com>
Message-ID:
Hi,
So far I have come come with poor solution:
class String
require 'iconv'
def iso1_to_utf8
Iconv.conv("UTF-8", "ISO-8859-1", self) rescue self
end
def utf8_to_iso1
Iconv.conv("ISO-8859-1", "UTF-8", self) rescue self
end
end
class NCustomer < ActiveRecord::Base
...
def after_initialize
self.attributes.each do |k,v|
if v.class.to_s == "String" and !v.empty?
self[k] = v.iso1_to_utf8
end
end
end
def before_save
self.attributes.each do |k,v|
if v.class.to_s == "String" and !v.empty?
self[k] = v.utf8_to_iso1
end
end
end
...
end
Cheers,
Tomasz Bak
--
Posted via http://www.ruby-forum.com/.
From roland.venesz at woa.hu Tue Aug 28 08:29:56 2007
From: roland.venesz at woa.hu (Roland Venesz)
Date: Tue, 28 Aug 2007 14:29:56 +0200
Subject: [Rails I18n] Language code in the URL
Message-ID: <73dfded2899014e6d2195d8fe7af5e2c@ruby-forum.com>
Cheers fellow developers,
in our application we would like to include a language code in the URL's
of at least some resources, mainly for SEO reasons (Google should index
several language versions of the same page so users can find them). Our
ultimate choice for a scheme looks like this:
/foobars/123.en.html
/foobars/123.fr.html
This displays neatly what it's all about: in contrast with a choice like
/en/foobars/123.html it correctly suggests that these URL's are not
pointing to entirely different kinds of resources but variants of the
same one. It also *seems* to be easier to achieve by a generic, DRY
solution.
My question is: *is this somehow possible without major tweakings in
Rails internals?* I'd also note that we would like to avoid external
rewriting for obvious portability reasons.
--
Posted via http://www.ruby-forum.com/.
From bk at benjaminkrause.com Tue Aug 28 09:32:35 2007
From: bk at benjaminkrause.com (Benjamin Krause)
Date: Tue, 28 Aug 2007 15:32:35 +0200
Subject: [Rails I18n] Language code in the URL
In-Reply-To: <73dfded2899014e6d2195d8fe7af5e2c@ruby-forum.com>
References: <73dfded2899014e6d2195d8fe7af5e2c@ruby-forum.com>
Message-ID: <5E797726-CE04-4E1F-9A27-B004EF084AC3@benjaminkrause.com>
Hey ..
> /foobars/123.en.html
> /foobars/123.fr.html
>
> My question is: *is this somehow possible without major tweakings in
> Rails internals?* I'd also note that we would like to avoid external
> rewriting for obvious portability reasons.
thats exactly a topic of a talk at the next rails conference in
berlin later this year ;-)
yes it is possible, but not without some serious tweaking.
especially if you want to be RESTful. Basically you need to
extend the routed to not only support :format, but :locale.:format.
I'm actually working on that right now, but it's far from stable.
I hope to release this as a plugin in the future, you can get
a first glimpse at it right here:
http://bugs.omdb.org/browser/branches/2007.1/vendor/plugins/mlcache/
lib/actionpack_ext.rb
this will support extensions to RESTful routes, as well as updated
page and fragment caching to respect the locale set for
the current request.
Ben
From roderick at vandomburg.net Tue Aug 28 15:31:01 2007
From: roderick at vandomburg.net (Roderick van Domburg)
Date: Tue, 28 Aug 2007 21:31:01 +0200
Subject: [Rails I18n] Legacy ISO-8859-1 MSSQL db and UTF8 rails app
In-Reply-To: <64f457d2222fdd531635bc43aa63b37d@ruby-forum.com>
References: <64f457d2222fdd531635bc43aa63b37d@ruby-forum.com>
Message-ID:
Tom Bak wrote:
> I have problem with legacy database in MSSQL encoding.
>
> The new app in Rails and most of the database is Utf8, while
> tables from legacy MSSQL are encoded in ISO-8859-1.
>
> I am not sure how to approach this problem. I would imagine
> creation of some kind of filter with Iconv.conv("UTF-8", "ISO-8859-1",
> input)
> for reading sql statements and the reverse for write methods.
>
> Any suggestions how this could be done?
I think that everyone who's ever been cornered by this can attest that
it can be a royal pain and that the options are all choosing between
lesser evils.
Last time I found myself there I exported the database to a plain text
SQL file and then ran recode [1] on it. It worked well enough but I
still found myself scanning over the file to correct tiny bits here and
there.
I'll admit that your solution has a ring to it -- being able to do it on
the fly improves the time to deploy. I like it. If however speed or
strict migration paths are an issue for you then recode may be an option
to consider.
[1] http://www.gnu.org/software/recode/
--
Roderick van Domburg
http://www.nedforce.nl
--
Posted via http://www.ruby-forum.com/.