Lines 209-216
Link Here
|
209 |
StringBuffer templateText = new StringBuffer(1024); |
209 |
StringBuffer templateText = new StringBuffer(1024); |
210 |
try { |
210 |
try { |
211 |
BufferedReader templateFile = new BufferedReader(new FileReader( |
211 |
BufferedReader templateFile = new BufferedReader(new FileReader( |
212 |
StaticUtils.installDir() + File.separator |
212 |
OConsts.HELP_DIR + File.separator |
213 |
+ OConsts.HELP_DIR + File.separator |
|
|
214 |
+ OConsts.HELP_LANG_INDEX)); |
213 |
+ OConsts.HELP_LANG_INDEX)); |
215 |
for (String line = templateFile.readLine(); |
214 |
for (String line = templateFile.readLine(); |
216 |
line != null; |
215 |
line != null; |
Lines 228-235
Link Here
|
228 |
// Get available translations and their versions |
227 |
// Get available translations and their versions |
229 |
StringBuffer translations = new StringBuffer(1024); |
228 |
StringBuffer translations = new StringBuffer(1024); |
230 |
translations.append("<table>\n"); |
229 |
translations.append("<table>\n"); |
231 |
File docDir = new File( |
230 |
File docDir = new File(OConsts.HELP_DIR); |
232 |
StaticUtils.installDir() + File.separator + OConsts.HELP_DIR); |
|
|
233 |
File[] subDirs = docDir.listFiles(); |
231 |
File[] subDirs = docDir.listFiles(); |
234 |
Arrays.sort(subDirs); // sort on alphabetical order |
232 |
Arrays.sort(subDirs); // sort on alphabetical order |
235 |
for (int i = 0; i < subDirs.length; i++) { |
233 |
for (int i = 0; i < subDirs.length; i++) { |
Lines 430-437
Link Here
|
430 |
{ |
428 |
{ |
431 |
try { |
429 |
try { |
432 |
return "file:" // NOI18N |
430 |
return "file:" // NOI18N |
433 |
+ (new File( StaticUtils.installDir() |
431 |
+ (new File(OConsts.HELP_DIR + File.separator |
434 |
+ File.separator + OConsts.HELP_DIR + File.separator |
|
|
435 |
+ m_language + File.separator + file)).getCanonicalPath(); |
432 |
+ m_language + File.separator + file)).getCanonicalPath(); |
436 |
} |
433 |
} |
437 |
catch (IOException exception) { |
434 |
catch (IOException exception) { |
Lines 477-484
Link Here
|
477 |
private static String getDocVersion(String locale) { |
474 |
private static String getDocVersion(String locale) { |
478 |
// Check if there's a manual for the specified locale |
475 |
// Check if there's a manual for the specified locale |
479 |
// (Assume yes if the index file is there) |
476 |
// (Assume yes if the index file is there) |
480 |
File index = new File(StaticUtils.installDir() |
477 |
File index = new File(OConsts.HELP_DIR |
481 |
+ File.separator + OConsts.HELP_DIR |
|
|
482 |
+ File.separator + locale |
478 |
+ File.separator + locale |
483 |
+ File.separator + OConsts.HELP_HOME); |
479 |
+ File.separator + OConsts.HELP_HOME); |
484 |
if (!index.exists()) |
480 |
if (!index.exists()) |
Lines 486-493
Link Here
|
486 |
|
482 |
|
487 |
// Check if the doc dir for the specified locale |
483 |
// Check if the doc dir for the specified locale |
488 |
// contains a file containing the doc version |
484 |
// contains a file containing the doc version |
489 |
File v = new File(StaticUtils.installDir() |
485 |
File v = new File(OConsts.HELP_DIR |
490 |
+ File.separator + OConsts.HELP_DIR |
|
|
491 |
+ File.separator + locale |
486 |
+ File.separator + locale |
492 |
+ File.separator + "version.properties"); |
487 |
+ File.separator + "version.properties"); |
493 |
if (!v.exists()) |
488 |
if (!v.exists()) |