From MSQL_User@st.hhs.nl Wed Mar 15 15:35:54 2000 Date: Wed, 15 Mar 2000 13:53:43 +0100 (MET) From: "J. op den Brouw" To: htdig3-dev@htdig.org Subject: [htdig3-dev] [PATCH] plural suffix patch for 3.1.5 This is the plural suffix patch for 3.1.5 because in some languages the suffix for plurals is not always "s". It is used in the header pages where you need a plural form of "document". This does not address the problem in some languages that have different extensions for plural and singular like italian. configuration option: plural_suffix default: s For Holland it would be plural_suffix: en diff -urp htdig-3.1.5/htcommon/defaults.cc htdig-3.1.5-plural/htcommon/defaults.cc --- htdig-3.1.5/htcommon/defaults.cc Fri Feb 25 03:29:10 2000 +++ htdig-3.1.5-plural/htcommon/defaults.cc Wed Mar 15 13:16:06 2000 @@ -116,6 +116,7 @@ ConfigDefaults defaults[] = {"page_list_header", "
Pages:
"}, {"page_number_separator", "\" \""}, {"page_number_text", ""}, + {"plural_suffix", "s"}, {"prefix_match_character", "*"}, {"prev_page_text", "[prev]"}, {"remove_bad_urls", "true"}, diff -urp htdig-3.1.5/htsearch/Display.cc htdig-3.1.5-plural/htsearch/Display.cc --- htdig-3.1.5/htsearch/Display.cc Fri Feb 25 03:29:11 2000 +++ htdig-3.1.5-plural/htsearch/Display.cc Wed Mar 15 13:17:44 2000 @@ -402,7 +402,7 @@ Display::setVariables(int pageNumber, Li else if (mystrcasecmp(config["match_method"], "or") == 0) vars.Add("MATCH_MESSAGE", new String("some")); vars.Add("MATCHES", new String(form("%d", nMatches))); - vars.Add("PLURAL_MATCHES", new String(nMatches == 1 ? (char *)"" : (char *)"s")); + vars.Add("PLURAL_MATCHES", new String(nMatches == 1 ? (char *)"" : config["plural_suffix"])); vars.Add("PAGE", new String(form("%d", pageNumber))); vars.Add("PAGES", new String(form("%d", nPages))); vars.Add("FIRSTDISPLAYED", --jesse -------------------------------------------------------------------- J. op den Brouw Johanna Westerdijkplein 75 Haagse Hogeschool 2521 EN DEN HAAG Faculty of Engeneering Netherlands Electrical Engeneering +31 70 4458936 -------------------- J.E.J.opdenBrouw@st.hhs.nl -------------------- Linux - because reboots are for hardware changes ------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to htdig3-dev-unsubscribe@htdig.org You will receive a message to confirm this.