add translate, fix error

master3.3
Спиридонов Денис 12 years ago
parent 27cd7f0b04
commit f908a9e941

@ -15,6 +15,4 @@
# limitations under the License.
def serv_cl_login (login, password) :
results = ''
results += ('Email: %s Passwd: %s'%(login, password))
return results
return ('Email: %s Passwd: %s'%(login, password))

@ -111,9 +111,6 @@ class ApiWsdl:
name = "args",
label = _("arguments: "),
type = "str",
opt = Option(shortopt="-n",
longopt="--name",
metavalue="NAME"),
help = \
_("Please, enter cl-template arguments"),
element = "input"))

@ -21,7 +21,7 @@ from soaplib.serializers.clazz import Array, ClassSerializer
from soaplib.service import rpc, DefinitionBase
from calculate.api.server.api_types import ReturnedMessage
from calculate.api.server.api_types import ChoiceValue, Table, Option, Field, \
from calculate.api.server.api_types import ChoiceValue, Table, Field, \
GroupField, ViewInfo
from calculate.api.server.baseClass import Basic
@ -231,9 +231,12 @@ class ApiWsdl:
return [returnmess]
@rpc(Integer, Integer, Boolean, _returns = ViewInfo)
def test_view (self, sid, step, expert = None):
def test_view (self, sid, step, expert):
print '%%%%%% test_view, step', step
if step == 0 or not step:
print "expert = ", expert
if step == 7:
step = None
if step == 0 or step == -1:
view = ViewInfo(groups=[])
group = GroupField(name=_("TEST_METHOD"),nextlabel="To step 2",last=False)
@ -244,9 +247,6 @@ class ApiWsdl:
label = _("YOUR NAME: "),
type = "str",
value = '',
opt = Option(shortopt="-n",
longopt="--name",
metavalue="NAME"),
help = \
_("Please, enter your name"),
element = "input"))
@ -256,8 +256,6 @@ class ApiWsdl:
#type = "int",
type = "int",
value = '55',
opt = Option(longopt="--times",
metavalue="TIMES"),
help = \
_("Enter times"),
#uncompatible = 'Tool tip text',
@ -267,8 +265,6 @@ class ApiWsdl:
label = _("select ISO"),
value = '/var/calculate',
type = 'files',
opt = Option(longopt="--times",
metavalue="TIMES"),
help = \
_("Enter times"),
element = "openfile"))
@ -279,16 +275,12 @@ class ApiWsdl:
comments = ['first', 'second'],
value = '/home/guest/1',
type = 'files',
opt = Option(longopt="--times",
metavalue="TIMES"),
help = \
_("Enter times"),
element = "file"))
group.fields.append(Field(
name = "Partition_table",
label = _("Mount Points: "),
opt = Option(longopt="--times",
metavalue="TIMES"),
element = "table",
type = 'writable',
# Table
@ -319,13 +311,17 @@ class ApiWsdl:
name = "Steps",
element = "table",
type = 'steps',
label = 'Brief preview',
help = '<b><i>help</b></i>',
value = 'install',
# Table
listvalue = ['go-previous',' ','system-log-out'],
tablevalue = Table(
head = ['Табличка','Второй шаг','Завершение'],
fields = ['calculate','cl-install-gui','calculate'],
body = [['times','name','isopath','Partition_table','',\
'boolvariable2','boolvariable', 'combovariable', \
'combovariable2'],\
'boolvariable2','boolvariable', 'combovariable', \
'combovariable2'],\
['radiovariable2','radiovariable','comboEdit1', \
'comboEdit2', 'multichoice_add', 'multichoice'], \
['comboLang']]
@ -335,8 +331,6 @@ class ApiWsdl:
name = "expert_open",
label = _("Press for advanced settings..."),
type = "label",
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
"you not human? This is a anti-bot test",
value = 'open',
@ -345,6 +339,7 @@ class ApiWsdl:
name = "boolvariable",
label = "you BOT?",
type = "bool",
value = 'on',
default = True,
help = \
"you not human? This is a anti-bot test",
@ -384,8 +379,6 @@ class ApiWsdl:
name = "expert_close",
label = _("Press for advanced settings..."),
type = "label",
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
"you not human? This is a anti-bot test",
value = 'close',
@ -393,8 +386,6 @@ class ApiWsdl:
#group.fields.append(Field(
#name = "Partition_table2",
#label = _("Mount Points: "),
#opt = Option(longopt="--times",
#metavalue="TIMES"),
#element = "table",
##type = 'writable',
## Table
@ -425,39 +416,36 @@ class ApiWsdl:
#name = "button_view1",
#label = _("Next Step"),
#value = 'test_view',
#opt = Option(longopt="--bot",
#metavalue="BOT"),
#element = "button"))
elif step == 1:
view = ViewInfo(groups=[])
if step == 1 or step == -1:
if not 'view' in locals():
view = ViewInfo(groups=[])
else:
view.groups.append(group)
group = GroupField(name=_("TEST_METHOD"),nextlabel=_("Next"))
group = GroupField(name=_("Other Settings"),nextlabel=_("Next"))
group.fields = []
#group.fields.append(Field(
#name = "radiovariable",
#label = "check city: ",
#choice = ['Moscow','Piter','New York','London'],
#type = "str",
##value = 'London',
#opt = Option(longopt="--bot",
#metavalue="BOT"),
#help = \
#"you not human? This is a anti-bot test",
#element = "radio"))
#group.fields.append(Field(
#name = "radiovariable2",
#label = "check village: ",
#choice = ['aaaaaa','bbbb','ccccc','dddddd'],
#comments = ['a','b','c','d'],
#type = "str",
#value = 'bbbb',
#opt = Option(longopt="--bot",
#metavalue="BOT"),
#help = \
#"you not human? This is a anti-bot test",
#element = "radio"))
group.fields.append(Field(
name = "radiovariable",
label = "check city: ",
choice = ['Moscow','Piter','New York','London'],
type = "str",
#value = 'London',
help = \
"you not human? This is a anti-bot test",
element = "radio"))
group.fields.append(Field(
name = "radiovariable2",
label = "check village: ",
choice = ['aaaaaa','bbbb','ccccc','dddddd'],
comments = ['a','b','c','d'],
type = "str",
value = 'bbbb',
help = \
"you not human? This is a anti-bot test",
element = "radio"))
group.fields.append(Field(
name = "comboEdit1",
label = "check city number: ",
@ -465,8 +453,6 @@ class ApiWsdl:
comments = ['Moscow','Piter','New York','London'],
type = "str",
value = 'N',
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
"you not human? This is a anti-bot test",
element = "combo"))
@ -476,8 +462,6 @@ class ApiWsdl:
choice = ['1000','10000','500000','2000000'],
type = "str",
value = '10000',
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
_("you not human? This is a anti-bot test"),
element = "combo"))
@ -488,82 +472,76 @@ class ApiWsdl:
comments = ['America','Bosniya','Chine','Denmark'],
type = "str",
listvalue = ['bb','cc'],
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
_("you not human? This is a anti-bot test"),
element = "multichoice_add"))
group.fields.append(Field(
name = "multichoice",
label = _("check population: "),
choice = ['1000','10000','500000','2000000','qwe','ert'],
type = "str",
listvalue = ['1000','ert'],
comments = ['Thousand',\
'Ten thousand smoothly and is less than a penny'],
default = False,
help = \
_("you not human? This is a anti-bot test"),
element = "selecttable_add"))
group.fields.append(Field(
name = "Partition_table",
label = _("Mount Points: "),
element = "table",
type = 'writable',
# Table
tablevalue = Table(
head = ['Partition','Mount Point','Filesystem', \
'Perform format','Label','Size'],
body = [['/dev/sda1','swap','swap','off',None,'4G'],\
['/dev/sda2','/','reiserfs','on','CLD','10G'],\
['/dev/sda3','/var/calculate','ext4','off',None,'30G']],
values = [ChoiceValue(
typefield = 'combo',
values = ['/dev/sda1','/dev/sda2','/dev/sda3'],
onChanged = ['nothing',None,'get_body','get_body',\
'get_body','get_body']),
ChoiceValue(
typefield = 'comboEdit',
values = ['/','swap','/var/calculate']),
ChoiceValue(
typefield = 'multichoice_add',
values = ['swap','reiserfs','ext4']),
ChoiceValue(
typefield = 'check',
values = ['on','off'])]
)))
if expert:
group.fields.append(Field(
name = "expert_open",
label = _("Press for advanced settings..."),
type = "label",
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
"you not human? This is a anti-bot test",
value = 'open',
element = "expert"))
group.fields.append(Field(
name = "multichoice",
label = _("check population: "),
choice = ['1000','10000','500000','2000000','qwe','ert'],
type = "str",
listvalue = ['qwe','ert'],
opt = Option(longopt="--bot",
metavalue="BOT"),
comments = ['Thousand',\
'Ten thousand smoothly and is less than a penny'],
default = False,
help = \
_("you not human? This is a anti-bot test"),
element = "selecttable_add"))
group.fields.append(Field(
name = "Partition_table",
label = _("Mount Points: "),
opt = Option(longopt="--times",
metavalue="TIMES"),
element = "table",
type = 'writable',
# Table
tablevalue = Table(
head = ['Partition','Mount Point','Filesystem', \
'Perform format','Label','Size'],
body = [['/dev/sda1','swap','swap','off',None,'4G'],\
['/dev/sda2','/','reiserfs','on','CLD','10G'],\
['/dev/sda3','/var/calculate','ext4','off',None,'30G']],
values = [ChoiceValue(
typefield = 'combo',
values = ['/dev/sda1','/dev/sda2','/dev/sda3'],
onChanged = ['nothing',None,'get_body','get_body','get_body','get_body']),
ChoiceValue(
typefield = 'comboEdit',
values = ['/','swap','/var/calculate']),
ChoiceValue(
typefield = 'multichoice_add',
values = ['swap','reiserfs','ext4']),
ChoiceValue(
typefield = 'check',
values = ['on','off'])]
)))
else:
group.fields.append(Field(
name = "expert_close",
label = _("Press for advanced settings..."),
type = "label",
opt = Option(longopt="--bot",
metavalue="BOT"),
help = \
"you not human? This is a anti-bot test",
value = 'close',
element = "expert"))
elif step == 2:
view = ViewInfo(groups=[])
if step == 2 or step == -1:
if not 'view' in locals():
view = ViewInfo(groups=[])
else:
view.groups.append(group)
group = GroupField(name=_("Gratulations!"),nextlabel=_("Done"),last=True)
group = GroupField(name=_("Gratulations!"),last=True)
group.fields = []
group.fields.append(Field(
@ -584,9 +562,7 @@ class ApiWsdl:
label = "check language: ",
choice = ['Russian','English'],
type = "str",
#value = 'London',
opt = Option(longopt="--bot",
metavalue="BOT"),
value = 'Russian',
help = \
"you not human? This is a anti-bot test",
element = "combo"))
@ -601,5 +577,5 @@ class ApiWsdl:
#@Dec.gui('Api', 'APITEST', \
#'/usr/share/wallpapers/Horos/contents/screenshot.png,system-log-out')
#def apitest ( self, l, t):
#print '==>', l
#print '++>', t
#print '==>', l
#print '++>', t

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: calculate-api\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-04-19 15:21+0300\n"
"PO-Revision-Date: 2012-04-19 15:23+0300\n"
"POT-Creation-Date: 2012-04-24 09:48+0300\n"
"PO-Revision-Date: 2012-04-24 09:50+0300\n"
"Last-Translator: Denis <ds@mail.ru>\n"
"Language-Team: \n"
"Language: \n"
@ -100,7 +100,7 @@ msgstr "выберите группу сертификата"
msgid "Certificate group"
msgstr "Группа сертификата"
#: /var/calculate/mydir/git/calculate-api/api/variables/request.py:295
#: /var/calculate/mydir/git/calculate-api/api/variables/request.py:294
#: /var/calculate/mydir/git/calculate-api/api/variables/edit_groups.py:86
#, python-format
msgid "Group %s does not exist"
@ -854,7 +854,7 @@ msgid "First group"
msgstr "Первая группа"
#: /var/calculate/mydir/git/calculate-api/api/server/test2.py:222
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:435
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:427
msgid "Next"
msgstr "Далее"
@ -863,7 +863,6 @@ msgid "Secound group"
msgstr "Вторая группа"
#: /var/calculate/mydir/git/calculate-api/api/server/test2.py:225
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:566
msgid "Done"
msgstr "Готово"
@ -871,12 +870,11 @@ msgstr "Готово"
msgid "Interrupted by user"
msgstr "Прервано пользователем"
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:239
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:435
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:242
msgid "TEST_METHOD"
msgstr "Тестовый метод"
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:244
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:247
msgid "YOUR NAME: "
msgstr "Ваше имя: "
@ -888,42 +886,46 @@ msgstr "Пожалуйста, введите Ваше имя"
msgid "TIMES: "
msgstr "Время: "
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:262
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:273
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:285
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:260
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:269
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:279
msgid "Enter times"
msgstr "Введите время"
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:267
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:277
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:265
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:273
msgid "select ISO"
msgstr "Выберите ISO образ"
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:289
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:523
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:283
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:492
msgid "Mount Points: "
msgstr "Точки монтирования: "
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:336
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:385
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:499
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:555
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:332
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:380
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:523
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:532
msgid "Press for advanced settings..."
msgstr "Нажмите для дополнительных настроек..."
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:475
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:486
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:509
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:427
msgid "Other Settings"
msgstr "Другие настройки"
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:461
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:470
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:480
msgid "check population: "
msgstr "Количество населения: "
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:482
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:494
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:519
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:466
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:476
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:488
msgid "you not human? This is a anti-bot test"
msgstr "Анти-бот тест"
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:566
#: /var/calculate/mydir/git/calculate-api/api/server/test.py:544
msgid "Gratulations!"
msgstr "Поздравляю!"
@ -1240,6 +1242,10 @@ msgstr "Ошибка чтения файла с идентификаторами
msgid "Unable import %s"
msgstr "Невозможно импортировать %s"
#: /var/calculate/mydir/git/calculate-api/api/server/api_types.py:209
msgid "Previous"
msgstr "Назад"
#: /var/calculate/mydir/git/calculate-api/api/server/request.py:204
msgid "View Requests"
msgstr "Просмотр запросов"
@ -1409,21 +1415,21 @@ msgstr ""
msgid "Error. May be a server cert or secret key not valid!"
msgstr "Ошибка. Может быть сертификат сервера и секретный ключ неверны!"
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:234
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:233
#, python-format
msgid "listening to https://0.0.0.0:%d"
msgstr "сервер прослушивает https://0.0.0.0:%d"
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:235
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:234
#, python-format
msgid "wsdl is at: https://0.0.0.0:%d/?wsdl"
msgstr "wsdl находится на: https://0.0.0.0:%d/?wsdl"
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:261
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:260
msgid "Server start"
msgstr "Сервер запущен"
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:268
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:267
msgid ""
"\n"
"Server stopping"
@ -1431,19 +1437,16 @@ msgstr ""
"\n"
"Сервер остановлен"
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:274
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:273
msgid "Server certificate not found"
msgstr "Сертификат сервера не найден"
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:275
#: /var/calculate/mydir/git/calculate-api/api/server/cl_server.py:274
msgid "use cl-api-server with key --gen-cert-by HOST (--get-cert-from HOST) or --use-root-as-server)"
msgstr "используйте cl-api-server с ключом --gen-cert-by HOST (--get-cert-from HOST) или --use-root-as-server)"
msgid "Press for advanced settings"
msgstr "Нажмите для дополнительных настроек"
msgid "Previous"
msgstr "Назад"
#~ msgid "Press for advanced settings"
#~ msgstr "Нажмите для дополнительных настроек"
#~ msgid "Change Group"
#~ msgstr "Изменить группу"

Loading…
Cancel
Save