This patch removes nine unnecessary strings from translations, and makes the code more easily maintainable.

CommentFileSizeAuthor
#2 characters_1.patch1.86 KBzeta ζ
characters.patch1.87 KBzeta ζ

Comments

damien tournoud’s picture

Status: Active » Needs work

Great, I like that, except that you have to pass '!num characters' to format_plural(): it is totally possible that some (crazy) language out there has a different form for 200 than for 400.

zeta ζ’s picture

StatusFileSize
new1.86 KB

Yes, you’re right. I have to put ‘characters’ into format_plural(), so there’s no point in putting the output through t() – is there?

I did look at format_plural(), but decided it could only distinguish singular / plural, because it can only take two input strings: So you can’t use it for primary, secondary, tertiary etc. Now that’s crazy! Also you have to use '@count', so it goes through check_plain too: Good job that this bit isn’t in a loop, 1000 times for each module :-D

Also, changed the helper function name :*)

damien tournoud’s picture

Status: Needs work » Needs review

This has a slight performance impact, no doubt about it. But the patch looks good. Back to "needs review" for a someone to take a second look at it.

dries’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Marking RTBC and will commit unless someone identifies a problem.

damien tournoud’s picture

Still applies, and looks good to me.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.