Software /
code /
prosody
Changeset
12158:7ff3699c1653
util.prosodyctl.check: Move word to ease future translations
Recent experience with translations in the context of Snikket
highlighted that sentences spread across concatenated strings like this
makes the experience less than pleasant for translators.
We don't have translation yet, but it is a future goal and why not?
The duplication can be solved with a parameterized function for the
common cases.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Jan 2022 17:01:10 +0100 |
parents | 12157:1dd9ee6112e9 |
children | 12159:aa299551f8c6 |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/check.lua Sat Jan 08 22:55:49 2022 +0100 +++ b/util/prosodyctl/check.lua Sat Jan 08 17:01:10 2022 +0100 @@ -113,17 +113,17 @@ "setuid", }); local deprecated_replacements = { - anonymous_login = "use 'authentication = \"anonymous\"'", - daemonize = "use the --daemonize/-D or --foreground/-F command line flags", - disallow_s2s = "add \"s2s\" to 'modules_disabled'", - no_daemonize = "use the --daemonize/-D or --foreground/-F command line flags", - require_encryption = "use 'c2s_require_encryption' and 's2s_require_encryption'", - vcard_compatibility = "use 'mod_compat_vcard' from prosody-modules", - use_libevent = "use 'network_backend = \"event\"'", - whitelist_registration_only = "use 'allowlist_registration_only'", - registration_whitelist = "use 'registration_allowlist'", - registration_blacklist = "use 'registration_blocklist'", - blacklist_on_registration_throttle_overload = "use 'blocklist_on_registration_throttle_overload'", + anonymous_login = "instead, use 'authentication = \"anonymous\"'", + daemonize = "instead, use the --daemonize/-D or --foreground/-F command line flags", + disallow_s2s = "instead, add \"s2s\" to 'modules_disabled'", + no_daemonize = "instead, use the --daemonize/-D or --foreground/-F command line flags", + require_encryption = "instead, use 'c2s_require_encryption' and 's2s_require_encryption'", + vcard_compatibility = "instead, use 'mod_compat_vcard' from prosody-modules", + use_libevent = "instead, use 'network_backend = \"event\"'", + whitelist_registration_only = "instead, use 'allowlist_registration_only'", + registration_whitelist = "instead, use 'registration_allowlist'", + registration_blacklist = "instead, use 'registration_blocklist'", + blacklist_on_registration_throttle_overload = "instead, use 'blocklist_on_registration_throttle_overload'", }; -- FIXME all the singular _port and _interface options are supposed to be deprecated too local deprecated_ports = { bosh = "http", legacy_ssl = "c2s_direct_tls" }; @@ -131,7 +131,7 @@ for port, replacement in pairs(deprecated_ports) do for suffix in port_suffixes do local rsuffix = (suffix == "port" or suffix == "interface") and suffix.."s" or suffix; - deprecated_replacements[port.."_"..suffix] = "use '"..replacement.."_"..rsuffix.."'" + deprecated_replacements[port.."_"..suffix] = "instead, use '"..replacement.."_"..rsuffix.."'" end end local deprecated = set.new(array.collect(it.keys(deprecated_replacements))); @@ -265,7 +265,7 @@ print(""); print(" You have some deprecated options in the global section:"); for option in deprecated_global_options do - print((" '%s' -- instead, %s"):format(option, deprecated_replacements[option])); + print((" '%s' -- %s"):format(option, deprecated_replacements[option])); end ok = false; end