mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Update instructions in README and provide link to a new file,
leve-xlation.html which has more explanation.
This commit is contained in:
parent
56fba4830f
commit
ca7f088186
@ -38,9 +38,27 @@
|
||||
# Author: Tao Cheng <tao@netscape.com>
|
||||
# Date : July 22, 2002
|
||||
#
|
||||
# Run the main script, "make-l10n-jar.sh", to leverage translations from the
|
||||
# Instructions: leverage translations from de-FG into English embed.jar
|
||||
# 1. create a working directory, "workspace". Change directory to it.
|
||||
# 2. expand the English embed.jar into a subdirectory, "embed_jar".
|
||||
# 3. expand the localized jars, says de-FG.jar and de-win.jar into
|
||||
# "de-FG_jar".
|
||||
# 4. expand the en-US.jar and en-win.jar (from which the de-FG.jar and
|
||||
# de-win.jar localized from) into "en-US_jar".
|
||||
# 5. update the jar manifest template, "jar.mn-ab-CD":
|
||||
# a. compare files between "embed_jar/" and "en-US_jar/".
|
||||
# b. ignore the files exist in "en-US_jar/" only.
|
||||
# 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/"
|
||||
# 6. Run the main script, "make-l10n-jar.sh", to leverage translations from the
|
||||
# language packs of existing localized Netscape 7.0 client.
|
||||
#
|
||||
run> make-l10n-jar.sh ${langcode} ver1 ver2
|
||||
# this will produce embed.jar-${langcode} & installed-chrome.txt-${langcode}
|
||||
# run> make-l10n-jar.sh de-FG ver1 ver2
|
||||
# where ver1 is the localeVersion # of the de-FG.jar
|
||||
# ver2 is the localeVersion # of the English embed.jar
|
||||
# This will produce embed.jar-${langcode} & installed-chrome.txt-${langcode}
|
||||
# and leverage ... see comments in make-l10n-jar.sh
|
||||
#
|
||||
# Please refer to lev-xlation.html for details.
|
||||
|
179
l10n/tools/moz2embed/lev_xlation.html
Normal file
179
l10n/tools/moz2embed/lev_xlation.html
Normal file
@ -0,0 +1,179 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- ***** 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 <tao@netscape.com>
|
||||
-
|
||||
- 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 LGPL or the GPL. 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 ***** -->
|
||||
<html>
|
||||
<head>
|
||||
<title>How to create a localized embed.jar from existing translation</title>
|
||||
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
|
||||
<meta name="author" content="Tao Cheng">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div align="center"><big><big><b>How to create a localized embed.jar from
|
||||
existing translation</b></big></big><br>
|
||||
</div>
|
||||
|
||||
<h4><br>
|
||||
</h4>
|
||||
|
||||
<h4>History</h4>
|
||||
|
||||
<ul>
|
||||
<li>2002-06-25: added note of <a href="#make-jars">partial automation</a><br>
|
||||
</li>
|
||||
<li>2002-06-24: 1 st version<br>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h4>Assumption<br>
|
||||
</h4>
|
||||
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.<br>
|
||||
|
||||
<h4>What you need</h4>
|
||||
All the following jar files from the same day (2002-05-12):<br>
|
||||
|
||||
<ul>
|
||||
<li>en-US.jar and en-win.jar from the English US build</li>
|
||||
<li>embed.jar and installed-chrome.txt from the embedding build off
|
||||
2002-05-12's mozilla pull.<br>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h4>Procedure (I use unix cmd; current working directory is <font
|
||||
color="#3333ff">workspace</font>/)</h4>
|
||||
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.<br>
|
||||
<br>
|
||||
1. Find out what files are different first. Jar files are zip archives<br>
|
||||
|
||||
<ul>
|
||||
<li><font color="#3333ff">workspace</font> > unzip embed.jar -d <font
|
||||
color="#3333ff">embed_jar</font></li>
|
||||
<li><font color="#3333ff">workspace </font>> unzip en-US.jar -d <font
|
||||
color="#3333ff">en-US_jar</font></li>
|
||||
<li><font color="#3333ff">workspace</font> > unzip en-win.jar -d <font
|
||||
color="#3333ff">en-US_jar</font></li>
|
||||
<li><font color="#3333ff">workspace</font> > unzip ja-JP.jar -d <font
|
||||
color="#3333ff">ja-JP_jar</font></li>
|
||||
<li><font color="#3333ff">workspace</font> > unzip ja-win.jar -d <font
|
||||
color="#3333ff">ja-JP_jar</font></li>
|
||||
<li><font color="#3333ff">workspace</font> > diff --brief <font
|
||||
color="#3333ff">embed_jar</font>/locale <font color="#3333ff">en-US_jar</font>/locale
|
||||
> locDiff.txt</li>
|
||||
|
||||
</ul>
|
||||
You will find some files exist in <font color="#3333ff">embed_jar </font>only
|
||||
and the others exist in <font color="#3333ff">en-US_jar </font>only.<br>
|
||||
<br>
|
||||
2. For the files are different, find out if they need translation at
|
||||
all<br>
|
||||
<br>
|
||||
There should be only a few files are different. Let me name those files,
|
||||
"<b>en_diff</b>". The rest of exactly the same. Let me call them "<b>en_same</b>".
|
||||
For PR1, I found only 5 files in "<b>en_diff</b>"; 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.<br>
|
||||
<br>
|
||||
3. Prepare the files/directory for localized embed.jar<br>
|
||||
<br>
|
||||
Copy skin and content files first<br>
|
||||
|
||||
<ul>
|
||||
<li><font color="#3333ff">workspace</font> > mkdir <font
|
||||
color="#3333ff">embed-ja-JP</font></li>
|
||||
<li><font color="#3333ff">workspace</font> > cp <font
|
||||
color="#3333ff">embed_jar</font>/{skin,content} <font color="#3333ff">embed-ja-JP</font></li>
|
||||
|
||||
</ul>
|
||||
Then<br>
|
||||
|
||||
<ul>
|
||||
<li>copy Japanese version of "<b>en_same</b>" from <font
|
||||
color="#3333ff">ja-JP_jar</font> into <font color="#3333ff">embed-ja-JP</font></li>
|
||||
<li>copy "<b>en_diff</b>" from <font color="#3333ff">embed_jar</font>/locale
|
||||
into <font color="#3333ff">embed-ja-JP/</font>locale</li>
|
||||
|
||||
</ul>
|
||||
<a name="make-jars"></a>Note that for this last step, you can automate it
|
||||
with make-jars.pl (one of Mozilla's build tools) & <a href="jar.mn">jar.mn</a><br>
|
||||
|
||||
<ul>
|
||||
<li><font color="#3333ff">workspace</font> > make-jars.pl -s <font
|
||||
color="#3333ff">ja-JP_jar</font> < jar.mn</li>
|
||||
<li><font color="#3333ff">workspace</font> > unzip embed.jar -d <font
|
||||
color="#3333ff">embed-ja-JP</font></li>
|
||||
<li><font color="#3333ff">workspace</font> > rm embed.jar<br>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
4. In <font color="#3333ff">embed-ja-JP/</font>locale, open "navigator.properties"
|
||||
to replace resource values from localized resources in "navigator.properties"
|
||||
in the <font color="#3333ff">ja-JP_jar</font> directory. To automate
|
||||
this process, you can write a small app or perl script.<br>
|
||||
<br>
|
||||
5. Repackage them with zip
|
||||
<ul>
|
||||
<li><font color="#3333ff">workspace</font> > cd <font
|
||||
color="#3333ff">embed-ja-JP</font>/</li>
|
||||
<li><font color="#3333ff">workspace</font> > zip embed.jar -r content
|
||||
skin locale</li>
|
||||
|
||||
</ul>
|
||||
6. Replace all "en-US" strings in installed-chrome.txt with the new language
|
||||
code, "ja-JP". You are done!<br>
|
||||
<br>
|
||||
|
||||
<h4>Questions</h4>
|
||||
Feel free to <a href="mailto:tao@netscape.com?subject=Q:%20embed.jar">contact
|
||||
me</a> for questions.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user