[Bug 1824005] Re: installing / refreshing snap impossible to translate
Brian Murray
brian at ubuntu.com
Fri Jun 14 17:37:53 UTC 2019
** Changed in: ubuntu-release-upgrader (Ubuntu)
Status: Triaged => In Progress
** Changed in: ubuntu-release-upgrader (Ubuntu)
Assignee: (unassigned) => Brian Murray (brian-murray)
** Tags removed: rls-ee-incoming
** Also affects: ubuntu-release-upgrader (Ubuntu Eoan)
Importance: Medium
Assignee: Brian Murray (brian-murray)
Status: In Progress
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1824005
Title:
installing / refreshing snap impossible to translate
Status in Release Upgrader:
New
Status in ubuntu-release-upgrader package in Ubuntu:
In Progress
Status in ubuntu-release-upgrader source package in Eoan:
In Progress
Bug description:
Hi,
In Disco, for ubuntu-release-upgrader package, there is currently an odd string:
%sing snap %s
Manfred Hampl found out:
"that "%s" is a placeholder that is filled with a string parameter, and "ing" is constant text.
Digging into the source https://git.launchpad.net/ubuntu/+source
/ubuntu-release-upgrader/tree/DistUpgrade/DistUpgradeQuirks.py#n459
(not sure whether it is the right version), it seems to be another
example of bad tricks that make translations impossible.
As far as I can see there are two branches, and depending on the status of the snap, it is either installing or refreshing that snap.
The value of "command" is either "install" or "refresh", and the string %sing results either in "installing" or in "refreshing".
With the way that this was done, I do not see any possibility that the
words "install" and "refresh" could be translated to a different
language.
The only reasonable solution that I can suggest is a split into two messages, e.g.
…
if re.search("^installed: ", …
…
command = 'refresh'
self._view.updateStatus(_("refreshing snap %s" % snap))
else:
command = 'install'
self._view.updateStatus(_("installing snap %s" % snap))
try:
self._view.processEvents()
…
This would make the strings easily translatable."
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-upgrader/+bug/1824005/+subscriptions
More information about the foundations-bugs
mailing list