Fixes in default lang
This commit is contained in:
parent
9cd3ada7b4
commit
3596838864
6 changed files with 35 additions and 21 deletions
|
|
@ -2,12 +2,15 @@
|
|||
|
||||
from paramecio2.libraries.pages import Pages
|
||||
from paramecio2.libraries.urls import add_get_parameters
|
||||
from paramecio2.libraries.i18n import I18n
|
||||
from paramecio2.libraries.i18n import I18n, PGetText
|
||||
#from flask import request, session
|
||||
from paramecio2.libraries.get_data import get_query_args
|
||||
import sys
|
||||
import re
|
||||
|
||||
pgettext=PGetText(__file__)
|
||||
_=pgettext.gettext
|
||||
|
||||
class SimpleList:
|
||||
"""Class for create item list from a model table
|
||||
"""
|
||||
|
|
@ -107,7 +110,7 @@ class SimpleList:
|
|||
|
||||
#self.yes_options=True
|
||||
|
||||
self.arr_extra_fields=[I18n.lang('common', 'options', 'Options')]
|
||||
self.arr_extra_fields=[_('Options')]
|
||||
|
||||
self.arr_extra_options=[SimpleList.standard_options]
|
||||
|
||||
|
|
@ -216,8 +219,8 @@ class SimpleList:
|
|||
options (list): Return a list of basic options for items row
|
||||
"""
|
||||
options=[]
|
||||
options.append('<a href="'+add_get_parameters(url, op_admin=1, id=id)+'">'+I18n.lang('common', 'edit', 'Edit')+'</a>')
|
||||
options.append('<a href="'+add_get_parameters(url, op_admin=3, id=id)+'">'+I18n.lang('common', 'delete', 'Delete')+'</a>')
|
||||
options.append('<a href="'+add_get_parameters(url, op_admin=1, id=id)+'">'+_('Edit')+'</a>')
|
||||
options.append('<a href="'+add_get_parameters(url, op_admin=3, id=id)+'">'+_('Delete')+'</a>')
|
||||
return options
|
||||
|
||||
def show(self):
|
||||
|
|
@ -286,7 +289,7 @@ class AjaxList(SimpleList):
|
|||
"""Class for make a list from a table based in Ajax
|
||||
"""
|
||||
|
||||
# Fields example: [[I18n.lang('cuchulu', 'hostname', 'Hostname'), True], ['IP', True], [I18n.lang('cuchulu', 'options', 'Options'), False]]
|
||||
# Fields example: [['Hostname', True], ['IP', True], ['Options', False]]
|
||||
|
||||
# arr_order_fields=['server.hostname', 'server.ip']
|
||||
|
||||
|
|
@ -389,7 +392,7 @@ class AjaxList(SimpleList):
|
|||
|
||||
pages=Pages()
|
||||
|
||||
html_pages=I18n.lang('cuchulu', 'pages', 'Pages')+': '+pages.show( begin_page, total_elements, limit, '#' ,initial_num_pages=self.initial_num_pages, variable='begin_page', label='', func_jscript='')
|
||||
html_pages=_('Pages')+': '+pages.show( begin_page, total_elements, limit, '#' ,initial_num_pages=self.initial_num_pages, variable='begin_page', label='', func_jscript='')
|
||||
|
||||
with self.db.query(str_query, params) as cursor:
|
||||
for row in cursor:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue