similar to: distance_of_time_in_words hardcoded strings should be separated for easier localization

Displaying 20 results from an estimated 400 matches similar to: "distance_of_time_in_words hardcoded strings should be separated for easier localization"

2011 May 23
4
Distance of time in days
In rails 3 there is distance_of_time_in_words which works fine, but I would like to tweak its output a bit. The thing is that if the dates are exactly the same it will say "Less Than a Minute" I would like it to show "Today" instead. Is that possible? Tiago Veloso ti.veloso-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- You received this message because you are subscribed to
2006 Mar 29
2
distance_of_time_in_words and Time classes
There is <%= distance_of_time_in_words(Time.now, @a_time) %> before xzy.<BR /> <!-- ^ this gives 2279 days --> This does not work because when @a_time is stored, even though it is a Time field and the class is Time, it includes a date. The Date isn''t even that days date its the year 2000, hence the 2279 days ago. So how do I set the date part of @a_time (a Time
2010 Dec 15
4
distance_of_time_in_words shows {{count}} days instead of showing actual days
I have following code in view <% if @next_topic %> Time to show next topic <%= distance_of_time_in_words(Time.now.utc, @next_topic.time_to_show.utc) %> <hr /> <% end %> Output: Time to show next topic {{count}} days -------------------- time_to_show has following value Mon, 20 Dec 2010 12:38:00 UTC +00:00 @next_topic comes from database. I am using SQLITE. I am using
2009 Aug 29
0
default_error_messages error with attachment_fu
Hi, Just a newbie at Rails. Was looking at uploading images using attachment_fu and RMagick on a Windows Vista machine, but was getting this error. Any possible way of fixing this problem? ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate(''activerecord.errors.messages'') I guess it''s attributed to this line in attachment_fu.rb
2008 May 20
2
DateHelpers .. don' display.. ?
HI I don''t understand what happen .. if I use the script/console : >> include ActionView::Helpers::DateHelper => Object >> include GLoc => Object >> time_ago_in_words(Time.now, include_seconds = false) => "moins d''une minute" I get the correct answer.. but I I write in my view <%= time_ago_in_words(Time.now, include_seconds = false)
2007 Aug 18
0
RSpec and acts_as_attachment
Hey guys, I''m getting a weird error when trying to test something like the following. It''s a model that is using acts_as_attachment but the weird thing is the equivalent Test::Unit case passes. Does anyone have any ideas? Best, Dave # it was a Test::Unit case first def test_should_be_invalid_without_file UserFile.any_instance.expects(:with_image).never
2006 Mar 19
0
Trouble redefining ActiveRecord default error messages
Hello, I''m redefining ActiveRecord::Errors.default_error_messages in order to translate ActiveRecord''s validation messages. I''m putting the redefinition in config/environment.rb. The trouble is that I''ve found that this approach works as long as I''m running in development mode under WEBrick, but not on my ISP under production mode. I guess the
2006 Aug 23
11
i18n friendly, plugable Rails Core
In my work with a simple localization plugin, i''m running into a lot of places in the Rails core, where text and other localization specific information is hardcoded. I''ve included some examples in the bottom of this post. It''s hard for an outsider to know, if the hardcoded values are a result of inconsistency in code, or "by design". I hope that we can have
2006 Aug 13
0
Announcement: Really simple localization plugin
I needed something simpler than Globalize and GLoc to localize my Rails application into Danish. I packed it into this plugin. Feel free to use it. Languages available: Spanish, German, Swedish, Danish, and ("Swedish Chef" for the fun of it) Plugin available at http://visitjesper.homeip.net/plugins/ IMPORTANT: Plugin directory likely to move to more appropriate location anytime The
2005 Jan 17
5
how to override rails errors messages?
hi, how can i override rails errors mesages (that are in english) to display them in an other language? thanks hangon
2008 Feb 03
4
Testing helper/view methods from script/console
Hi, Is it possible to test helper/view methods from script/console. I want to test the output of methods like distance_of_time_in_words. But it won''t let me from the console. What am I missing? TIA Luke -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2006 May 10
3
formatted date down-counter - help!
I''d like to have a count down to a certain date, but display it in words, such as "123 days away" or something. I''m aware of the function "distance_of_time_in_words_to_now()", which will display "about 6 hours" or "12 days" or something like that, but how can I get it to reverse? Pass it a date for future reference, then it will error
2007 Jul 31
11
helper spec not finding rails core helpers
Hi, My helper specs were going ok until I added a call to a rails DateHelper method in one of my helpers http://api.rubyonrails.com/classes/ActionView/Helpers/ DateHelper.html#M000574 The helper runs fine from my view templates, just dies in the spec test. I boiled my question down to a simple (not too useful) example. I''m not sure what I''m missing. #
2006 Jul 14
1
Converting Date string to Time Object
Hi, I have MySQL model with created_on specified as :date. This means that the day the record was created on is stored in the database as a string like "2006-04-28". I want to be able output a something like "5 days ago". From looking in the API I''ve found "strftime" and "*distance_of_time_in_words*". Distance_of_time_in_words only accepts Time
2006 Sep 19
0
Hardcoded /usr/lib dir
tc.c has the following line snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str); the libdir should not be hardcoded but it should be detected at build time. Radek -- Radek Vokál <rvokal@redhat.com> Base OS Engineering Office: +420 543 422 235 Red Hat Inc. http://www.redhat.com
2007 Apr 08
1
winefile/explorer hardcoded ? HKEY_CLASSES_ROOT\Folder\shell\open\command ignored
Winefile seems to be hardcoded when it comes to opening folders. No matter what I do it always pops up. I tried deleting HKEY_CLASSES_ROOT\Folder and nothing changed. What can I do to convince wine to open folders with /usr/bin/nautilus ? I allready made it open ordinary files with gnome-open. -- Who logs in to gdm? Not I, said the duck.
2011 Jul 05
0
hardcoded patch for dovecot v2 - authentication (ldap ) and mail location configuration with domain determined by IP
for hg changeset 12866:537d4b6d9a7a need help for creating/movement array "lip2user" in each code part to loadable settings array from configuration files in config must contain many rows by 3 fields : ip,ldapdn,resolved -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: virtual-domain-auth-by-reverse-ip.patch URL:
2013 Jun 18
1
[bug] PXELINUX: hardcoded options from pxelinux-options ignored
Hardcoded options for PXELINUX (embedded in the pxelinux.0 binary by pxelinux-options) was introduced in 3.83. While working on documentation, I decided to try it on 5.10, verified that 209 (config-file) was set as an after option and saw no change in behavior. I then tested the same as a before with no change. I then tested 3.86, found it working and tested 4.06 and 4.00 and found them broken.
2013 Sep 10
0
[LLVMdev] Fwd: BitcodeWriter.cpp, WriteAttributeGroupTable attribute slot index is hardcoded.. ?
Hi all. In the beginning of this method I see the next: for (unsigned i = 0, e = AttrGrps.size(); i != e; ++i) { AttributeSet AS = AttrGrps[i]; for (unsigned i = 0, e = AS.getNumSlots(); i != e; ++i) { AttributeSet A = AS.getSlotAttributes(i); Record.push_back(VE.getAttributeGroupID(A)); Record.push_back(AS.getSlotIndex(i)); for (AttributeSet::iterator I
2015 Feb 27
0
[LLVMdev] [PATCH] CMake: Use LLVM_VERSION_SUFFIX instead of hardcoded "svn" string
LGTM. -Chris > On Feb 27, 2015, at 3:27 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote: > > Signed-off-by: Sedat Dilek <sedat.dilek at gmail.com> > --- > CMakeLists.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index ed7aeb026f5d..60fe427e456e 100644 > --- a/CMakeLists.txt > +++