similar to: [Globalize] Enhancement - zip code regexes for each country

Displaying 20 results from an estimated 140 matches similar to: "[Globalize] Enhancement - zip code regexes for each country"

2006 Mar 01
5
validations without AR - going crazy trying to find link
Hi, in the past few months someone posted an entry on their blog about how to do validations in non-AR classes and I cant find it any more. Anyone have a link? Thanks, Trevor -- Trevor Squires http://somethinglearned.com
2006 Jul 28
1
Nasty pitfall: don''t use ^ and $ in validation regexes!
Let''s say you want to validate that an attribute contains only 2-10 lowercase characters, e.g. with validates_format_of. The appropriate regex is obviously /^[a-z]{2,10}$/, right? Wrong! Try it with "abc\nANYTHING YOU LIKE" - this is perfectly valid. On the second look the reason is clear: ^ matches the start of a line, $ matches the end of a line. So as long as one line in
2009 Feb 25
0
if/else regexes?
All, Are regexes supported in if/else statements? For example: if $foo =~ /^some.*string$/ { notice ("I foo''d") } else { notice ("bar") } If not, are there any plans to do so? (Yes, I know I need to stop asking questions and start submitting patches :-/) Caveat: I haven''t been able to upgrade to 0.24.7 yet. I managed a kludgy workaround with a
2009 Oct 24
1
Bug#552222: logcheck: dhclient regexes need updating
Package: logcheck Version: 1.3.3 Severity: normal Tags: patch User: ubuntu-devel at lists.ubuntu.com Usertags: origin-ubuntu karmic ubuntu-patch As reported in https://launchpad.net/bugs/307847: recent dhclient includes the ip address it is releasing and renewing. ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ dhclient(-2.2.x)?: DHCP(NAK|ACK|OFFER) from [.0-9]{7,15}$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+
2011 Mar 07
0
Bug#617232: logcheck: ignore regexes match ipv4 addresses only, causing false positives with ipv6 addresses.
Package: logcheck Version: 1.3.13 Severity: normal Various files under ignore.d.* use "[0-9.]{7,15}" to match an IPv4 address, e.g., a connection to rsyncd. However, this does not match IPv6 addresses, causing spurious reports. A better regexp might be something like: ([0-9.]{7,15}|[0-9a-f:]{2,39}) -- System Information: Debian Release: 6.0 APT prefers stable APT policy: (990,
2006 Feb 28
1
Wrong id after join!
The Problem ----------- After using a join in my find the id attributes set in my Entity objects are wrong! It is setting the Entity id to the value from Postcode id! The Code -------- entities = Entity.find(:all, :conditions => [...omited...], :joins => "as e inner join postcodes as pc on substring_index(e.postcode,'' '', 1) =
2016 Apr 29
1
How to access the latitude & longitude for UK post codes in R
Hi All, I have a data frame with three columns i.e., pc, lat, lon. The pc column is populated with list of postcodes, and I want to execute R command that can get me the lat and lon for the every item in the pc column and populate the respective lat and lon columns. Is there any package that could be used? Any help will be really appreciated. Many Thanks and Kind Regards -- Muhammad
2006 Nov 04
0
Globalize: how to set a space in thousands_sep
Hi So far Globalize works perfectly for me with rails 1.1.6 However, when I wanted to set a space as the thousand separator, here is what I did : I set " " (double quote, space, double quote) in the thousands_sep field, for the corresponding country, in the file vendor/plugin/globalize/data/country_data.csv , and then "rake globalize:setup" as usual. The result is not what
2006 Nov 04
0
Globalize & caching
Currently only the translated keys are being cached, those that have no translation are not. I believe a form of caching should be done for the keys/strings that do not have (yet) a translation, because right now the application keeps trying to find a translation that is not there. A mundane way would be to cache a predefined value for strings that did not have a translation, and return the
2006 Jul 26
0
Globalize strategy for content ?
Hello, what are your strategy for using Globalize to translate sites with lot of full text ? I mean where do you translate your String ? I saw on the swen''s wiki (http://www.artweb-design.de/articles/2006/06/13/real-fun-get-on-rails-with-globalize-take-2), that you can use the locale:set_translation method: Locale.set_translation(''Welcome'',
2006 Jul 26
0
How to Globalize using variants of templates?
Hi, We have a web application running on Ruby on Rails 1.0, with all RHTML files stored in the standard app/views/controller directories. The static content, messages, etc. in all the templates are in US English. We hope to release the website in other languages. We are considering the use of the Globalize plugin from http://svn.globalize-rails.org/svn/globalize/globalize/trunk/ The layout of the
2006 Jun 05
0
Failed to install Globalize plugin
My envrionment is Rails 1.1.2, Ruby 1.8.4, MySQL 5.0.21 on WinXP. When I run ''rake migrate'' after pulling the lastest 1.1 branch of Globalize plugin, I get the following error message: (in C:/Rails/Application/medicalmind) == GlobalizeMigration: migrating ============================================== -- create_table(:globalize_countries, {:force=>true}) -> 0.2110s
2006 Jun 11
0
url reverse translation with Globalize
I wrote something abou it, any suggestions are welcome http://assente.altervista.org/?q=reverse_url_translation_with_globalize_-_rails -- Posted via http://www.ruby-forum.com/.
2006 May 08
0
Globalize howto
Anybody who can help with a step by step howto in using globalize... I followed this example: http://globalize-rails.org/wiki/pages/example First I''ve created the database for use in my application: CREATE TABLE `products` ( `id` bigint(20) unsigned NOT NULL auto_increment, `name` varchar(12) NOT NULL default '''', `type`
2006 Apr 01
0
Using globalize and Net::HTTP.get
Today we did some cool stuff with globalize (the library) and Net::HTTP.get. I thought it was pretty awesome, but most people I talked to really didn''t think so, so I''ve come here to share my excitement on this list w/ ppl who''d understand :P Anyways, we took globalize and extended it so that websites were translated on the fly by Google Translate / Babelfish type
2006 Apr 13
0
Globalize not with Rails 1.1.2
Does anybody have the latest Globalize (r184) working with Rails 1.1.2? I can''t seem to get a very simple example to work: ----- ruby test/unit/news_item_test.rb Loaded suite test/unit/news_item_test Started F. Finished in 0.10109 seconds. 1) Failure: test_add_content_translations(NewsItemTest) [test/unit/news_item_test.rb:49]: <"US Title"> expected but was
2006 Apr 18
2
Implementing Globalize
Hello all, I was wondering if any of you know some good documentation that points out how to implement the Globalization plugin in your existing application. Also some text on how to use a cms like system with Globalization (how to handle the population of the translated texts per item for example) With kind regards, Gerard de Brieder. Govannon. tel : +31624739047
2006 Mar 13
3
Translate to one language: Globalize is overkill?
Hi, I am developing a Rails application which should be in ONE language (not English). Globalize seems overkill for this purpose (do you agree?). So I''m trying some of the approaches on the wiki. In particular: http://wiki.rubyonrails.org/rails/pages/OverridingRailsMessagesInAnotherLanguage This *does* override the month names, but does *not* override the error messages. I''m
2006 Mar 30
1
Globalize DB translate not working in Rails 1.1.0
It seems there have been some changes to ActiveRecord between Rails 1.1.0 RC and 1.10 Final that cause Globalize to fail; 1.10 RC was working fine. When retrieving records from the DB only the base language version is fetched, even when the locale has been set differently. The SQL in the log confirms that Globalize is ignored and a regular find() is performed.
2006 Feb 05
0
[GLOBALIZE] Trouble getting example on wiki working
Hi, I decided to integrate globalize into my app yesterday but I''ve run into trouble. I originally decided to try a db translation on one of my models so I followed the wiki example and modified where appropriate. When I tried to create an empty Album via the console I get the following error: http://www.rafb.net/paste/results/opZ13I27.html I tried to investigate and from what I