Hi Danek and Tim,
Yes, the multiple unnamed parameters is issue left and
software codes should be modified to eliminate the issue.
(Though updating software for the fix at this moment will
not likely to get translation syncup within this release.)
Currently we have been doing these:
- Translation group instructs to translators
that reorder of unnamed parameters in Python format
cannot be done at translator side and need software fix.
- After received translations from the group, checking that *not* to have:
* attempt to printf-style explicit reordering 1$, 2$, ...
* reorder of parameters in different types
but those won't fully eliminate possibility of having reorder
between parameters in same type.
Essential solution by eliminating the issue from software
is appropriate.
Regarding how to detect the issue in source codes,
/usr/gnu/bin/xgettext itself can report the issue as like:
----
../client.py:1370: warning: 'msgid' format string with unnamed arguments cannot
be properly localized:
The translator cannot reorder the arguments.
Please consider using a format string with named
arguments,
and a mapping instead of a tuple for the arguments.
----
if the xgettext is called directly rather than through
intltool-update --pot. So either seeking way to have
intltool-update forward the warnings or migrating to
direct use of xgettext may be other options.
Thanks,
Takeshi
On 2012年07月19日 06:35, Tim Foster wrote:
On 07/19/12 06:21 AM, Danek Duvall wrote:
Takeshi Asano wrote:
https://cr.opensolaris.org/action/browse/pkg/asano/7182484/
Looks okay to me. Though I've noticed in some of the changes that we still
have strings with multiple %-expandos where they're not named; things like
"invalid '%s' value: %s"
or
"'%s' must be>= %d"
Is there a simple way to find all of these, so that we can file bugs?
Yep, here goes, based on the ja.po file that's in the gate at present, using
http://pypi.python.org/pypi/polib/ (perhaps there's better libraries out there,
this was just the first I ran into)
>>> import polib
>>> entries = polib.pofile("./ja.po")
>>> for entry in entries:
... msgid = entry.msgid
... count = msgid.count("%s")
... if count > 1:
... print msgid
...
...
...
%s failed: %s
%s failed (linked image exception(s)):
%s
An unexpected error happened during %s: %s
%s failed (inventory exception):
%s
%s: duplicate variant specified: %s
%s (group dependency of '%s')
pkg: %s/%s catalogs successfully updated:
%s%s
%s dependency on an obsolete package (%s);this package must be uninstalled
manually
Path outside alternate root: root=%s, path=%s
'%s' supports the following architectures: %s
Error encountered while retrieving data from '%s':
%s
%s failed to be updated. No changes have been made to %s.
The Boot Environment %s failed to be updated. A snapshot was taken before the
failed attempt and has been restored so no changes have been made
to %s.
%s is expected to be a certificate but could not be parsed. The error
encountered was:
%s
%s %s [already rejected; see above]
Couldn't find '%s' in any of the specified search directories:
%s
%s had this elf error:%s
%s <b>to</b> %s
Could not change the BE name to:
%s
The following name will be used instead:
%s
'%s' and '%s' have the same meaning
A '%s' action cannot be present in an obsolete package: %s
A '%s' action cannot be present in a renamed package: %s
Out dir %s does not exist and could not be created. Error is: %s
File %s line %s: %s
illegal %s option -- %s
Unable to create basedir '%s': %s
Manifests support different variants %s %s
Invalid file %s: manifest not encoded in UTF-8: %s
Unable to read manifest file %s: %s
transform (%s) has regexp error (%s) in matching clause
transform (%s) has 'edit' operation with malformedregexp (%s)
>>>
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss