Substitute "for the following role:" with placeholder

vwegert - January 17, 2009 - 21:39
Project:Apply for role
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Text concatenations ending with "...for the following roles:" are ugly to read and translate. For example, "Your application was received for the following role:" should be "Your application for the role %role was received".

#1

Soren Jones - January 17, 2009 - 23:36
Status:active» postponed (maintainer needs more info)

Please explain why it should be "Your application for the role %role was received". Thanks!

#2

vwegert - January 18, 2009 - 12:21

Because in the german translation (and probably others), the name of the role (or the names of the roles for the plural phrase) need to appear in the middle of the sentence.

#3

kiamlaluno - January 18, 2009 - 12:43

+1 for the feature.
The string passed to t() should take in consideration the different position the words could have in a different language; in this cases, a placeholder (for that part of the sentence that must not be translated) makes more sense.

#4

kiamlaluno - January 18, 2009 - 12:44
Status:postponed (maintainer needs more info)» active

#5

kiamlaluno - January 18, 2009 - 12:44
Title:substitute "...for the following role:" with variable substitution» Substitute "for the following role:" with placeholder
Version:6.x-1.8» 6.x-1.x-dev
 
 

Drupal is a registered trademark of Dries Buytaert.