You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.




Making UNIX package for Localization


                   
newsgroup discussion
      mailing list
Masaki Katakai

[main page]
[how to]

Making Solaris SVR4 package and Linux RPM package for localization
  
When we provide Mozilla L10N package as Solaris SVR4 package or Linux RPM package, we can use regchrome utility at the installation. The regchrome utility will look into installed-chrome.txt and will update all-locales.rdf file automatically.


Creating base Mozilla package
'Base' means Mozilla components and English (en-US) L10N files.  The base package should contains all files that are needed to run Mozillain en-US locale. The base package should contain,
  • chrome/all-locales.rdf  
  • chrome/installed-chrome.txt  
and these files must be defined as *modify-able* by package script because these will need to be updated when L10N package is  installed and uninstalled.


Creating Mozilla L10N package
'L10N' package will contain only L10N files, e.g. ja-JP. User will   add the package if the locale is needed for the system.   For example, ja-JP package should contain L10N files,
  • chrome/ja-JP.jar
  • defaults/profile/ja-JP/...
  • defaults/isp/ja-JP/..
  • defaults/messenger/ja-JP/...
  • searchplugins/*   
and two scripts,
  • script for post installation
  • script for post un-installation
which will run at post installation and un-installation to update
  • chrome/all-locales.rdf
  • chrome/installed-chrome.txt

Script for installation of L10N package
  1. L10N package will install ja-JP.jar as chrome/ja-JP.ja

    After installing of ja-JP.jar, script for installation needs to do the following,

  2. Add the following lines to chrome/installed-chrome.txt

    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/necko/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/editor/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/navigator/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/communicator/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/global/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/messenger/

  3. remove all-locales.rdf file

    Due to

    http://bugzilla.mozilla.org/show_bug.cgi?id=55276

    all-locales.rdf file need to be removed before performing regchrome.

    chrome/all-locales.rdf
  4. run regchrome utility with proper LD_LIBRARY_PATH and MOZILLA_FIVE_HOME

    export MOZILLA_FIVE_HOME=/usr/local/...
    export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:/usr/local/...
    $MOZILLA_FIVE_HOME/regchrome

    This utility will insert ja-JP entries to chrome/all-locales.rdf.


Script for de-installation of L10N package
  1. Remove ja-JP.jar

    After removing of ja-JP.jar, script for un-installation needs todo the following,        

  2. Remove the following lines from chrome/installed-chrome.txt

    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/necko/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/editor/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/navigator/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/communicator/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/global/
    locale,install,url,jar:resource:/chrome/ja-JP.jar!/locale/ja-JP/messenger/

  3. Remove all-locales.rdf file

    Due to

    http://bugzilla.mozilla.org/show_bug.cgi?id=55276,

    all-locales.rdf file need to be removed before performing regchrome.

    chrome/all-locales.rdf
  4. Run regchrome utility with proper LD_LIBRARY_PATH and MOZILLA_FIVE_HOME

    export MOZILLA_FIVE_HOME=/usr/local/...
    export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:/usr/local/...
    $MOZILLA_FIVE_HOME/regchrome

    This utility will remove ja-JP entries from chrome/all-locales.rdf