Rename the "messages" Output of the i18n_messages command to "texts"

This is to prevent a fatal name clash wih the new common "messages" Output.

Since i18n_messages is an internal plugin, the change does not affect
our public API.
This commit is contained in:
Petr Viktorin
2012-12-13 11:42:06 -05:00
committed by Martin Kosek
parent 24bca144a8
commit 42300eb55b
5 changed files with 7 additions and 7 deletions

View File

@@ -1944,7 +1944,7 @@ output: Output('value', <type 'unicode'>, None)
command: i18n_messages
args: 0,1,1
option: Str('version?', exclude='webui')
output: Output('messages', <type 'dict'>, None)
output: Output('texts', <type 'dict'>, None)
command: idrange_add
args: 1,12,3
arg: Str('cn', attribute=True, cli_name='name', multivalue=False, primary_key=True, required=True)

View File

@@ -89,4 +89,4 @@ IPA_DATA_VERSION=20100614120000
# #
########################################################
IPA_API_VERSION_MAJOR=2
IPA_API_VERSION_MINOR=52
IPA_API_VERSION_MINOR=53

View File

@@ -110,7 +110,7 @@ var IPA = function() {
batch.add_command(IPA.command({
method: 'i18n_messages',
on_success: function(data, text_status, xhr) {
that.messages = data.messages;
that.messages = data.texts;
}
}));

View File

@@ -6,7 +6,7 @@
"results": [
{
"error": null,
"messages": {
"texts": {
"ajax": {
"401": {
"message": "Your session has expired. Please re-login."

View File

@@ -25,7 +25,7 @@ Plugins not accessible directly through the CLI, commands used internally
import json
from ipalib import api, errors
from ipalib import api
from ipalib import Command
from ipalib import Str
from ipalib.output import Output
@@ -680,10 +680,10 @@ class i18n_messages(Command):
},
}
has_output = (
Output('messages', dict, doc=_('Dict of I18N messages')),
Output('texts', dict, doc=_('Dict of I18N messages')),
)
def execute(self, **options):
return dict([("messages",json_serialize(self.messages))])
return dict(texts=json_serialize(self.messages))
def output_for_cli(self, textui, result, *args, **options):
print json.dumps(result, default=json_serialize)