Skip to content

Commit

Permalink
[wip #52, #41, #36] marking more strings for translations
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Jan 4, 2018
1 parent f2d85f5 commit 5fd2e7f
Show file tree
Hide file tree
Showing 18 changed files with 186 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ debian
*.1
config.status
htdoc/attrs.html
htsearch/qtest
hlsearch/qtest
httools/htmerge
include/config.h
installdir/htdigconfig.8
Expand Down
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,15 @@ language: cpp

os:
- linux
- osx
#- osx

compiler:
- clang
- gcc

script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then xcode-select --install; fi
- ./configure --prefix=$PWD/tempbuild --with-ssl --with-zlib --enable-bigfile && make && make install

allow_failures:
- os: osx

# blocklist
#branches:
# except:
# - legacy
# - experimental

# safelist
branches:
only:
- master
Expand Down
2 changes: 1 addition & 1 deletion hldig/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Makefile
.pure
.deps
.libs
htdig
hldig
12 changes: 6 additions & 6 deletions hldig/hldig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,7 @@ main (int ac, char **av)
}
else
{
cerr << "Could not open argument '" << minimalFile << "' of flag -m\n";
// fprintf (stderr, _("Could not open argument '%s' of flag -m\n"), minimalFile.c_str());
fprintf (stderr, _("Could not open argument '%s' of flag -m\n"), &minimalFile[0]);
exit (1);
}
}
Expand Down Expand Up @@ -485,9 +484,10 @@ void
usage ()
{
Usage help;
printf (_("usage: hldig [-v][-i][-c configfile][-t][-m minimalfile]\n\
This program is part of hl://Dig %s\n\n\
Options:\n"), VERSION);
cout << _("usage:");
cout << " hldig [-v][-i][-c configfile][-t][-m minimalfile]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");

help.verbose ();

Expand Down Expand Up @@ -518,8 +518,8 @@ Options:\n"), VERSION);
\tThere *HAS* to be a colon (:) between the username\n\
\tand password.\n\n"));

help.alternate_common();
printf (_("\
-a\tUse alternate work files.\n\
\tTells hldig to append .work to database files, causing\n\
\ta second copy of the database to be built. This allows\n\
\tthe original files to be used by hlsearch during the\n\
Expand Down
2 changes: 1 addition & 1 deletion hlsearch/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Makefile
.pure
.deps
.libs
htsearch
hlsearch
6 changes: 3 additions & 3 deletions hlsearch/hlsearch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,9 @@ void
usage ()
{
Usage help;
printf (_("\
usage: hlsearch [-v][-d][-c configfile] [query_string]\n\
This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("usage:");
cout << " hlsearch [-v][-d][-c configfile] [query_string]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");

help.verbose ();
Expand Down
6 changes: 5 additions & 1 deletion htcommon/messages.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ void Usage::verbose (void) {
}

void Usage::config (void) {

printf (_("\
-c\tconfigfile\n\
\tUse the specified configuration file instead of the\n\
\tdefault.\n\n"));
}

void Usage::alternate_common (void) {
printf (_("\
-a\tUse alternate work files.\n"));
}

Usage::Usage (void) {}

Usage::~Usage (void) {}
1 change: 1 addition & 0 deletions htcommon/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Usage {
public:
void config (void);
void verbose (void);
void alternate_common (void);
Usage ();
~Usage ();
};
Expand Down
19 changes: 8 additions & 11 deletions htfuzzy/htfuzzy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,25 +229,22 @@ main(int ac, char **av)
void
usage()
{
cout << "usage: hlfuzzy [-c configfile][-v] algorithm ...\n";
cout << "This program is part of ht://Dig " << VERSION << "\n\n";
cout << "Supported algorithms:\n";
Usage help;
cout << _("usage:");
cout << " hlfuzzy [-c configfile][-v] algorithm ...\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Supported algorithms:\n");
cout << "\tsoundex\n";
cout << "\tmetaphone\n";
cout << "\taccents\n";
cout << "\tendings\n";
cout << "\tsynonyms\n";
cout << "\n";

cout << "Options:\n";
cout << _("Options:\n");

cout << "\t-c configfile\n";
cout << "\t\tUse the specified configuration file instead of the\n";
cout << "\t\tdefault.\n\n";

cout << "\t-v\tVerbose mode. This increases the verbosity of the\n";
cout << "\t\tprogram. Using more than 2 is probably only useful\n";
cout << "\t\tfor debugging purposes.\n\n";
help.config ();
help.verbose ();

exit(0);
}
Expand Down
8 changes: 4 additions & 4 deletions httools/htdump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ void
usage ()
{
Usage help;
printf (_("\
usage: hldump [-v][-d][-w][-a][-c configfile]\n\
This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("usage:");
cout << "hldump [-v][-d][-w][-a][-c configfile]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");
help.verbose ();
cout << "\t-d\tDo NOT dump the document database.\n\n";
cout << "\t-w\tDo NOT dump the word database.\n\n";
cout << "\t-a\tUse alternate work files.\n";
help.alternate_common ();
cout << "\t\tTells hldump to append .work to the database files \n";
cout << "\t\tallowing it to operate on a second set of databases.\n";
help.config ();
Expand Down
23 changes: 12 additions & 11 deletions httools/htload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,22 @@ main (int ac, char **av)
void
usage ()
{
cout << "usage: hlload [-v][-d][-w][-a][-c configfile]\n";
cout << "This program is part of ht://Dig " << VERSION << "\n\n";
cout << "Options:\n";
cout << "\t-v\tVerbose mode. This increases the verbosity of the\n";
cout << "\t\tprogram. Using more than 2 is probably only useful\n";
cout << "\t\tfor debugging purposes. The default verbose mode\n";
cout << "\t\tgives a progress on what it is doing and where it is.\n\n";
Usage help;
cout << _("usage:");
cout << " hlload [-v][-d][-w][-a][-c configfile]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");

help.verbose ();

cout << "\t-d\tDo NOT load the document database.\n\n";
cout << "\t-w\tDo NOT load the word database.\n\n";
cout << "\t-a\tUse alternate work files.\n";

help.alternate_common ();
cout << "\t\tTells hlload to append .work to the database files \n";
cout << "\t\tallowing it to operate on a second set of databases.\n";
cout << "\t-c configfile\n";
cout << "\t\tUse the specified configuration file instead on the\n";
cout << "\t\tdefault.\n\n";

help.config ();
exit (0);
}

Expand Down
21 changes: 9 additions & 12 deletions httools/htmerge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,23 +383,20 @@ mergeDB ()
void
usage ()
{
cout << "usage: hlmerge [-v][-c configfile][-m merge_configfile]\n";
cout << "This program is part of ht://Dig " << VERSION << "\n\n";
cout << "Options:\n";
cout << "\t-v\tVerbose mode. This increases the verbosity of the\n";
cout << "\t\tprogram. Using more than 2 is probably only useful\n";
cout << "\t\tfor debugging purposes. The default verbose mode\n";
cout << "\t\tgives a progress on what it is doing and where it is.\n\n";
Usage help;
cout << _("usage:");
cout << " hlmerge [-v][-c configfile][-m merge_configfile]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");
help.verbose ();
cout << "\t-m merge_configfile\n";
cout << "\t\tMerge the databases specified into the databases specified\n";
cout << "\t\tby -c or the default.\n\n";
cout << "\t-c configfile\n";
cout << "\t\tUse the specified configuration file instead on the\n";
cout << "\t\tdefault.\n\n";
cout << "\t-a\tUse alternate work files.\n";
help.config ();
help.alternate_common ();
cout << "\t\tTells hlmerge to append .work to database files causing\n";
cout << "\t\ta second copy of the database to be built. This allows\n";
cout << "\t\toriginal files to be used by htsearch during the indexing\n";
cout << "\t\toriginal files to be used by hlsearch during the indexing\n";
cout << "\t\trun.\n\n";
exit (0);
}
Expand Down
22 changes: 12 additions & 10 deletions httools/htnotify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -557,18 +557,20 @@ send_email (List * notifList, String & command,
void
usage ()
{
cout << "usage: hlnotify [-c configfile][-b db_base]\n";
cout << "This program is part of ht://Dig " << VERSION << "\n\n";
cout << "There can be any number or words.\n";
cout << "Options:\n";
cout << "\t-c configfile\n";
cout <<
"\t\tUse the specified configuration file instead of the default.\n\n";
Usage help;
cout << _("usage:");
cout << " hlnotify [-c configfile][-b db_base]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);

// Why is this here?
// cout << "There can be any number or words.\n";
cout << _("Options:\n");

help.verbose ();
help.config ();

cout << "\t-b db_base\n";
cout << "\t\tSet the base path of the document database.\n";
cout << "\t-v\n";
cout << "\t\tIncrease the verbose level. Use two or three times for\n";
cout << "\t\tmore output.\n";
cout << "\t-n\n";
cout << "\t\tDon't send any email, just list what has expired.\n";
exit (0);
Expand Down
22 changes: 11 additions & 11 deletions httools/htpurge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,23 +384,23 @@ purgeWords (Dictionary * discard_list)
void
usage ()
{
cout << "usage: hlpurge [-][-u url][-v][-a][-c configfile]\n";
cout << "This program is part of ht://Dig " << VERSION << "\n\n";
cout << "Options:\n";
Usage help;
cout << _("usage:");
cout << " hlpurge [-][-u url][-v][-a][-c configfile]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");
cout <<
"\t-\tURL input. Read in a list of URLs to remove, one per line.\n\n";
cout << "\t-u\tURL input. Add this url to the list of URLs to remove.\n";
cout << "\t\t(can be specified multiple times)\n\n";
cout << "\t-v\tVerbose mode. This increases the verbosity of the\n";
cout << "\t\tprogram. Using more than 2 is probably only useful\n";
cout << "\t\tfor debugging purposes. The default verbose mode\n";
cout << "\t\tgives a progress on what it is doing and where it is.\n\n";
cout << "\t-a\tUse alternate work files.\n";

help.verbose ();

help.alternate_common ();
cout << "\t\tTells hlpurge to append .work to the database files \n";
cout << "\t\tallowing it to operate on a second set of databases.\n\n";
cout << "\t-c configfile\n";
cout << "\t\tUse the specified configuration file instead on the\n";
cout << "\t\tdefault.\n\n";
help.config ();

exit (0);
}

Expand Down
19 changes: 8 additions & 11 deletions httools/htstat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,16 @@ main (int ac, char **av)
void
usage ()
{
cout << "usage: hlstat [-v][-a][-c configfile][-u]\n";
cout << "This program is part of ht://Dig " << VERSION << "\n\n";
cout << "Options:\n";
cout << "\t-v\tVerbose mode. This increases the verbosity of the\n";
cout << "\t\tprogram. Using more than 2 is probably only useful\n";
cout << "\t\tfor debugging purposes. The default verbose mode\n";
cout << "\t\tgives a progress on what it is doing and where it is.\n\n";
cout << "\t-a\tUse alternate work files.\n";
Usage help;
cout << _("usage:");
cout << " hlstat [-v][-a][-c configfile][-u]\n";
printf (_("This program is part of hl://Dig %s\n\n"), VERSION);
cout << _("Options:\n");
help.verbose ();
help.alternate_common ();
cout << "\t\tTells hlstat to append .work to the database files \n";
cout << "\t\tallowing it to operate on a second set of databases.\n";
cout << "\t-c configfile\n";
cout << "\t\tUse the specified configuration file instead on the\n";
cout << "\t\tdefault.\n\n";
help.config ();
cout << "\t-u\tGive a list of URLs in the document database.\n\n";
exit (0);
}
Expand Down
Loading

0 comments on commit 5fd2e7f

Please sign in to comment.