diff --git a/l10n/tools/moz2embed/README b/l10n/tools/moz2embed/README
index 0c3c954f8b13..e5a5c11d98a0 100644
--- a/l10n/tools/moz2embed/README
+++ b/l10n/tools/moz2embed/README
@@ -51,7 +51,10 @@
# c. look at the list of differed files to see they do need localization.
# d. update the template, "jar.mn-ab-CD", to reflect what files can be
# copied from "embed_jar/" into the "embed_jar-de-FG/" and what files
-# to be leveraged from "de-FG_jar/"
+# to be leveraged from "de-FG_jar/". For the latter, update
+# leverage.sh accordingly to leverage files changed since de-FG.jar
+# was generated.
+#
# 6. Run the main script, "make-l10n-jar.sh", to leverage translations from the
# language packs of existing localized Netscape 7.0 client.
#
diff --git a/l10n/tools/moz2embed/lev_xlation.html b/l10n/tools/moz2embed/lev_xlation.html
index 0baa91a13dbe..041e79b896c9 100644
--- a/l10n/tools/moz2embed/lev_xlation.html
+++ b/l10n/tools/moz2embed/lev_xlation.html
@@ -1,5 +1,7 @@
-
-
-
How to create a localized embed.jar from existing translation
-
+
-
+
-
+
How to create a localized embed.jar from
- existing translation
-
-
+ existing translation
+
+
-
-
+
+
History
-
+
+ - 2002-08-02: refer to README for updated procedure.
+
- 2002-06-25: added note of partial automation
-
- - 2002-06-24: 1 st version
-
-
-
-
-Assumption
-
- You have a pair of localized browser's jar files in Japanese, ja-JP.jar
- and ja-win.jar, based off the N7.0 PR1 (2002-05-12) build. You would like
- to create an embed.jar of the same day from it. For T-Bird, you need ja-mac.jar
- instead of ja-win.jar.
-
-What you need
- All the following jar files from the same day (2002-05-12):
-
-
- - en-US.jar and en-win.jar from the English US build
- - embed.jar and installed-chrome.txt from the embedding build off
-2002-05-12's mozilla pull.
-
+
+ - 2002-06-24: 1 st version
+
-
+
+Assumption
+
+ You have a pair of localized browser's jar files in Japanese, ja-JP.jar
+ and ja-win.jar, based off the N7.0 PR1 (2002-05-12) build. You would like
+ to create an embed.jar of the same day from it. For T-Bird, you need ja-mac.jar
+ instead of ja-win.jar.
+
+What you need
+ All the following jar files from the same day (2002-05-12):
+
+
+ - en-US.jar and en-win.jar from the English US build
+ - embed.jar and installed-chrome.txt from the embedding build off
+ 2002-05-12's mozilla pull.
+
+
+
+
Procedure (I use unix cmd; current working directory is workspace/)
- Find out what's the difference between the English embed.jar and browser
- jar files, en-US.jar and en-win.jar. Expand embed.jar into embed_jar folder
- and en-US_jar.
-
- 1. Find out what files are different first. Jar files are zip archives
-
+Option 1: read README for more automated process.
+
+Option 2: less automated approach
+
+Find out what's the difference between the English embed.jar and browser
+ jar files, en-US.jar and en-win.jar. Expand embed.jar into embed_jar folder
+ and en-US_jar.
+
+ 1. Find out what files are different first. Jar files are zip archives
+
- - workspace > unzip embed.jar -d embed_jar
- - workspace > unzip en-US.jar -d workspace > unzip embed.jar -d
+ embed_jar
+ - workspace > unzip en-US.jar -d
+ en-US_jar
+ - workspace > unzip en-win.jar -d en-US_jar
- - workspace > unzip en-win.jar -d en-US_jar
- - workspace > unzip ja-JP.jar -d workspace > unzip ja-JP.jar -d
+ ja-JP_jar
+ - workspace > unzip ja-win.jar -d ja-JP_jar
- - workspace > unzip ja-win.jar -d ja-JP_jar
- - workspace > diff --brief workspace > diff --brief embed_jar/locale en-US_jar/locale
- > locDiff.txt
-
+ > locDiff.txt
+
- You will find some files exist in embed_jar only
- and the others exist in en-US_jar only.
-
- 2. For the files are different, find out if they need translation at
-all
-
- There should be only a few files are different. Let me name those files,
- "en_diff". The rest of exactly the same. Let me call them "en_same".
- For PR1, I found only 5 files in "en_diff"; four of them do
- not need translation. I only needed to manually edit navigator.properties
- to copy/paste localized resources from ja-JP directory. To automate this
- process, you can write a small app or perl script to replace resource values
- in the English version with those from the localized version.
-
- 3. Prepare the files/directory for localized embed.jar
-
- Copy skin and content files first
-
+ You will find some files exist in embed_jar only
+ and the others exist in en-US_jar only.
+
+ 2. For the files are different, find out if they need translation at
+ all
+
+ There should be only a few files are different. Let me name those files,
+ "en_diff". The rest of exactly the same. Let me call them "en_same".
+ For PR1, I found only 5 files in "en_diff"; four of them do
+ not need translation. I only needed to manually edit navigator.properties
+ to copy/paste localized resources from ja-JP directory. To automate this
+ process, you can write a small app or perl script to replace resource
+values in the English version with those from the localized version.
+
+ 3. Prepare the files/directory for localized embed.jar
+
+ Copy skin and content files first
+
- - workspace > mkdir workspace > mkdir embed-ja-JP
- - workspace > cp workspace > cp embed_jar/{skin,content} embed-ja-JP
-
+
- Then
-
+ Then
+
- - copy Japanese version of "en_same" from copy Japanese version of "en_same" from ja-JP_jar into embed-ja-JP
- - copy "en_diff" from embed_jar/locale
- into embed-ja-JP/locale
-
+ - copy "en_diff" from embed_jar/locale
+ into embed-ja-JP/locale
+
- Note that for this last step, you can automate it
-with make-jars.pl (one of Mozilla's build tools) & jar.mn
-
+ Note that for this last step, you can automate
+it with make-jars.pl (one of Mozilla's build tools) & jar.mn
+
- - workspace > make-jars.pl -s workspace > make-jars.pl -s ja-JP_jar < jar.mn
- - workspace > unzip embed.jar -d workspace > unzip embed.jar -d embed-ja-JP
- - workspace > rm embed.jar
-
-
-
- 4. In embed-ja-JP/locale, open "navigator.properties"
- to replace resource values from localized resources in "navigator.properties"
- in the ja-JP_jar directory. To automate
- this process, you can write a small app or perl script.
-
- 5. Repackage them with zip
-
- - workspace > cd embed-ja-JP/
- - workspace > zip embed.jar -r content
- skin locale
+ - workspace > rm embed.jar
+
- 6. Replace all "en-US" strings in installed-chrome.txt with the new language
- code, "ja-JP". You are done!
-
-
+ 4. In embed-ja-JP/locale, open "navigator.properties"
+ to replace resource values from localized resources in "navigator.properties"
+ in the ja-JP_jar directory. To automate
+ this process, you can write a small app or perl script.
+
+ 5. Repackage them with zip
+
+ - workspace > cd embed-ja-JP/
+ - workspace > zip embed.jar -r content
+ skin locale
+
+
+ 6. Replace all "en-US" strings in installed-chrome.txt with the new
+language code, "ja-JP". You are done!
+
+
Questions
- Feel free to contact
- me for questions.
-
+ Feel free to contact me for
+questions.
+
+
+
diff --git a/l10n/tools/moz2embed/leverage.sh b/l10n/tools/moz2embed/leverage.sh
index 7c44f52ab93d..8837ec1118bc 100755
--- a/l10n/tools/moz2embed/leverage.sh
+++ b/l10n/tools/moz2embed/leverage.sh
@@ -1,46 +1,5 @@
#!/usr/bin/sh
#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2002
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Tao Cheng
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-#
-#
-# Author: Tao Cheng
-# Date : July 22, 2002
-#
# use to this script to leverage transation from localized jar, xx-XX_jar, into the US embed_jar/
toLoc=$1
if [ "$toLoc" = "" ]
@@ -49,27 +8,25 @@ then
exit 1
fi
# leverage
-subsKeyVal.pl embed_jar/locale/en-US/communicator/wallet/wallet.properties ${toLoc}_jar/locale/${toLoc}/communicator/wallet/wallet.properties ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/global/ldapAutoCompErrs.properties ${toLoc}_jar/locale/${toLoc}/global/ldapAutoCompErrs.properties ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/global/printing.properties ${toLoc}_jar/locale/${toLoc}/global/printing.properties ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/global/regionNames.properties ${toLoc}_jar/locale/${toLoc}/global/regionNames.properties ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/global/tabbrowser.dtd ${toLoc}_jar/locale/${toLoc}/global/tabbrowser.dtd ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/navigator/navigator.dtd ${toLoc}_jar/locale/${toLoc}/navigator/navigator.dtd ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/navigator/pageInfo.dtd ${toLoc}_jar/locale/${toLoc}/navigator/pageInfo.dtd ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/navigator/navigator.properties ${toLoc}_jar/locale/${toLoc}/navigator/navigator.properties ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/navigator/turboDialog.dtd ${toLoc}_jar/locale/${toLoc}/navigator/turboDialog.dtd ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/pipnss/pipnss.properties ${toLoc}_jar/locale/${toLoc}/pipnss/pipnss.properties ${toLoc}
-subsKeyVal.pl embed_jar/locale/en-US/pippki/PageInfoOverlay.dtd ${toLoc}_jar/locale/${toLoc}/pippki/PageInfoOverlay.dtd ${toLoc}
+files="communicator/pref/pref-scripts.dtd \
+ communicator/pref/pref-smart_browsing.dtd \
+ communicator/pref/preftree.dtd \
+ communicator/wallet/wallet.properties \
+ global/ldapAutoCompErrs.properties \
+ global/printing.properties \
+ global/regionNames.properties \
+ global/tabbrowser.dtd \
+ navigator/navigator.dtd \
+ navigator/navigator.properties \
+ navigator/pageInfo.dtd \
+ navigator/turboDialog.dtd \
+ pipnss/pipnss.properties"
#
-# copying
-cp embed_jar/locale/en-US/communicator/wallet/wallet.properties.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/communicator/wallet/wallet.properties
-cp embed_jar/locale/en-US/global/ldapAutoCompErrs.properties.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/global/ldapAutoCompErrs.properties
-cp embed_jar/locale/en-US/global/printing.properties.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/global/printing.properties
-cp embed_jar/locale/en-US/global/regionNames.properties.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/global/regionNames.properties
-cp embed_jar/locale/en-US/global/tabbrowser.dtd.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/global/tabbrowser.dtd
-cp embed_jar/locale/en-US/navigator/navigator.dtd.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/navigator/navigator.dtd
-cp embed_jar/locale/en-US/navigator/pageInfo.dtd.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/navigator/pageInfo.dtd
-cp embed_jar/locale/en-US/navigator/navigator.properties.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/navigator/navigator.properties
-cp embed_jar/locale/en-US/navigator/turboDialog.dtd.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/navigator/turboDialog.dtd
-cp embed_jar/locale/en-US/pipnss/pipnss.properties.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/pipnss/pipnss.properties
-cp embed_jar/locale/en-US/pippki/PageInfoOverlay.dtd.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/pippki/PageInfoOverlay.dtd
+for file in $files
+do
+ #
+ subsKeyVal.pl embed_jar/locale/en-US/${file} ${toLoc}_jar/locale/${toLoc}/${file} ${toLoc}
+ #
+ # copying
+ cp embed_jar/locale/en-US/${file}.${toLoc} embed_jar-${toLoc}/locale/${toLoc}/${file}
+done
diff --git a/l10n/tools/moz2embed/make-l10n-jar.sh b/l10n/tools/moz2embed/make-l10n-jar.sh
index 183433b56d94..c795187c3fb6 100755
--- a/l10n/tools/moz2embed/make-l10n-jar.sh
+++ b/l10n/tools/moz2embed/make-l10n-jar.sh
@@ -1,54 +1,15 @@
#!/usr/bin/sh
#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2002
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Tao Cheng
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-#
-# Author: Tao Cheng
-# Date : July 22, 2002
+# needed files / dirs
+# embed_jar/{content,skin,locale}
+# ${langcode}_jar/
+# jar.mn-ab-CD
+# installed-chrome.txt-en-US
#
# needed scripts:
-# make-jars.pl, mozLock.pm, leverage.sh,
+# make-jars.pl, leverage.sh, subsKeyVal.pl
# and strsubs.pl if $2, $3 present
-#
-# note: you can get the most recent copies of make-jars.pl and mozLock.pm
-# from mozilla/config
-#
-# needed file: jar.mn-ab-CD
-#
+#
langcode=$1
if [ "$langcode" = "" ]
then
@@ -57,6 +18,11 @@ then
fi
# 1. copy jar.mn-ab-CD
# 2. replace all ab-CD to ${langcode}
+#
+strsubs.pl "ab-CD" ${langcode} jar.mn-ab-CD
+mv jar.mn-ab-CD jar.mn-${langcode}
+mv jar.mn-ab-CD.org jar.mn-ab-CD
+#
# 3. make 1st ver of jar
echo ""
echo "-- calling make-jars.pl ..."
@@ -81,7 +47,7 @@ mv installed-chrome.txt installed-chrome.txt-${langcode}
echo ""
echo "-- calling leverage.sh ${langcode} ..."
echo ""
-leverage.sh ${langcode}
+./leverage.sh ${langcode}
#
# 6. update localeVersion if they are outdated
#