summaryrefslogtreecommitdiffstats
path: root/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict')
-rwxr-xr-xl10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict39
1 files changed, 39 insertions, 0 deletions
diff --git a/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict b/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict
new file mode 100755
index 0000000000..24492cad22
--- /dev/null
+++ b/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/install-new-dict
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+#
+# This script copies the new dictionary created by make-new-dict in
+# place.
+#
+
+set -e
+
+WKDIR="`pwd`"
+export SCOWL="$WKDIR/scowl/"
+SPELLER="$SCOWL/speller"
+
+set -x
+
+if [ -e orig-bk ]; then echo "$0: directory 'orig-bk' exists." 1>&2 ; exit 0; fi
+mv orig orig-bk
+mkdir orig
+cp $SPELLER/en_US-custom.dic $SPELLER/en_US-custom.aff $SPELLER/README_en_US-custom.txt orig
+
+mkdir mozilla-bk
+mv ../en-US.dic ../en-US.aff ../README_en_US.txt mozilla-bk
+
+# Convert the affix file to ISO8859-1
+sed -i=bak -e '/^ICONV/d' -e 's/^SET UTF-8$/SET ISO8859-1/' en_US-mozilla.aff
+
+# Convert the dictionary to ISO8859-1
+mv en_US-mozilla.dic en_US-mozilla-utf8.dic
+iconv -f utf-8 -t iso-8859-1 < en_US-mozilla-utf8.dic > en_US-mozilla.dic
+
+cp en_US-mozilla.aff ../en-US.aff
+cp en_US-mozilla.dic ../en-US.dic
+cp README_en_US-mozilla.txt ../README_en_US.txt
+
+set +x
+
+echo "New dictionary copied into place. Please commit the changes."
+
+