Skip to content

Commit

Permalink
Update helptext in client, server and manual
Browse files Browse the repository at this point in the history
  • Loading branch information
jwrober committed Jun 10, 2023
1 parent d7440ca commit 19ee90d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 53 deletions.
43 changes: 20 additions & 23 deletions client/client_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,48 +343,45 @@ int client_main(int argc, char *argv[])
bool ok = parser.addOptions(
{{{"A", _("Announce")},
// TRANS: Do not translate IPv4, IPv6 and none
_("Announce game in LAN using protocol PROTO (IPv4/IPv6/none)"),
_("Announce game in LAN using protocol PROTO (IPv4/IPv6/none)."),
_("PROTO"),
"IPv4"},
{{"a", "autoconnect"}, _("Skip connect dialog")},
{{"d", _("debug")},
{{"a", "autoconnect"}, _("Skip connect dialog.")},
{{"d", _("debug.")},
// TRANS: Do not translate "fatal", "critical", "warning", "info" or
// "debug". It's exactly what the user must type.
_("Set debug log level (fatal/critical/warning/info/debug)"),
_("Set debug log level (fatal/critical/warning/info/debug)."),
_("LEVEL"),
QStringLiteral("info")},
{{"F", _("Fatal")}, _("Raise a signal on failed assertion")},
{{"f", "file"}, _("Load saved game FILE"), "FILE"},
{{"F", _("Fatal")}, _("Raise a signal on failed assertion.")},
{{"f", "file"}, _("Load saved game FILE."), "FILE"},
#ifdef FREECIV_DEBUG
{{"H", "Hackless"},
_("Do not request hack access to local, but not spawned, server")},
_("Do not request hack access to local, but not spawned, server.")},
#endif // FREECIV_DEBUG
{{"l", "log"},
_("Use FILE as logfile (spawned server also uses this)"),
_("Use FILE as logfile (spawned server also uses this)."),
"FILE"},
{{"M", "Meta"}, _("Connect to the metaserver at HOST"), "HOST"},
{{"n", "name"}, _("Use NAME as username on server"), "NAME"},
{{"M", "Meta"}, _("Connect to the metaserver at HOST."), "HOST"},
{{"n", "name"}, _("Use NAME as username on server."), "NAME"},
{{"p", "port"},
_("Connect to server port PORT (usually with -a)"),
_("Connect to server port PORT (usually with -a)."),
"PORT"},
{{"P", _("Plugin")},
QString::asprintf(_("Use PLUGIN for sound output %s"),
qUtf8Printable(audio_get_all_plugin_names())),
"PLUGIN"},
{{"P", _("Plugin")}, _("Use PLUGIN for sound output."), "PLUGIN"},
{{"r", "read"},
_("Read startup script FILE (for spawned server only)"),
_("Read startup script FILE (for spawned server only)."),
"FILE"},
{{"s", "server"},
_("Connect to the server at HOST (usually with -a)"),
_("Connect to the server at HOST (usually with -a)."),
"HOST"},
{{"S", "Sound"}, _("Read sound tags from FILE"), "FILE"},
{{"m", "music"}, _("Read music tags from FILE"), "FILE"},
{{"t", "tiles"}, _("Use data file FILE.tilespec for tiles"), "FILE"},
{{"w", "warnings"}, _("Warn about deprecated modpack constructs")}});
{{"S", "Sound"}, _("Read sound tags from FILE."), "FILE"},
{{"m", "music"}, _("Read music tags from FILE."), "FILE"},
{{"t", "tiles"}, _("Use data file FILE.tilespec for tiles."), "FILE"},
{{"w", "warnings"}, _("Warn about deprecated modpack constructs.")}});
parser.addPositionalArgument(
_("url"), _("Server information in URL format"), _("[url]"));
_("url"), _("Server information in URL format."), _("[url]"));
if (!ok) {
qFatal("Adding command line arguments failed");
qFatal("Adding command line arguments failed.");
exit(EXIT_FAILURE);
}
parser.process(app);
Expand Down
49 changes: 25 additions & 24 deletions server/civserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,77 +160,78 @@ int main(int argc, char *argv[])
bool ok = parser.addOptions({
{{"A", "Announce"},
// TRANS: Do not translate IPv4, IPv6 and none
_("Announce game in LAN using protocol PROTO (IPv4/IPv6/none)"),
_("Announce game in LAN using protocol PROTO (IPv4/IPv6/none)."),
// TRANS: Command-line argument
_("PROTO"),
"IPv4"},
{{"B", "Bind-meta"},
_("Connect to metaserver from this address"),
_("Connect to metaserver from this address."),
// TRANS: Command-line argument
_("ADDR")},
{{"b", "bind"},
_("Listen for clients on ADDR"),
_("Listen for clients on ADDR."),
// TRANS: Command-line argument
_("ADDR")},
{{"d", _("debug")},
// TRANS: Do not translate "fatal", "critical", "warning", "info" or
// "debug". It's exactly what the user must type.
_("Set debug log level (fatal/critical/warning/info/debug)"),
_("Set debug log level (fatal/critical/warning/info/debug)."),
_("LEVEL"),
QStringLiteral("info")},
{{"e", "exit-on-end"},
_("When a game ends, exit instead of restarting")},
{{"F", "Fatal"}, _("Raise a signal on failed assertion")},
_("When a game ends, exit instead of restarting.")},
{{"F", "Fatal"}, _("Raise a signal on failed assertion.")},
{{"f", "file"},
_("Load saved game"),
_("Load saved game."),
// TRANS: Command-line argument
_("FILE")},
{{"i", "identity"},
_("Be known as ADDR at metaserver or LAN client"),
_("Be known as ADDR at metaserver or LAN client."),
// TRANS: Command-line argument
_("ADDR")},
{{"k", "keep"},
_("Keep updating game information on metaserver even after failure")},
_("Keep updating game information on metaserver even after "
"failure.")},
{{"l", "log"},
_("Use FILE as logfile"),
_("Use FILE as logfile."),
// TRANS: Command-line argument
_("FILE")},
{{"M", "Metaserver"},
_("Set ADDR as metaserver address"),
_("Set ADDR as metaserver address."),
// TRANS: Command-line argument
_("ADDR")},
{{"m", "meta"}, _("Notify metaserver and send server's info")},
{{"m", "meta"}, _("Notify metaserver and send server's info.")},
{{"p", "port"},
_("Listen for clients on port PORT"),
_("Listen for clients on port PORT."),
// TRANS: Command-line argument
_("PORT")},
{{"q", "quitidle"},
_("Quit if no players for TIME seconds"),
_("Quit if no players for TIME seconds."),
// TRANS: Command-line argument
_("TIME")},
{{"R", "Ranklog"},
_("Use FILE as ranking logfile"),
_("Use FILE as ranking logfile."),
// TRANS: Command-line argument
_("FILE")},
{{"r", "read"},
_("Read startup file FILE"),
_("Read startup file FILE."),
// TRANS: Command-line argument
_("FILE")},
{{"S", "Serverid"},
_("Sets the server id to ID"),
_("Sets the server id to ID."),
// TRANS: Command-line argument
_("ID")},
{{"s", "saves"},
_("Save games to directory DIR"),
_("Save games to directory DIR."),
// TRANS: Command-line argument
_("DIR")},
{{"t", "timetrack"},
_("Prints stats about elapsed time on misc tasks")},
{{"w", "warnings"}, _("Warn about deprecated modpack constructs")},
{"ruleset", _("Load ruleset RULESET"),
_("Prints stats about elapsed time on misc tasks.")},
{{"w", "warnings"}, _("Warn about deprecated modpack constructs.")},
{"ruleset", _("Load ruleset RULESET."),
// TRANS: Command-line argument
_("RULESET")},
{"scenarios", _("Save scenarios to directory DIR"),
{"scenarios", _("Save scenarios to directory DIR."),
// TRANS: Command-line argument
_("DIR")},
{{"a", "auth"},
Expand All @@ -242,13 +243,13 @@ int main(int argc, char *argv[])
{{"G", "Guests"}, _("Allow guests to login if auth is enabled.")},
{{"N", "Newusers"}, _("Allow new users to login if auth is enabled.")},
#ifdef AI_MODULES
{"LoadAI", _("Load ai module MODULE. Can appear multiple times"),
{"LoadAI", _("Load ai module MODULE. Can appear multiple times."),
// TRANS: Command-line argument
_("MODULE")},
#endif // AI_MODULES
});
if (!ok) {
qFatal("Adding command line arguments failed");
qFatal("Adding command line arguments failed.");
exit(EXIT_FAILURE);
}

Expand Down
12 changes: 6 additions & 6 deletions tools/civmanual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,22 +677,22 @@ int main(int argc, char **argv)
{{"d", _("debug")},
// TRANS: Do not translate "fatal", "critical", "warning", "info" or
// "debug". It's exactly what the user must type.
_("Set debug log level (fatal/critical/warning/info/debug)"),
_("Set debug log level (fatal/critical/warning/info/debug)."),
_("LEVEL"),
QStringLiteral("info")},
{{"F", "Fatal"}, _("Raise a signal on failed assertion")},
{{"F", "Fatal"}, _("Raise a signal on failed assertion.")},
{{"l", "log"},
_("Use FILE as logfile"),
_("Use FILE as logfile."),
// TRANS: Command-line argument
_("FILE")},
{{"r", "ruleset"},
_("Make manual for RULESET"),
_("Make manual for RULESET."),
// TRANS: Command-line argument
_("RULESET")},
{{"w", "wiki"}, _("Write manual in wiki format")},
{{"w", "wiki"}, _("Write manual in wiki format.")},
});
if (!ok) {
qFatal("Adding command line arguments failed");
qFatal("Adding command line arguments failed.");
}

// Parse
Expand Down

0 comments on commit 19ee90d

Please sign in to comment.