Change locale to language for better readability
This commit is contained in:
parent
d3c0f36c1b
commit
78448d4d4f
@ -45,7 +45,6 @@ def opt_args(print_help=None):
|
|||||||
group.add_option("--location", dest="location", action="store", help="Change location where scripts saves the files")
|
group.add_option("--location", dest="location", action="store", help="Change location where scripts saves the files")
|
||||||
group.add_option("--file", dest="file", action="store", help="Use specific file")
|
group.add_option("--file", dest="file", action="store", help="Use specific file")
|
||||||
group.add_option("--backup", dest="backup", action="store_true", help="Backup Webapp settings")
|
group.add_option("--backup", dest="backup", action="store_true", help="Backup Webapp settings")
|
||||||
group.add_option("--change-locale", dest="change_locale", action="store", help="Set new locale (e.g. en_GB or nl_NL)")
|
|
||||||
group.add_option("--restore", dest="restore", action="store_true", help="Restore Webapp settings")
|
group.add_option("--restore", dest="restore", action="store_true", help="Restore Webapp settings")
|
||||||
group.add_option("--reset", dest="reset", action="store_true", help="Reset WebApp settings")
|
group.add_option("--reset", dest="reset", action="store_true", help="Reset WebApp settings")
|
||||||
parser.add_option_group(group)
|
parser.add_option_group(group)
|
||||||
@ -69,6 +68,7 @@ def opt_args(print_help=None):
|
|||||||
|
|
||||||
# WebApp setting option group
|
# WebApp setting option group
|
||||||
group = OptionGroup(parser, "webapp-settings", "")
|
group = OptionGroup(parser, "webapp-settings", "")
|
||||||
|
group.add_option("--language", dest="language", action="store", help="Set new language (e.g. en_GB or nl_NL)")
|
||||||
group.add_option("--theme", dest="theme", action="store", help="Change theme (e.g. dark)")
|
group.add_option("--theme", dest="theme", action="store", help="Change theme (e.g. dark)")
|
||||||
group.add_option("--free-busy", dest="freebusy", action="store", help="Change free/busy time span in months")
|
group.add_option("--free-busy", dest="freebusy", action="store", help="Change free/busy time span in months")
|
||||||
group.add_option("--icons", dest="icons", action="store", help="Change icons (e.g. breeze)")
|
group.add_option("--icons", dest="icons", action="store", help="Change icons (e.g. breeze)")
|
||||||
@ -168,9 +168,9 @@ def restore(user, filename=None):
|
|||||||
Change the language
|
Change the language
|
||||||
|
|
||||||
:param user: The user
|
:param user: The user
|
||||||
:param locale: The language that should be used. Format e.g. "en_GB"
|
:param language: The language that should be used. Format e.g. "en_GB"
|
||||||
"""
|
"""
|
||||||
def change_locale(user, locale):
|
def language(user, language):
|
||||||
settings = read_settings(user)
|
settings = read_settings(user)
|
||||||
if not settings['settings']['zarafa']['v1'].get('main'):
|
if not settings['settings']['zarafa']['v1'].get('main'):
|
||||||
settings['settings']['zarafa']['v1']['main'] = {}
|
settings['settings']['zarafa']['v1']['main'] = {}
|
||||||
@ -409,8 +409,8 @@ def main():
|
|||||||
restore(user, options.file)
|
restore(user, options.file)
|
||||||
|
|
||||||
# Language
|
# Language
|
||||||
if options.change_locale:
|
if options.language:
|
||||||
change_locale(user, options.change_locale)
|
language(user, options.language)
|
||||||
|
|
||||||
# S/MIME import/export
|
# S/MIME import/export
|
||||||
if options.export_smime:
|
if options.export_smime:
|
||||||
|
Loading…
Reference in New Issue
Block a user