From kuryshevdmr2 at mail.ru Thu Feb 1 19:17:03 2007 From: kuryshevdmr2 at mail.ru (Sdfjlskdj Sldjkfklj) Date: Fri, 2 Feb 2007 01:17:03 +0100 Subject: [Rails I18n] gdfgdsg Message-ID: <2e58e4ca1438fa099b3aac969b2d8edd@ruby-forum.com> dsfgdsfg -- Posted via http://www.ruby-forum.com/. From ingoweiss at gmail.com Thu Feb 1 23:32:51 2007 From: ingoweiss at gmail.com (Ingo Weiss) Date: Fri, 2 Feb 2007 05:32:51 +0100 Subject: [Rails I18n] globalize_countries conflict Message-ID: <21d9d82a3cd3afb8337b25c671dfe5b8@ruby-forum.com> Hi, I just installed globalize and the problem is that I have a model 'Country' which seems to conflict with globalize's 'Globalize::Country' model. Every time I use 'Country' now Rails assumes I mean Globalize::Country. How can I work around that? Thanks! Ingo -- Posted via http://www.ruby-forum.com/. From ingoweiss at gmail.com Fri Feb 2 21:06:11 2007 From: ingoweiss at gmail.com (Ingo Weiss) Date: Sat, 3 Feb 2007 03:06:11 +0100 Subject: [Rails I18n] globalize_countries conflict In-Reply-To: <21d9d82a3cd3afb8337b25c671dfe5b8@ruby-forum.com> References: <21d9d82a3cd3afb8337b25c671dfe5b8@ruby-forum.com> Message-ID: <88687807ac87615f609151136d1692aa@ruby-forum.com> 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. The only problem right now is that almost all my functional tests broke, I think because when I use the generated functions to load models from fixtures like 'countries(:us)', Rails tries to load it from Globalize::Countries. How can I tell Rails to use MyApp::Country in these functions, too? Thanks! Ingo Ingo Weiss wrote: > Hi, > > I just installed globalize and the problem is that I have a model > 'Country' which seems to conflict with globalize's 'Globalize::Country' > model. Every time I use 'Country' now Rails assumes I mean > Globalize::Country. How can I work around that? > > Thanks! > Ingo -- Posted via http://www.ruby-forum.com/. From evan at protest.net Fri Feb 2 21:46:25 2007 From: evan at protest.net (evan) Date: Fri, 2 Feb 2007 18:46:25 -0800 Subject: [Rails I18n] globalize_countries conflict (satire) Message-ID: <86ec40c10702021846q3ca416dfo936ef57ff6701b2@mail.gmail.com> Hey Ingo Many countries have conflicts when they try and globalize their model. Sometimes this is due to the cultural changes under globalization and sometimes it's due to economic changes. It's important when ever you are going to globalize a country to do it in cooperation with the people. This can include making sure there is space for a domestic culture industry and an economic safety net to be put in place for people who will be displaced. Best of luck, rabble On 2/1/07, Ingo Weiss wrote: > Hi, > > I just installed globalize and the problem is that I have a model > 'Country' which seems to conflict with globalize's 'Globalize::Country' > model. Every time I use 'Country' now Rails assumes I mean > Globalize::Country. How can I work around that? > > Thanks! > 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 gwik at gwikzone.org Mon Feb 5 14:41:35 2007 From: gwik at gwikzone.org (Antonin Amand) Date: Mon, 5 Feb 2007 20:41:35 +0100 Subject: [Rails I18n] UTF8 Database content In-Reply-To: <80b09c9232190cab327b67f9f926b551@ruby-forum.com> References: <80b09c9232190cab327b67f9f926b551@ruby-forum.com> Message-ID: <28f9365ca08ec2f0065d461831be6f4f@ruby-forum.com> > 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. This should interest you. http://woss.name/2006/10/25/migrating-your-rails-application-to-unicode/ -- Posted via http://www.ruby-forum.com/. From chad at zulu.net Tue Feb 6 08:25:58 2007 From: chad at zulu.net (Chad Thatcher) Date: Tue, 6 Feb 2007 14:25:58 +0100 Subject: [Rails I18n] UTF8 Database content In-Reply-To: <28f9365ca08ec2f0065d461831be6f4f@ruby-forum.com> References: <80b09c9232190cab327b67f9f926b551@ruby-forum.com> <28f9365ca08ec2f0065d461831be6f4f@ruby-forum.com> Message-ID: <89a828df62db79c43189826136348721@ruby-forum.com> I just ran into similar problems Abdulaziz. I wrote an import script that imports data from files into the database. The problem was that the files were in one encoding (windows-1252) and the database in utf8. I used the 'iconv' library which is available in standard Ruby to convert the file to utf8 first before attempting to put the data into my models and save them to the database. (On Windows I believe iconv is only available in the One-Click installer version of Ruby). If it is MySQL at least, you can make sure Rails is talking to the database correctly by adding the "encoding" line to database.yml like this: development: adapter: mysql database: adatabase encoding: utf8 username: auser password: apassword host: localhost (Be sure to restart Rails after adding this) If the data is coming from the browser then you need to make sure the data is being sent correctly. If you are using MySQL you should also think about installing PHPMyAdmin and checking with that that the data is being stored properly, as it might just be a display problem. Also make sure that any templates of pages being sent out to the browser have the line: in the and that it is the very first entry. Hope this helps and good luck. Chad. -- Posted via http://www.ruby-forum.com/. From yastrub at gmail.com Tue Feb 6 09:14:56 2007 From: yastrub at gmail.com (Eugene) Date: Tue, 6 Feb 2007 15:14:56 +0100 Subject: [Rails I18n] Gettext error_messages_for problem Message-ID: Hello, Can anyone help with my problem? When trying to add validation to Model like "validates_uniqueness_of" and then put <%= error_messages_for 'article' %> into view, I get error. can't convert Array into String Extracted source (around line #1): 1: <%= error_messages_for 'article' %> Please advice. Thank you. -- Posted via http://www.ruby-forum.com/. From info at rubynarails.com Sun Feb 11 05:40:15 2007 From: info at rubynarails.com (zarni) Date: Sun, 11 Feb 2007 11:40:15 +0100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> Message-ID: <74c43e4493b0c37e77f7af09ac9bb0dd@ruby-forum.com> I'm using this, works. http://wiki.rubyonrails.org/rails/pages/Localization+Plugin -- Posted via http://www.ruby-forum.com/. From japgolly at gmail.com Sun Feb 11 07:54:25 2007 From: japgolly at gmail.com (David Barri) Date: Sun, 11 Feb 2007 23:54:25 +1100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> Message-ID: Hi. Sounds like GLoc would be a good fit for those requirements. However regarding the points: - translation of rails error messages and stuff - translation of model and attribute names (in error messages) would be appreciated you would have to do that yourself. Golly On 09/01/07, David Scheffel wrote: > 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/. > _______________________________________________ > Railsi18n-discussion mailing list > Railsi18n-discussion at rubyforge.org > http://rubyforge.org/mailman/listinfo/railsi18n-discussion > From japgolly at gmail.com Sun Feb 11 08:37:04 2007 From: japgolly at gmail.com (David Barri) Date: Mon, 12 Feb 2007 00:37:04 +1100 Subject: [Rails I18n] GLoc 1.2 released Message-ID: Hey all, GLoc 1.2 has been released. For those interested, you can see more info here: http://rubyforge.org/frs/shownotes.php?release_id=9613 Golly From david.scheffel at novaris-software.com Tue Feb 13 05:44:14 2007 From: david.scheffel at novaris-software.com (David Scheffel) Date: Tue, 13 Feb 2007 11:44:14 +0100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> Message-ID: <91a4a380110145810e8fb7120d4998e4@ruby-forum.com> Thanks god Gloc 1.2 is out:-) It's my last hope. Thanks... David -- Posted via http://www.ruby-forum.com/. From japgolly at gmail.com Tue Feb 13 06:46:54 2007 From: japgolly at gmail.com (David Barri) Date: Tue, 13 Feb 2007 22:46:54 +1100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: <91a4a380110145810e8fb7120d4998e4@ruby-forum.com> References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> <91a4a380110145810e8fb7120d4998e4@ruby-forum.com> Message-ID: Great to hear. Hope it's what you're looking for. :) Golly On 13/02/07, David Scheffel wrote: > Thanks god Gloc 1.2 is out:-) > > It's my last hope. > > Thanks... > David > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Railsi18n-discussion mailing list > Railsi18n-discussion at rubyforge.org > http://rubyforge.org/mailman/listinfo/railsi18n-discussion > From patcito at gmail.com Thu Feb 15 13:02:01 2007 From: patcito at gmail.com (Patrick Aljord) Date: Thu, 15 Feb 2007 19:02:01 +0100 Subject: [Rails I18n] is globalize rails 1.2 ready? Message-ID: <6b6419750702151002u79bbf9a7scf1048ae8a3ca68f@mail.gmail.com> does anyone know if globalize works with rails 1.2? thanx in advance Pat From neongrau at gmail.com Tue Feb 20 10:28:56 2007 From: neongrau at gmail.com (neongrau __) Date: Tue, 20 Feb 2007 16:28:56 +0100 Subject: [Rails I18n] GetText problems with .set_error_message_title Message-ID: i tried to change the error message title to use with "error_messages_for" as described at http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Translate+the+title%2Fexplanation+on+the+error+message+dialog but i never ever get the translated strings :( i just always get the strings within the N_('') function. but the %{record} inside gets properly translated. i'm currenlty runnnig my rails app with ruby 1.8.5 on windows with rails 1.2.2 and gettext 1.9.0 even downgrading gettext to 1.7.0 didn't help (the page said it's supposed to work since version 1.7.0). this is what i have in my application controller: ActionView::Helpers::ActiveRecordHelper::L10n.set_error_message_title( N_("An error prevented saving this %{record}"), N_("%{num} errors prevented saving this %{record}")) and the excerpt from my .po file for "de_DE": #: app/controllers/application.rb:10 msgid "An error prevented saving this %{record}" msgstr "Ein Fehler verhinderte das Speichern dieser %{record}" #: app/controllers/application.rb:10 msgid "%{num} errors prevented saving this %{record}" msgstr "%{num} Fehler verhindern das Speichern dieser %{record}" i'm totally out of ideas what to do :( any help would be greatly appreciated! -- Posted via http://www.ruby-forum.com/. From patcito at gmail.com Fri Feb 23 08:30:37 2007 From: patcito at gmail.com (Patrick Aljord) Date: Fri, 23 Feb 2007 14:30:37 +0100 Subject: [Rails I18n] how to translate ruby date functions with gettext? Message-ID: <6b6419750702230530t402d53av9657aa382d449dbd@mail.gmail.com> any idea how to translate Time::now or 2.days.ago with gettext to french or Spanish? thanx in advance Pat From manoel at lemos.net Sat Feb 24 12:30:40 2007 From: manoel at lemos.net (Manoel Lemos) Date: Sat, 24 Feb 2007 18:30:40 +0100 Subject: [Rails I18n] Iconv failing to convert UTF-8 to ISO-8859-1 Message-ID: <65abcac37f9da249f51284cecf2f8eb4@ruby-forum.com> Gents, I have a technorati like website, and on some feeds I index I need to convert the feed content from utf-8 to iso-8859-1. However, on a few feeds, the conversion is failling bad. See and example here: This utf-8 string ?enxergarem? Generates a fail on Iconv when converting from utf-8 to iso-8859-1 Any ideas? -- Posted via http://www.ruby-forum.com/. From david.scheffel at novaris-software.com Mon Feb 26 09:46:54 2007 From: david.scheffel at novaris-software.com (David Scheffel) Date: Mon, 26 Feb 2007 15:46:54 +0100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> <91a4a380110145810e8fb7120d4998e4@ruby-forum.com> Message-ID: <66a99f9e9fb18d0111af7276aec51b50@ruby-forum.com> Yes, indeed. k Thnx!! However I have one thing that is in conflict with my requirements: As I can see it does not work with caching very well. Do you use caching in your web-apps? Regards //David -- Posted via http://www.ruby-forum.com/. From japgolly at gmail.com Tue Feb 27 17:05:52 2007 From: japgolly at gmail.com (David Barri) Date: Wed, 28 Feb 2007 09:05:52 +1100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: <66a99f9e9fb18d0111af7276aec51b50@ruby-forum.com> References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> <91a4a380110145810e8fb7120d4998e4@ruby-forum.com> <66a99f9e9fb18d0111af7276aec51b50@ruby-forum.com> Message-ID: Hi. Yes, I've used it with caching without any problems. You know how you use a url_for style hash to identify the cached filename, just add :lang => current_language to it. Golly On 27/02/07, David Scheffel wrote: > Yes, indeed. k Thnx!! > > However I have one thing that is in conflict with my requirements: As I > can see it does not work with caching very well. > > Do you use caching in your web-apps? > > Regards > //David > > -- > 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 Wed Feb 28 06:42:13 2007 From: david.scheffel at novaris-software.com (David Scheffel) Date: Wed, 28 Feb 2007 12:42:13 +0100 Subject: [Rails I18n] Localisation - Looking for a straight-forward solution In-Reply-To: References: <32720c09d6fa6737fb6147ab35a9fbcb@ruby-forum.com> <91a4a380110145810e8fb7120d4998e4@ruby-forum.com> <66a99f9e9fb18d0111af7276aec51b50@ruby-forum.com> Message-ID: <164b94aa3903610b0c055f3634132902@ruby-forum.com> I have no idea. Actually I'm using the RESTful versions. Therefore the cache is organised like /tmp//:resource/:id/:sub_resource/:id.cache How can the url_for modify the cache-filename? THX David -- Posted via http://www.ruby-forum.com/.