Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

I18n :prompt message for select helpers

#2252

Attached a patch to externalize the default prompt message for select helpers, which is hardcoded in the form_options_helper.rb

I'm not confident about the I18n key naming 'select.prompt', so please give it the right name if you don't like it.

Reported by Akira Matsuda · March 16th, 2009 @ 01:30 PM

State: committed
Milestone: 2.3.4
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: Medium

Activity

  1. Sven Fuchs
    Sven Fuchs
    • Assigned user set to Sven Fuchs

    July 8th, 2009 @ 11:37 PM

  2. Sven Fuchs
    Sven Fuchs
    • State changed from new to open
    • Milestone changed from 2.x to 2.3.4

    Thanks Akira!

    Ok, I've (manually) rebased the patch on 2-3-stable and moved the translation from select.prompt to support.select.prompt

    Should be applied imo, it's kind of a no-brainer :)

    August 26th, 2009 @ 01:02 PM

  3. Sven Fuchs
    Sven Fuchs
    • Assigned user changed from Sven Fuchs to Jeremy Kemper

    assigning this to Jeremy

    August 26th, 2009 @ 01:03 PM

  4. Repository
    Repository
    • State changed from open to committed

    August 26th, 2009 @ 07:28 PM

  5. Repository
  6. Jeremy Kemper
    Jeremy Kemper
    • State changed from committed to open

    Did I miss something?

      1) Failure:
    test_select_with_default_prompt(FormOptionsHelperTest)
        [./test/../lib/action_controller/test_case.rb:114:in `clean_backtrace'
         ./test/template/form_options_helper_test.rb:371:in `test_select_with_default_prompt'
         ./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
         ./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
    <"<select name=\"post[category]\" id=\"post_category\"><option value=\"\">Please select</option>\n<option value=\"abe\">abe</option>\n<option value=\"&lt;mus&gt;\">&lt;mus&gt;</option>\n<option value=\"hest\">hest</option></select>"> expected to be == to
    <"<select name=\"post[category]\" id=\"post_category\"><option value=\"\">Select!</option>\n<option value=\"abe\">abe</option>\n<option value=\"&lt;mus&gt;\">&lt;mus&gt;</option>\n<option value=\"hest\">hest</option></select>">.
    
      2) Failure:
    test_select_with_prompt_and_blank(FormOptionsHelperTest)
        [./test/../lib/action_controller/test_case.rb:114:in `clean_backtrace'
         ./test/template/form_options_helper_test.rb:398:in `test_select_with_prompt_and_blank'
         ./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
         ./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
    <"<select name=\"post[category]\" id=\"post_category\"><option value=\"\">Please select</option>\n<option value=\"\"></option>\n<option value=\"abe\">abe</option>\n<option value=\"&lt;mus&gt;\">&lt;mus&gt;</option>\n<option value=\"hest\">hest</option></select>"> expected to be == to
    <"<select name=\"post[category]\" id=\"post_category\"><option value=\"\">Select!</option>\n<option value=\"\"></option>\n<option value=\"abe\">abe</option>\n<option value=\"&lt;mus&gt;\">&lt;mus&gt;</option>\n<option value=\"hest\">hest</option></select>">.
    

    August 26th, 2009 @ 08:02 PM

  7. Sven Fuchs
    Sven Fuchs

    Man. I swear they passed. I'll look into it.

    August 26th, 2009 @ 08:10 PM

  8. Repository
    Repository

    (from [3cd245b7fa8bf6afea1c41af503a6a1db28450a9]) Revert "I18n: use I18n for select helpers' prompt text"

    Broke CI.

    [#2252 I18n :prompt message for select helpers state:open]

    This reverts commit d725ad39da4436bded05cb647b930e5597c8771c.
    http://github.com/rails/rails/commit/3cd245b7fa8bf6afea1c41af503a6a...

    August 26th, 2009 @ 08:13 PM

  9. Repository
    Repository

    (from [a7ca5595a21fa3bfd0ef51e6a56fbb80a13e040b]) Revert "I18n: use I18n for select helpers' prompt text"

    Broke CI.

    [#2252 I18n :prompt message for select helpers state:open]

    This reverts commit adedf72821a5623227ce91e6b298838e692477e4.
    http://github.com/rails/rails/commit/a7ca5595a21fa3bfd0ef51e6a56fbb...

    August 26th, 2009 @ 08:13 PM

  10. Jeremy Kemper
    Jeremy Kemper

    I swore I ran tests too! But it was against the other patch.

    August 26th, 2009 @ 08:13 PM

  11. Sven Fuchs
    Sven Fuchs

    Ok, new version of this patch.

    I've re-cloned the repo, reapplied the patch and now I got the same errors.

    The test did not correctly clean up after itself so a translation was still sticking.

    August 26th, 2009 @ 08:40 PM

  12. Repository
    Repository
    • State changed from open to committed

    August 26th, 2009 @ 10:05 PM

  13. Repository
  14. Akira Matsuda
    Akira Matsuda

    Sorry for the broken test, and thank you for your rebasing and fixing work, Sven!

    August 27th, 2009 @ 03:16 AM