Issue146

Project smart
Title Various i18n fix (mainly variable name) for trunk
Priority bug Status done-review
Superseder Nosy List bogdano, dfarning, fundawang, mvo, netmask, rasker
Assigned To rasker Topics

Created on 2006-05-07.17:42:01 by fundawang, last changed 2008-07-01.10:54:20 by rasker.

Files
File name Uploaded Type Edit Remove
smart.i18n.patch fundawang, 2006-05-07.17:43:29 text/x-patch
Messages
msg1432 (view) Author: rasker Date: 2008-07-01.10:54:20
Retired

Reason for Retirement: Please confirm if this is still a problem in the latest
version of Smart.

Please reopen this issue in the new bugtracker if it is still an issue.
New Bugtracker : http://bugs.launchpad.net/smart
further details:
https://blueprints.launchpad.net/smart/+spec/bug-reporting-migration.
msg949 (view) Author: netmask Date: 2006-11-17.18:50:45
Looks like it will demand a lot of work to implement the format proposed by
fundawang. The correct solution would be (using bogdano's example):

>>> m={"foo":"sape", "bar":"grimpa"}
>>> smart._("Some people call %(foo)s as %(bar)s") % m
u'Some people call sape as grimpa'

So it would need to create a dict mapping for each string that uses more than
one var. It's doable, but would require quite some work on rewriting a lot of
code, and rechecking all the translation files.

Anyone agree with fundawang's suggestion? Does it really brings any advantage
over the current way?
msg945 (view) Author: dfarning Date: 2006-11-17.16:34:17
Fundawang,

Would you be interested in fixing this patch of should we close the issue?  It
has been 6 months since the last activity on the issue.

Dave
msg482 (view) Author: mvo Date: 2006-05-08.16:24:33
*cough* You are right of course

I reverted the last commit and grabbed a brown paperbag to wear it all day.

Thanks,
 Michael
msg481 (view) Author: bogdano Date: 2006-05-08.12:27:10
2006/5/8, Michael Vogt at Labix Tracker <tracker@labix.org>:
>
> Michael Vogt <michael.vogt@ubuntu.com> added the comment:
>
> Thanks for your bugreport and your patch.
>
> I applied it to the svn trunk/ and it will be part of the next release.
>

This patch has been fully tested? Am I missing something about the
behavior of "%(name)s" format?

<smart.control.Control object at 0xb77b4aec>
>>> foo = "sapé"
>>> bar = "grimpa"
>>> smart._("Some people call %(foo)s as %(bar)s") % (foo, bar)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: format requires a mapping
msg479 (view) Author: mvo Date: 2006-05-08.08:03:08
Thanks for your bugreport and your patch. 

I applied it to the svn trunk/ and it will be part of the next release.

Cheers,
 Michael
msg478 (view) Author: fundawang Date: 2006-05-07.17:43:29
Patch against the issue
msg477 (view) Author: fundawang Date: 2006-05-07.17:42:00
There might be some more places for the translators to reorder the parameters. 
So, including variable name should be as more as possible.
History
Date User Action Args
2008-07-01 10:54:22raskersetstatus: chatting -> done-review
nosy: + rasker
messages: + msg1432
assignedto: rasker
2006-11-17 18:50:46netmasksetnosy: + netmask
messages: + msg949
2006-11-17 16:34:21dfarningsetnosy: + dfarning
messages: + msg945
2006-05-08 16:24:35mvosetmessages: + msg482
2006-05-08 12:27:13bogdanosetstatus: resolved -> chatting
nosy: + bogdano
messages: + msg481
2006-05-08 08:03:09mvosetstatus: chatting -> resolved
nosy: + mvo
messages: + msg479
2006-05-07 17:43:30fundawangsetfiles: + smart.i18n.patch
status: unread -> chatting
messages: + msg478
2006-05-07 17:42:02fundawangcreate