Closed (fixed)
Project:
Panels
Version:
5.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
14 May 2008 at 18:16 UTC
Updated:
18 Jun 2008 at 13:02 UTC
Jump to comment: Most recent file
Enclosed patch reduces the number of strings that need to be translated in panels_simple_cache_settings_form() from 21 to 8.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | panels_simple_cache_settings_form_translation_6.patch | 1.48 KB | pancho |
| panels_simple_cache_settings_form_translation.patch | 2.19 KB | pancho |
Comments
Comment #1
panchoBumping this. Please review.
Comment #2
sdboyer commentedI feel like I'm being thick, but - how does this reduce t() overhead? Even if it does, though, I think I'd rather keep it the way it is purely from a code readability perspective.
Comment #3
panchoOh certainly it does reduce the overhead! As stated in my original post, translators this way need to translate only 8 strings instead of 21.
Also we're close to the string freeze, and it's not nice to leave translators alone with such repetitive work. I'd therefore simply consider it good codestyle. And code readability doesn't really suffer IMHO, does it? I mean this code is probably the simplest of our whole project...
I changed status, so you can reconsider, but if you still don't agree, I certainly won't insist on getting this committed.
Comment #4
kkaefer commentedThis use of t() is wrong. Please use format_plural for formatting these strings. Your solution does not account for languages with more complex plural formulas, such as Polish.
Comment #5
panchoOh, kkaefer pointed me on IRC to a much, much better solution... I'll rework this and post a new patch!
Comment #6
panchoThis is what kkaefer pointed me to, and it is what core uses in http://api.drupal.org/api/function/system_performance_settings.
Small code, great flexibility for languages with 5, 6 or whatever different plural forms. And the best is: translation comes for free with the core translation!
Tested works. Please promote if you feel comfortable with it.
Comment #7
merlinofchaos commentedComment #8
panchoCommitted a slightly corrected version of this: http://drupal.org/cvs?commit=119500.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.