JDK-8247994 : Localize javadoc search
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-06-22
  • Updated: 2021-01-20
  • Resolved: 2020-12-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16 JDK 17
16 b30Fixed 17Fixed
Related Reports
Blocks :  
Description
One example of non-localized strings can be seen in search.js:

var noResult = {l: "No results found"};
var loading = {l: "Loading search index..."};
var catModules = "Modules";
var catPackages = "Packages";
var catTypes = "Types";
var catMembers = "Members";
var catSearchTags = "SearchTags";
var watermark = 'Search';

var UNNAMED = "<Unnamed>";
Comments
Changeset: 30ca0a5d Author: Jonathan Gibbons <jjg@openjdk.org> Date: 2020-12-17 18:34:27 +0000 URL: https://git.openjdk.java.net/jdk16/commit/30ca0a5d
17-12-2020

Basic functionality complete and verified; just need jtreg test
12-12-2020

Needed to complete JDK-8258002 -- specifically, to handle varying the value of var catTypes = "Types";
12-12-2020

In search.js, I notice that `escapeHtml` on line 42 does not handle `&`. Should it? Could `&` in `{@index ...}` tags be a problem?
10-12-2020

General suggestion: perhaps the template file could have tokens it it of the general form ##REPLACE:key## where "key" is the name of the resource string to be substituted
10-12-2020

From offline discussion: Suggestion for discussion/consideration: search.js contains a number of strings that should be localized, For example, selected constants in lines 26-40. Maybe the file could be renamed as a template file in the repo and generated binary, and then localized as part of being copied into the generated docs.
10-12-2020