~ubuntu-branches/ubuntu/lucid/dict-ns/lucid

« back to all changes in this revision

Viewing changes to utils/install.js.in

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-02-06 20:11:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070206201142-vix5rf0kn1h06h94
Tags: upstream-20070206
ImportĀ upstreamĀ versionĀ 20070206

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Spell checking dictionary for Mozilla Thunderbird
 
2
// Script written by rockstiff. Dictionary from openoffice.org
 
3
 
 
4
const APP_DISPLAY_NAME  = "{LANGNAME} ({REGIONNAME}) dictionary";
 
5
const APP_NAME                  = "spell-{LANG}-{REGION}";
 
6
const APP_PACKAGE               = "dictionaries.mozdev.org/spell-{LANG}-{REGION}";
 
7
const APP_VERSION               = "{VERSION}";
 
8
 
 
9
var err = initInstall(APP_NAME, APP_PACKAGE, APP_VERSION);
 
10
if (err==SUCCESS) {
 
11
 
 
12
  // Copy files to Components/myspell
 
13
  var myspell_folder = getFolder("Components", "myspell");
 
14
  addFile(APP_NAME, "{LANG}-{REGION}.dic", myspell_folder, "");
 
15
  addFile(APP_NAME, "{LANG}-{REGION}.aff", myspell_folder, "");
 
16
  addFile(APP_NAME, "README-{LANG}-{REGION}.txt", myspell_folder, "");
 
17
 
 
18
  err = performInstall();
 
19
  if(err == SUCCESS || err == 999) {
 
20
    alert(APP_DISPLAY_NAME+" (v "+APP_VERSION+") has been succesfully installed.\n");
 
21
  }
 
22
  else {
 
23
    alert("Installation failed. Error:" + err);
 
24
    cancelInstall(err);
 
25
  }
 
26
 
 
27
}
 
28
else {
 
29
  cancelInstall(err);
 
30
}
 
31