MCPcopy Index your code
hub / github.com/cloudfoundry/cli / TranslateText

Method TranslateText

util/ui/ui.go:417–419  ·  view source on GitHub ↗

TranslateText passes the template through an internationalization function to translate it to a pre-configured language, and returns the template with templateValues substituted in. Only the first map in templateValues is used.

(template string, templateValues ...map[string]interface{})

Source from the content-addressed store, hash-verified

415// to translate it to a pre-configured language, and returns the template with
416// templateValues substituted in. Only the first map in templateValues is used.
417func (ui *UI) TranslateText(template string, templateValues ...map[string]interface{}) string {
418 return ui.translate(template, getFirstSet(templateValues))
419}
420
421// UserFriendlyDate converts the time to UTC and then formats it to ISO8601.
422func (ui *UI) UserFriendlyDate(input time.Time) string {

Callers 15

DisplayBoolPromptMethod · 0.95
DisplayPasswordPromptMethod · 0.95
DisplayTextMenuMethod · 0.95
DisplayTextPromptMethod · 0.95
DisplayChangesForPushMethod · 0.95
displayDiffForIntMethod · 0.95
displayDiffForNullIntMethod · 0.95
displayDiffForStringMethod · 0.95

Calls 2

getFirstSetFunction · 0.85
translateMethod · 0.80

Tested by

no test coverage detected