Michael Hall has proposed merging
lp:~mhall119/loco-directory/fix-merge_teams-translations into lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
Fix translation strings so that ugettext doesn't fail, and manage.py
update-template doesn't fail
--
https://code.launchpad.net/~mhall119/loco-directory/fix-merge_teams-translations/+merge/39061
Your team loco-directory-dev is requested to review the proposed merge of
lp:~mhall119/loco-directory/fix-merge_teams-translations into lp:loco-directory.
=== modified file 'loco_directory/teams/utils.py'
--- loco_directory/teams/utils.py 2010-10-08 09:10:43 +0000
+++ loco_directory/teams/utils.py 2010-10-21 16:24:48 +0000
@@ -7,57 +7,57 @@
related_events = TeamEvent.objects.filter(teams__id=old_team.id)
for event in related_events:
for team in event.teams.filter(id=old_team.id):
- msgs += [ugettext('New owner of event "%s" is team "%s".' % (event.name, new_team.name))]
+ msgs += [ugettext('New owner of event "%{event}s" is team "%{team}s".' % {event: event.name, team: new_team.name})]
event.teams.remove(team)
event.teams.add(new_team)
event.save()
if old_team.contact_profiles.count() and not new_team.contact_profiles.count():
for contact_profile in old_team.contact_profiles.all():
new_team.contact_profiles.add(contact_profile)
- msgs += [ugettext('Adding contact "%s" to team "%s".' % (contact_profile.realname, new_team.name))]
+ msgs += [ugettext('Adding contact "%{contact}s" to team "%{team}s".' % {contact: contact_profile.realname, team: new_team.name})]
if old_team.countries.count() and not new_team.countries.count():
for country in old_team.countries.all():
new_team.countries.add(country)
- msgs += [ugettext('Adding country "%s" to team "%s".' % (country.name, new_team.name))]
+ msgs += [ugettext('Adding country "%{country}s" to team "%{team}s".' % {country: country.name, team: new_team.name})]
if old_team.languages.count() and not new_team.languages.count():
for language in old_team.languages.all():
new_team.languages.add(language)
- msgs += [ugettext('Adding language "%s" to team "%s".' % (language.name, new_team.name))]
+ msgs += [ugettext('Adding language "%{lang}s" to team "%{team}s".' % {lang: language.name, team: new_team.name})]
if old_team.spr and not new_team.spr:
new_team.spr = old_team.spr
- msgs += [ugettext('Setting State/Province/Region of "%s" to "%s".' % (new_team.name, old_team.spr))]
+ msgs += [ugettext('Setting State/Province/Region of "%{team}s" to "%{state}s".' % {team: new_team.name, state: old_team.spr})]
if old_team.city and not new_team.city:
new_team.city = old_team.city
- msgs += [ugettext('Setting city of "%s" to "%s".' % (new_team.name, old_team.city))]
+ msgs += [ugettext('Setting city of "%{team}s" to "%{city}s".' % {team: new_team.name, city: old_team.city})]
if old_team.wiki_url and not new_team.wiki_url:
new_team.wiki_url = old_team.wiki_url
- msgs += [ugettext('Setting Wiki URL of "%s" to "%s".' % (new_team.name, old_team.wiki_url))]
+ msgs += [ugettext('Setting Wiki URL of "%{team}s" to "%{url}s".' % {team: new_team.name, url: old_team.wiki_url})]
if old_team.web_url and not new_team.web_url:
new_team.web_url = old_team.web_url
- msgs += [ugettext('Setting Web URL of "%s" to "%s".' % (new_team.name, old_team.web_url))]
+ msgs += [ugettext('Setting Web URL of "%{team}s" to "%{url}s".' % {team: new_team.name, url: old_team.web_url})]
if old_team.ml_url and not new_team.ml_url:
new_team.ml_url = old_team.ml_url
- msgs += [ugettext('Setting Mailing list URL of "%s" to "%s".' % (new_team.name, old_team.ml_url))]
+ msgs += [ugettext('Setting Mailing list URL of "%{team}s" to "%{url}s".' % {team: new_team.name, url: old_team.ml_url})]
if old_team.forum_url and not new_team.forum_url:
new_team.forum_url = old_team.forum_url
- msgs += [ugettext('Setting Forum URL of "%s" to "%s".' % (new_team.name, old_team.forum_url))]
+ msgs += [ugettext('Setting Forum URL of "%{team}s" to "%{url}s".' % {team: new_team.name, url: old_team.forum_url})]
if old_team.email and not new_team.email:
new_team.email = old_team.email
- msgs += [ugettext('Setting email address of "%s" to "%s".' % (new_team.name, old_team.email))]
+ msgs += [ugettext('Setting email address of "%{team}s" to "%{email}s".' % {team: new_team.name, email: old_team.email})]
if old_team.irc_chan and not new_team.irc_chan:
new_team.irc_chane = old_team.irc_chan
- msgs += [ugettext('Setting IRC channel of "%s" to "%s".' % (new_team.name, old_team.irc_chan))]
+ msgs += [ugettext('Setting IRC channel of "%{team}s" to "%{irc}s".' % {team: new_team.name, irc: old_team.irc_chan})]
if old_team.flickr_id and not new_team.flickr_id:
new_team.flickr_id = old_team.flickr_id
- msgs += [ugettext('Setting Flickr ID of "%s" to "%s".' % (new_team.name, old_team.flickr_id))]
+ msgs += [ugettext('Setting Flickr ID of "%{team}s" to "%{flickr}s".' % {team: new_team.name, flickr: old_team.flickr_id})]
if old_team.picasa_id and not new_team.picasa_id:
new_team.picasa_id = old_team.picasa_id
- msgs += [ugettext('Setting Picasa ID of "%s" to "%s".' % (new_team.name, old_team.picasa_id))]
+ msgs += [ugettext('Setting Picasa ID of "%{team}s" to "%{picasa}s".' % {team: new_team.name, picasa: old_team.picasa_id})]
if old_team.pixie_id and not new_team.pixie_id:
new_team.pixie_id = old_team.pixie_id
- msgs += [ugettext('Setting Pix.ie ID of "%s" to "%s".' % (new_team.name, old_team.pixie_id))]
+ msgs += [ugettext('Setting Pix.ie ID of "%{team}s" to "%{pixie}s".' % {team: new_team.name, pixie: old_team.pixie_id})]
new_team.save()
old_team.delete()
- msgs += [ugettext('Team "%s" merged with "%s".' % (old_team.name, new_team.name))]
+ msgs += [ugettext('Team "%{old}s" merged with "%{new}s".' % {old: old_team.name, new: new_team.name})]
return msgs
_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help : https://help.launchpad.net/ListHelp