Browse Source

Update messages

tags/3.5.0_alpha4
parent
commit
c41379f9e7
11 changed files with 29 additions and 23 deletions
  1. +6
    -4
      pym/unix/unix.py
  2. +2
    -1
      pym/unix/utils/cl_unix_groupadd.py
  3. +1
    -1
      pym/unix/utils/cl_unix_groupdel.py
  4. +4
    -3
      pym/unix/utils/cl_unix_groupmod.py
  5. +1
    -1
      pym/unix/utils/cl_unix_passwd.py
  6. +2
    -2
      pym/unix/utils/cl_unix_useradd.py
  7. +1
    -1
      pym/unix/utils/cl_unix_userdel.py
  8. +1
    -1
      pym/unix/utils/cl_unix_usermod.py
  9. +2
    -2
      pym/unix/variables/filters.py
  10. +7
    -5
      pym/unix/variables/users.py
  11. +2
    -2
      pym/unix/wsdl_unix.py

+ 6
- 4
pym/unix/unix.py View File

@@ -144,8 +144,9 @@ class UnixGroups(object):
raise self.exception(_("Group %s not found") % value)
if not ldap_group and unix_group:
raise self.exception(
_("You should create group %s (%d) in Unix service") %
(unix_group.group_name, unix_group.gid))
_("You should create group {groupname} ({groupid}) "
"in Unix service").format(groupname=unix_group.group_name,
groupid=unix_group.gid))

def group_dn(self, group):
return "cn=%s,%s" % (group, self.groups_dn)
@@ -466,7 +467,7 @@ class Unix(Ldap):
users_dn = self.clVars.Get('ld_unix_users_dn')
uu = UnixUsers(ldap_connect, users_dn)
for user in uu.iterate_ldap_user("gidNumber=%d" % old_gid):
self.printSUCCESS(_("Change primary group for user {user}").format(
self.printSUCCESS(_("Changed primary group for user {user}").format(
user=user.username))
uu.update_user_group_id(user.username, str(gid))
return True
@@ -571,7 +572,8 @@ class Unix(Ldap):
if gid is not None and user.gid != gid:
params['gid'] = str(gid)
self.printSUCCESS(
_("Changed primary group for user %s") % user.username)
_("Changed primary group for user {user}").format(
user.username))
if comment is not None and user.comment != comment:
params['comment'] = comment
self.printSUCCESS(


+ 2
- 1
pym/unix/utils/cl_unix_groupadd.py View File

@@ -47,7 +47,8 @@ class ClUnixGroupaddAction(Action):
LdapError)

successMessage = __("Group {ur_unix_group_name} added in Unix service!")
failedMessage = __("Failed to add {ur_unix_group_name} in Unix server!")
failedMessage = __("Failed to add {ur_unix_group_name} group "
"in Unix server!")
interruptMessage = __("Adding of new group manually interrupted")

stop_tasks = [


+ 1
- 1
pym/unix/utils/cl_unix_groupdel.py View File

@@ -46,7 +46,7 @@ class ClUnixGroupdelAction(Action):

successMessage = __("Group {ur_unix_group_name} deleted from Unix service!")
failedMessage = __(
"Failed to delete {ur_unix_group_name} from Unix server!")
"Failed to delete {ur_unix_group_name} group from Unix server!")
interruptMessage = __("Deleting of group manually interrupted")

stop_tasks = [


+ 4
- 3
pym/unix/utils/cl_unix_groupmod.py View File

@@ -45,7 +45,8 @@ class ClUnixGroupmodAction(Action):
LdapError)

successMessage = __("Group {ur_unix_group_name} modified in Unix service!")
failedMessage = __("Failed to modify {ur_unix_group_name} in Unix server!")
failedMessage = __("Failed to modify {ur_unix_group_name} group "
"in Unix server!")
interruptMessage = __("Modifing of group manually interrupted")

stop_tasks = [
@@ -66,7 +67,7 @@ class ClUnixGroupmodAction(Action):
'condition': lambda Get: Get('unix.ur_unix_group_users_add')
},
{'name': 'rename_group',
'message': _("Rename group {unix.ur_unix_group_name} to "
'message': _("Renaming group {unix.ur_unix_group_name} to "
"{unix.ur_unix_group_newname}"),
'method': 'Unix.rename_group(unix.ur_unix_group_name,'
'unix.ur_unix_group_newname)',
@@ -82,7 +83,7 @@ class ClUnixGroupmodAction(Action):
'unix.ur_unix_group_comment_exists')
},
{'name': 'group_change_id',
'message': _("Changes ID for group {unix.ur_unix_group_name} "
'message': _("Changed ID for group {unix.ur_unix_group_name} "
"to {unix.ur_unix_group_id}"),
'method': 'Unix.update_group_id(unix.ur_unix_group_name,'
'unix.ur_unix_group_id,unix.ur_unix_group_id_exists)',


+ 1
- 1
pym/unix/utils/cl_unix_passwd.py View File

@@ -45,7 +45,7 @@ class ClUnixPasswdAction(Action):
LdapError)

successMessage = __("User {ur_unix_login} modified in Unix service!")
failedMessage = __("Failed to modify user {ur_unix_login} in Unix server!")
failedMessage = __("Failed to modify {ur_unix_login} user in Unix server!")
interruptMessage = __("Modifing of user manually interrupted")

stop_tasks = [


+ 2
- 2
pym/unix/utils/cl_unix_useradd.py View File

@@ -47,7 +47,7 @@ class ClUnixUseraddAction(Action):
LdapError)

successMessage = __("User {ur_unix_login} added in Unix service!")
failedMessage = __("Failed to add {ur_unix_login} in Unix server!")
failedMessage = __("Failed to add {ur_unix_login} user in Unix server!")
interruptMessage = __("Adding of new user manually interrupted")

stop_tasks = [
@@ -70,7 +70,7 @@ class ClUnixUseraddAction(Action):
'condition': lambda Get: Get('ur_unix_groups')
},
{'name': 'create_homedir',
'message': _("Create user home directory {unix.ur_unix_home_path}"),
'message': _("Created user home directory {unix.ur_unix_home_path}"),
'method': 'Unix.create_home_directory(unix.ur_unix_home_path,'
'unix.ur_unix_uid,unix.ur_unix_gid,ur_unix_skel)',
'condition': lambda Get: Get('unix.ur_unix_create_home_set') == 'on'


+ 1
- 1
pym/unix/utils/cl_unix_userdel.py View File

@@ -46,7 +46,7 @@ class ClUnixUserdelAction(Action):

successMessage = __("User {ur_unix_login} deleted from Unix service!")
failedMessage = __(
"Failed to delete {ur_unix_login} from Unix server!")
"Failed to delete {ur_unix_login} user from Unix server!")
interruptMessage = __("Deleting of user manually interrupted")

stop_tasks = [


+ 1
- 1
pym/unix/utils/cl_unix_usermod.py View File

@@ -45,7 +45,7 @@ class ClUnixUsermodAction(Action):
LdapError)

successMessage = __("User {ur_unix_login} modified in Unix service!")
failedMessage = __("Failed to modify user {ur_unix_login} in Unix server!")
failedMessage = __("Failed to modify {ur_unix_login} user in Unix server!")
interruptMessage = __("Modifing of user manually interrupted")

stop_tasks = [


+ 2
- 2
pym/unix/variables/filters.py View File

@@ -342,8 +342,8 @@ class VariableClUnixGroupFilterId(FilterIntegerHelper, Variable):
opt = ["--filter-gid"]

def init(self):
self.label = _("Group id filter")
self.help = _("set group id filter")
self.label = _("Group ID filter")
self.help = _("set group ID filter")

def test(self, group):
return self.test_value(group.gid)


+ 7
- 5
pym/unix/variables/users.py View File

@@ -297,12 +297,14 @@ class VariableUrUnixUid(UnixUserHelper, UnixActionHelper, Variable):
def check_new(self, value):
user = self.search_ldap_user_id(value)
if user:
raise VariableError(_("Uid %s is used by user %s")
% (user.uid, user.username))
raise VariableError(
_("Uid {userid} is used by user {username}").format(
userid=user.uid, username=user.username))
user = self.search_system_user_id(value)
if user:
raise VariableError(_("Uid %s is used by system user %s")
% (user.uid, user.username))
raise VariableError(
_("Uid {userid} is used by system user {username}").format(
userid=user.uid, username=user.username))


class VariableUrUnixGroups(UnixGroupHelper, UnixActionHelper, Variable):
@@ -454,7 +456,7 @@ class VariableUrUnixSkel(Variable):

def init(self):
self.label = _("Skeleton directory")
self.help = _("set skeletion directory for new account")
self.help = _("use this alternative skeleton directory")


class VariableUrUnixCreateHomeSet(Variable):


+ 2
- 2
pym/unix/wsdl_unix.py View File

@@ -83,7 +83,7 @@ class Wsdl(WsdlBase):
# описание груп (список лямбда функций)
'groups': [
lambda group: group(
_("Unix Server"),
_("Unix Accounts"),
brief=(
'ldap.ld_base_dn',
'server.sr_ldap_set',
@@ -105,7 +105,7 @@ class Wsdl(WsdlBase):
],
'depends': [Ldap.Method.Setup],
'brief': {'next': __("Perform"),
'name': __("Setup Unix"), }
'name': __("Setup Accounts Server"), }
},
#
# Добавить пользователя


Loading…
Cancel
Save