overlord/ifacestate,po: use i18n on task summary

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This commit is contained in:
Zygmunt Krynicki
2016-03-16 09:24:53 +01:00
parent ba0f5845b3
commit eab125738c
2 changed files with 9 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ package ifacestate
import (
"fmt"
"github.com/ubuntu-core/snappy/i18n"
"github.com/ubuntu-core/snappy/interfaces"
"github.com/ubuntu-core/snappy/interfaces/builtin"
"github.com/ubuntu-core/snappy/overlord/state"
@@ -46,8 +47,9 @@ func Manager() (*InterfaceManager, error) {
// Connect initiates a change connecting an interface.
//
func Connect(change *state.Change, plugSnap, plugName, slotSnap, slotName string) error {
task := change.NewTask("connect", fmt.Sprintf("connect %s:%s to %s:%s",
plugSnap, plugName, slotSnap, slotName))
summary := fmt.Sprintf(i18n.G("Connecting %s:%s to %s:%s"),
plugSnap, plugName, slotSnap, slotName)
task := change.NewTask("connect", summary)
task.Set("slot", interfaces.SlotRef{Snap: slotSnap, Name: slotName})
task.Set("plug", interfaces.PlugRef{Snap: plugSnap, Name: plugName})
return nil

View File

@@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: snappy\n"
"Report-Msgid-Bugs-To: snappy-devel@lists.ubuntu.com\n"
"POT-Creation-Date: 2016-03-14 14:48+0100\n"
"POT-Creation-Date: 2016-03-16 09:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -111,6 +111,10 @@ msgstr ""
msgid "Configures a package. The configuration is a YAML file, provided in the specified file which can be \"-\" for stdin. Output of the command is the current configuration, so running this command with no input file provides a snapshot of the app's current config."
msgstr ""
#, c-format
msgid "Connecting %s:%s to %s:%s"
msgstr ""
msgid "Connects a plug to a slot"
msgstr ""