diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/edit-dictionary | |
parent | Initial commit. (diff) | |
download | firefox-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/edit-dictionary')
-rwxr-xr-x | l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/edit-dictionary | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/edit-dictionary b/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/edit-dictionary new file mode 100755 index 0000000000..ad77e47fd1 --- /dev/null +++ b/l10n-zh-TW/extensions/spellcheck/hunspell/dictionary-sources/edit-dictionary @@ -0,0 +1,31 @@ +#!/bin/sh +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# +# edit-dictionary + +set -e + +if [ -z "$EDITOR" ]; then + echo 'Need to set the $EDITOR environment variable to your favorite editor!' + exit 1 +fi + +# Strip the first line that contains the count +tail -n +2 ../en-US.dic > en-US.stripped + +# Open the patched hunspell editor and let the user edit it +echo "Now the dictionary is going to be opened for you to edit. When you're done, just quit the editor" +echo -n "Press Enter to begin." +read foo +$EDITOR en-US.stripped + +# Add back the line count +wc -l < en-US.stripped | tr -d '[:blank:]' > en-US.dic +LC_ALL=C sort en-US.stripped >> en-US.dic + +# Clean up +rm -f en-US.stripped + |